Skip to content

Commit

Permalink
smufl integration: articulation 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Nov 12, 2013
1 parent 5b021ad commit 4b88445
Show file tree
Hide file tree
Showing 12 changed files with 539 additions and 292 deletions.
Binary file modified fonts/mscore/mscore.otf
Binary file not shown.
799 changes: 516 additions & 283 deletions fonts/mscore/mscore.sfd

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libmscore/articulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ void Articulation::draw(QPainter* painter) const
}
}
painter->setPen(curColor());
drawSymbol(sym, painter);
drawSymbol(sym, painter, QPointF(-0.5 * width(), _up ? 0.0 : height()));
}

//---------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion libmscore/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,6 @@ QPointF Chord::layoutArticulation(Articulation* a)
}
pos.ry() = line * _spStaff2; // convert staff position to sp distance
}

a->setPos(pos);
a->adjustReadPos();
return QPointF(pos);
Expand Down
17 changes: 11 additions & 6 deletions libmscore/sym.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3300,15 +3300,20 @@ ScoreFont* ScoreFont::fontFactory(QString s)
}
return f;
}
#if 0
Sym& ScoreFont::sym(SymId id)
{
return _symbols[int(id)];
}
#endif

//---------------------------------------------------------
// sym
// Get symbol for SymId.
// Use font 0 (Bravura) as fallback, if sym does not
// exist.
//---------------------------------------------------------

const Sym& ScoreFont::sym(SymId id) const
{
if (id == SymId::noSym)
return _symbols[0];
if (!_symbols[int(id)].isValid() && (this != &_scoreFonts[0]))
return _scoreFonts[0]._symbols[int(id)];
return _symbols[int(id)];
}
}
Expand Down
1 change: 1 addition & 0 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4889,6 +4889,7 @@ int main(int argc, char* av[])
mscore = new MuseScore();
mscoreCore = mscore;
gscore = new Score(MScore::defaultStyle());
gscore->setScoreFont(ScoreFont::fontFactory("Bravura"));

if (writeWorkspaceFile) {
Workspace::writeBuiltinWorkspace();
Expand Down
Binary file added vtest/bravura-2-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 added vtest/bravura-2.mscz
Binary file not shown.
9 changes: 9 additions & 0 deletions vtest/edit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

#
# edit file
#

MSCORE=../build.debug/mscore/mscore
$MSCORE $1.mscz

Binary file added vtest/emmentaler-2-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 added vtest/emmentaler-2.mscz
Binary file not shown.
2 changes: 1 addition & 1 deletion vtest/gen
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
SRC="mmrest-1 mmrest-2 mmrest-4 mmrest-5 mmrest-6 mmrest-7 mmrest-8 mmrest-9\
fmrest-1 fmrest-2 fmrest-3 fmrest-4 fmrest-5 measure-repeat-1 \
noteheadposition-1 valign-1 emmentaler-1 bravura-1"
noteheadposition-1 valign-1 emmentaler-1 bravura-1 emmentaler-2 bravura-2"

MSCORE=../build.debug/mscore/mscore
DPI=130
Expand Down

0 comments on commit 4b88445

Please sign in to comment.