Fails to load glyphs from bitmap-only font and NO_HINTING
Submitted by Behdad Esfahbod
Assigned to David Turner
Link to original bug (#105035)
Description
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.