os.font: return the "segoeui.ttf" font, if its file exists on Windows (#21655)

This commit is contained in:
Mehmet Ali Şipi 2024-06-08 07:07:24 +03:00 committed by GitHub
parent 0b2edd0dd1
commit ff865ea110
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'
}