[Bug: 21.5-b28] Xft: characters picked from different fonts
Stephen J. Turnbull
stephen at xemacs.org
Mon Mar 16 08:23:10 EDT 2009
Marcus Harnisch writes:
> a box drawing set where the lines don't line up. Not sure how likely
> it is in practice that a relatively small set (such as box drawing)
> has been only partially implemented.
Probably unlikely. OTOH your application use dignbats like the
triangles, too, and that seems likely to be more or less independent
of the box drawing characters.
> OTOH, it might be difficult to tell whether a given font provides all
> characters in a set. Again, I have no idea about font infrastructure
> and how any of this is done technically.
Not hard, but unimplemented in XEmacs as yet.
> Although it doesn't explicitly talk about bold variants, we find that
> at least some box drawing characters are still not
> supported[2]. Supporting these in Sans Mono Bold has been on the ToDo
> since at least 2005[3].
Bummer. Not an XEmacs bug, though ;-)
> > (That's up to you of course, and the boxes *are* an XEmacs bug. But
> > even if XEmacs provided a fallback glyph, it would be in a different
> > font and you would notice it, I think.)
>
> "Noticing" is different from "eye sore".
>
> I think a resonable algorithm would be:
>
> 1. Check if current font provides character.
>
> Display and go to END.
>
> 2. Find variant of font that extends the default font.
>
> Completely made up Example: We'd need to figure that there is a
> font e.g. CourierExtra that has been designed to be used with
> Courier, and extends it with extra (less common) characters. Is
> there any way to obtain such information?
Not without checking all the fonts. For example for Japanese the
wadalab/watanabe font, the kochi font, and the sazanami font are all
based on the same original collection (by the Wada Lab) AFAICT, and so
would be suitable for such a substitution, if they have different
characters in them. If so, you just have to know that those three
font collections are related, and try them.
This might be a reasonable thing to try to do in Lisp (of course then
we need to cache the answers, presumably in the face customizations or
specifiers). However, it's not kosher to call Lisp from redisplay.
It might be possible to set up a task to be called when XEmacs is idle
to do the search; I'll think about that.
>
> Display and go to END.
>
> 3. Check if other font variant (bold, normal, light, etc.) provides
> character.
>
> Display and go to END.
>
> 4. Find /any/ font providing character.
>
> Display.
1 and then 4 is more or less what we do, at lesat I though Aidan
implemented that. I'm not sure why it doesn't work for the boldface
case.
More information about the XEmacs-Beta
mailing list