Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
fix: handle %%staffscale at the global level
Browse files Browse the repository at this point in the history
Issue #108.
  • Loading branch information
moinejf committed Jan 10, 2022
1 parent cf222f8 commit 12423ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions abcm2ps.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ struct FORMAT { /* struct for page layout */
float breaklimit, maxshrink, lineskipfac, parskipfac, stemheight;
float gutter, indent, infospace, slurheight, tieheight, notespacingfactor, scale;
float staffsep, sysstaffsep, maxstaffsep, maxsysstaffsep, stretchlast;
float staffscale; // (treated in parse.c)
int abc2pscompat, alignbars, aligncomposer, autoclef;
int barsperstaff, breakoneoln, bstemdown, cancelkey, capo;
int combinevoices, contbarnb, continueall, custos;
Expand Down
5 changes: 3 additions & 2 deletions parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2805,6 +2805,8 @@ static void set_global_def(void)
p_voice->s_clef->u.clef.type = TREBLE;
p_voice->s_clef->sflags &= ~S_CLEF_AUTO;
}
if (cfmt.staffscale)
p_voice->staffscale = cfmt.staffscale;
}

/* switch to the 1st voice */
Expand Down Expand Up @@ -5698,8 +5700,7 @@ static struct SYMBOL *process_pscomment(struct SYMBOL *s)
return s;
}
if (s->state != ABC_S_TUNE) {
for (voice = 0; voice < MAXVOICE; voice++)
voice_tb[voice].staffscale = scale;
cfmt.staffscale = scale;
} else {
curvoice->staffscale = scale;
}
Expand Down

0 comments on commit 12423ab

Please sign in to comment.