CUPS 1.4.3 && printing UTF-8 text

Helge Blischke h.blischke at acm.org
Sat Aug 7 14:42:29 PDT 2010


Matthias Apitz wrote:

> Helge Blischke wrote:
> 
>> So what I'll do next is
>> (1) check your text file against psglyps (by a Perl script) to see if the
>> hebrew text points to the expected glyph names, and
>> (2) set up a virtual system running cups 1.4.4 and do some tests.
>> 
>> This will take a couple of days, so be patient.
> 
> We are not in hurry with this. In any case, thanks for the help provided
> so far and for your offered help. Enjoy your weekend
> 
>         Matthias

Mathias, 

I've set up a virtual Linux (Peppermint Linux, which is based on, and said 
to be compatible to, recent Ubuntu, and has CUPS 1.4.3 by default), loaded 
the CUPS 1.4.3 sources, compiled it, and replaced the installed texttops 
filter by my compiled one (in order to rule out any side effects caused by 
the modifications Ubuntu is known to make).
Tests with this confiruration reviealed three things:

(1) the utf-8 file
----------------------
The start and end values for the Hebrew and Arabic scripts were errouneously 
separated by a "-" instead of a space (which I overlooked until I 
orchestrated the texttops filter with some debugging statements - shame on 
me).
And, the PostScript procset generated by the texttops filter assumes that 
the font filename is equal to the PostScript fontname, So I renamed the 
installed .pfa files to the names without the .pfa extension.

I attach the modified utf-8 file for you.

(2) the glyph names
-----------------------------
The texttops filter uses the glyphlist file which maps the unicode code 
points to the glyph names as specified (as far I could check) in Adobe's 
AGLNF (Adobe Glyph List for New Fonts). The Gnu FreeMono family, on the 
other hand, uses "historic" glyph names for the Hebrew and Arabic glyphs 
which obviously have their origin in the pre-unicode area. 
An example:
the codepoint 05DC is mapped to afii57676 in both the cups's psglyphs file 
and the adobe glyphlist, but the latter lists the aliases "lamed" and 
"lamedhebrew" in addition, and this last one is the glyph name used by the 
font.

(3) font embedding
---------------------------
My self-compiled texttops filter embedded the (complete) used fonts into the 
PostScript output, but the file you posted had the fonts not embedded. Is 
there a configure option for not embedding the fonts? (you told me you 
compiled your CUPS from the sources, if I remember correctly).

What to do:
=========

In the short run, I'd suggest to modify the fonts of the FreeMono family to 
be compliant to the cups psglyphs list. This is best done by 
1. disassembling the pfa files 
2. mapping the glyph names to unicode numbers according the AGL
3. mapping the unicode numbers to the glyph names according to psglyphs
4. reassembling the files
(1 and 4 by t1disasm and t1asm, respectively, from the t1utils suite; 2 and 
3 perhaps by a suitable Perl or Python script, I'd suggest).

The other way round - to modify the texttops filter to accept the aliases as 
specified in the AGL - would require quite a big modification which, I 
suspect, sould be some 3 to 4 weeks developing and testing.
What I have not yet tested up to now is if the filter correctly does left to 
right rendering if requested.

Helge


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: utf-8
URL: <https://lists.cups.org/pipermail/cups/attachments/20100807/30fd2138/attachment-0001.ksh>


More information about the cups mailing list