Re: Truetype fonts and UTF-8
Re: Truetype fonts and UTF-8
- Subject: Re: Truetype fonts and UTF-8
- From: Ken Thomases <email@hidden>
- Date: Sun, 18 May 2014 21:28:27 -0500
On May 18, 2014, at 7:55 PM, Bob Nnamtrop wrote:
> Is it possible to have truetype fonts and get good UTF-8 support. I find
> that I cannot have both.
I don't think that's quite right. I don't think the problem has anything to do with either TrueType fonts, per se, or UTF-8.
> The character "⋮" is giving me trouble. This shows up fine in my mail program as three
> vertical dots (I don't know how to type it but it is output in a program I
> use). If I use:
>
> $ xterm -ls &
>
> then I can see the "⋮" in the terminal. But if I use
>
> $ xterm -ls -fa Menlo &
>
> then I cannot (it shows up as an empty box).
> The problem is that I like the truetype fonts (e.g., Menlo, Conolas, etc)
> much better than the font I get with the first command above. Also, I use
> Menlo in Terminal.app and it outputs the "⋮" character so I think it is
> capable of it.
That doesn't mean what you think it does. Terminal.app uses the Mac frameworks (Cocoa or Core Text) to render text. The Mac frameworks have a system of font fallbacks. If a given character doesn't have a glyph in the selected font, they search through a font list for a font which does.
I think that Menlo does not have a glyph for the vertical ellipsis character but Terminal is using another font to display it. You can verify this using the Character Viewer. You can pull it up using the Edit > Special Characters… menu item. You can enter the character into the search box to find it. Then look in the Font Variation section to see which fonts contain a glyph for it.
Whatever font rendering mechanism xterm is using, it doesn't do this font fallback search. Or, if it does, it is not searching all of the same fonts that the Mac frameworks do.
> Does anyone have any suggestions to fix this?
* Somehow persuade xterm and its font rendering engine to use a font fallback mechanism and a font list containing, say, Apple Symbols. I don't know how you might do that.
* Use a font other than Menlo; one which contains all of the characters you want it to display. Arial Unicode MS might work, although it's proportional and not great for use in a terminal.
* Edit the Menlo font using FontForge or the like and add the characters you want it to display, possibly by copying them from another font.
Regards,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden