lout-users
[Top][All Lists]
Advanced

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

Re: Wanted: a font that contains music accidentals such as sharp, flat a


From: David Duffy
Subject: Re: Wanted: a font that contains music accidentals such as sharp, flat and natural
Date: Fri, 2 May 2014 10:55:59 +1000
User-agent: Alpine 2.00 (LMD 1167 2008-08-23)

On Fri, 2 May 2014, Barrie Stott wrote:


On 1 May 2014, at 03:48, David Duffy wrote:

On Thu, 1 May 2014, Barrie Stott wrote:

I'm creating a document about music that contains musical examples. The examples are created using mup, a program for typesetting music, where each example is turned into .eps file. The document proper is a lout file that includes the musical examples and I want to be able to refer to flat (b), sharp (#) and natural.

Does anyone know of a suitable font for gaining access to such characters from 
within lout?

Perhaps

http://users.teilar.gr/~g1951d/Musica.ttf

which you have to then convert to AFM, and then make a lout LCM file -
see the README in lout.lib/maps and the Expert manual.

David Duffy (who hasn't actually done this).

Thanks for the reply. I downloaded the font, created the .afm and .pfb and updated my fontdefs.ld. Not knowing what characters would be present or where I would find flat, sharp and natural, I used the LtLatin1.LCM and my LCM file.

No, that won't work. If you look in the AFM file for Musica, you will see that the first 128 characters are the usual latin ones, and the fancy ones are further along eg

C -1 ; WX 550 ; N sixteenthnotedbl ; B 32 -127 518 632 ;
C -1 ; WX 250 ; N flat ; B 72 -201 216 247 ;
C -1 ; WX 250 ; N natural ; B 61 -215 188 247 ;
C -1 ; WX 250 ; N sharp ; B 44 -215 205 266 ;
C -1 ; WX 318 ; N psili_byz ; B 20 494 297 732 ;
...
C -1 ; WX 485 ; N fermata_below ; B 16 -70 469 174 ;
C -1 ; WX 160 ; N breath_mark ; B 16 -215 143 -7 ;
C -1 ; WX 615 ; N caesura ; B 0 -70 615 274 ;

The second column in my conversion using ttf2afm has all been set to -1,
and I think these have to be set appropriately for the characters you want, and have to match those in the .LCM file. My first attempt has put

C -1 ; WX 550 ; N sixteenthnotedbl ; B 32 -127 518 632 ;
C 131; WX 250 ; N flat ; B 72 -201 216 247 ;
C 132; WX 250 ; N natural ; B 61 -215 188 247 ;
C 133; WX 250 ; N sharp ; B 44 -215 205 266 ;
C -1 ; WX 318 ; N psili_byz ; B 20 494 297 732 ;

and in my Musica.LCM file (I used null.LCM as a template) as
...
130     202     -none-
131     203     flat
132     204     natural
133     205     sharp
134     206     -none-
...

However, that still isn't working quite right. The output PostScript from a minimal example includes

...
%Page: 1 1
%%BeginPageSetup
%%PageResources: font Times-Roman
%%+ font Musica
%%+ font ZapfDingbats
/pgsave save def
%%IncludeResource: font Times-Roman
/Times-Romanfnt1 vec2 /Times-Roman LoutRecode
/fnt1 { /Times-Romanfnt1 LoutFont } def
%%IncludeResource: font Musica
/Musicafnt2 vec3 /Musica LoutRecode
/fnt2 { /Musicafnt2 LoutFont } def
%%IncludeResource: font ZapfDingbats
/fnt3 { /ZapfDingbats LoutFont } def
...
0 13555(Here)m 520(is)s 730(a)s 896(sharp:)s
240 fnt2 1520 13549(\205)m 240 fnt1 0 13047(Here)m 520(is)s
730(a)s 896(\210at:)s 240 fnt2 1307 13041(\203)m 240 fnt1
0 12542(Here)m 520(is)s 730(a)s 896(dingbat:)s 240 fnt3
1720 12536(4)m 240 fnt1 0 12039(Here)m 520(is)s 730(a)s
896(natural:)s 240 fnt2 1665 12033(\204)m

so those are the codes from my map file.

Hopefully, someone who has done this before can chime in.

Cheers, David.

| David Duffy (MBBS PhD)
| email: address@hidden  ph: INT+61+7+3362-0217 fax: -0101
| Genetic Epidemiology, QIMR Berghofer Institute of Medical Research
| 300 Herston Rd, Brisbane, Queensland 4006, Australia  GPG 4D0B994A



reply via email to

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