[PATCH] tools/wine.inf.in: Added UTF8 bom header. (resend)

Qian Hong fracting at gmail.com
Thu Nov 8 02:04:39 CST 2012


Hello,

On Thu, Nov 8, 2012 at 3:25 AM, Alexandre Julliard <julliard at winehq.org> wrote:
>
> It's here to support Unicode data in wine.inf, as you noted. However, I
> don't think it makes sense to add the BOM unless we actually have
> Unicode keys in there.

Thanks for explain!

Let me make a summary of Bug 32136:

Since Wine1.4 we added the 'font replacement' feature to Wine, and
leave the 'font replacement' setting to distribution folks, for
example, Ubuntu's Wine packager has a patch like
0001-tools-wine.inf.in-Added-font-name-replacement.txt

To solve Bug 32136, we need not only English font name replacement for
CJK fonts, but also localized font name replacement for CJK fonts, so
Ubuntu need to update their patch like
0001-tools-wine.inf.in-Added-localized-font-name-replacemen.txt.

The second patch is a bit strange and ugly, because it change the
encoding of a upstream file, that will make people confused. What's
worse, once Wine update the encoding of wine.inf.in from ANSI to
UTF8_with_bom in the future, the second patch will confilict to the
new wine.inf.in.

My idea is split the second patch into two parts, the first part is
0001-tools-wine.inf.in-Added-UTF8-bom-header.txt, the second part is
adding english and localized font name replacement settings without
changing the encoding of wine.inf.in.

Did I explain clearly enough? Does that make sense?

Thank you!


--
Regards,
Qian Hong

-
Sent from Ubuntu
http://www.ubuntu.com/
-------------- next part --------------
From 2a1216e71ad99be207c445336d7a97b3a42813f7 Mon Sep 17 00:00:00 2001
From: Qian Hong <fracting at gmail.com>
Date: Thu, 8 Nov 2012 15:51:21 +0800
Subject: [PATCH] tools/wine.inf.in: Added font name replacement.
Reply-To: wine-devel at winehq.org
To: wine-patches at winehq.org

---
 tools/wine.inf.in |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tools/wine.inf.in b/tools/wine.inf.in
index 03a748a..213b878 100644
--- a/tools/wine.inf.in
+++ b/tools/wine.inf.in
@@ -581,6 +581,18 @@ HKLM,%FontSubStr%,"Times New Roman CYR,204",,"Times New Roman,204"
 HKLM,%FontSubStr%,"Times New Roman Greek,161",,"Times New Roman,161"
 HKLM,%FontSubStr%,"Times New Roman TUR,162",,"Times New Roman,162"
 HKLM,System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts,"LogPixels",0x10003,0x00000060
+HKCU,Software\Wine\Fonts\Replacements,"SimSun",,"WenQuanYi Micro Hei"
+HKCU,Software\Wine\Fonts\Replacements,"PMingLiU",,"WenQuanYi Micro Hei"
+HKCU,Software\Wine\Fonts\Replacements,"MS Gothic",,"Ume Gothic"
+HKCU,Software\Wine\Fonts\Replacements,"MS PGothic",,"Ume P Gothic"
+HKCU,Software\Wine\Fonts\Replacements,"MS UI Gothic",,"Ume UI Gothic"
+HKCU,Software\Wine\Fonts\Replacements,"MS Mincho",,"Ume Mincho"
+HKCU,Software\Wine\Fonts\Replacements,"MS PMincho",,"Ume P Mincho"
+HKCU,Software\Wine\Fonts\Replacements,"Batang",,"UnBatang"
+HKCU,Software\Wine\Fonts\Replacements,"Dotum",,"UnDotum"
+HKCU,Software\Wine\Fonts\Replacements,"Gulim",,"UnDotum"
+HKCU,Software\Wine\Fonts\Replacements,"Arial Unicode MS",,"Droid Sans Fallback"
+
 
 [MCI]
 HKLM,%Mci32Str%,"AVIVideo",,"mciavi32.dll"
-- 
1.7.5.4
-------------- next part --------------
From df84ea7bf12ebacf8d5cd1fecceeeccc64ac363a Mon Sep 17 00:00:00 2001
From: Qian Hong <fracting at gmail.com>
Date: Thu, 8 Nov 2012 15:48:08 +0800
Subject: [PATCH] tools/wine.inf.in: Added localized font name replacement.
Reply-To: wine-devel at winehq.org
To: wine-patches at winehq.org

---
 tools/wine.inf.in |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/tools/wine.inf.in b/tools/wine.inf.in
index 03a748a..24cc0b9 100644
--- a/tools/wine.inf.in
+++ b/tools/wine.inf.in
@@ -1,3 +1,6 @@
+;; To support localized font name replacement, this file should be encoded in
+;; UTF-8 with BOM, be careful not to strip the BOM header!
+;;
 ;; .INF script for the basic Wine configuration
 ;; Version: @PACKAGE_STRING@
 ;;
@@ -581,6 +584,21 @@ HKLM,%FontSubStr%,"Times New Roman CYR,204",,"Times New Roman,204"
 HKLM,%FontSubStr%,"Times New Roman Greek,161",,"Times New Roman,161"
 HKLM,%FontSubStr%,"Times New Roman TUR,162",,"Times New Roman,162"
 HKLM,System\CurrentControlSet\Hardware Profiles\Current\Software\Fonts,"LogPixels",0x10003,0x00000060
+HKCU,Software\Wine\Fonts\Replacements,"SimSun",,"WenQuanYi Micro Hei"
+HKCU,Software\Wine\Fonts\Replacements,"宋体",,"WenQuanYi Micro Hei"
+HKCU,Software\Wine\Fonts\Replacements,"PMingLiU",,"WenQuanYi Micro Hei"
+HKCU,Software\Wine\Fonts\Replacements,"新細明體",,"WenQuanYi Micro Hei"
+HKCU,Software\Wine\Fonts\Replacements,"MS Gothic",,"Ume Gothic"
+HKCU,Software\Wine\Fonts\Replacements,"MS PGothic",,"Ume P Gothic"
+HKCU,Software\Wine\Fonts\Replacements,"MSPゴシック",,"Ume P Gothic"
+HKCU,Software\Wine\Fonts\Replacements,"MS UI Gothic",,"Ume UI Gothic"
+HKCU,Software\Wine\Fonts\Replacements,"MS Mincho",,"Ume Mincho"
+HKCU,Software\Wine\Fonts\Replacements,"MS PMincho",,"Ume P Mincho"
+HKCU,Software\Wine\Fonts\Replacements,"Batang",,"UnBatang"
+HKCU,Software\Wine\Fonts\Replacements,"Dotum",,"UnDotum"
+HKCU,Software\Wine\Fonts\Replacements,"Gulim",,"UnDotum"
+HKCU,Software\Wine\Fonts\Replacements,"Arial Unicode MS",,"Droid Sans Fallback"
+
 
 [MCI]
 HKLM,%Mci32Str%,"AVIVideo",,"mciavi32.dll"
-- 
1.7.5.4


More information about the wine-devel mailing list