Skip to content

Commit

Permalink
Use "segoeui.ttf" font if exist on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
malisipi authored Jun 7, 2024
1 parent 0d52a7d commit f4ec2b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vlib/os/font/font.v
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ pub fn default() string {
return env_font
}
$if windows {
if os.exists("C:\\Windows\\Fonts\\segoeui.ttf") {
debug_font_println('Using font "C:\\Windows\\Fonts\\segoeui.ttf"')
return "C:\\Windows\\Fonts\\segoeui.ttf"
}
debug_font_println('Using font "C:\\Windows\\Fonts\\arial.ttf"')
return 'C:\\Windows\\Fonts\\arial.ttf'
}
Expand Down

0 comments on commit f4ec2b0

Please sign in to comment.