Skip to content

Commit

Permalink
Implement @head.fill with @headshape="diammond". Closes #2837
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Oct 31, 2023
1 parent 84bf0ce commit 00c6c9c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/note.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,14 @@ char32_t Note::GetNoteheadGlyph(const int duration) const
// case HEADSHAPE_circle: return SMUFL_E0B3_noteheadCircleX;
case HEADSHAPE_plus: return SMUFL_E0AF_noteheadPlusBlack;
case HEADSHAPE_diamond: {
if (DUR_4 > duration) return SMUFL_E0D9_noteheadDiamondHalf;
return SMUFL_E0DB_noteheadDiamondBlack;
if (duration < DUR_4) {
return (this->GetHeadFill() == FILL_solid) ? SMUFL_E0DB_noteheadDiamondBlack
: SMUFL_E0D9_noteheadDiamondHalf;
}
else {
return (this->GetHeadFill() == FILL_void) ? SMUFL_E0D9_noteheadDiamondHalf
: SMUFL_E0DB_noteheadDiamondBlack;
}
}
// case HEADSHAPE_isotriangle: return SMUFL_E0BC_noteheadTriangleUpHalf;
// case HEADSHAPE_oval: return SMUFL_noteheadOval;
Expand Down

0 comments on commit 00c6c9c

Please sign in to comment.