Bug 85185

Summary: Unable to load some chinese fonts with the right name.
Product: [Retired] Red Hat Linux Reporter: Chan Min Wai <dcmwai>
Component: ttmkfdirAssignee: Yu Shao <yshao>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: eng-i18n-bugs, mitr, otaylor
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-12-11 06:33:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 100967    

Description Chan Min Wai 2003-02-26 11:40:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.0.1) Gecko/20021003

Description of problem:
Every time we start xfs, the process want to rebuild the fonts.dir so that it
contain the right informaiton. But this is not working for Chinese or some
double-byte character fonts.

The main problem for this is that mkfontdir and mkfontscale didn't really know
about the fonts information. the output become.

ID009.TTF -misc-$$$$$s$$$$$$-medium-r-normal--0-0-0-0-m-0-iso10646-1
ID011.TTF -misc-$$$$$s$$$$$$-medium-r-normal--0-0-0-0-m-0-iso10646-1
ID012.TTF -misc-$$$$$s$$$$$$-medium-r-normal--0-0-0-0-m-0-iso10646-1
ID013.TTF -misc-$$$$$s$$$$$$-medium-r-normal--0-0-0-0-m-0-iso10646-1

instate of (The Right version)

ID009.TTF
-misc-&#20013;&#22283;&#40845;&#27611;&#26999;&#39636;-normal-r-normal-utf8-0-0-0-0-m-0-iso10646-1
ID011.TTF
-misc-&#20013;&#22283;&#40845;&#28023;&#34892;&#26360;-normal-r-normal-utf8-0-0-0-0-m-0-iso10646-1
ID012.TTF
-misc-&#20013;&#22283;&#40845;&#27611;&#38584;&#26360;-normal-r-normal-utf8-0-0-0-0-m-0-iso10646-1
ID013.TTF
-misc-&#20013;&#22283;&#40845;&#21109;&#34269;&#39636;-normal-r-normal-utf8-0-0-0-0-m-0-iso10646-1
(There is some chinese fonts in between and these chinese fonts is big5 coded.)

We need a resolve to make sure that mkfontdir is getting the right fonts name If
I'm not wrong this will happen to other double-byte fonts as well.

For your information this chinese fonts is some ages old, an hence it don't
really follow the new ttf standard but Openoffice printer does add them
correctly, and the correct fonts.dir was generated by openoffice.

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


How reproducible:
Always

Steps to Reproduce:
1.Place a new Chinese Fonts to any of your fonts path
2.Restart your X fonts Server (xfs)
3.You will notice a change on the fonts.dir



Actual Results:  You will get the chinese name if you are luckly enough else you
will get something like 
ID009.TTF -misc-$$$$$s$$$$$$-medium-r-normal--0-0-0-0-m-0-iso10646-1

Expected Results:  The font name should be 
ID009.TTF
-misc-&#20013;&#22283;&#40845;&#27611;&#26999;&#39636;-normal-r-normal-utf8-0-0-0-0-m-0-iso10646-1

Additional info:

These Chinese fonts was some ages old but it should be correctly detected. At
the same time, I've some new chinese fonts their name can be found for the one
which is postscript enable.

Comment 1 Chan Min Wai 2003-02-26 11:43:04 UTC
The web Prohibit me to enter some chinese character...
&#20013;&#22283;&#40845;&#27611;&#26999;&#39636; should be 中åé¾æ¯æ¥·é«

Comment 2 Owen Taylor 2003-05-01 21:10:15 UTC
*** Bug 85184 has been marked as a duplicate of this bug. ***

Comment 3 Owen Taylor 2003-06-10 22:04:52 UTC
X Logical Font Descriptors are defined to be in the X Portable Character Set;
you can't have a Chinese font name.

I suspect that with current versions of freetype and 'mkfontscale' 
(ttmkfdir uses freetype1) things will come out better with a real
ASCII name rather than $$$$. Quite a bit of attention has been put 
into making freetype-2.1.x pick the best ASCII name from a font.

Unfortunately, ttmkfdir is run on every font directory on xfs 
startup, so will erase whatever fonts.scale you have there will
get overwritten.

I don't think this problem will get fixed until we get rid of 
ttmkfdir, but reassigning to that component.


Comment 4 Yu Shao 2003-06-10 23:40:37 UTC
Could you please attach ID009.TTF here, so I can take a look. Thanks.

Comment 5 Chan Min Wai 2003-06-11 01:01:34 UTC
The fonts files is a bit big in size (about 5~6) MB do you really want it to be
uploded?

Comment 6 Yu Shao 2003-06-11 01:13:16 UTC
I think it is fine, or you could tell us how to download from other places.

Comment 7 Owen Taylor 2003-06-11 02:06:22 UTC
If the font is a commercial font, please don't attach it here, since
we don't have any easy way of deleting attachments. I would mail
it to Yu Shao as an attachment, or mail him a link to where he can
download it.


Comment 8 Chan Min Wai 2003-06-11 03:44:26 UTC
Ok I'll send to Yu Shao.

BTW, This this is happen to RH9 as well.

Comment 9 Yu Shao 2003-12-10 00:40:26 UTC
Chan Min Wai, 

I didn't receive the font, I will close it now, if it is still an
issue, please reopen it.


Comment 10 Chan Min Wai 2003-12-11 04:51:25 UTC
Sorry for this long long delay.

http://hanyi.com.cn/8000/html/8000.htm

Please download the Big5 fonts or GB fonts here. I've try them it is
usable in Redhat 9 / Fedora.

Because the name isn't loaded correctly, So When you add 1 fonts, The
Fonts server added one new "unknow" fonts.
But after that, when you add the 2nd ~ 4th fonts, There is Still ONLY
one "unknow" fonts because fontconfig can't read it name.

This Page have some of the hack that Might help But they are not
accept by the main branch YET.
http://firefly.idv.tw/test/Forum.php?Board=1&History=0&Page=1

Thank You
And Sorry for the long delay.

Comment 11 Yu Shao 2003-12-11 06:33:56 UTC
All entries of the name table's language ids are set as specific
language names like "simplified chinese" or "traditional chinese",
even it is ASCII string, it is a bug of font files.

So please contact font vendor, will close it as NOTABUG.