[Top][All Lists]

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

Re: [Groff] unicode support - where to compose?

From: Larry Kollar
Subject: Re: [Groff] unicode support - where to compose?
Date: Sun, 26 Feb 2006 21:36:31 -0500

Werner LEMBERG wrote:

... how gtroff figures out glyph widths ...

gtroff reads the metric files (in the devXXX directories) for the
given device and positions the glyphs accordingly.  The postprocessor
just translates the intermediate output file into device-specific
data -- no need to access the glyph metrics again.

Aha... that makes sense now.

It would be nice to have access to all the TrueType and PostScript
fonts installed on the system without having to build metric files
and so forth.

This is virtually impossible IMHO.  You need a tight integration
between groff and the OS, making it highly system-specific.

I don't know about that. Instead of reading the groff metrics,
gtroff could perhaps query the system for metrics. Grops might
not even have to do anything different. It might even be possible
to make the source (mostly) backward-compatible by associating
a groff-style font name with a real font name (e.g. TB with
DejaVuSerif-Bold); versions that don't support the request would
fall back to Times-Bold.

The code to get the metrics would obviously be system-specific,
and the Free operating systems would have to go even further
and have WM-specific code (say, for Gnome or KDE)... which
would be a problem when moving around.

If I were to poke at this, where would I start?

In case you really want to invest some time I suggest that you think
about an improved `make install' (or `make font-install') which checks
the system for fonts and calls FontForge, afmtodit, etc., to convert
them to something groff can understand (this is, PFA+AFM).  Today,
disk space is abundant, and fonts are rather small, so this is the
route to go I believe.

Hm. I see the logic in that. It would certainly be a lot easier to do,
given the currently amorphous state of font management on the
Free OSes. FontForge would be a good choice of conversion
utilities since it runs on the same platforms as groff does. But instead
of driving it through make, I think a separate utility might be a better
route -- each user will have to tell the converter *where* to find the
fonts, because they live in different directories on each OS (and in
the case of MacOSX, there are two system-wide font directories
and each user can have his/her own set of fonts as well).

I'll look into this a bit later. I'm currently setting up some infrastructure
for UTP Revisited so those who are interested can get started soon.

Larry Kollar     k  o  l  l  a  r  @  a  l  l  t  e  l  .  n  e  t
Unix Text Processing: "UTP Revival"

reply via email to

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