Skip to content

Commit

Permalink
Minor changes to fix the font board under skia
Browse files Browse the repository at this point in the history
When using a chess font instead of SVGs, the board was being
displayed with spaces between the ranks when rendered with tiny-skia
(it was ok with vulkan). This fixes it, should look the same in
either renderer now.
  • Loading branch information
brianch committed Dec 25, 2023
1 parent 391aae4 commit f608647
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -931,8 +931,11 @@ fn gen_view<'a>(
board_row =
board_row.push(Button::new(
Text::new(text)
.width(board_height)
.height(board_height)
.font(config::CHESS_ALPHA)
.size(board_height)
.vertical_alignment(alignment::Vertical::Center)
.line_height(LineHeight::Absolute(board_height.into())
))
.padding(0)
Expand Down

0 comments on commit f608647

Please sign in to comment.