Skip to content

Commit

Permalink
文字配置修正
Browse files Browse the repository at this point in the history
  • Loading branch information
yutyan0119 committed Jun 4, 2023
1 parent 419512e commit b2c52f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn draw_centered_lines(
let v_metrics: rusttype::VMetrics = font.v_metrics(scale);
let line_height: f32 = v_metrics.ascent - v_metrics.descent + v_metrics.line_gap;
let text_height: f32 = line_height * lines.len() as f32;
let start_y: f32 = (image.height() as f32 - text_height) / 2.0;
let start_y: f32 = (image.height() as f32 - text_height) / 2.0 + 25.0;

for (i, line) in lines.iter().enumerate() {
let text_width: f32 = line
Expand Down

0 comments on commit b2c52f5

Please sign in to comment.