[webkit-reviews] review requested: [Bug 20237] Zero width and space characters are displayed incorrectly if not contained in a fallback font. : [Attachment 22591] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 31 16:56:27 PDT 2008


Marvin Decker <marv.decker at gmail.com> has asked  for review:
Bug 20237: Zero width and space characters are displayed incorrectly if not
contained in a fallback font.
https://bugs.webkit.org/show_bug.cgi?id=20237

Attachment 22591: Patch
https://bugs.webkit.org/attachment.cgi?id=22591&action=edit

------- Additional Comments from Marvin Decker <marv.decker at gmail.com>
This patch makes boxes for directional markers and nonbreaking spaces disappear
when there is no fallback font that supports them. It hardcodes that the width
of "zero width space" characters is 0. Platforms will also have to hardcode
that the glyph for such characters is the space glyph. I've added this to the
Windows code.

Mac doesn't seem to have this problem because the fonts are less crappy. If Mac
wanted to implement it, it would be best in wkGetGlyphVectorFirstRecord which
looks like isn't public.

I added a parameter to the glyph width getter so it gets the original
character. I also use this for an optimization for Chinese characters which I
hope to submit soon; it's very helpful for the width computation code to
actually know what character we're talking about.

The changes in the Font.h file are to make the zero width space (and a few
related chars) actually return true in the treatAsZeroWidthSpace function().


More information about the webkit-reviews mailing list