freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] checking national glyhs


From: suzuki toshiya
Subject: Re: [ft] checking national glyhs
Date: Tue, 10 Jun 2014 11:19:31 +0900
User-agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100329)

Oops, I made a mistake.

> $ fc-query serif:lang=hu

I meant:
$ fc-match serif:lang=hu.

fc-match can accept the charset specification,
but its expression is not easy for human eye
(see discussion
http://comments.gmane.org/gmane.comp.fonts.fontconfig/4916
)

Regards,
mpsuzuki

suzuki toshiya wrote:
Hi,

For the codepoint scanning of ftdump, "-v" is OK, I think.
In general speaking, you should exclude the cmap subtable
with non-Unicode mapping (e.g. some east asian fonts and
some MacOS fonts have non-Unicode mapping table - there is
a possibility that the codepoint you're looking for is
used for different character).

But as Werner recommended, also I recommend fontconfig as
a considerable option. Because crawling all available font
files is time consuming work (file open & close is already
time consuming), and you might have another problem - how
to find a fallback font? Such issues could be solved by
fontconfig, if you have no problem in the settings of fontconfig
in your platform (many people complain the default setting
of fontconfig, manufactured by unix distributors, as they
return unwanted substitutions).

Anyway, I recommend fontconfig as a considerable option,
not as better solution, because yet I'm not understanding
your task completely.

# in fact, I think, fontconfig cannot search the font file
# by its filename.

Szépe Viktor wrote:
However, I strongly suggest that you use already existing solutions
like the `fontconfig' library, which contains code to scan a font for
detecting the supported scripts and languages.  A single glyph doesn't
make up a font for Hungarian...

Is it what you suggested?

$ fc-scan --format '%{lang}\n' /usr/share/fonts/truetype/msttcorefonts/verdana.ttf

Its output is
aa|af|av|ay|be|bg|bi|bin|br|bs|ca|ce|ch|co|cs|cy|da|de|el|en|eo|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gn|gv|ho|hr|hu|ia|ig|id|ie|ik|io|is|it|ki|kl|kum|la|lb|lez|lt|lv|mg|mh|mt|nb|nds|nl|nn|no|nr|nso|ny|oc|om|os|pl|pt|rm|ru|se|sel|sk|sl|sma|smj|smn|so|sq|sr|ss|st|sv|sw|tk|tl|tn|tr|ts|uk|uz|vo|vot|wa|wen|wo|xh|yap|zu|an|crh|csb|fil|hsb|ht|jv|kj|ku-tr|kwm|lg|li|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za


I guess Werner recommended to search the font aslike:

$ fc-query serif:lang=hu

Maybe you wonder "oh, I have not specified the character
to be searched". fontconfig has their own charset database
to detect the supported charset. For example, please check
 http://cgit.freedesktop.org/fontconfig/tree/fc-lang/hu.orth
for the database for Hungarian.


Is it stored in the font, or calculated?
fc doc says "This is computed by comparing the Unicode coverage of the font with the orthography of each language."
So I think it's calculted, so font cannot "lie".


Szépe Viktor

Regards,
mpsuzuki

_______________________________________________
Freetype mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype




reply via email to

[Prev in Thread] Current Thread [Next in Thread]