Skip to content

Commit

Permalink
fix #28366: use new SMuFL symbols for tempo texts
Browse files Browse the repository at this point in the history
should keep compatibility with existing scores and there unicode
variants of these glyphs, but fallback to Bravura for all newly
added tempo texts, as none of the other text fonts contain those
new qlyphs yet.
  • Loading branch information
Jojo-Schmitz committed May 25, 2015
1 parent e3b3bf1 commit 6c04a6d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
21 changes: 15 additions & 6 deletions libmscore/tempotext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,24 @@ struct TempoPattern {
// note: findTempoDuration requires the longer patterns to be before the shorter patterns in tp

static const TempoPattern tp[] = {
TempoPattern("<sym>unicodeNoteHalfUp</sym>\\s*<sym>unicodeAugmentationDot</sym>", 1.5/30.0, TDuration::DurationType::V_HALF, 1), // dotted 1/2
TempoPattern("<sym>unicodeNoteHalfUp</sym>\\s*<sym>unicodeAugmentationDot</sym>", 1.5/30.0, TDuration::DurationType::V_HALF, 1), // dotted 1/2
TempoPattern("<sym>unicodeNoteHalfUp</sym><sym>space</sym><sym>unicodeAugmentationDot</sym>", 1.5/30.0, TDuration::DurationType::V_HALF, 1), // dotted 1/2
TempoPattern("<sym>unicodeNoteQuarterUp</sym>\\s*<sym>unicodeAugmentationDot</sym>", 1.5/60.0, TDuration::DurationType::V_QUARTER, 1), // dotted 1/4
TempoPattern("<sym>unicodeNoteQuarterUp</sym>\\s*<sym>unicodeAugmentationDot</sym>", 1.5/60.0, TDuration::DurationType::V_QUARTER, 1), // dotted 1/4
TempoPattern("<sym>unicodeNoteQuarterUp</sym><sym>space</sym><sym>unicodeAugmentationDot</sym>", 1.5/60.0, TDuration::DurationType::V_QUARTER, 1), // dotted 1/4
TempoPattern("<sym>unicodeNote8thUp</sym>\\s*<sym>unicodeAugmentationDot</sym>", 1.5/120.0, TDuration::DurationType::V_EIGHTH, 1), // dotted 1/8
TempoPattern("<sym>unicodeNote8thUp</sym>\\s*<sym>unicodeAugmentationDot</sym>", 1.5/120.0, TDuration::DurationType::V_EIGHTH, 1), // dotted 1/8
TempoPattern("<sym>unicodeNote8thUp</sym><sym>space</sym><sym>unicodeAugmentationDot</sym>", 1.5/120.0, TDuration::DurationType::V_EIGHTH, 1), // dotted 1/8
TempoPattern("<sym>unicodeNoteHalfUp</sym>", 1.0/30.0, TDuration::DurationType::V_HALF), // 1/2
TempoPattern("<sym>unicodeNoteQuarterUp</sym>", 1.0/60.0, TDuration::DurationType::V_QUARTER), // 1/4
TempoPattern("<sym>unicodeNote8thUp</sym>", 1.0/120.0, TDuration::DurationType::V_EIGHTH), // 1/8
TempoPattern("<sym>unicodeNoteHalfUp</sym>", 1.0/30.0, TDuration::DurationType::V_HALF), // 1/2
TempoPattern("<sym>unicodeNoteQuarterUp</sym>", 1.0/60.0, TDuration::DurationType::V_QUARTER), // 1/4
TempoPattern("<sym>unicodeNote8thUp</sym>", 1.0/120.0, TDuration::DurationType::V_EIGHTH), // 1/8
TempoPattern("<sym>metNoteHalfUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/30.0, TDuration::DurationType::V_HALF, 1), // dotted 1/2
TempoPattern("<sym>metNoteHalfUp</sym><sym>space</sym><sym>metAugmentationDot</sym>", 1.5/30.0, TDuration::DurationType::V_HALF, 1), // dotted 1/2
TempoPattern("<sym>metNoteQuarterUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/60.0, TDuration::DurationType::V_QUARTER, 1), // dotted 1/4
TempoPattern("<sym>metNoteQuarterUp</sym><sym>space</sym><sym>metAugmentationDot</sym>", 1.5/60.0, TDuration::DurationType::V_QUARTER, 1), // dotted 1/4
TempoPattern("<sym>metNote8thUp</sym>\\s*<sym>metAugmentationDot</sym>", 1.5/120.0, TDuration::DurationType::V_EIGHTH, 1), // dotted 1/8
TempoPattern("<sym>metNote8thUp</sym><sym>metAugmentationDot</sym>", 1.5/120.0, TDuration::DurationType::V_EIGHTH, 1), // dotted 1/8
TempoPattern("<sym>metNoteHalfUp</sym>", 1.0/30.0, TDuration::DurationType::V_HALF), // 1/2
TempoPattern("<sym>metNoteQuarterUp</sym>", 1.0/60.0, TDuration::DurationType::V_QUARTER), // 1/4
TempoPattern("<sym>metNote8thUp</sym>", 1.0/120.0, TDuration::DurationType::V_EIGHTH), // 1/8
};

//---------------------------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions mscore/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,12 +964,12 @@ Palette* MuseScore::newTempoPalette()
sp->setDrawGrid(true);

static const TempoPattern tp[] = {
TempoPattern("<sym>unicodeNoteHalfUp</sym> = 80", 80.0/30.0), // 1/2
TempoPattern("<sym>unicodeNoteQuarterUp</sym> = 80", 80.0/60.0), // 1/4
TempoPattern("<sym>unicodeNote8thUp</sym> = 80", 80.0/120.0), // 1/8
TempoPattern("<sym>unicodeNoteHalfUp</sym><sym>space</sym><sym>unicodeAugmentationDot</sym> = 80", 120/30.0), // dotted 1/2
TempoPattern("<sym>unicodeNoteQuarterUp</sym><sym>space</sym><sym>unicodeAugmentationDot</sym> = 80", 120/60.0), // dotted 1/4
TempoPattern("<sym>unicodeNote8thUp</sym><sym>space</sym><sym>unicodeAugmentationDot</sym> = 80", 120/120.0), // dotted 1/8
TempoPattern("<sym>metNoteHalfUp</sym> = 80", 80.0/30.0), // 1/2
TempoPattern("<sym>metNoteQuarterUp</sym> = 80", 80.0/60.0), // 1/4
TempoPattern("<sym>metNote8thUp</sym> = 80", 80.0/120.0), // 1/8
TempoPattern("<sym>metNoteHalfUp</sym><sym>space</sym><sym>metAugmentationDot</sym> = 80", 120/30.0), // dotted 1/2
TempoPattern("<sym>metNoteQuarterUp</sym><sym>space</sym><sym>metAugmentationDot</sym> = 80", 120/60.0), // dotted 1/4
TempoPattern("<sym>metNote8thUp</sym><sym>metAugmentationDot</sym> = 80", 120/120.0), // dotted 1/8
};
for (unsigned i = 0; i < sizeof(tp)/sizeof(*tp); ++i) {
TempoText* tt = new TempoText(gscore);
Expand Down
Binary file modified vtest/bravura-text-1-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vtest/bravura-text-1.mscz
Binary file not shown.

0 comments on commit 6c04a6d

Please sign in to comment.