Re: [dev] multiple fonts in wmii

From: Yuval Hager <yhager_AT_yhager.com>
Date: Wed, 4 Nov 2009 14:18:57 +0200

On Wednesday 04 November 2009, Kris Maglione wrote:
> On Mon, Nov 02, 2009 at 02:09:07PM +0200, Yuval Hager wrote:
> >I've tried this, and it looks like it is not working.
> >Running
> >$ wmiir xwrite /ctl font 'xft:Arial'
> >presents the Hebrew characters correctly (in windows title, and mpd
> > status area), while $ wmiir xwrite /ctl font 'xft:terminus-10'
> >presents just white boxes instead.
> >
> >So I try:
> >$ wmiir xwrite /ctl font 'xft:terminus-10,xft:Arial'
> >but no change from previous (white boxes).
> >
> >I also tried not using xft for the first font:
> >$ wmiir xwrite /ctl font
> > '-*-terminus-*-*-*-*-12-*-*-*-*-*-iso8859-1,xft:Arial'
> >
> >but they all give the same result.
> >
> >I've tried to run urxvt with the same settings, and it seem to work
> > fine: $ urxvt -fn '-*-fixed-medium-r-*-*-14-*-*-*-*-*-*-*,xft:Miriam
> > Mono CLM'
> >
> >(in testing the terminal, I used a mono-spaced font - but all fonts give
> > the same result).
> >
> >I must be missing something?
>
> Well, first of all, you can only specify xft: once, at the
> begining of the spec. You either get Xft or you don't, you can't
> mix them.

so how on earth can you specify a list of fonts? I don't know much about
xft, but readin http://fontconfig.org/fontconfig-user.html, it mentions
that commas are used to specify lists of values,
like 'xft:terminus-10:lang=en,ja'.
If someone knows how to specify a list of fonts to xft (maybe even a font
per language?), it might help - I couldn't get it from the docs.

> Second, it seems that Xft isn't as smart as I thought
> it was. As far as I can tell, the only thing I can do is query
> the fonts myself with fontconfig and render the individual
> glyphs myself. Given the general bulk of code required to do
> that, and the likelihood of errors, I'm not especially willing
> to add it, but I may consider it if anyone has suggestions on
> how to do it cleanly. I'm not willing to link in Pango or Cairo,
> for very obvious reasons.
>

Thanks for looking into this.
I glanced at urxvt's code, and it does seem it goes to great length to
display the correct characters (well, as much as you can understand from
reading C++ code), and I understand your rejection from this amount of code
and complexity. it does not have a good gain/effort ratio.

I haven't even asked about right-to-left support, but I am going to give up
before that :)

--y

Received on Wed Nov 04 2009 - 12:18:57 UTC

This archive was generated by hypermail 2.2.0 : Wed Nov 04 2009 - 12:36:01 UTC