[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 11 Feb 2002 11:21:46 +0100
> I've made a first attempt to implement the long awaited
> support for different font encodings. This means that you
> now can typeset Swedish, Danish, German, Spanish, ...
> in lyrics and text scripts including all special characters and
> Lilypond will understand and calculate the correct size of each letter
> when it determines the spacing. So far, the encodings OT1 (the default
> in TeX) and T1 (Latin1) are supported.
I have thought this over some more, and basically, I'm against
complicating the font-selection code more. The virtue of separate
grob properties for controlling series, shape, design-size etc. of a
font, is that you can change these for every grob separately, or in
the case of markup expression, for a part of the markup expression. I
don't see why one would want to change encodings for every grob
If you want to load differently encoded fonts, simply do
#'font-name = #'ecrm
#'font-design-size = #10
while adding appropriate entries into font.scm
I'd rather like to slim down the current font selection mechanism.
The current font selection mechanism is rather baroque, and was copied
from LaTeX's NFSS, which in turn is designed to match the TeX fonts,
which are baroque (many styles and variations) but not that
good. Given the fact that we want to move towards PostScript, it is a
candidate for rewrite:
* It is overweight. I confess that I haven't done any timings, but
selecting a font is more expensive than it should be. For almost
every grob, a complicated filtering operation on the list of
available fonts has to be done.
* it is slightly painful (editing font.scm) to load fonts that are
not standardly installed in font.scm.
* there is no a mechanism to select font size (i.e. font
magnification) per grob.
* combine font-shape, font-series and font-design-size into
font-variation. -- note that the Computer Modern Fonts are the only
fonts I know that are available in different design sizes.
* add font-magnification to the properties. Note that magnification
should probably be cumulative, i.e. setting magnification = 0.5 on
a font that already has magnification = 0.5 should probably load a
font at 0.25 of the original size.
* have font-name determine the font up to magnification, i.e.
#'font-name = #'T1-Encoded-Computer-Modern-Roman-10
with a global table mapping Encoded-Computer-Modern-Roman-10 to
"ecrm0100" (just like fonts.map from Ghostscript), or
#'font-name = #"ecrm0100" %%%% load a non-standard font.
(or perhaps both mechanisms.)
Han-Wen Nienhuys | address@hidden | http://www.cs.uu.nl/~hanwen/
- Font encoding, Han-Wen Nienhuys, 2002/02/01
- Font encoding,
Han-Wen Nienhuys <=