[webkit-dev] 48459: Glyphs in vertical text tests are rotated 90 degrees clockwise on Windows

Ryosuke Niwa rniwa at webkit.org
Fri Feb 24 12:20:22 PST 2012


On Fri, Feb 24, 2012 at 12:14 PM, Koji Ishii <kojiishi at gluesoft.co.jp>wrote:
>
> I was looking into bug 48459: "Glyphs in vertical text tests are rotated
> 90 degrees clockwise on Windows"
> https://bugs.webkit.org/show_bug.cgi?id=48459
>
> and found that it has two issues:
>
> 1. It does not support text-orientation[1] property as OS X does.
>
> 2. It uses @-font, which lets Windows do a magic to rotate some code
> points and apply 'vert' automatically. But that means WebKit has no control
> over the glyph orientations, and therefore orientation of some code points
> don't match to the one on OS X.
>
> I think the correct fix for the bug is to port showGlyphsWithAdvances from
> FontMac.mm to FontCGWin.cpp.
>
> But I then encounter an issue that WebKitLibraries does not support
> CTFontGetVerticalTranslationsForGlyphs API.
>
> Since Windows doesn't have such API, possible options I can think of are:
>
> 1. Bring the CTFontGetVerticalTranslationsForGlyphs API to WebKitLibraries.
> 2. Use other libraries such as FreeType[2] to read related OpenType tables.
> 3. Read raw tables using GetFontData Win32 API and parse vhea/vorg/vmtx
> tables etc.
>

Option 3 seems most desirable since it doesn't introduce new dependencies.

- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120224/aa9398ac/attachment-0001.html>


More information about the webkit-dev mailing list