[PATCH] Wrong encoding for TT_MS_ID_UCS_4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!
In ttf namelists TT_PLATFORM_MICROSOFT/TT_MS_ID_UCS_4 uses UTF-16BE
encoding, not UCS4 (as can be implied from name); see also
freetype-2.3.5/src/sfnt/sfobjs.c. I've noticed this problem with second
(MS PGothic) and third faces (MS UI Gothic) of msgothic.ttc font
(version 5.00) - japanese family name and style name garbled and
familylang wrong.
Attached patch should work with fontconfig versions from 2.3.95 to
2.6.99; tested on 2.6.0 and 2.4.2.
--- fontconfig-2.5.0/src/fcfreetype.c.orig	2007-10-26 00:49:10.000000000 +0400
+++ fontconfig-2.5.0/src/fcfreetype.c	2008-04-10 04:40:02.000000000 +0400
@@ -123,7 +123,7 @@
  {  TT_PLATFORM_MICROSOFT,	TT_MS_ID_BIG_5,		"BIG-5" },
  {  TT_PLATFORM_MICROSOFT,	TT_MS_ID_WANSUNG,	"Wansung" },
  {  TT_PLATFORM_MICROSOFT,	TT_MS_ID_JOHAB,		"Johab" },
- {  TT_PLATFORM_MICROSOFT,	TT_MS_ID_UCS_4,		"UCS4" },
+ {  TT_PLATFORM_MICROSOFT,	TT_MS_ID_UCS_4,		"UTF-16BE" },
  {  TT_PLATFORM_ISO,		TT_ISO_ID_7BIT_ASCII,	"ASCII" },
  {  TT_PLATFORM_ISO,		TT_ISO_ID_10646,	"UCS-2BE" },
  {  TT_PLATFORM_ISO,		TT_ISO_ID_8859_1,	"ISO-8859-1" },
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux