Closed Bug 379888 Opened 16 years ago Closed 15 years ago

nsFontEnumeratorPango::EnumerateFonts doesn't filter enough


(Core :: Graphics, defect)

Not set





(Reporter: bzbarsky, Unassigned)


(Keywords: regression)


(1 file)

BUILD: Current trunk Seamonkey and Firefox builds on Linux.

STEPS TO REPRODUCE (Current trunk Firefox):

0)  Create a new profile, or use one where you didn't customize fonts
1)  Start the browser
2)  Edit > Preferences
3)  Select the "content" tab
4)  Click the "Advanced" button in the "Fonts & Colors" section
5)  Look at the "Serif" dropdown in the "Fonts for" groupbox

EXPECTED RESULTS (pre-cairo): Chinese fonts show up below the line if "Fonts for" is set to "Western".

ACTUAL RESULTS: Pretty much everything shows above the line.  In particular, the very first font in the list over here is "AR PL KaitiM Big5", which is below the line in non-cairo builds.

At a guess, nsFontEnumeratorPango::EnumerateFonts() is not doing the right thing here...
Flags: blocking1.9?
Summary: nsFontEnumeratorPango::EnumerateFonts → nsFontEnumeratorPango::EnumerateFonts doesn't filter enough
Flags: blocking1.9? → blocking1.9+
Target Milestone: --- → mozilla1.9beta1
Attached patch patchSplinter Review
I think this gets us back to the state where we were pre-cairo, although it's a little hard for me to test because the font prefs dialog is pretty busted right now for me (once I change language group, none of the dropdowns work).  (I'm guessing it's a popup rewrite regression, but I haven't had a chance to file yet.)  It does restore the above/below line separation for Western, though.

All I did was uncomment the commented-out NS_AddLangGroup call, move the NS_AddLangGroup function and the functions it depends on from the old code to the new code (with only a single change -- changing NUM_GTK_LANG_GROUPS to NS_ARRAY_LENGTH(MozGtkLangGroups)), and delete the old file since it looks like it's only set up to be compiled when building with the old gfx code.

There's still more that could be done, like filtering serif/sans-serif fonts like we do on Windows, but this should get us to parity with the old code.
Attachment #272557 - Flags: review?(vladimir)
(In reply to comment #1)
> It does restore the above/below line separation for Western, though.

And I tested via |dump| that it's doing the right thing for Simplified Chinese.
Checked in to trunk.
Closed: 15 years ago
Resolution: --- → FIXED
Verified that this patch fixes the issue I was seeing.
You need to log in before you can comment on or make changes to this bug.