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



--- Comment #26 from Akira TAGOH <ta...@redhat.com> ---
(In reply to Oleg Oshmyan from comment #24)
> The list returned by Fontconfig is ordered by priority. libass uses the
> first (highest-priority) font that satisfies the request. The choice of
> priority lies entirely with Fontconfig.

No, that isn't even true. It sounds like there are any gaps in recognition.
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.

> But Latin *isn't the problem*. It's digits. Noto Sans Arabic contains digit
> glyphs. When it is the system's default font, applications have no reason
> not to use those glyphs.
> 
> Application says: draw this number in sans-serif
> Fontconfig says: the top sans-serif font is Noto Sans Arabic
> libass says: OK, here's your number set in Noto Sans Arabic

As I demonstrated the above, fontconfig chose Noto Sans without lang="ar". This
is a libass issue that they use fontconfig API improperly.

(In reply to Oleg Oshmyan from comment #25)
> What libass could, in fact, do better here is it could better match the size
> of the primary font (Noto Sans Arabic) used for the numerals and the
> fallback font used for the Latin, so that the apparent font size at least
> wouldn't jerk around like that (on this pair of fonts at least... there's
> never any guarantee about size consistency when using two different fonts).
> But I don't see how it could be expected to not choose Arabic in the first
> place.

How about simply taking a look at "lang" for a font? "lang" object indicates
what character coverage is needed to represent for. "en" almost covers Latin
characters loosely. If you know what characters represent a language, you don't
need to check it with FC_CHARSET one by one.


-- 
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%23c26
--
_______________________________________________
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