Bug 105035

Summary: Fails to load glyphs from bitmap-only font and NO_HINTING
Product: cairo Reporter: Behdad Esfahbod <freedesktop>
Component: freetype font backendAssignee: David Turner <david>
Status: RESOLVED MOVED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: ismail
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Behdad Esfahbod 2018-02-10 18:26:39 UTC
As reported in:

  https://github.com/googlei18n/noto-emoji/issues/36#issuecomment-356954653

Looks like if a font is bitmap-only, and NO_HINTING is requested, we fail to load the glyphs.  Checking the code I see that is indeed the case in the FcPattern codepath:


↦       /* Force embedded bitmaps off if no hinting requested */ 
↦       if (ft_options.base.hint_style == CAIRO_HINT_STYLE_NONE) 
↦         bitmap = FcFalse; 
 
↦       if (!bitmap) 
↦           ft_options.load_flags |= FT_LOAD_NO_BITMAP; 

The fact that it's only done in that codepath is arbitrary to begin with.  Probably need to move somewhere closer to the actual glyph loading, and excepted if the FT_Face has no outlines.
Comment 1 GitLab Migration User 2018-08-25 14:02:35 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/326.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.