[Fontconfig] How to block glyph fallback in a QT application?

Khaled Hosny khaledhosny at eglug.org
Mon Jan 6 07:30:27 PST 2014


On Mon, Jan 06, 2014 at 04:09:40PM +0100, Janusz S. Bien wrote:
> Quote/Cytat - Behdad Esfahbod <behdad at behdad.org> (Mon 06 Jan 2014 03:57:06
> PM CET):
> 
> >On 14-01-06 10:46 PM, Janusz S. Bien wrote:
> >>Quote/Cytat - Raimund Steger <rs at mytum.de> (Mon 06 Jan 2014 02:51:29 PM
> >>CET):
> >>
> >>>Hi,
> >>>
> >>>On Mon, January 6, 2014 07:13, Janusz S. Bien wrote:
> >>>>[...]
> >>>>incidentally selects an improper font, then fallback creates quite a
> >>>>mess.
> >>>
> >>>What kind of mess are you seeing --
> >>>
> >>>* empty squares showing (= no glyph fallback)
> >>
> >>That's what I would like to have when the user selects a wrong font.
> >
> >You need to ask Qt then.  Little that can be done in fontconfig.
> 
> The problem doesn't seem to be QT specific. On several versions of Debian I
> never get empty squares in any application - for example gnucharmap is quite
> confusing for this reason.

Generally, for most applications it is preferable to show the user some
text, even if the typographic quality is low than showing him empty
squares, that is why virtually every GUI application (or toolkit)
implement some sort of fallback.

Gucharmap has an option to turn off fallback, and so does Pango, but for
a Qt application you will need a Qt solution.

FontConfig itself does not do glyph fallback (since it is not a text
layout library), though such a mechanism can be built on top of its API.

Regards,
Khaled


More information about the Fontconfig mailing list