This commit is contained in:
Behdad Esfahbod 2017-08-04 18:30:43 +01:00
parent 60b2cf8e4c
commit a8bbbfb601
1 changed files with 10 additions and 11 deletions

View File

@ -2077,6 +2077,7 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks FC_UNUSED, int *spac
{
FcCharSet *fcs;
int o;
FT_Int load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
FT_Pos advances[3];
unsigned int num_advances = 0;
@ -2084,6 +2085,15 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks FC_UNUSED, int *spac
if (!fcs)
goto bail0;
/* When using scalable fonts, only report those glyphs
* which can be scaled; otherwise those fonts will
* only be available at some sizes, and never when
* transformed. Avoid this by simply reporting bitmap-only
* glyphs as missing
*/
if (face->face_flags & FT_FACE_FLAG_SCALABLE)
load_flags |= FT_LOAD_NO_BITMAP;
#if HAVE_FT_SELECT_SIZE
if (!(face->face_flags & FT_FACE_FLAG_SCALABLE) &&
face->num_fixed_sizes > 0 &&
@ -2122,17 +2132,6 @@ FcFreeTypeCharSetAndSpacing (FT_Face face, FcBlanks *blanks FC_UNUSED, int *spac
{
FcBool good = FcTrue;
FT_Int load_flags = FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH | FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING;
/* When using scalable fonts, only report those glyphs
* which can be scaled; otherwise those fonts will
* only be available at some sizes, and never when
* transformed. Avoid this by simply reporting bitmap-only
* glyphs as missing
*/
if (face->face_flags & FT_FACE_FLAG_SCALABLE)
load_flags |= FT_LOAD_NO_BITMAP;
/* CID fonts built by Adobe used to make ASCII control chars to cid1
* (space glyph). As such, always check contour for those characters. */
if (ucs4 <= 0x001F)