Open GoogleCodeExporter opened 9 years ago
CMAPs is now permanently on and the fallback font is now defined as an
ATSFontRef, so we at least have the framework.
Original comment by classi...@floodgap.com
on 17 May 2012 at 1:18
We also need to support FFFD fallback:
gfxFontEntry*
gfxPlatformFontList::SystemFindFontForChar(const PRUint32 aCh,
PRInt32 aRunScript,
const gfxFontStyle* aStyle)
{
gfxFontEntry* fontEntry = nsnull;
// is codepoint with no matching font? return null immediately
if (mCodepointsWithNoFonts.test(aCh)) {
return nsnull;
}
// try to short-circuit font fallback for U+FFFD, used to represent
// encoding errors: just use a platform-specific fallback system
// font that is guaranteed (or at least highly likely) to be around,
// or a cached family from last time U+FFFD was seen. this helps
// speed up pages with lots of encoding errors, binary-as-text, etc.
if (aCh == 0xFFFD && mReplacementCharFallbackFamily.Length() > 0) {
bool needsBold; // ignored in the system fallback case
fontEntry = FindFontForFamily(mReplacementCharFallbackFamily,
aStyle, needsBold);
if (fontEntry && fontEntry->TestCharacterMap(aCh))
return fontEntry;
}
in gfxPlatformFontList.cpp. BY default this should be
mReplacementCharFallbackFamily = NS_LITERAL_STRING("Lucida Grande");
Need to verify this works.
Original comment by classi...@floodgap.com
on 5 Jun 2012 at 8:40
This has improved with issue 195, so I'm dropping priority.
Original comment by classi...@floodgap.com
on 12 Jan 2013 at 9:28
Original issue reported on code.google.com by
classi...@floodgap.com
on 30 Apr 2012 at 5:42