Chromium Code Reviews
DescriptionTries to retrieve all post_match_families in the font file to support non-ascii fonts. This patch should fix CHECK failures like this:
yusukes@yusukes-desktop:~/chromium2/src/build$ ../sconsbuild/Release/chrome
[20666:20666:544922424350:FATAL:/home/yusukes/chromium2/src/app/gfx/font_skia.cc(90)]
Check failed: tf. Could not find font: IPA モナー Pゴシック
Since some fonts have multiple font family names, the FontConfigDirect::Match() function should try to compare post_config_family with _all_ family names in the font, rather than with only the first (usually English) family name. For example, a popular Japanese font called ipagpmona.ttf has two family names, an English name and an internationalized (Japanese) one, and post_config_family for the font can be either the English name or the Japanese name depending on the situation.
$ showttf /usr/share/fonts/truetype/ttf-ipamonafont/ipagp-mona.ttf | egrep -A 1 -e
"platform=1 .* Family"
platform=1 plat spec encoding=0 language=0 name=1 Family
strlen=14 stroff=288 IPAMonaPGothic
--
platform=1 plat spec encoding=1 language=b name=1 Family
strlen=20 stroff=871 IPA <83><82><83>i<81>[ P<83>S<83>V<83>b<83>N
BUG=12530
TEST=none
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #
Total comments: 4
Patch Set 4 : '' #Messages
Total messages: 6 (0 generated)
|