bugThe FreeType Project - Bugs: bug #44022, [raster] glyphs with single,...

 
 

bug #44022: [raster] glyphs with single, narrow stem don't render

Submitted by:  Chris Liddell <chrisl>
Submitted on:  Fri 16 Jan 2015 10:08:57 AM UTC  
 
Severity: 3 - NormalItem Group: Hack required
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.6.0

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 27 Jan 2015 10:15:00 PM UTC, comment #5:

Reasonable. So you basically accept with some cropping of wider outlines because you keep regular rounding there. Alright.

Alexei Podtelezhnikov <podtelez>
Project Member
Thu 22 Jan 2015 08:30:33 AM UTC, comment #4:

I considered just forcing to 1 as you suggest, but I decided against that because I wanted outlines that were genuinely of zero width or height to still not allocate a raster. I don't consider it a big problem that we can get width/height of 2 in some cases.

Chris Liddell <chrisl>
Wed 21 Jan 2015 08:08:48 PM UTC, comment #3:

Why this is not sufficient?

if ( width == 0 )
width = 1;

The applied patch would sometimes produce width = 2.

Also, what is wrong with the #else case to begin with?

Alexei Podtelezhnikov <podtelez>
Project Member
Mon 19 Jan 2015 09:14:24 AM UTC, comment #2:

Thanks Werner, much appreciated!

Chris

Chris Liddell <chrisl>
Sun 18 Jan 2015 06:32:08 AM UTC, comment #1:

Patch applied, thanks!

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Fri 16 Jan 2015 10:08:57 AM UTC, original submission:

Glyphs that consist of only a single, narrow feature, (for example, a sans serif 'I' glyph) it can end up not being rendered at certain sizes/resolutions because the bounding box ends up with either a zero width or height, and no raster is allocated.

OTOH, a glyph with similar narrow features (for example, a sans serif 'E' where the vertical stem is likely to be a similar width to the 'I' mentioned earlier) will be drawn due to the effective drop-out compensation during scan conversion.

In the interests of performance, and since only poorly designed/hinted glyphs suffer the problem, I don't think it would be sensible to attempt "real" drop-out compensation when calculating the bounding box.

If we provide a slightly more "liberal" fallback case in the event of either the bbox width or height being zero, we'll allow the drop-out compensation to do its work even on these very narrow glyphs - suggested patch attached (0001-raster-add-fallback-for-glyph-with-degenerate-bbox.patch).

With this applied, there are a large number of progressions in the Ghostscript low resolution regression tests, as well as resolving the specific case in question.

(I hate doing this) The font that inspired this is a subset (it reached us embedded in a PDF) of Autodesk RomanS, as the font is copyright, I'd rather not attach it here, but I can make it available for testing if required.

Chris Liddell <chrisl>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by podtelez (Posted a comment)
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by chrisl (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 18 Jan 2015 06:32:08 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.6.0
    Fri 16 Jan 2015 10:08:57 AM UTCchrislAttached File-=>Added 0001-raster-add-fallback-for-glyph-with-degenerate-bbox.patch, #32839

    Back to the top


    Powered by Savane 3.1-cleanup1