[Bug 13829] Wine does not have CJK fonts

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jul 24 00:09:08 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=13829





--- Comment #30 from Paul "TBBle" Hampson <Paul.Hampson at Pobox.com>  2010-07-24 00:09:06 ---
That patch should not be necessary. With the (Wine-internal) font substitutions
I provided earlier, those FontLinks keys should be being autopopulated based on
the locale Wine is running in. (Patch linked in comment 11)

I don't know if Wine honours fontconfig's alias list off hand, I'm guessing it
doesn't, or you wouldn't have had to do _anything_ to make this work.

The standard set of font names I chose in my patch is:

+    /* Non East-Asian */
+    { Tahoma, /* FIXME unverified ordering */
+      { MS_UI_Gothic, SimSun, Gulim, PMingLiU, NULL }
+    },
+    /* Below lists are courtesy of
+     * http://blogs.msdn.com/michkap/archive/2005/06/18/430507.aspx
+     */
+    /* Japanese */
+    { MS_UI_Gothic,
+      { MS_UI_Gothic, PMingLiU, SimSun, Gulim, NULL }
+    },
+    /* Chinese Simplified */
+    { SimSun,
+      { SimSun, PMingLiU, MS_UI_Gothic, Batang, NULL }
+    },
+    /* Korean */
+    { Gulim,
+      { Gulim, PMingLiU, MS_UI_Gothic, SimSun, NULL }
+    },
+    /* Chinese Traditional */
+    { PMingLiU,
+      { PMingLiU, SimSun, MS_UI_Gothic, Batang, NULL }
+    }
+};

(That's MS Shell Dlg substitute, then font links. It uses the first TTF
filename for the given family when generating the links.)

See http://source.winehq.org/source/dlls/gdi32/freetype.c#L2331 for that list,
and http://source.winehq.org/source/dlls/gdi32/freetype.c#L2590 for the code
that uses it.

If you're not seeing it working with my supplied registry key stuff, check the
debugging output on the "font" channel. A quick glance at the code suggests
that if no FontSubstitute is defined for MS Shell Dlg, it won't populate the
Font links.

I don't remember how the FontSubstitute for MS Shell Dlg is supposed to be
created on Wine. On Windows MS Shell Dlg is substituted internally to GDI based
on the locale, I believe. For a global distribution, Tahoma is probably a safe
bet since Wine ships a metric-compatible version, and we generate FontLinks for
Tahmoa to glyphs for all CJK characters.

So add this to my earlier wine.inf and see if that makes it work. (Delete the
SystemLinks key, Wine won't override an existing such key.)

HKCU,Software\Wine\Fonts\Replacements,"MS Shell Dlg",,"Tahoma"

Perhaps this should be made a default setting... If Wine honours fontconfig,
then this would be the _only_ change needed, and it could be safely defaulted
to by Wine because Tahoma is included with Wine.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list