[Top][All Lists]

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

[Groff] Re: Composed glyphs - quick and dirty solution

From: Werner LEMBERG
Subject: [Groff] Re: Composed glyphs - quick and dirty solution
Date: Sat, 04 Mar 2006 16:16:27 +0100 (CET)

> > request to groff to activate an option so that it tries to compose
> > missing glyphs automatically if both the base and accent
> > characters are available.  On the other hand I'm not sure whether
> > this is a good thing from the typographical point of view.
> For fonts that lack composition data (core PS fonts, for example)
> that seems the only way to produce at least some result.

TeX, for example, doesn't do that.  I've never seen any complaint
about this.  The problem only arises if you want to have automatic
Unicode support -- if you, for example, get a warning that \[x ']
isn't available it is sufficient to add

  .ps-achar "\[x ']" \' x x

at the beginning of your document, and you get decent output.  Using
fonts for something they haven't been designed for always needs manual
hacks IMHO.

Admittedly, `.ps-achar' is not for end-users because it also sets
hyphenation codes.  Here a user-friendly variant.

  .de ps-accent
  .  fchar \\$1 \

Now you can say either

  .ps-accent "\[u0078_0301]" \' x
  .ps-acent  "\[x ']"        \' x

which are equivalent.

> > Hmm, I'm not happy about a PS-only solution.  If any, than support
> > for the CC keyword would help to handle the ogonkify solution, I
> > think.
> I was thinking in terms of small improvements of the current state.
> Making groff understand character composition and improving ligatures
> is not a "quick and dirty solution".

But we are going to handle this right now...

> Adding parsing CC to afmtodit does not make sense, since
> the only useful AFM files with CC are files form ognkify, AFAIK.

No.  For example, my AvantGarde-Book.afm file version 001.006
(directly from Adobe, I think) has this:

  StartComposites 56
  CC Aacute 2 ; PCC A 0 0 ; PCC acute 183 163 ;
  CC Acircumflex 2 ; PCC A 0 0 ; PCC circumflex 119 163 ;
  CC Adieresis 2 ; PCC A 0 0 ; PCC dieresis 186 163 ;
  CC Agrave 2 ; PCC A 0 0 ; PCC grave 181 163 ;

Basically, `CC' lines aren't needed by gtroff but by grops -- for
example, a composite `Aacute' always has a corresponding `C' line in
the AFM file.  In case the PFA file doesn't have an `Aacute' glyph it
can be then composed.

> May be it is easier to change FontForge to write troff font files
> [...]

This is a marvellous idea!  As soon as we've cooked up glyph classes
within the font description files this is definitely the way to go.

> As to the huge size of tables resulting from conversion of
> class-based data, Adobe used the following solution: [...]

Well, groff doesn't have such a limitation, fortunately.


reply via email to

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