[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arbitrary accidental glyphs
From: |
Han-Wen Nienhuys |
Subject: |
Re: Arbitrary accidental glyphs |
Date: |
Sat, 19 Jul 2008 20:28:44 -0300 |
On Sat, Jul 19, 2008 at 7:58 PM, Graham Breed <address@hidden> wrote:
>> (define-public (layout-set-absolute-staff-size-in-module module
>> staff-height)
>>
>> this sets a variable 'fonts, which is a Font-tree-element (see
>> scm/font.scm), a tree defining how to select a font using font-shape,
>> font-family, etc.
>
> Okay. How do I get at the staff-height for a function that isn't being
> called from this one? Well, minor detail, let's go on...
It's something you should worry about unless you have several versions
of the font in different design sizes.
>> When font-encoding is fetaMusic, the result is that one of the
>> emmentaler OTF files is selected. If you want to override this, you
>> would have to add your font similar to the mechanism for emmentaler,
>> but using a different value for font-encoding. You should probably do
>> this first inside font.scm, and if you can get this working, you can
>> select your custom font by doing
>>
>> \override Accidental #'font-encoding = #'Sagitarius
>>
>> When it works, try moving the function you added to a .ly, doing
>
> Here's the function I added:
>
> (define-public (add-music-font encoding-name font staff-height)
> (add-font
> (make-font-tree-node 'font-encoding encoding-name)
> (list (cons 'font-encoding encoding-name))
> (cons staff-height font)))
>
>> \paper {
>> #(add-music-font 'Sagitarius (ly:font-load "sagitarius") fonts)
>> }
>>
>> and export enough variables to make it work in the .ly version too.
>
> What I actually do then is
>
> \paper {
> #(add-music-font 'sagittal (ly:font-load "Sagittal") 100)
> }
>
> I added fonts called Sagittal.otf and Sagittal.pfb to the relevant folders.
> The console output includes this:
>
>>
>> [ET22-sagittal.ly[/home/graham/usr/share/lilypond/2.11.52/fonts/otf/Sagittal.otf
>
> programming error: Free type error: SFNT font table missing
> continuing, cross fingers
> programming error: Free type error: SFNT font table missing
> continuing, cross fingers
> programming error: Free type error: SFNT font table missing
> continuing, cross fingers
> ]]
>
> Is that a problem with the font or is there something else I have to do? I
> think it's important because Open_type_font::name_to_index is now returning
> a fail value (-1) for everything in Sagittal. That's pleasantly different
> to the original problem where Pango_font::name_to_index did the same thing.
I think SFNT is a generic wrapper format used for OpenType fonts. To
make sure you have the correct type of font, you could load the font
in fontforge and then save as OTF.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen