Issue 97086

Summary: Try to determine ZHS/ZHT/JAN/KOR preference from system settings
Product: General Reporter: fangq <fangqq>
Component: uiAssignee: AOO issues mailing list <issues>
Status: ACCEPTED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOO300m9   
Target Milestone: AOO Later   
Hardware: PC   
OS: Windows, all   
URL: http://bbs.dartmouth.edu/~fangq/temp/ooo_zenhei_bug.png
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 101552    
Attachments:
Description Flags
font selection box for OOo and Wordpad none

Description fangq 2008-12-10 04:40:40 UTC
After upgrading to OOo 3.0, I found it has some problems to display Chinese font
names in the font-selection box. This screenshot shows an example:
http://bbs.dartmouth.edu/~fangq/temp/ooo_zenhei_bug.png

the Chinese font used here can be downloaded from:
https://sourceforge.net/project/showfiles.php?group_id=128192&package_id=242056
(0.6.28 has win32 installer)

From the screenshot, the Chinese font name in the font selection box (not the
drop-down menu) was displayed by a strange bitmap font, looks like a Japanese
font (at 8pt). However, the 3rd and 4th characters were totally blacked out by
overlapping bitmaps, the 5th character disappeared. In the drop-down menu, they
were displayed correctly by this selected font (WenQuanYi Zen Hei).

This only happens on a Windows machine (XP and vista). There are at least two
Chinese fonts covers the entire unicode CJK basic code points, unfortunately,
OOo did not use any of these fonts, but a strange bitmap font with limited glyphs.
Comment 1 Olaf Felka 2009-08-20 14:22:54 UTC
@ mru: Please have e look.
Comment 2 michael.ruess 2009-08-20 15:14:14 UTC
Problem is, that in this control a different font is used - the font which is
set in the Windows options for the User interface. Thus it cannot display
certain Unicode characters.
Set a different font for the Windows UI and this will be better. Sorry, but we
cannot fix this here.
Comment 3 michael.ruess 2009-08-20 15:14:46 UTC
Closed.
Comment 4 fangq 2009-08-20 15:31:46 UTC
@mru

if the control is set to a fixed UI font, then why not make it changeable and
get updated as the user choose a different font? what are the concerns?
Comment 5 fangq 2009-08-20 20:35:24 UTC
@ mru

There is still something not right. Please see the attached screenshot. If your
argument is correct, then how come Wordpad can display the font name properly?

(My system wide font is window's default, i.e. Tahoma, and I selected "Chinese
(PRC)" as the non-unicode program language from Control Panel\Regional and
Language\Advanced tab).

It looks like OOo does not follow the non-unicode language settings, and chose
to display Han characters with Japanese bitmaps.
Comment 6 fangq 2009-08-20 20:36:07 UTC
Created attachment 64281 [details]
font selection box for OOo and Wordpad
Comment 7 hdu@apache.org 2009-09-03 15:43:57 UTC
Selecting the best matching set of ideographic glyphs (be it simplified chinese, traditional chinese, 
japanese or korean) by using the language setting in ControlPanel->RegionalSettings->Advanced-
>LanguageForNonUnicodeProgs would be a possibility. Having this info could be also be useful for other 
purposes, e.g. setting the default language for CJK- or CTL-texts.

Since the information from the ControlPanel is not available directly it would have to be guessed by 
comparing the results of the non-unicode API with several differently test strings from the unicode API. 
Such a heuristic could be tricky though, e.g. are there reliable differences between the Big5 encodings 
used in Mainland China and Hongkong?
Comment 8 fangq 2009-09-03 16:28:40 UTC
@ hdu

this information appears to be stored in the registry at
\HKLM\SYSTEM\\CurrentControlSet\\Control\\Nls\\Language\\Default

see more details:
http://support.microsoft.com/kb/102987

codepage 936(GBK) has language id 0804.
Comment 9 fangq 2009-09-03 16:33:17 UTC
the full list of language ids can be found at
http://www.science.co.il/Language/Locale-Codes.asp

the registry key value is the "LCID Hexade" column.
Comment 10 michael.ruess 2009-09-22 09:08:31 UTC
Reassigned to HDU.
Maybe someone from the community could build a Patch to solve this; as long as
we do not have the resources to solve this, we have to target to "OOo later".
Comment 11 hdu@apache.org 2009-09-22 09:18:33 UTC
Thanks for the pointer to the KB article!
Comment 12 hdu@apache.org 2010-03-08 12:04:10 UTC
Glyph fallback as mentioned in item A of issue 101552#desc35 could also benefit from this.
Comment 13 Marcus 2017-05-20 11:35:12 UTC
Reset assigne to the default "issues@openoffice.apache.org".