Bug 1051083

Summary: Long lines rendered incorrectly (canvas is wrapped around horizontally)
Product: [Fedora] Fedora Reporter: Alois Mahdal <amahdal>
Component: pangoAssignee: Akira TAGOH <tagoh>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 20CC: fonts-bugs, i18n-bugs, tagoh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-13 05:48:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
incorrect rendering (500K, all visible characters affected) none

Description Alois Mahdal 2014-01-09 16:34:56 UTC
Created attachment 847731 [details]
incorrect rendering (500K, all visible characters affected)

Description of problem:

When I open this (quite strange, I admit) file:
*  ASCII plain text
*  only dollar signs (no whitespace whatsoever, reproduces with other chars as well)
*  large number of them (over 320K in my case)

in Mousepad, which uses pango, rendering issues appear.  Specifically, characters appear doubled, with these "ghosts" being few pixels offset.

I have tested this on Fedora 20 with Mousepad and Leafpad, both being simplistic GUI plain text editors and both using Pango.  Hence I'm reporting this to Pango.


Version-Release number of selected component (if applicable):

pango-1.36.1-1.fc20.x86_64
mousepad-0.3.0-3.fc20.x86_64
leafpad-0.8.18.1-10.fc20.x86_64


How reproducible:

always - with specifically prepared (abnormal) file


Steps to Reproduce:

1. Let N be a large number, 500 thousand or so (see below) 
2. Create a plain text file comprised of N identical non-whitespace characters
3. Open the file in Mousepad or Leafpad


Actual results:

Characters are rendered incorrectly, some/all glyphs have a "ghost" with small offset


Expected results:
Characters should be displayed normally.


Additional info:

Exploring the exact border (N) where the problem appears:

*   with 322,639 characters, the text still looks OK
*   with 322,640 characters, first character has this "ghost"
*   with 322,641 characters, first *two* characters have this "ghost"
*   ...etc.

I have also quick-tested this with other characters like "a", and the same problem appears.  I haven't tested with mixed files or with whitespace, though.

Comment 1 Alois Mahdal 2014-01-09 17:34:05 UTC
I have performed additional tests,  I have found this:

*   With the N value multiplied, the same effect appears with additional
    "ghosts":  with 322,640 characters, first two characters have two
    ghosts, and rest has one ghost.
*   Also when font size is halved (Monospace 8 instead of 16), the value of N 
    where problem appears is doubled.
*   Also effect appears with any characters including spaces as long as they
    a re on single line.

So the effect can be described more precisely: with very long lines, the canvas is horizontally wrapped around at some point in pixels.  (It may be the padding  set by the window that creates the aforementioned offset.)

Comment 2 Akira TAGOH 2014-05-13 05:48:30 UTC
Please continue for the discussion on this at the upstream bug as needed. that looks like the sort of the corner case and sounds not what we want to track here carefully.