| Scope | Available in |
| immediate | txtmus abc2svg abcm2ps |
xxx is the music element type.
| Music element | Default value | |
| annotationfont | annotation | sans-serif 12 |
| capofont | capo | sans-serif 12 |
| composerfont | composer field in tune header | serifItalic 14 |
| cstabfont | chord symbol in tablature | gchordfont with size / 1.6 |
| footerfont | page footer | serif 16 |
| gchordfont | chord symbol | sans-serif 12 |
| gridfont | grid | serif 16 |
| headerfont | page header | serif 16 |
| historyfont | history and other tune relative information | serif 16 |
| infofont | info line (R: and A:) in tune header | serifItalic 14 |
| measurefont | measure number | serifItalic 10 |
| partsfont | parts (P:) | serif 15 |
| repeatfont | repeat sequence number/text | serif 13 |
| setfont-n | ancillary fonts | (none) 12 |
| subtitlefont | subtitle | serif 16 |
| tabfont | tablature | sans-serifBold 7 |
| tempofont | tempo (Q:) | serifBold 15 |
| textfont | text | serif 16 |
| titlefont | tune title | serif 20 |
| tupletfont | text | serifItalic 12 |
| vocalfont | lyrics under staff | serifBold 13 |
| voicefont | voice name | serifBold 13 |
| wordsfont | lyrics under tune | serif 16 |
txtmus and abc2svg,
the font 'text' is added before the default font.
This permits to do a global font change. See below.abcm2ps, 'serif' is 'Times' and
'sans-serif' is 'Helvetica'.
abcm2ps.
txtmus and abc2svg, the font name may be:
%%textfont Verdana 16
%%textfont "Rursus Compact Mono" 16
%%textfont Evolventa,"Rursus Compact Mono" 16
%%textfont url(/home/me/fonts/dejavu/DejaVuSerif.ttf) 16
%%textfont * 16
%%setfont-2 music 24
With abcm2ps, the font name may be:
%%textfont Times-Roman 16
%%textfont Times-Bold 16 %%textfont TimesBold 16
%%textfont * 16
txtmus and abc2svg only.abcm2ps.
txtmus and abc2svg, the default font name starts
with the font 'text'.
This font does not exist, but may be created by a @font-face.
Here is how all the texts may be displayed using an installed font 'MuseJazzText':
%%beginml
<style>
@font-face {
font-family: text;
src: local(MuseJazzText)
}
</style>
%%endml
%abc-2.2
musicfont url(../js/abc2svg.ttf)
%%pagewidth 13cm
%%bgcolor white
%%leftmargin 20
%%rightmargin 20
%%titlefont sans-serif * box
%%historyfont sans-serifItalic 12
%%writefields HN 1
%%beginsvg
<style>
.green {color:green;fill:green}
.bbb {outline: 5px solid black;
outline-offset: 5px;
outline-color: blue}
</style>
%%endsvg
%%setfont-1 sans-serifBold 12 class=green
%%setfont-2 music 24
X:1
T:Tune title in a box
M:C
L:1/4
H:Version 1.20.15: 'padding=' added
H:Version 1.18.3: 'wadj=' added
N:"$1wadj=$0" is usefull when the font
+:is replaced by an other one by the browser
N:Also, below, the computation of the length
+:with the font "$1monospace$0" is wrong
K:C
"^annotation"cc\
%%annotationfont * 16
"^bigger font"cc |\
%%gchordfont * 26
"G"GA"@-20,0$2\ue56d"[FB]2 | [Ec]4|]
%%vskip 1cm
%%textfont monospace * box
%%text text without length adjustment
%%textfont * * wadj=space
%%text text adjusted by spacing
%%textfont * * wadj=glyph
%%text text adjusted by spacing and glyph
%%textfont * * class=bbb padding=10
%%text text inside a big blue box
%%textfont bold
%%text bold text
%%textfont normal
%%text normal text
|
|
%%beginsvg
<style>
@font-face{
font-family: ft1;
src: url(../js/Bravura.woff2)
}
@font-face{
font-family: ft2;
src: url(../js/Petaluma.woff2)
}
</style>
%%endsvg
X:2
T:with Bravura
M:4/4
L:1/4
%%musicfont ft1
K:C
CDEF|GABc||
X:3
T:with Petaluma
M:4/4
L:1/4
%%musicfont ft2
K:C
CDEF|GABc||
|
|
abc2svg documentation source author - page hosted by Free