Skip to content

Commit

Permalink
bug 635451 - don't reject glyph index 31 in type-1 fonts. r=jdaggett …
Browse files Browse the repository at this point in the history
…a=joe
  • Loading branch information
jfkthame committed Feb 22, 2011
1 parent f5134f8 commit 64909ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gfx/thebes/gfxGDIFontList.cpp
Expand Up @@ -327,7 +327,8 @@ GDIFontEntry::FillLogFont(LOGFONTW *aLogFont, PRBool aItalic,
aLogFont->lfQuality = (aUseCleartype ? CLEARTYPE_QUALITY : DEFAULT_QUALITY);
}

#define MISSING_GLYPH 0x1F
#define MISSING_GLYPH 0x1F // glyph index returned for missing characters
// on WinXP with .fon fonts, but not Type1 (.pfb)

PRBool
GDIFontEntry::TestCharacterMap(PRUint32 aCh)
Expand Down Expand Up @@ -376,8 +377,8 @@ GDIFontEntry::TestCharacterMap(PRUint32 aCh)
DWORD ret = GetGlyphIndicesW(dc, str, 1,
glyph, GGI_MARK_NONEXISTING_GLYPHS);
if (ret != GDI_ERROR
&& glyph[0] != 0xFFFF
&& glyph[0] != MISSING_GLYPH)
&& glyph[0] != 0xFFFF
&& (IsType1() || glyph[0] != MISSING_GLYPH))
{
hasGlyph = PR_TRUE;
}
Expand Down

0 comments on commit 64909ee

Please sign in to comment.