[Webkit-unassigned] [Bug 31804] New: Safari/Chromium for Windows fails to load CJK WebFonts
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Nov 23 06:33:27 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31804
Summary: Safari/Chromium for Windows fails to load CJK WebFonts
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: yusukes at chromium.org
Safari for Windows fails to load OpenType web fonts (@font-face) that have 2 or
more faces.
Chromium for Windows also fails to load TrueType and OpenType web fonts that
have 2 or more faces.
This is because the renameAndActivateFont() function in
WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp, which is used by
Safari for Windows and Chromium for Windows, explicitly refuses such fonts.
However, since most of CJK ttf/otf fonts and some of Latin ttf/otf fonts have
more than 2 faces (e.g., one is for horizontal writing and the other is for
vertical writing), the restriction seems to be too strict. For example,
HIRAGINO (ヒラギノ) font, which is the default Japanese OpenType font for Mac OS X,
has 2 faces.
I'll attach a one-line patch that allows WebKit to load such fonts. Just for
reference, Safari for Mac seems not to have the restriction. I tried to load
the HIRAGINO font to Safari for Mac via @font-face (on my local machine, of
course), and it succeeded. A comment in
WebCore/platform/graphics/mac/FontCustomPlatformData.cpp says that when a font
has more than 2 faces, the first one is used for rendering, and I believe this
behavior is good enough for most cases.
--
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