Closed Bug 1167281 Opened 9 years ago Closed 9 years ago

find a font with language support even when the preferred font is not scalable

Categories

(Core :: Graphics: Text, defect)

Unspecified
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: karlt, Assigned: jtd)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

gfxFcPlatformFontList::FindGenericFamily() aims to find a family supporting
the requested language.  It does this by using FcFontSort(), which, in normal
fontconfig configurations, will provide a list where the first font supports
the language.  Subsequent fonts however are not sorted by language (as the
language support has been provided by the first font).

If the first font is not scalable, then FindGenericFamily() skips the first
font, but then the next font has not been sorted to support the language.

FcFontSort() can find a scalable font that supports the language, even in the
presence on non-scalable fonts, if the sort pattern has FC_SCALABLE set, as
indicated in https://bugzilla.mozilla.org/show_bug.cgi?id=1056479#c42
Whiteboard: [gfx-noted]
Assignee: nobody → jdaggett
OS: Unspecified → Linux
Comment on attachment 8610990 [details] [diff] [review]
patch, restrict font lookups to scalable fonts

>Bug 1167281 - restrict generics to scalable fonts under Linux. r?karlt

>+    // -- ignore size-specific fonts

Please make this "prefer scalable fonts" or "de-prioritize size-specific fonts" or similar, as they are not ignored.  It is just the sorted order that changes.

Also adjust the commit message, as generics are already restricted to scalable fonts; it is the choice of scalable font that is affected by this change.
Something like "sort scalable fonts first when resolving generic families".
Attachment #8610990 - Flags: review?(karlt) → review+
https://hg.mozilla.org/mozilla-central/rev/120ff7bb304a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: