Re: Font priorities
- From: Keith Packard <keithp keithp com>
- To: Owen Taylor <otaylor redhat com>
- Cc: Keith Packard <keithp keithp com>, Stefan Baums <baums u washington edu>, GTK-I18N Mailing List <gtk-i18n-list gnome org>
- Subject: Re: Font priorities
- Date: Tue, 04 Feb 2003 20:40:49 -0800
Around 23 o'clock on Feb 4, Owen Taylor wrote:
> Acute: fontconfig is picking fonts that don't have the right
> OpenType tables.
Let's add the right fields to the font information then so we can match on
OT tables. I think that's easy.
> Chronic: There is no reliable way for the user to specify
> preferences as to what fallback fonts they prefer. Once
> you get a fallback, you get the fallback that best matches
> the current language tag, even if that font is the ugliest
> font on the system.
That's a "feature", not a bug :-)
Of course, you can force the system to select a different font with a
strong binding value, but realistically, the goal is to make sure the font
selected has a prayer of displaying documents in the current language. A
good looking font that is missing half of the letters in the text is worse
than a less desirable font which does have the needed glyphs.
It may be that we need better mechanisms for selecting the document
language; HTML has language tags which match fontconfig quite nicely and
(generally) yield reasonable results. Lacking better information,
fontconfig falls back to $LANG (et al.). Perhaps there are better ways?
> Yeah ... I think for Pango's needs, a fontconfig key that was all
> the tables in the TrueType file would probably be sufficient.
Can you build that into a complete proposal? I don't mind grubbing
through freetype sources, but I fear I'll miss something as I don't really
understand the whole picture. Just a list of the possible values with
semantics should suffice for a start.
> Normally, "supports the user's default language" is a good heuristic
> for choosing between two fonts that both cover the code points.
> But sometimes it isn't ... so there needs to be a way of overriding
> this ... the obvious thing (and the thing people expect) is that
> being in the sans alias is a stronger indication of preference.
If the document isn't in the default language, then somehow we need to
tell fontconfig what language is in use; lying always gets you in trouble.
The addition of $LANG handling to fontconfig could be seen as a hack; the
intent was that applications supply language information at all times.
Of course, pango has no clue about language, so it may be necessary to
expose that up to the application so it can select the right value.
I don't see any other reasonable way to support multiple Han languages in
one document; no amount of configuration will make that work automatically.
Weak bindings were added precisely because the Sans alias shouldn't
override the document language, when the document language is accurate.
-keith
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]