Closed GoogleCodeExporter closed 9 years ago
Alternatively, a more optimal solution is to force system fallback when boxes
appear, but we don't know what this would do if the font were merely
incomplete. So the blacklist seems "safer."
Original comment by classi...@floodgap.com
on 18 Jul 2012 at 5:21
Arial and Helvetica are reported frequently. In gfxMacPlatformFontList.mm we
could add to InitFontList():
while ((availableFamily = [families nextObject])) {
// make a nsString
GetStringForNSString(availableFamily, availableFamilyName);
//XXX something like this:
if ((availableFamilyName.Equals("Arial") && PREF_NO_ARIAL) ||
(availableFamilyName.Equals("Helvetica") && PREF_NO_HELVETICA)) { ; } else {
// create a family entry
gfxFontFamily *familyEntry = new gfxMacFontFamily(availableFamilyName);
if (!familyEntry) break;
// add the family entry to the hash table
ToLowerCase(availableFamilyName);
mFontFamilies.Put(availableFamilyName, familyEntry);
// check the bad underline blacklist
if (mBadUnderlineFamilyNames.Contains(availableFamilyName))
familyEntry->SetBadUnderlineFamily();
} // end
}
Original comment by classi...@floodgap.com
on 19 Sep 2012 at 4:57
Added this code, along with another blockset for Times, which was also
reported. Scheduled for 17.
Original comment by classi...@floodgap.com
on 24 Sep 2012 at 4:58
Prefs:
tenfourfox.gfx.badfont.{arial,helvetica,times}
Original comment by classi...@floodgap.com
on 27 Sep 2012 at 2:10
New theory proposed on the ticket is that these are PostScript Type 1 fonts.
chtrusch demonstrates a good test case.
Since we need ATSUI or CoreText for those, and can use neither, we should just
remove them from the platform list. The easiest way appears to be to use
mRequiresAAT, and while enumerating fonts, warn and discard any where
static_cast<MacOSFontEntry*>(GetFontEntry())->RequiresAATLayout() returns true.
However, we need to change MacOSFontEntry::ReadCMAP() to not set mRequiresAAT
for the M614903 situation because we should make every effort to render *any*
OpenType table if it exists.
Original comment by classi...@floodgap.com
on 29 Sep 2012 at 1:16
That did not work at all. mRequiresAAT is actually set for more fonts than we
realize, and simply returning a nullptr caused the browser to crash.
The actual issue is if the font is Type 1 PS bitmaps only (i.e., no 'glyf' or
'CFF ' tables). In ReadCMAP(), we check the font to see if it has either table.
If it has neither table, it loads a null character map and marks the font as
having no characters at all. When the browser tries to use this bogus font, no
characters are available, causing it then to fall back on another font. This
correctly rejects the bitmap fonts I have on my system.
Original comment by classi...@floodgap.com
on 12 Oct 2012 at 5:16
Shipp'd
Original comment by classi...@floodgap.com
on 20 Nov 2012 at 6:11
Planning a performance improvement on this for 17.0.2 and 19.
Original comment by classi...@floodgap.com
on 17 Dec 2012 at 4:50
Original issue reported on code.google.com by
classi...@floodgap.com
on 18 Jul 2012 at 5:20