Closed Bug 410701 Opened 17 years ago Closed 16 years ago

Postscript OpenType fonts may not be crappy and so should be considered in font fallback

Categories

(Core :: Graphics, defect, P2)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: karlt, Assigned: pavlov)

References

Details

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/gfx/thebes/public/gfxWindowsFonts.h&rev=1.67&mark=74#72

Allowing DEVICE_FONTTYPE fonts may be OK:  (non-OpenType) Type1 fonts are already excluded by !mUnicodeFont.

http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/thebes/src/gfxWindowsPlatform.cpp&rev=1.35&mark=138,140#138

(Is this test valid on Windows NT?)

If there are other DEVICE_FONTTYPE fonts that need to be excluded, the OpenType fonts may need to be detected in gfxWindowsPlatform::FontEnumProc.
The NTM_PS_OPENTYPE flag can be used on Windows 2000/XP.  Not sure about NT though:

http://bugzilla.gnome.org/show_bug.cgi?id=142579#c24
Requesting blocking because the only font providing glyphs for many mathematical characters is likely to be the Postscript OpenType STIX fonts (and authors may request different fonts).
Flags: blocking1.9?
Priority: -- → P3
how do i get the cmap out of one of these?  If I don't know that it supports proper unicode code points I don't want to use it...
(In reply to comment #2)
> how do i get the cmap out of one of these?

All OpenType fonts have the same sfnt wrapper and cmap table, so the algorithm should be no different to TrueType fonts.

http://www.microsoft.com/OpenType/OTSpec/otff.htm#otttables

ReadCMAP in gfxWindowsPlatform.cpp looks like it should work for NTM_PS_OPENTYPE fonts.
Flags: blocking1.9? → blocking1.9+
Priority: P3 → P4
This is also important for Japanese users because all Pr6N fonts are Postscript OpenType fonts.
WinNT4 support is dropped, so We could just assume that NTM_PS_OPENTYPE is always available.
OpenType PostScript fonts are definitely not crappy so there is no reason to exclude them. They are supported on Win2000 and later and work exactly the same way as TrueType fonts. They have the same CMAP table and all the win32 API that works with TrueType fonts also works with OpenType fonts (despite the documentation stating TrueType only - it was probably never updated when OpenType support was added).

DEVICE_FONTTYPE should not be used to test for OpenType/PS fonts. It means something else. The correct way is to use NTM_PS_OPENTYPE from ntmFlags the same way NTM_TYPE1 is tested for in 
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/gfx/thebes/src/gfxWindowsPlatform.cpp&rev=1.35&mark=138,140#138

Alternatively you can just try reading the CMAP table. All TrueType, OpenType/TT and OpenType/PS fonts will successfully return a CMAP table. Anything else will fail.

See also http://bugzilla.gnome.org/show_bug.cgi?id=142579#c26 where I go into a lot more detail about supporting OpenType/PS fonts in pango on win32.
Flags: wanted-next+
Flags: blocking1.9-
Assignee: nobody → pavlov
Flags: wanted-next+
Flags: blocking1.9-
Flags: blocking1.9+
Priority: P4 → P2
i just checked in what should fix this as part of a patch for bug 396315.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Blocks: 324857
You need to log in before you can comment on or make changes to this bug.