Bug 910875 - Google Droid Sans Fallback and fontconfig
Summary: Google Droid Sans Fallback and fontconfig
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: google-droid-fonts
Version: 18
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Nicolas Mailhot
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-13 18:59 UTC by Mattias Ellert
Modified: 2013-02-16 16:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-16 16:36:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mattias Ellert 2013-02-13 18:59:08 UTC
Description of problem:

I have a question about the Google Droid Sans Fallback font in Fedora. How am I supposed to find this font using fontconfig?

Finding the non-fallback Google Droid Sans is easy:

[ellert@localhost ~]$ fc-match DroidSans
DroidSans.ttf: "Droid Sans" "Regular"

Also finding the non-latin fonts is easy using lang in the pattern:

[ellert@localhost ~]$ fc-match DroidSans:lang=ja
DroidSansJapanese.ttf: "Droid Sans" "Regular"
[ellert@localhost ~]$ fc-match DroidSans:lang=ar
DroidSansArabic.ttf: "Droid Sans" "Regular"

But what pattern should I use to get the Fallback font? The only idea I have is the following:

[ellert@localhost ~]$ fc-match DroidSansFallback
DroidSans.ttf: "Droid Sans" "Regular"

But as can be seen above this just finds the non-fallback version. Is there some pattern that can be used to find the fallback font I can't figure out?

Version-Release number of selected component (if applicable):
google-droid-sans-fonts-20120715-4.fc18

Comment 1 Nicolas Mailhot 2013-02-16 16:36:41 UTC
While the complete hiding of DroidSansFallback is an unintended side-effect of the method we use to merge Droid fonts in fontconfig I'm pretty sure it does not matter since the merged "Droid Sans" will include all the codepoints of the files we built it from.

Therefore fc-match is correct: in Fedora you should use "Droid Sans" for your DroidSansFallback needs. Our Droid Sans is as complete as DroidSansFallback, except that some DroidSansFallback glyphs are being transparently replaced by better versions from other Droid fonts.

Now of course that only works if your application is using fontconfig properly. If you only use fontconfig to find font files on the system, but do not use the fontconfig substitution engine on a per-glyph basis, things are going to be hard for you.

And this kind of partial fontconfig support is definitely something we do *not* want to encourage in Fedora: use the system glyph substitution rules, if you find holes in them fix them, but do not try to work around them, having different font behaviour in apps because they're making shortcuts in their fontconfig plumbing is not something that is helping users at all.


Note You need to log in before you can comment on or make changes to this bug.