Closed Bug 397288 Opened 18 years ago Closed 18 years ago

Missing text without fallback from U+0000-00FF fast path when first font-family doesn't have necessary glyphs

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(3 files, 3 obsolete files)

If the first specified font available on the system does not support a character then gfxPangoFontGroup::CreateGlyphRunsFast draws nothing for that glyph. It should instead fallback to CreateGlyphRunsItemizing.
Flags: blocking1.9?
Attached file testcase
This should show two y characters and one psi. Increase the font-size and CreateGlyphRunsItemizing is used and so all characters will be visible. Decrease the font-size and CreateGlyphRunsFast is used and only the psi is visible. (If Standard Symbols L is not available, and monotype's truetype Symbol is used rather than adobe's type1 Symbol, then the y's will be shown as psi's. This seems to be a problem with monotype's font. According to ftdump the first charmap has platform_id is TT_PLATFORM_MACINTOSH and encoding is TT_MAC_ID_ROMAN, but the font appears to have substituted Greek characters for Latin. The second charmap has platform TT_PLATFORM_MICROSOFT and encoding TT_MS_ID_SYMBOL_CS, which may work much better or at least just not find any matches.)
This applies on top of the patch in bug 362682.
Depends on: 362682
Flags: blocking1.9? → blocking1.9+
Attached patch reftest (obsolete) — Splinter Review
Attachment #284235 - Flags: review?(pavlov)
(The scaled font assertion is fires once when creation fails rather than each time it is used.)
Attachment #282084 - Attachment is obsolete: true
Attachment #284240 - Flags: review?(pavlov)
Comment on attachment 284235 [details] [diff] [review] reftest This reftest is not the best, as it already uses the itemizing path.
Attachment #284235 - Attachment is obsolete: true
Attachment #284235 - Flags: review?(pavlov)
Attached patch reftest v2 (obsolete) — Splinter Review
This version changes font-family to force separate textruns.
Attachment #284244 - Flags: review?(pavlov)
Attachment #284240 - Flags: review?(pavlov) → review+
Attachment #284240 - Flags: approval1.9+
Comment on attachment 284244 [details] [diff] [review] reftest v2 does this test pass on all platforms?
The testcase renders appropriately on Mac. However, on Windows the body text is treated as characters in the TT_MS_ID_SYMBOL_CS charset, including the numeric character references, which should be treated as ISO 10646. (http://www.w3.org/TR/html4/charset.html#h-5.3.1). Even the treatment of the y as mapping to TT_MS_ID_SYMBOL_CS, seems inconsistent with the resolution of bug 33127, or the effort to distinguish quirks mode in bug 195038.
Attached patch gentler reftestSplinter Review
To avoid debate over how a utf-8 y should be interpreted in text with Symbol font-family, I've changed the test to only use numeric character references. This fails on Windows (as marked) but at least there is no debate over the ideal behavior.
Attachment #284244 - Attachment is obsolete: true
Attachment #284400 - Flags: review?(pavlov)
Attachment #284244 - Flags: review?(pavlov)
this has nothing to do with the Symbol font family. The 'Symbol' font on Windows only contains a symbol character map and thus is not a Unicode font. Our handling of symbol fonts (symbol, wingdings, etc) is correct on Windows.
(In reply to comment #8) > However, on Windows the body text is treated as characters in the > TT_MS_ID_SYMBOL_CS charset, including the numeric character references, which > should be treated as ISO 10646. Correction: on Windows, the TT_MAC_ID_ROMAN charmap is used not TT_MS_ID_SYMBOL_CS.
Comment on attachment 284400 [details] [diff] [review] gentler reftest The test is no good on Windows because Windows has Monotype's Symbol font and uses the encoding corresponding to TT_PLATFORM_MACINTOSH, which is broken. Even if numeric character references are converted from Unicode to TT_MAC_ID_ROMAN, then that (encoding for) Symbol will show a psi for the &#x79.
Attachment #284400 - Flags: review?(pavlov)
checked in: 1.56 mozilla/gfx/thebes/public/gfxPangoFonts.h 1.109 mozilla/gfx/thebes/src/gfxPangoFonts.cpp Don't know what fonts (if there are any that) can be used in the test case on Windows and Mac.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: