[packagekit] [Fontconfig] FontConfig iso15924 tag for autoinstallation via PackageKit

Frédéric WANG fred.wang at free.fr
Thu May 1 05:27:30 PDT 2014


Thanks for your reply,

I'm cc'ing Jonathan Kew, as I'm not sure I can really comment precisely 
on the current patch. At the moment the "missing glyph for this unicode 
char" is done at a low level, during the text rendering. My 
understanding is that you can determine a script (e.g. Cyrillic) for a 
given character, but you have no way to then infer the language (e.g. 
the various languages using the Cyrillic alphabet). HTML has a lang 
attribute that could be used to determine the language of a page, but 
this is done at a higher level in Gecko and this attribute might not 
always be provided anyway. So I believe, it is unlikely that Gecko will 
always be able to provide both the language and script tags. On the 
other hand, I believe that fontconfig would be able to determine the 
script(s) used in a font by checking the unicode coverage, just as 
Jonathan has done that in Gecko.

(Anyway, in the short term it's unlikely that the script metadata is 
available in PackageKit, so Mozilla will need a way to map the script 
tag to something that this library can understand. My plan is to have an 
add-on that does that)

Regarding the Zmth "Mathematical notation" script, perhaps a more 
reliable way for fontconfig would be to check the presence of the 
OpenType MATH table [1]. Indeed, some fonts like DejaVu have good 
coverage for math characters, but can not really be used for math 
rendering because of the absence of the MATH table, so only checking the 
unicode coverage is not enough...

[1] 
http://mpeg.chiariglione.org/standards/mpeg-4/open-font-format/text-isoiec-cd-14496-22-3rd-edition, 
section 6.3.6

Le 30/04/2014 13:11, Akira TAGOH a écrit :
> I have a rough idea to support the script based selection in
> fontconfig though, there are some issues we may need to address before
> that. most obvious one is, the mapping from the script to fonts isn't
> necessarily unique.that may eventually depends on the language or
> needing another map to determine the script tag at the end as you
> told. easier way may be to leave it to applications and expect to see
> the language and the script tags together in the query perhaps. no ETA
> for that however.
>
> On Wed, Apr 30, 2014 at 4:45 PM, Frédéric WANG <fred.wang at free.fr> wrote:
>> Dear FontConfig & PackageKit developers,
>>
>> I've recently worked on automatic font installation in Gecko-based
>> applications using PackageKit [1]. The current patch to add notifications
>> for missing glyphs in Gecko relies on script tags as defined in iso15924 [2]
>> [3]. So it would help if fontconfig & PackageKit would be able to handle
>> some metadata for these script tags, for example :script=Khmr (at the moment
>> I think only the :lang tag is supported). Also, I'm interested in automatic
>> installation of math fonts, so it would be important to support the code
>> "Zmth=Mathematical notation" too. This script does not correspond to any
>> Unicode script, but you can find some relevant ranges in
>> http://www.w3.org/TR/xml-entity-names/#blocks (especially the Mathematical
>> Alphanumeric Symbols are important and are required for [4])
>>
>> Thanks,
>>
>> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=467729
>> [2] http://www.unicode.org/iso15924/iso15924-codes.html
>> [3] https://bugzilla.mozilla.org/show_bug.cgi?id=619521
>> [4] https://bugzilla.mozilla.org/show_bug.cgi?id=930504
>>
>> --
>> Frédéric Wang
>> MathML Crowdfunding: ulule.com/mathematics-ebooks
>> _______________________________________________
>> Fontconfig mailing list
>> Fontconfig at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/fontconfig
>
>


-- 
Frédéric Wang
MathML Crowdfunding: ulule.com/mathematics-ebooks


More information about the PackageKit mailing list