Closed
Bug 31013
Opened 25 years ago
Closed 25 years ago
need to use "Times New Roman" as is, when available
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: erik, Assigned: erik)
Details
From: TenThumbs <tenthumbs@cybernex.net>
Even though I have a TImes New Roman TrueType font available, Mozilla never
uses it. In fact, Mozilla does a XListFonts on this font, which succeeds,
but then ignore it.The same goes for Courier New.
Looking at mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp I see in
nsFontMetricsGTK::FindFont that there is code to map these fonts to their
supposed Unix equivalents. I realize that there is a naming issue with
Times, Times Roman, TimesRoman, Times New Roman, etc. but it seems to me
that an exact match should always be used.
This is not an idle issue. The Adobe fonts that Mozilla settles on do not
scale well at larger sizes.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M16
You can see what happens at http://www2.cybernex.net/~tenthumbs/moz-tnr1.png. I
used a fonts.alias file that gives Times New Roman another faily name so I could
use it.
Ignore the title, it's actually 48pt type.
BTW, Helvetica is being used instead of Arial, which can't be good.
If it were me, I would use this font mapping only on the default types, i.e.
serif, sans-serif, monospaced, etc. This way if a page specifies
font-family: "Times New Roman", Times, serif
then only the last would be mapped. This may be hard, though.
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 3•25 years ago
|
||
There are several ripple-through effects of this bug.
If you have bitmapped fonts available for Times, Courier, and
Helvetica, as is common under X, Mozilla seems to be inconsistent
about what DPI it asks for fonts in. In particular, my display is
set to 100 DPI (100x100, in fact), I have 100 DPI fonts listed,
yet Mozilla will happily ask for 75 DPI fonts (as well as 100
DPI ones). The best tool for seeing this is judicious use of
the xmon program (available in /contrib at ftp.x.org, I believe).
Mozilla will do this even if I have scalable versions of them.
Next, the normal Unix global.css specifies the default UI font as
'arial,helvetica,sans-serif'. This means that Mozilla will wind up
using bitmapped Helvetica for its UI font -- quite possibly at 75 DPI,
too. No wonder some Linux/Unix people are complaining that the UI fonts
are too small.
Checking with xmon shows that Mozilla is doing XListFonts against Arial,
Times New Roman, and Courier New, so it knows that they're there and can
be used (like TenThumbs, I have TrueType versions of them available). It's
just that the code overrides this and uses the bitmapped fonts instead.
Indeed, on second look the existence of this code in the GTK code may be
quite odd, since up in gfx/src/nsDeviceContext.cpp we seem to have code
(in DeviceContextImpl::CreateFontAliasTable()) that carefully builds
aliases (both ways!) for the affected fonts, checking to see if it's
necessary or not.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 4•25 years ago
|
||
Fixed by first checking for the names directly (e.g. "Times New Roman") and if
that fails, we try aliases (e.g. "times").
You need to log in
before you can comment on or make changes to this bug.
Description
•