Axel Hecht writes:

> On 8/8/13 10:45 PM, Karl Tomlinson wrote:
>> Axel Hecht writes:
>>
>>> On 8/8/13 5:17 PM, Jonathan Kew wrote:
>>>> On 8/8/13 15:17, Axel Hecht wrote:
>>>>> Couter example seems to be Chinese, the unagi shows something, while my
>>>>> tool reports 13k missing glyphs for zh-TW.
>>
>>>> If we're using Droid Sans Fallback, I believe it supports somewhere well
>>>> over 20,000 Chinese characters, so that probably includes all those in
>>>> fontconfig's list - but that still doesn't mean it has *every* possible
>>>> Chinese character.
>>>
>>> Yeah, I see DroidSansFallback in fonts.mk in moztt,
>>> https://github.com/mozilla-b2g/moztt/blob/master/fonts.mk#L31, but
>>> how would we pick that up?
>>
>> I suspect you want to add font.name-list support to your tool.
>> These fonts should be searched by the product after font.name.
>>
>> pref("font.name-list.serif.zh-TW", "Droid Serif, Droid Sans Fallback");
>> pref("font.name-list.sans-serif.zh-TW", "Roboto, Droid Sans, Droid Sans
>> Fallback");
>> pref("font.name-list.monospace.zh-TW", "Droid Sans Fallback");
>>
>
> Right. I pick up both, but not name-list as fallback to
> name. Basically, what comes last in all.js wins right now.
>
> Is there a reason why font.name.* isn't just the first in
> font.name-list.* ? I.e., why do we have two of them, and does it
> matter for what I'm trying to do?

This was set up before I was around, so I'm not clear on the
reasoning.  Some comments [1] point out that only .name. is
configurable in Firefox Preferences UI.  Perhaps that would even
support the idea of .name. remaining in the .name-list. in case
some other font accidentally selected by the user was not helpful.

I think you do want to check both preferences for the situation
where a Latin font may have been inserted in .name. before a
native font in .name-list. in an attempt to get better Latin
characters.

I suspect usually one font will cover the language, so your tool
may not need to find the union the ranges or intersection of missing. 

At one stage IIRC only these fonts were being checked on Android,
while desktop platforms had a fallback search through every font
on the system.  That has changed a bit with desktop platforms not
always checking exhaustively, for perf reasons, and it may have
changed on Android also.

Even if other system fonts are checked in fallback, it is
important that the .name. and .name-list. fonts cover their
language, or you can get an awkward mix of characters from
different fonts that don't work together.  That can be as simple
as a collage of different characters, or as bad as not working at
all because some scripts require the presentation of characters to
depend on neighbouring characters and this is not supported across
a mix of fonts.

[1] 
http://hg.mozilla.org/mozilla-central/annotate/e33c2011643e/layout/base/nsPresContext.cpp#l485
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to