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: Ted Harding
Subject: RE: Another way of tweaking lout to support alien characters?
Date: Wed, 02 Dec 1998 12:38:46 -0000 (GMT)

On 02-Dec-98 Matìj Cepl wrote:
> after doing a small "research" (I mean, below mentioned TeXpert and
> reading this list) 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.
> 
> However, I found, that there is other way as well. I was informed by
> Mr. Petr Ols~a'k (s~ is equivalent of /scaron and a' /aacute -- just to
> see, how difficult Czech language is :-), who is a national Czech
> TeXpert (or how to call it - the second highest in TeXists rank, right
> after Donald Knuth himself), that it is possible to tweak AFM (Adobe
> Font Metrics) so that in resulting PostScript the missing characters
> (e.g., zcaron) are represented by some kind of composite of underlying
> character and a diacritical mark (in this case letter "z" and caron).
> 
> TeX is able to prepare from such changed AFM file prepare its own
> internal metrics (TFM, I believe, is the name) and dvips is able to
> prepare PostScript displaying Czech characters using these composite,
> which should be able to be shown by GhostScript without any Czech
> characters installed.

This looks horribly and unnecessarily complicated.

I have to come clean and admit that I mainly use gtroff, but keep an eye
on Lout to see how it's going, so I apologise in advance for any
ignorance which will show up below.

In gtroff, there is no problem whatever with this sort of thing, since you
can create a character consisting of any combination of whatever font
marks your PostScript device has resident (either as built-in or as
downloaded fonts); gtroff will assign metrics to this character derived
from the font metric files and the positioning commands in the character
definition.

For instance, "s-caron" could, as I have defined it, result from:

.acc*over-def v \(ah
.char \(sv s\*v

[ \(ah is the gtroff identifier for the "hacek" accent; the first line
  defines a string "v" which causes \(ah to be placed as an accent above
  the preceding character; and the second line defines a new character
  identifier "\(sv" which gives rise to an "s" with a hacek accent,
  furnished with character metrics which take account of its components.
  All this uses only the Standard Roman Character Set].

Using simply the characters available in the standard PostScript
"Standard Roman Character Set" and "Symbol Character Set" I have defined
characters which cover all the European languages (Romance, Germanic,
Scandinavian, Polish, Czech, Yugoslav etc; Romanian; Greek; as well as
Turkish); there is no need to even think about the font metric files. I
have also used this technique to match "characters" invented by writers
for special purposes (such as an "H" with a breve accent underneath, or a
single character consisting of two "P"s linked by a horizontal line at
the level of the bottom of the curved part). If you also have basic
Cyrillic or Hebrew fonts, etc, installed you can make use of marks from
these too, and so on.

You can also define a character of arbitrary shaped define by lines of
raw PostScript code, but here you have to take extra trouble to ensure
that the correct metrics get stored with the character; and this is not
so straightforward.

The point of all this is that the result is a true character object,
on the same footing as the letter "A" say, with various metric attributes
which the software keeps track of.

I'm aware that Lout users may not be very interested in reading about
what you can do in gtroff, but -- and here is where my ignorance shows --
while I suppose something of a similar sort should be possible with Lout
I really don't know how much is possible and whether you can achieve the
same comprehensive flexibility. To the extent that it is possible, it
should provide an easy solution to Matij's problem.

To the extent that it is not possible, it is a gap which the Lout
developers should consider filling, for the sake of the many people who
wish to write in their native languages.

Best wishes to all,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Date: 02-Dec-98                                       Time: 12:38:46
--------------------------------------------------------------------


reply via email to

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