Re: [dev] Potential bug in st fallback font code

From: FRIGN <dev_AT_frign.de>
Date: Sat, 21 Feb 2015 16:40:20 +0100

On Sat, 21 Feb 2015 07:32:54 -0800
Eric Pruitt <eric.pruitt_AT_gmail.com> wrote:

> In my dwm patch, I worked around this problem by creating a proper font
> structure from the fallback search result and then calling XftCharExists
> on the codepoint to actually verify that the fallback font contains the
> character I want. Something else I've considered that is probably more
> performant is calling 'FcCharSetAddChar(fccharset, " ");' to determine
> what the user's default font is (I'm assuming that the vast majority of
> default fonts contains a space) then using strstr or strcmp to make
> certain the fallback font isn't the default font.

Agreed.

> Having configurable fallbacks is a good idea IMO, but again, I don't
> think specifying _one_ fallback is sufficient. Instead of specifying a
> single fallback font, I would suggest making the font configuration
> variable an array that is used to prepopulate the font cache. This still
> allows for generic fallback support while allowing each user to optimize
> the font configuration for speed and aesthetic preferences on a
> particular system.

Yes, having an array is a great idea! I don't like how the fontconfig
magic possibly pulls in fonts you don't want to use.
The strictness of compile-time-configuration would be kept if we only
loaded fonts specified in the array. This would also bring a performance
gain for Unicode characters (The performance is horrible atm).

Cheers

FRIGN

-- 
FRIGN <dev_AT_frign.de>
Received on Sat Feb 21 2015 - 16:40:20 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 21 2015 - 16:48:16 CET