@@ -54,6 +54,7 @@ void TupletLayout::layout(Tuplet* item, LayoutContext& ctx)
5454 //
5555 // create tuplet number if necessary
5656 //
57+ const MStyle& style = ctx.conf ().style ();
5758 double _spatium = item->spatium ();
5859 if (item->numberType () != TupletNumberType::NO_TEXT) {
5960 if (item->number () == nullptr ) {
@@ -71,10 +72,21 @@ void TupletLayout::layout(Tuplet* item, LayoutContext& ctx)
7172 item->number ()->setPropertyFlags (Pid::FONT_SIZE, item->propertyFlags (Pid::FONT_SIZE));
7273 item->number ()->setPropertyFlags (Pid::FONT_STYLE, item->propertyFlags (Pid::FONT_STYLE));
7374 item->number ()->setPropertyFlags (Pid::ALIGN, item->propertyFlags (Pid::ALIGN));
74- if (item->numberType () == TupletNumberType::SHOW_NUMBER) {
75- item->number ()->setXmlText (String (u" %1" ).arg (item->ratio ().numerator ()));
75+
76+ String numberString = (item->numberType () == TupletNumberType::SHOW_NUMBER)
77+ ? String (u" %1" ).arg (item->ratio ().numerator ())
78+ : String (u" %1:%2" ).arg (item->ratio ().numerator (), item->ratio ().denominator ());
79+ if (style.styleB (Sid::tupletUseSymbols)) {
80+ String smuflNum = String (u" " );
81+ for (size_t i = 0 ; i < numberString.size (); ++i) {
82+ smuflNum.append (u" <sym>tuplet" );
83+ smuflNum.append (numberString.at (i).unicode ());
84+ smuflNum.append (u" </sym>" );
85+ }
86+ smuflNum.replace (String (u" :" ), String (u" Colon" ));
87+ item->number ()->setXmlText (smuflNum);
7688 } else {
77- item->number ()->setXmlText (String ( u" %1:%2 " ). arg (item-> ratio (). numerator (), item-> ratio (). denominator ()) );
89+ item->number ()->setXmlText (numberString );
7890 }
7991
8092 item->setIsSmall (true );
@@ -84,7 +96,7 @@ void TupletLayout::layout(Tuplet* item, LayoutContext& ctx)
8496 break ;
8597 }
8698 }
87- item->number ()->mutldata ()->setMag (item->isSmall () ? ctx. conf () .styleD (Sid::smallNoteMag) : 1.0 );
99+ item->number ()->mutldata ()->setMag (item->isSmall () ? style .styleD (Sid::smallNoteMag) : 1.0 );
88100 } else {
89101 if (item->number ()) {
90102 if (item->number ()->selected ()) {
@@ -150,7 +162,6 @@ void TupletLayout::layout(Tuplet* item, LayoutContext& ctx)
150162 //
151163 // calculate bracket start and end point p1 p2
152164 //
153- const MStyle& style = ctx.conf ().style ();
154165 double maxSlope = style.styleD (Sid::tupletMaxSlope);
155166 bool outOfStaff = style.styleB (Sid::tupletOufOfStaff);
156167 double vHeadDistance = style.styleMM (Sid::tupletVHeadDistance) * item->mag ();
0 commit comments