All users were logged out of Bugzilla on October 13th, 2018

nsIFontEnumerator::EnumerateFonts() lists all fonts on gtk builds

NEW
Assigned to

Status

()

17 years ago
9 years ago

People

(Reporter: james, Assigned: jshin1987)

Tracking

({intl, platform-parity})

Trunk
mozilla1.1alpha
x86
Linux
intl, platform-parity
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
Rather than just listing fonts that match the aLangGroup and aGeneric arguments,
EnumerateFonts lists every font on the system (nsFontEnumeratorGTK::EnumFonts()
ignores these arguments).

This is visible in the fonts page of the preferences dialog, in that
proportional fonts are listed in the selector for the default monospace font.
The font selectors in Netscape 4.x's preferences page correctly identified
monospace fonts vs proportional ones, so this is a regression. (separating
serif/sans-serif fonts may be more difficult).
(Reporter)

Updated

17 years ago
Keywords: 4xp
intl.  Confirming bug.  This is also pp, since on Windows we use these args.
Assignee: hyatt → yokoyama
Status: UNCONFIRMED → NEW
Component: XP Toolkit/Widgets → Internationalization
Ever confirmed: true
Keywords: pp
QA Contact: jrgm → ruixu
(Reporter)

Comment 2

17 years ago
I don't think this is an i18n bug.  It is really a bug in the gtk code in gfx/
(I think that's the dir.  If not, probably widget/).  When you ask for a list of
fonts matching a generic type (sans-serif, serif, monospace), it always returns
the complete list of fonts, no matter what.

Part of the problem (I believe) is that X doesn't really give you a good way to
differentiate between serif and sans serif fonts (monospace ones are easy, as
they are marked as m in the eleventh part of the XLFD).  The code in classic
mozilla picked out the monospace fonts, as can be seen here:
   http://lxr.mozilla.org/classic/source/cmd/xfe/fonts.c#4179

However the code in the new code doesn't seem to use the passed generic font
name passed in:
    http://lxr.mozilla.org/seamonkey/source/gfx/src/gtk/nsFontMetricsGTK.cpp#4743

Instead, just returning every font.  This is why all the font selectors in gtk
mozilla have the same font names (instead of just showing monospace, or just
serif or just sans-serif fonts).  Possibly the gtk2 port will be able to do a
better job, getting the font information from the pango or Xft libraries.  For
now, it should at least be possible to distinguish between monospace and other
fonts though.

I would recommend moving it back to XP Widgets component.
Of the 3 people who seem to have made substantive code changes to the code in
that file, 2 (yokoyama and ftang) are i18n.  The third is Brian Stell, who is
cced on this bug.

In general, i18n handles all the font stuff...

Comment 4

17 years ago
> The font selectors in Netscape 4.x's preferences page correctly identified
> monospace fonts vs proportional ones, so this is a regression. 

Has this ever worked in moz/ns6x?

As far as I remember Erik never implemented that code.

Comment 5

17 years ago
over to shanjian
Assignee: yokoyama → shanjian

Updated

17 years ago
Keywords: intl
QA Contact: ruixu → ylong

Comment 6

17 years ago
accepted.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1

Comment 7

14 years ago
shanjian is no longer working on mozilla for 2 years and these bugs are still
here. Mark them won't fix. If you want to reopen it, find a good owner first. 
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WONTFIX

Comment 8

14 years ago
Mass Reassign Please excuse the spam
Assignee: shanjian → nobody

Comment 9

14 years ago
Mass Re-opening Bugs Frank Tang Closed on Wensday March 02 for no reason, all
the spam is his fault feel free to tar and feather him
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---

Comment 10

14 years ago
Reassigning Franks old bugs to Jungshik Shin for triage - Sorry for spam
Assignee: nobody → jshin1987
Status: REOPENED → NEW

Comment 11

14 years ago
These are my two cents regarding font enumerator.

I found that when i use bitmapped fonts (no XFT) i can't find iso10646-1 encoded
fonts when i select 'Western' languages in Edit|Preferences|Appearance|Fonts. I use:

Mozilla 1.7.5
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041221

straight from the Slackware package.
QA Contact: amyy → i18n

Comment 12

9 years ago
This happens on OS X as well (OS X 10.5.7), with Firefox 3.0.13
You need to log in before you can comment on or make changes to this bug.