[Webkit-unassigned] [Bug 51450] Glyphs in vertical text tests are rotated 90 degrees clockwise on Chromium Windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 19 22:47:13 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=51450





--- Comment #13 from Chun-Lung Huang <alvincl.huang at gmail.com>  2011-01-19 22:47:12 PST ---
(In reply to comment #11)
> (In reply to comment #10)
> > I am tring to reproduce it in a pure English environment.
> > Any suggestions? Please let me know.
> yeah, I tried on Windows 7 English edition.

Finally got some time to reproduce it in Windows 7 English Edition.

The problem is that some fonts, in this case 'Times New Romain', do not have the vertical form.  If I ask for '@Times New Romain', Windows GDI's font mapper attempts to match the it with an existing physical font. If it fails to find an exact match, it provides an alternative whose characteristics match as many of the requested characteristics as possible. (from MSDN)

It seems that CreateFontIndirect() took locale into consideration.
In my environment, traditional Chinese edition, it will return '@新細明體'.
In yours, English edition, it will return '@Malgun Gothic'.
/* @FontCacheChromiumWin.cpp:253 */

I think both of them can be used, however, it cannot pass the name checking statement: "if (!equalIgnoringCase(updatedFamilyName, winName))"
/* FontCache::createFontPlatformData()@FontCacheChromiumWin.cpp:591 */
/* @Times New Romain <> @新細明體(aka "PMingLiu"), in my case*/
/* @Times New Romain <> @Malgun Gothic, in yours */

So both of them will get to getLastResortFallbackFont().  The difference is here.
In my case, it will find fallback font "微軟正黑體"(aka "Microsoft JhengHei") and returned simpleFont @FontCacheChromiumWin.cpp:540
In your case, it cannot find fallback font and crashed at ASSERT_NOT_REACHED() @FontCacheChromiumWin.cpp:551

*********************************************************

=== Possible Solution ===
Becuase Windows GDI's font mapper has already found a similar font that you have for you.  How about just use it for vertical text!  If you wanna locally try this patch without crash. Please replace FontCacheChromiumWin.cpp:591 to

if (!winName.startsWith("@") && !equalIgnoringCase(updatedFamilyName, winName)) {

I think this would work for you.  Please try it. :)

=== Another Solution?? ===
Yes. We can handle fallback in FontCache.cpp and CSSFontSelector.cpp but it is not platform dependent.  I don't think I want to touch this now.

Any comments?

MSDN reference: http://msdn.microsoft.com/en-us/library/dd183500%28v=VS.85%29.aspx

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list