PS unicode fonts under X


Subject: PS unicode fonts under X
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Tue Feb 06 2001 - 04:26:02 CST


> I don't really know. But I think X server really don't know about
> if a font is an Unicode font or not. It just looks up glyphs in the
> font.
That's not the case. X treats all fonts as 16 bit fonts represented by
a matrix of n rows and m columns. It sees 8 bit font as a matrix
with 1 row and 256 columns, and an iso10646-1 fonts as a matrix
with 256 rows and 256 columns.

> Sure you cannot use single byte drawing functions to draw a char
> greater than 255. Have you tried with XDrawString16 seriel of functions?
> Just contruct the right XChar2b and draw glyph with it. "xfd" gives
> the right index of glyphs in a font.

The AbiWord drawing under utf-8 locale uses XDrawString16, but
XDrawString16 will only work if the matrix that represents the font
has more than one row, i.e., if the font is registered with the font
server as containing more than 256 characters, and I cannot find a
way to achieve that for a PS font (it works fine with ttf fonts).

> If it cannot, maybe the Type1 font driver in X does not know about
> font with more than 255 chars.

I think this is the case.

> Oh, my xlsfonts -ll -fn 'font name' does not give me any
> min_byte1 max_byte1 entries.

It should dump a huge amount of information for each font, and
these are somewhere among it.

Tomas

*********************************************
tomas@frydrych.net / www.frydrych.net
PGP keys: http://www.frydrych.net/contact.html



This archive was generated by hypermail 2b25 : Tue Feb 06 2001 - 04:32:06 CST