https://bugzilla.redhat.com/show_bug.cgi?id=2262410



--- Comment #28 from Oleg Oshmyan <chor...@inbox.lv> ---
Ah, you must mean the other kind of lang object, the one Fontconfig extracts
from each font. I'm actually unsure how it does this; isn't it still built from
the fonts' built-in code page or Unicode coverage bits? Anyway, I don't see how
that helps.

> Language coverage has some correlation with glyph coverage but one does not 
> guarantee the other.

And more than anything, fonts' language properties are useful to determine what
shape the glyphs have rather than what glyphs are available. For example, some
CJK code points look different in different variants of Chinese and Japanese,
some Cyrillic code points look different in Bulgarian, Serbian and Russian, and
even some Latin code points look different in Europe and elsewhere.
Correspondingly, if one knows the text being rendered is in a particular
language, one should prefer a font that is designed for that language.

But this doesn't mean that one should stop checking whether a glyph actually
exists in a font, and when no particular language is involved, libass has no
particular reason to look for an English font when another font fits the bill.

> It isn't actually "ordered by priority". FcPattern built by 
> FcConfigSubstitute() is just a result going through all config enabled. There 
> are nothing more than that.
> It doesn't guarantee that it is available on the system even.
> fontconfig tries to build a best font/font list with FcFontMatch/FcFontSort 
> against it. the result will be polished. This is what libass is missing here.

Side note: it would help if Fontconfig documentation actually explained this.

So basically we just need to add a FcFontSort call immediately after the
FcConfigSubstitute?

How *does* Fontconfig decide to prefer Noto Sans upon FcFontSort in this case?
Does it try to find a font that covers the system locale's language?


-- 
You are receiving this mail because:
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2262410

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202262410%23c28
--
_______________________________________________
fonts-bugs mailing list -- fonts-bugs@lists.fedoraproject.org
To unsubscribe send an email to fonts-bugs-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/fonts-bugs@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to