Re: ttf printing


Subject: Re: ttf printing
From: Vlad Harchev (hvv@hippo.ru)
Date: Tue Feb 06 2001 - 07:08:14 CST


On Tue, 6 Feb 2001, Tomas Frydrych wrote:

> > I have a suspicion that by using different XLFDs with same font name but
> > different encoding field it will be possible to get all characters from font
> > displayed (probably by using XFont with the encoding field in xlfd that has
> > the character being drawn in it). May be creating a fontset from XLFDs with
> > the same font name and different encoding field will work and will allow not
> > to switch XFont when drawing each character, and will allow to utilize all
> > glyphs in given font?
>
> That's what I thought, and this is how it works with ttf fonts -- you
> specify iso8859-1 and get iso-8859-1 font, and if you specify iso-
> 8859-8 you get a Hebrew font and and if you specifiy iso10646-1
> you get a unicode font. But with the postscript font irrespective of
> what encoding I specify in the encoding field, the font behaves like
> an iso8859-1 font.

 I had to solve this problem (with Type1 fonts always appearing as iso8859-1)
too when I was trying to use AW with russian. Solution is follows:
in fonts.dir list this font with adobe-fontspecific registry-encoding field,
and in fonts.alias make aliases from -adobe-fontspecific fonts to the font
with XLFD with encoding you need.

Example: you have a fonts named 'blah.pfa' and want to use it under the XLFD
-AbiSource-Arial-regular-r-normal--0-0-0-0-p-0-koi8-r, you do the following:

in fonts.dir you add:
blah.pfa -AbiSource-Arial-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific

in fonts.alias you add:
-AbiSource-Arial-regular-r-normal--0-0-0-0-p-0-adobe-fontspecific -AbiSource-Arial-regular-r-normal--0-0-0-0-p-0-koi8-r
(two XLFDs on one line of course).

 After that you will really have glyphs in the font accessible by the XLFD
-AbiSource-Arial-regular-r-normal--0-0-0-0-p-0-koi8-r matching koi8-r
encoding. This is a feature of modern font servers and XFree4.x I believe.
 
> > Another option I think worth considering is to inspect what gtk-2.0 uses (it
> > uses Pango - and what mechanism pango uses?). I saw a screenshots of pango
> > showing a lot of various languages in one text widget. Have anybody tried
> > gtk-2.0 betas? May be these quesions should be asked to
> > gtk-devel-list@gnome.org? If this problem is solved, may be we should wait for
> > gtk-2.0 and don't bother with utf8 input and drawing and concentrate on
> > printing?
>
> I though about that too, but there are no links to gtk 2 sources on
> the gtk website ... If I recall corretly, Pango might use font sets as
> well as proper Unicode fonts; the problem with fontsets is that it
> would require much more significant rewrite of our code, and that
> IMHO font sets are anachronistic, and by the time utf-8 locales will
> become the standard, there will be no need for font sets, because
> there will be enough Unicode fonts.

 Of course they are available from gnome CVS. There are packages of it in rpm
format flying around (and even included in RedHat 7.0) under the name
gtk-1.3*beta.

> The input and drawing for utf-8 are already implemented, you just
> need to use ttf fonts; that's why I am so keen to be able to print ttf.
> I personally am quite happy to use ttf fonts and there are virtually
> no free Type1 Unicode fonts around anyway.

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

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Tue Feb 06 2001 - 07:41:02 CST