[Fontconfig] FontConfig font selection problem

Akira TAGOH akira at tagoh.org
Mon Mar 12 22:00:52 PDT 2012


Please explain what the font you are expecting to see and what the
font is actually selected. it's hard to figure out what's going on
there.

try:
$ fc-match sans-serif

or

$ fc-match sans-serif:lang=ug

perhaps. or whatever the alias font you are suspecting.

On Tue, Mar 13, 2012 at 1:31 PM, Eagle Burkut <eagle.burkut at gmail.com> wrote:
> On Mon, Mar 12, 2012 at 10:43 PM, Akira TAGOH <akira at tagoh.org> wrote:
>>
>> Please be aware that no one can tell you the better answer without the
>> details. this is a rough answer for the rough question. if you aren't
>> comfortable with it, please give us what you did, what happened and
>> what you were expected. otherwise there are no way to see what's wrong
>> in fontconfig.
>>
>> On Tue, Mar 13, 2012 at 9:30 AM, Eagle Burkut <eagle.burkut at gmail.com>
>> wrote:
>> > So I am here to ask your help. I have couple of questions:
>> >
>> > (1) Why does the fontconfig select the font poorly here, even selecting
>> > a
>> > font which does not support the required code points and or glyphs?
>>
>> The possible reason is, 1) there are no better fonts against the
>> query. which covers the code points in ug.orth. 2) the font pattern in
>> the query is wrong. 3) ug.orth has a bug.
>
>
> 1) Yes, there is already a better font available.
> 2) Probably
> 3) ug.orth has no bug. we have recently fixed it.
>
>>
>>
>> > (2) Is the any way to tell/force fontconfig to use a font for the given
>> > language environment / writing system / scripts?
>>
>> You can put the following config to $HOME/.fonts.conf:
>
>
> The problem starts immediately when you boot your PC with CD to install the
> system. The installation screen itself is very buggy. I think it is because
> of the bugs in the fontconfig itself.
>
> Before you finish installing the system, there is no way to put these files
> into those folder (which does not exist at the time you are installing the
> system from the CD).
>
>>
>>
>> <?xml version="1.0"?>
>> <!DOCTYPE fontconfig SYSTEM "/etc/fonts/fonts.dtd">
>> <fontconfig>
>>  <alias>
>>    <family>serif</family>
>>    <prefer>
>>        <family>Your Font Family Name</family>
>>    </prefer>
>>  </alias>
>>  <alias>
>>    <family>sans-serif</family>
>>    <prefer>
>>        <family>Your Font Family Name</family>
>>    </prefer>
>>  </alias>
>>  <alias>
>>    <family>monospace</family>
>>    <prefer>
>>        <family>Your Font Family Name</family>
>>    </prefer>
>>  </alias>
>> </fontconfig>
>>
>> or if you want to use your font for Uyghur only:
>>  <match>
>>    <test name="lang" compare="contains">
>>      <string>ug</string>
>>    </test>
>>    <test name="family">
>>        <string>sans-serif</string>
>>    </test>
>>    <edit name="family" mode="prepend">
>>        <string>Your Font Family Name</string>
>>    </edit>
>>  </match>
>>
>> and similar for serif and monospace too.
>>
>> --
>> Akira TAGOH



-- 
Akira TAGOH


More information about the Fontconfig mailing list