Skip to content

Commit

Permalink
os.font: return the "segoeui.ttf" font, if its file exists on Windows (
Browse files Browse the repository at this point in the history
  • Loading branch information
malisipi authored and raw-bin committed Jul 2, 2024
1 parent a4cb1bc commit 8176fac
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 8176fac

Please sign in to comment.