Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 232716 - [xft] need to add 'Uncode' font(s) to a fontconfig search pattern
: [xft] need to add 'Uncode' font(s) to a fontconfig search pattern
: intl
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Milan Sreckovic [:milan] (PTO through Oct 23)
Depends on:
Blocks: 232647
  Show dependency treegraph
Reported: 2004-01-30 18:17 PST by Jungshik Shin
Modified: 2012-01-13 14:33 PST (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (4.50 KB, patch)
2004-06-27 05:08 PDT, Jungshik Shin
no flags Details | Diff | Splinter Review

Description Jungshik Shin 2004-01-30 18:17:10 PST
When you have an Chinese document with a few non-Latin characters (say,
Devanagari, Tamil, Mathematical symbols, Old Italic), the list of fonts returned
by fontconfig is not likely to include fonts for Devanagari or Tamil even though
you have fonts covering them.  Fixing bug 204586 and bug 229394 can make this
better in some situations, but that doesn't work always. Fixing bug 204586
doesn't solve this particular problem because Devanagari and Tamil have to be
explicitly tagged with 'lang'/xml:lang. Moreover, if characters in question are
some 'language-neutral' symbols (say, Mathematical symbols), we can't tell
authors to tag them with lang/xml:lang. Bug 229394 could work in all cases, but
the only platform where we have that implemented doesn't have UI for that and
it's undocumented so that we can't expect end-users to do that (see bug 232657
comment #2). 

In addition, on Windows, what I want to implement in bug 208479 is implemented
so that the situation is better. However, it's all but impossible to do the
equivalent on Gfx:Xft because the pattern for fontconfig is not constructed per

There are a couple of things we can do here. 

1. When we construct a font pattern, we can map the first character to a
langGroup and add the font for that langGroup to the pattern. This is not
perfect but could have a similar effect to what we have on Gfx:Win (see 
Perhaps, I have to do that in bug 208479.

2. Even #1 could fail because 1) we only have a handful of langGroups and there
are a huge number of scripts not covered by our current set of langGroups
(actually scriptGroups) 2) the first character may happen to be covered by one
of our existing langGroups while most of characters in a chunk are not. In the
first case, we can solve the problem in bug 208479 by using x-unicode font as
'fit-them-all' fallback. For the second case,  we explicitly have to add fonts
for 'x-unicode' to the pattern, which is this bug. Gfx:Win effectively does this
already and Gfx:Xft should do that, too.
Comment 1 Jungshik Shin 2004-02-06 00:16:09 PST
bug 232657 comment #16 explains why we need to add the feature.
see also 
The page has Latin, Chinese and Tamil without 'lang' specified.
Comment 2 Jungshik Shin 2004-06-27 05:08:43 PDT
Created attachment 151799 [details] [diff] [review]

This patch will make Gfx:Xft a bit closer to Gfx:Win.
Comment 3 Zack Weinberg (:zwol) 2011-11-15 17:07:45 PST
The code modified by the patch no longer exists, but I don't know whether the change request is still relevant.  Relabeling Core:Graphics for triage.
Comment 4 Jeff Muizelaar [:jrmuizel] 2012-01-13 14:33:15 PST
I suspect this is now fixed.

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