Skip to content

Commit ff865ea

Browse files
authored
os.font: return the "segoeui.ttf" font, if its file exists on Windows (#21655)
1 parent 0b2edd0 commit ff865ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vlib/os/font/font.v

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ pub fn default() string {
2828
return env_font
2929
}
3030
$if windows {
31+
if os.exists('C:\\Windows\\Fonts\\segoeui.ttf') {
32+
debug_font_println('Using font "C:\\Windows\\Fonts\\segoeui.ttf"')
33+
return 'C:\\Windows\\Fonts\\segoeui.ttf'
34+
}
3135
debug_font_println('Using font "C:\\Windows\\Fonts\\arial.ttf"')
3236
return 'C:\\Windows\\Fonts\\arial.ttf'
3337
}

0 commit comments

Comments
 (0)