Re: improvement of font selection



In article <Pine LNX 4 58 0603272114170 21196 epoch cs>, Behdad Esfahbod <behdad cs toronto edu> writes:

> On Mon, 27 Mar 2006, Kenichi Handa wrote:
>> Unfortunately, AFAIK, fonts.conf doesn't allow per-script
>> (or per-language) settings, and we can't say some font is
>> broken or not without specifying a script or language.

> I keep hearing this (this is the third time in the past couple of
> months), but I don't believe it's true.  For example, I just
> hacked a tiny fonts.conf to change font selection for Arabic and
> Persian.

Ah!  You are right.  I was short sight.  I was only thinking
about adding fonts in this kind of parts.

<!--
  Serif faces
 -->
	<alias>
		<family>Bitstream Vera Serif</family>
		<family>Times New Roman</family>
[...]
	</alias>

So, I tried this setting to prefer lklug to freeserif for
sinhara.

        <match>
                <test name="lang">
                        <string>si</string>
                </test>
                <edit name="family" mode="prepend" binding="same">
                        <string>lklug</string>
                </edit>
        </match>

Then, fc-match surely returns lklug for :lang=si.  But when
I open a Sinhala file with gedit, it seems that gedit (or
pango; I don't know) prefer freeserif over lklug.  The file
contains this character sequence ("hello" in Sinhara):

  U+0D86 U+0DBA U+0DD4 U+0DB6 U+0DDD U+0DC0 U+0DB1 U+0DCA

The fonts selected are these (I got this information by
adding printf() in pango/modules/indic/indic-fc.c).

  U+0D86 -> LKLUG
  U+0DBA U+0DD4 U+0DB6 -> FreeSerif
  U+0DDD -> LKLUG
  U+0DC0 U+0DB1 U+0DCA -> FreeSerif

lklug contains all corresponding glyphs, but glyphs for
U+0D86 and U+0DDD are missing in freeserif.  Of course the
resulting rendering is incorrect.

---
Kenichi Handa
handa m17n org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]