Bug 753511

Summary: Wine font substitutes incorrect after 1.3.31
Product: [Fedora] Fedora Reporter: Yijun Yuan <bbbush.yuan>
Component: wineAssignee: Andreas Bierfert <andreas.bierfert>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: andreas.bierfert, stefan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-26 20:29:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Yijun Yuan 2011-11-13 01:45:40 UTC
Description of problem:
System font is not used as font substitutes, cannot find specified fonts like "Tahoma" or "SimSun". For English text the quality becomes very bad. For Chinese text nothing or only little squares is displayed.

Version-Release number of selected component (if applicable):
1.3.31
1.3.32

How reproducible:
Always

Steps to Reproduce:
1. Update to latest package
2. Run winecfg
3.
  
Actual results:
Text is hardly readable in English locale, Text missing in Chinese local

Expected results:
System font is used automatically

Additional info:
The reg key FontSubStr has incomplete content. In 1.3.28/29, all items defined in wine.inf presents. In 1.3.31/32, only Ms Shell Dlg and Tms Rmn are there. Thus there is something wrong during the font matching process -- not finished normal substitutes.

Comment 1 Yijun Yuan 2011-12-06 14:44:43 UTC
In wine-1.3.33 the problem is still there. The registry looks fine, but the  font substitution is just incorrect if current locale is zh_CN.UTF-8. I doubt if any dependency package is missing from my system.

I find a workaround now. The point is to ensure an instance of wineserver is running when lanch any other applications, and the first application this wineserver get connected to must be running in an en_US.UTF-8 locale. For example

1. Start wineserver and run in foreground
$ wineserver -f

2. Start any an application, specify locale. Once this application is started, it can be closed. I guess wineserver maintains a cache of fonts or font mappings that is only correct in this situation, and the cache is only populated once.
$ LANG=en_US.UTF-8 regedit

3. Leave wineserver running, launch any other applications. Not necessarily under shell prompt -- starting through .desktop files is also fine now.

(No need to manually edit registry during above steps, because any contents are automatically overwritten in step #2)

Comment 2 Yijun Yuan 2012-05-26 20:29:48 UTC
With current version (wine 1.5.2) the registry is not overwritten during multiple runs. I also find a registry file at https://gist.github.com/1947935 that defined all substitutes, "regedit" can import its content to ~/.wine/system.reg

My minimal file content is like this:

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"MS Shell Dlg"="WenQuanYi Zen Hei"
"MS Shell Dlg 2"="WenQuanYi Zen Hei"
"MS Dialog"="WenQuanYi Zen Hei"