lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond fonts in Latex


From: Werner LEMBERG
Subject: Re: Lilypond fonts in Latex
Date: Mon, 10 Sep 2007 15:36:53 +0200 (CEST)

> Briefly: Has anyone created the font descriptor (*.fd) and style
> (*.sty) files that would enable Lilypond's fonts to be used in
> LaTeX?

No.

> 1. Use lilypond-book - Seems to create a large amount of whitespace
> around the character.

The surrounding whitespace can be suppressed; however, it is quite
inconvenient to do that in case you want to access just a single glyph
of the font.

> 2. Use a tool such as otftotfm to install the emmentaler*.otf fonts.
> Use a tool such as autoinst or fontools to create the fd and sty
> files.  - These tools don't seem to like the emmentaler fonts,
> possibly something to do with the size being reported as 0?

Hmm.  Since the emmentaler fonts definitely work it looks like a bug
in otftotfm or the related tools.

> 3. Copy the metafont source files (*.mf) to my TeX directory and
> create the fd and sty files manually.

This will give suboptimal results (this is, bitmap glyphs only) in
case you want to create PDF or PS output.

> 4. Install the feta type1 fonts. As in:
> http://www.mamster.net/tex/latex-fontfaq-amster-burton.pdf

This is probably the most straightforward way; additionally, you can
use such fonts with virtually all TeX environments because all of them
support Type 1 fonts.

The LaTeX support should be quite easy:

  . The LaTeX encoding of the lilypond font(s) is clearly `U'; it
    makes no sense to create a new encoding for it.

  . Write a script which converts the lilypond glyph names in the AFM
    or ENC file(s) into LaTeX commands which map to glyph indices.
    Since the glyph names contain both dots and digits, it's probably
    best to define and access those glyphs with macros (untested):

       \def\fetadef#1#2{%
         \expandafter\expandafter\expandafter\chardef
           \expandafter\csname #1\endcsname #2}

       -> \fetadef{rests.M2}{38}

       \def\fetaglyph#1{%
         \expandafter\csname feta#1\endcsname}

       -> \fetaglyph{rests.M2}

    Since some of those names are extremely long you might manually add
    some shorthands where necessary.


      Werner




reply via email to

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