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

From: Christoph Lohmann <20h_AT_r-36.net>
Date: Mon, 09 Mar 2015 23:17:23 +0100

Greetings.

On Mon, 09 Mar 2015 23:17:23 +0100 Eric Pruitt <eric.pruitt_AT_gmail.com> wrote:
> First off, I'm not sure what's proper etiquette around here for posting
> a public email that is somewhat directed toward a specific person, so
> mea culpa if CC'ing that person is the wrong approach.

I will read the mailinglist.

> While implementing Unicode support for dwm with Xft, I discovered an
> issue with my code and realized the same issue appears to be present in
> st. When selecting a fallback font for a character that the user has no
> fonts installed for, the font cache is immediately exhausted with
> duplicate entries of the default font. To test this in st, I made a
> small change to print the name of the font st is falling back to for a
> given character:
>
> [...]
>
> The Xft / Fc* font calls end up returning the default font even though
> the codepoint does not exist in it. This is the first time I've done
> anything with Xft, so I'm not sure if there's something that can be done
> with the Fc* calls to keep this from happening.

The returned pattern are no duplicates and can’t be compared. I pushed a
change to st to store the unicode long too of the glyph. This prevents
the code from reloading the default font used to display the missing
glyph.

Thanks for reporting this.


Sincerely,

Christoph Lohmann
Received on Mon Mar 09 2015 - 23:17:23 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 09 2015 - 23:24:07 CET