lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another way of tweaking lout to support alien characters?


From: Valeriy E. Ushakov
Subject: Re: Another way of tweaking lout to support alien characters?
Date: Wed, 2 Dec 1998 21:12:22 +0300

On Wed, Dec 02, 1998 at 09:50:45AM -0000, MatЛj Cepl wrote:

> I found, that downloading Czech fonts seems not to be satisfactory
> to my goals, because (a) resulting PS file is too big, (b) action is
> not easily done automagically.

(a) If you only print locally and use Czech often (as I guess you do;)
you can just download your Czech fonts into printer.  See Adobe
TechNote #5040 (IIRC).

If you send your PS docs to someone on a regular basis, just make
sure that you use the fonts they have access to.

If you send your PS docs to someone on a casual basis (e.g. post it on
the web) - you have to include fonts.


(b) Including fonts is easily done automatically.  This what DSC is
for.  Use includeres from PSUtils.

There's one minor problem though.  Lout will put %%IncludeResource
into the document setup only for those fonts that are referred on the
first page of your document.  Others will go into page setup section
on each page they are used on.  If you use some font a lot, but not on
the first page - you'll have %%IncludeResource comment for this font
in every page setup and running includeres directly will bloat your
file significantly.  However you can move %%IncludeResource comments
for frequently used fonts into document setup with a simple script (I
usually have my Russian fonts downloaded to the printer on when it
goes up, and I use a simple sed script for Tibetan font, this should
be easy to rewrite to handle generic case, perhaps someday I will).


> While reading all PostScript related materials, I met another question,
> which is, why there is a such thing as a .LCM file at all and why lout
> cannot read this coding information from AFM files?

Lout completely ignores encoding given in the AFM file (C keyword).

I don't want to go into character-glyph saga here.  You can read about
this on Unicode site and few other places whose urls I don't have
handy right now.

Basicly, font encoding is completely irrelevant.  It's only a shortcut
to get to procedures that draw glyphs.  You can use whatever encoding
that suits your needs best.  So Lout use LCM files to map from
characters in the input to glyphs in the font using the same encoding
for chars and glyphs.  This works for European languages, that have
mostly 1-to-1 char-glyph correspondence.

Consider Russian, that has 5(!) encodings in more or less widespread
use, some of them are sppecifically Russian, some are Cyryllic in
general: cp866 (DOS), cp1251(Windows), koi8-r(Unix), iso8859-5(not
very popular in Russia), Mac-Cyrillic.

As long as Cyryllic font that I have follows Adobe's technote #5013
for naming cyryllic glyphs, I don't care which /Encoding vector comes
with the font as shipped and which encoding is used in the AFM file.
Lout knows from the LCM file how to map my koi8-r on input into glyph
names and reencode the font into appropriate encoding.  This minimizes
maintenance, I just drop the AFM file into fonts dir and add a
fontdef.  In fact, I don't know which encoding my cyrillic fonts use,
Lout cares about this for me (I suspect that in most of them cyrillic
is not encoded at all).

SY, Uwe
-- 
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]