Skip to content

Commit

Permalink
use proper tempo symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Dec 22, 2024
1 parent ddfe818 commit 7513c7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ui/canvas_measure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,14 @@ impl canvas::Program<Message> for CanvasMeasure {
if self.measure_id == 0
|| measure_header.tempo != previous_measure_header.unwrap().tempo
{
// TODO use https://unicodeplus.com/U+1D15F
let tempo_label = format!("bpm={}", measure_header.tempo.value);
let tempo_sign = std::char::from_u32(0x1D15F).unwrap(); // https://unicodeplus.com/U+1D15F
let tempo_label = format!("{} = {}", tempo_sign, measure_header.tempo.value);
tempo_label_len = tempo_label.chars().count() * 10;
let tempo_text = Text {
shaping: Advanced, // required for printing unicode
content: tempo_label,
color: Color::WHITE,
size: 10.0.into(),
size: 11.0.into(),
position: Point::new(measure_start_x, MEASURE_ANNOTATION_Y),
..Text::default()
};
Expand Down

0 comments on commit 7513c7c

Please sign in to comment.