File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -583,9 +583,10 @@ double CompatUtils::convertChordExtModUnits(double val)
583583 // After 4.6 this is in % of root cap height
584584 // The best we can do for conversion of old files is to assume a default spatium of 1.75mm and a default font size of 10pt
585585 // The height value is calculated from Edwin at 10pt using FontMetrics::capHeight
586- constexpr double DEFAULT_STAVE_SPACE_MM = 1.75 ;
587- constexpr double DEFAULT_SPATIUM = DEFAULT_STAVE_SPACE_MM * DPMM;
588- constexpr double DEFAULT_FONT_CAP_HEIGHT = 35.3795 ;
586+ const double DEFAULT_SPATIUM = StyleDef::styleValues[static_cast <size_t >(Sid::spatium)].defaultValue ().toDouble ();
587+ muse::draw::Font f (u" Edwin" , muse::draw::Font::Type::Text);
588+ f.setPointSizeF (10 );
589+ const double DEFAULT_FONT_CAP_HEIGHT = muse::draw::FontMetrics::capHeight (f); // 121
589590
590591 return ((val / 5 ) * DEFAULT_SPATIUM) / DEFAULT_FONT_CAP_HEIGHT;
591592}
You can’t perform that action at this time.
0 commit comments