Closed
Bug 130661
Opened 23 years ago
Closed 23 years ago
TrueType font rendering prefers bold/italic inappropriately
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: deleted46272, Assigned: bstell)
References
Details
Attachments
(3 files)
(deleted),
image/png
|
Details | |
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
tetsuroy
:
review+
rbs
:
superreview+
scc
:
approval+
|
Details | Diff | Splinter Review |
After enabling true-type font display, Mozilla prefers to render pages using the
BOLD version of a font, rather than the appropriate non-bold version. Here is a
listing of my unix.js additions, followed by my fonts directory:
=== unix.js ===
pref("font.FreeType2.enable", true);
pref("font.directory.truetype.1", "/m1/homes/bcrowder/fonts");
=== unix.js ===
=== ~/fonts ===
-rw-r--r-- 1 bcrowder users 105468 Mar 12 10:41 andalemo.ttf
-rw-r--r-- 1 bcrowder users 286620 Mar 12 10:41 arialbd.ttf
-rw-r--r-- 1 bcrowder users 224692 Mar 12 10:41 arialbi.ttf
-rw-r--r-- 1 bcrowder users 206132 Mar 12 10:41 ariali.ttf
-rw-r--r-- 1 bcrowder users 275572 Mar 12 10:41 arial.ttf
-rw-r--r-- 1 bcrowder users 117028 Mar 12 10:41 ariblk.ttf
-rw-r--r-- 1 bcrowder users 111476 Mar 12 10:41 comicbd.ttf
-rw-r--r-- 1 bcrowder users 126364 Mar 12 10:41 comic.ttf
-rw-r--r-- 1 bcrowder users 311508 Mar 12 10:41 courbd.ttf
-rw-r--r-- 1 bcrowder users 234788 Mar 12 10:41 courbi.ttf
-rw-r--r-- 1 bcrowder users 244156 Mar 12 10:41 couri.ttf
-rw-r--r-- 1 bcrowder users 302688 Mar 12 10:41 cour.ttf
-rw-r--r-- 1 bcrowder users 139584 Mar 12 10:41 georgiab.ttf
-rw-r--r-- 1 bcrowder users 156668 Mar 12 10:41 georgiai.ttf
-rw-r--r-- 1 bcrowder users 142964 Mar 12 10:41 georgia.ttf
-rw-r--r-- 1 bcrowder users 158796 Mar 12 10:41 georgiaz.ttf
-rw-r--r-- 1 bcrowder users 136076 Mar 12 10:41 impact.ttf
-rw-r--r-- 1 bcrowder users 333900 Mar 12 10:41 timesbd.ttf
-rw-r--r-- 1 bcrowder users 238612 Mar 12 10:41 timesbi.ttf
-rw-r--r-- 1 bcrowder users 247092 Mar 12 10:41 timesi.ttf
-rw-r--r-- 1 bcrowder users 330412 Mar 12 10:41 times.ttf
-rw-r--r-- 1 bcrowder users 123828 Mar 12 10:41 trebucbd.ttf
-rw-r--r-- 1 bcrowder users 131188 Mar 12 10:41 trebucbi.ttf
-rw-r--r-- 1 bcrowder users 139288 Mar 12 10:41 trebucit.ttf
-rw-r--r-- 1 bcrowder users 126796 Mar 12 10:41 trebuc.ttf
-rw-r--r-- 1 bcrowder users 136032 Mar 12 10:41 verdanab.ttf
-rw-r--r-- 1 bcrowder users 154264 Mar 12 10:41 verdanai.ttf
-rw-r--r-- 1 bcrowder users 139640 Mar 12 10:41 verdana.ttf
-rw-r--r-- 1 bcrowder users 153324 Mar 12 10:41 verdanaz.ttf
-rw-r--r-- 1 bcrowder users 118752 Mar 12 10:41 webdings.ttf
=== ~/fonts ===
These are all fonts from the MicroSoft truetype fonts package, when I moved
*i.tff and *b.tff files away from this folder, the bold/italic rendering stopped
(reverting to X11 fonts to render bold and italic text on pages that actually
required it).
Comment 1•23 years ago
|
||
What order does your fonts.dir list the fonts in? ttmkfdir is buggy and lists
the fonts in "reverse" order in that file by default. See, eg,
http://www.paulandlesley.org/linux/xfree4_tt.html#NON-PACKAGED-FONTS-FILES,
section 4.2.2
Reporter | ||
Comment 2•23 years ago
|
||
The existence/nonexistance and ordering of fonts.dir does not have any effect on
this behavior. I've played with several different variations of fonts.dir and
finally tested the feature entirely without it. No change.
Comment 3•23 years ago
|
||
In that case, confirming... we likely have the same problem as ttmkfdir..
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 4•23 years ago
|
||
Would having my fonts directory help at all?
Comment 5•23 years ago
|
||
Here's some additional information I've managed to gather.
At first I thought it was some localisation issue as the sort order in ls
changes between LC_COLLATE=C and LC_COLLATE=fi_FI (for example). It didn't fix
this one, though.
However, making symbolic links as follows works for me:
1_Georgia.ttf -> Georgia.ttf
2_Georgia.ttf -> Georgia_Bold.ttf
3_Georgia.ttf -> Georgia_Bold_Italic.ttf
4_Georgia.ttf -> Georgia_Italic.ttf
The links are in a different directory from the actual fonts and that directory
with the links is then configured for mozilla. Interestingly, if you use
0_Georgia.ttf, it will not be the first one...
Hope this helps. I hate this bug :)
You can set NS_FONT_DEBUG=3 (or maybe 7) in the environment before
starting mozilla and see if anything interesting shows up.
Assignee | ||
Comment 7•23 years ago
|
||
These fonts are not related to X fonts so ttmkfdir will not have any effect.
I'm guessing these fonts have the same internal font name.
Could you attach the font summary?
(If you have write permission it will be in the font dir and named
".mozilla_font_summary.ndb". If you do not have write permission it will be
in "$HOME/.mozilla/fontsummaries/" with a name like "tt_font.d0302.i1234.ndb")
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•23 years ago
|
||
*** Bug 130465 has been marked as a duplicate of this bug. ***
I probably have the same fonts and they all have different internal
names. Mozilla loads the correct verdana but it renders it quite fat.
See the upcoming screen shot, particularly the last part.
Comment 10•23 years ago
|
||
"Just a test" is in Verdana, the url bar is in Andale Mono. Obviously,
this is not a property of a particular font.
I have FreeType 2.0.8 installed. The last part is the same set of fonts
via an XFree86 3.3.6 xfs patched with FreeType1 support.
Assignee | ||
Comment 11•23 years ago
|
||
> Mozilla loads the correct verdana but it renders it quite fat.
I assume you mean that moz loads verdana but the bold not the
regular weight. When it comes to rendering moz does not try
and adjust the weight. Moz simply gets the pixels from FreeType2
which renders the outlines specified in the font.
> ... "Just a test" is in Verdana, the url bar is in Andale Mono.
> Obviously, this is not a property of a particular font.
I assume you mean it is not the property of a particular font
family (or face). It is very likely that a bold font is being
selected. Hence, it is likely that it is a property of
the particular font.
To see what a given font should look like use a reference
display program such as 'ftstring' in the FreeType2 demos.
> The last part is the same set of fonts via an XFree86 3.3.6 xfs patched
> with FreeType1 support.
FreeType1 renders *quite* differently from FreeType2. There has been an
on going discussion about this. Many people feel that FreeType1 produces
much more attractive glyphs than FreeType2. The FreeType developers have
recently released 2.0.9 and say that the glyphs now look much better.
Also note that being from xfs it is not anti aliased.
Assignee | ||
Comment 12•23 years ago
|
||
this needs to be fixed for 1.0
Severity: normal → major
Target Milestone: --- → mozilla1.0
Comment 13•23 years ago
|
||
> I assume you mean that moz loads verdana but the bold not the regular
> weight.
No, mozilla claims it's loading the correct file.
> I assume you mean it is not the property of a particular font
> family (or face). It is very likely that a bold font is being
> selected. Hence, it is likely that it is a property of the particular
> font.
I was unclear. While there are a set of Verdana ttf files, there is
only one Andale Mono. That's why it's not font dependent.
> FreeType1 renders *quite* differently from FreeType2. There has been
> an on going discussion about this. Many people feel that FreeType1
> produces much more attractive glyphs than FreeType2.
No doubt. Lots of people use/used this font server and I'm sure they
will be displeased if mozilla doesn't come close to it.
> The FreeType developers have recently released 2.0.9 and say that the
> glyphs now look much better.
I'll build it later today and let you know.
> Also note that being from xfs it is not anti aliased.
Which is why I ran tests with antialias.min bumped up.
Assignee | ||
Comment 14•23 years ago
|
||
> > Many people feel that FreeType1
> > produces much more attractive glyphs than FreeType2.
>
> No doubt. Lots of people use/used this font server and I'm sure they
> will be displeased if mozilla doesn't come close to it.
Unfortunately, FreeType1 is no longer supported so moz cannot
use it. Lets hope that the supported version gets better. For
FreeType2 glyph rendering issues see bug 114885.
Reporter | ||
Comment 15•23 years ago
|
||
Comment 16•23 years ago
|
||
Since upgrading to the debian package of 0.9.9 with freetype, antialiasing, and
the mstt core fonts, italic style on text seems to no longer be honored. My
default font is verdana, and it looks gorgeous, except that on /. I can no
longer tell the difference between quoted text (usually handled using <em>) and
unquoted. This is a pain ;). Is that this bug, or a different one?
Assignee | ||
Comment 18•23 years ago
|
||
The font info is kept in a hash so later call can share it.
The hash key was based on the family name but that is not unique for
bold/italic.
Now use file name (and add face index for ttc)
Comment 20•23 years ago
|
||
Comment on attachment 74448 [details] [diff] [review]
patch; make the hash key unique
/r=yokoyam
Thanks brian for explaining the patch for me.
Attachment #74448 -
Flags: review+
Comment 21•23 years ago
|
||
*** Bug 131168 has been marked as a duplicate of this bug. ***
Comment 22•23 years ago
|
||
*** Bug 131367 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 23•23 years ago
|
||
> I can no longer tell the difference between quoted text (usually
> handled using <em>) and unquoted. This is a pain ;). Is that this bug, or a
> different one?
It should be this bug.
Stuart: could you try attachment 74448 [details] [diff] [review] and see if it fixes this for you?
Comment 24•23 years ago
|
||
Just recompiled mozilla with Brian Stell's patch
(http://bugzilla.mozilla.org/showattachment.cgi?attach_id=74448) applied;
Italics, regular and bold aa fonts now work correctly on my X 4.2.0 system.
Assignee | ||
Comment 25•23 years ago
|
||
thanks
Comment 26•23 years ago
|
||
Just want to add my bit:
Patched my mozilla yesterday and I can now see bold/italics/etc perfectly and
have not had any problems.
Assignee | ||
Comment 27•23 years ago
|
||
thanks
Comment 28•23 years ago
|
||
Is the patch approved? I would like to have it, but can't compile from sources
for some reasons and I don't have time to investigate so I would like to
download some binaries that include the patch. Does anyone know where I could
get them?
Assignee | ||
Comment 29•23 years ago
|
||
Sorry for the delay, this bug is waiting on super-review and then checkin
approval
It is a fair amount of work to make experimental binaries available.
I believe experimental binaries are made when the patch seems risky.
Since the patch is not very risky (even if the problem is really annoying)
I doubt an experimental binary will be made.
The process of review/super-review/approval does slow the process somewhat
but the more important thing is that it does lead to a better end product
which of course is our highest priority.
Hopefully, we can get this fixed in in a few days.
Assignee | ||
Comment 30•23 years ago
|
||
*** Bug 132367 has been marked as a duplicate of this bug. ***
Comment 31•23 years ago
|
||
Comment on attachment 74448 [details] [diff] [review]
patch; make the hash key unique
sr=rbs
+ char buf[20];
+ sprintf(buf, "/%d", nsFT2FontCatalog::GetFaceIndex(aFce));
+ key_str.Append(buf);
nit (a bit more elegant):
key_str.Append('/');
key_str.AppendInt(nsFT2FontCatalog::GetFaceIndex(aFce));
Attachment #74448 -
Flags: superreview+
Comment 32•23 years ago
|
||
Comment on attachment 74448 [details] [diff] [review]
patch; make the hash key unique
a=scc
Attachment #74448 -
Flags: approval+
Assignee | ||
Comment 33•23 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 34•23 years ago
|
||
Tested with nightly build "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9+)
Gecko/20020322". Works beautifully now. Thanks :)
Comment 35•23 years ago
|
||
Same for me with the Debian 0.9.9-2 build which incorporates this patch :)
Comment 36•23 years ago
|
||
Verified it has been fixed on 03-25 trunk build / RH7.2.
However, the problem still exists when I login as root but not my self, it might
related to bug 131260.
I'm marking one as verified here. Will see if still a problem with above case
after bug 131260.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•