[Interest] Glyph fallback

Ender Erel ender.erel at icterra.com
Wed Nov 20 11:01:03 CET 2013


Can you please elaborate on how you are doing it currently? From what I understand, you are using two fonts simultaneously (latin, chinese), which I think is exactly what i need. What do you mean by "the fonts specified", where do you specify them? 

> But fontconfig is not used in Qt for embedded Linux, isn't it? :-(
I don't think so, Our current configuration uses legacy fontdir approach, but i think Qt can be built to use fontconfig, embedded or otherwise. 
See: http://qt-project.org/doc/qt-4.7/qt-embedded-fonts.html#id-3f8b04d8-02f7-44c9-8990-343b812dda64

Alejandro: Sure, If i can sort this out, I will share how to do it with the list.

Regards,
Ender

-----Original Message-----
From: interest-bounces+ender.erel=icterra.com at qt-project.org [mailto:interest-bounces+ender.erel=icterra.com at qt-project.org] On Behalf Of Alejandro Exojo
Sent: Wednesday, November 20, 2013 11:42 AM
To: interest at qt-project.org
Subject: Re: [Interest] Glyph fallback

2013/11/20 Rutledge Shawn <Shawn.Rutledge at digia.com>:
>
> On 19 Nov 2013, at 4:25 PM, Ender Erel wrote:
>
>> Hi all,
>>
>> I am using Qt on Embedded Linux and trying to setup fallback fonts for some glyphs.
>>
>> First, let me explain my situation:
>> I have three TTF fonts (without any overlap in glyph coverage):
>> -FontA: includes Latin, Cyrillic and Greek characters
>> -FontB: includes Korean characters
>> -FontC: includes Chinese & Japanese characters
>>
>> I want to setup my application such that FontA is used for all text but missing characters in FontA are taken from FontB, and if FontB does not contain them, taken from FontC. I tried QFont::insertSubstitution but i think that mechanism is intended for using FontB in case FontA is missing on the system. Is there any way I can achieve this?

I am in a similar situation. I have so far a bunch of fonts with the usual glyphs for numbers and western languages, plus one font for Chinese only. When the application is in Chinese, the fonts specified make the default fonts picked up first (e.g. for numbers), and the Chinese characters with the Chinese font for the rest.

I will have to add Korean and Japanese, and my understanding is that both share with Chinese values in the Unicode table, but different fonts have to be used, so a language change would require loading and unloading fonts. From a quick look, QFontDatabase states that loading and unloading fonts without fontconfig is not possible.

> That's the sort of thing fontconfig usually does.

But fontconfig is not used in Qt for embedded Linux, isn't it? :-(

Ender: I'm in a similar situation. I will have to look at that soon.
If you find something, please comment. I will do the same.

--
Alejandro Exojo Piqueras

ModpoW, S.L.
Technova LaSalle | Sant Joan de la Salle 42 | 08022 Barcelona | www.modpow.es _______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list