Discussion:
[Mlterm-dev-en] Getting a fallback font in mlterm
Chris
2015-05-23 07:23:26 UTC
Permalink
Hello!

I've been using mlterm for a while, and I've only been having one
problem. When my font doesn't have a character being displayed, it
shows as a box instead of falling back to a font that does have it.

I tried looking into fontconfig for this, but it appears as though
fontconfig does the right thing, and mlterm doesn't use fontconfig. Is
there a way to specify that I want to use my selected font for all
Unicode characters it has, and fall back to another font for the
characters it doesn't have?

Thanks in advance,
Chris
Araki Ken
2015-06-07 06:51:35 UTC
Permalink
Hi,

From: Chris <***@rdw.se>
Subject: [Mlterm-dev-en] Getting a fallback font in mlterm
Date: Sat, 23 May 2015 09:23:26 +0200
Message-ID: <***@vigilance>

k> I've been using mlterm for a while, and I've only been having one
k> problem. When my font doesn't have a character being displayed, it
k> shows as a box instead of falling back to a font that does have it.
k>
k> I tried looking into fontconfig for this, but it appears as though
k> fontconfig does the right thing, and mlterm doesn't use fontconfig. Is
k> there a way to specify that I want to use my selected font for all
k> Unicode characters it has, and fall back to another font for the
k> characters it doesn't have?

Pango library which many modern applications uses via toolkit libraries
such as gtk+ enables you to get a fallback font.
For now, mlterm doesn't use pango to draw text on a screen, so you can't
fall back to another font by configuring fontconfig.
If you want to use multiple fonts for unicode characters, configure
~/.mlterm/aafont manually as follows.

ISO10646_UCS4_1=Generic font
U+0590-05FF=Hebrew font
U+0E00-0E7F=Thai font
...

Regards,
---
Araki Ken
***@users.sourceforge.net

------------------------------------------------------------------------------
Chris S
2015-06-20 13:24:31 UTC
Permalink
Quoting Araki Ken (2015-06-07 08:51:35)
Post by Araki Ken
For now, mlterm doesn't use pango to draw text on a screen, so you can't
fall back to another font by configuring fontconfig.
If you want to use multiple fonts for unicode characters, configure
~/.mlterm/aafont manually as follows.
ISO10646_UCS4_1=Generic font
U+0590-05FF=Hebrew font
U+0E00-0E7F=Thai font
...
Thank you for the hint, Ken! Does this mean that I have to figure out
the Unicode ranges for all characters not supported by my font, and
assign a font specifically to those?

Would it be possible to easily use my font for most Western European
languages, and some single fallback font for everything outside that
range? How do I go about figuring out what the interesting ranges in
this case is?

Regards,
Chris

------------------------------------------------------------------------------
Araki Ken
2015-07-25 14:10:06 UTC
Permalink
From: Chris S <***@rdw.se>
Subject: Re: [Mlterm-dev-en] Getting a fallback font in mlterm
Date: Sat, 20 Jun 2015 15:24:31 +0200
Post by Chris S
Thank you for the hint, Ken! Does this mean that I have to figure out
the Unicode ranges for all characters not supported by my font, and
assign a font specifically to those?
Would it be possible to easily use my font for most Western European
languages, and some single fallback font for everything outside that
range? How do I go about figuring out what the interesting ranges in
this case is?
Now hg head at http://bitbucket.org/arakiken/mlterm supports automatic
fallback. This feature is enabled only if type_engine = cairo.

Regards,
---
Araki Ken
***@users.sourceforge.net

------------------------------------------------------------------------------
Loading...