Rendering fixes
ci / checks (push) Successful in 39m19s

This commit is contained in:
khodowany
2026-09-08 14:29:35 -05:00
parent d7919f148d
commit d441e59993
2 changed files with 58 additions and 21 deletions
+10 -7
View File
@@ -84,9 +84,11 @@ constexpr auto thin_barline_thickness_spaces = std::float32_t{0.16F};
constexpr auto thick_barline_thickness_spaces = std::float32_t{0.50F};
constexpr auto tie_thickness_spaces = std::float32_t{0.13F};
constexpr auto normal_stem_length_spaces = std::float32_t{3.50F};
constexpr auto preamble_vertical_correction_spaces = std::float32_t{0.50F};
constexpr auto stem_head_horizontal_overlap_spaces = std::float32_t{0.06F};
constexpr auto stem_head_vertical_overlap_spaces = std::float32_t{0.38F};
constexpr auto clef_vertical_correction_spaces = std::float32_t{1.00F};
constexpr auto key_signature_vertical_correction_spaces = std::float32_t{0.50F};
constexpr auto time_signature_vertical_correction_spaces = std::float32_t{0.50F};
constexpr auto stem_head_horizontal_overlap_spaces = std::float32_t{0.20F};
constexpr auto stem_head_vertical_overlap_spaces = std::float32_t{0.45F};
constexpr auto measure_right_guard_spaces = std::float32_t{2.05F};
constexpr auto chord_above_staff_spaces = std::float32_t{3.65F};
constexpr auto chord_clearance_spaces = std::float32_t{0.45F};
@@ -923,7 +925,7 @@ auto layout_clef(vamp_zero::score_page_layout& layout, std::string_view clef, st
auto reference_pitch = codepoint == glyph_f_clef
? vamp_zero::score_pitch{.letter = 'f', .octave = 3}
: vamp_zero::score_pitch{.letter = 'g', .octave = 4};
auto baseline_y = pitch_y(reference_pitch, staff_top, spacing, clef) + scaled(preamble_vertical_correction_spaces, spacing);
auto baseline_y = pitch_y(reference_pitch, staff_top, spacing, clef) + scaled(clef_vertical_correction_spaces, spacing);
auto origin = origin_for_left_baseline(codepoint, x, baseline_y, spacing);
add_glyph(layout, vamp_zero::score_layout_item_role::CLEF, codepoint, origin, spacing, score_ink(), system_index);
return glyph_width(codepoint, spacing) + spacing * 0.90F;
@@ -996,7 +998,7 @@ auto layout_key_signature(
auto const total = static_cast<std::size_t>(std::abs(count));
for (auto index = std::size_t{}; index < total; ++index) {
auto pitch = key_signature_pitch(count, index, clef);
auto baseline_y = pitch_y(pitch, staff_top, spacing, clef) + scaled(preamble_vertical_correction_spaces, spacing);
auto baseline_y = pitch_y(pitch, staff_top, spacing, clef) + scaled(key_signature_vertical_correction_spaces, spacing);
add_glyph(
layout,
vamp_zero::score_layout_item_role::KEY_SIGNATURE,
@@ -1078,8 +1080,9 @@ auto layout_time_signature(
if (width <= 0.0F) {
return 0.0F;
}
layout_time_signature_run(layout, numerator, x + (width - numerator_width) * 0.5F, staff_top + spacing * 1.5F, spacing, system_index);
layout_time_signature_run(layout, denominator, x + (width - denominator_width) * 0.5F, staff_top + spacing * 3.5F, spacing, system_index);
auto const vertical_correction = scaled(time_signature_vertical_correction_spaces, spacing);
layout_time_signature_run(layout, numerator, x + (width - numerator_width) * 0.5F, staff_top + spacing * 1.5F + vertical_correction, spacing, system_index);
layout_time_signature_run(layout, denominator, x + (width - denominator_width) * 0.5F, staff_top + spacing * 3.5F + vertical_correction, spacing, system_index);
return width + spacing * 0.95F;
}