abcjs icon indicating copy to clipboard operation
abcjs copied to clipboard

Some font formatting directives not working

Open santh opened this issue 5 years ago • 2 comments

Have not tested all, but these are what I've found so far for my application:

Working correctly: %%titlefont %%composerfont

Not working: %%partsfont %%gchordfont %%vocalfont %%textfont %%tempofont

santh avatar May 16 '20 20:05 santh

Discovered that most of the font formatting directives, except for %%titlefont, %%composerfont and %%subtitlefont, must be placed after "X:x" but before the other header lines (ie. "T:title", "L:1/4", etc.) in order for them to work correctly. This seems a bit counter-intuitive and is not documented anywhere as far as I have been able to find.

santh avatar May 25 '20 19:05 santh

It looks like you just have to declare it above the K: parameter, like this:

X:1
T:title
P:AABB
Q:1/4=120
C:Me
%%titlefont "Cursive" 26
%%composerfont "Cursive" 26 
%%partsfont "Cursive" 26
%%gchordfont "Cursive" 26
%%vocalfont "Cursive" 26
%%textfont "Cursive" 26
%%tempofont "Cursive" 26
K:D
"G"gggg|
w: la la la la
%%text some text

But that is a bug because there would be no way to change the font in the middle of the tune. I'll fix it.

paulrosen avatar May 25 '20 19:05 paulrosen