Skip to content

Commit

Permalink
use iosevka-nf for braille
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Mar 24, 2022
1 parent d7edd32 commit 5190942
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions ui.fs
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,11 @@ let DefaultFontEmoji =
elif RuntimeInformation.IsOSPlatform(OSPlatform.OSX) then "Apple Color Emoji"
else "Noto Color Emoji"

let DefaultFontBraille =
if RuntimeInformation.IsOSPlatform(OSPlatform.Windows) then "Segoe UI Symbol"
elif RuntimeInformation.IsOSPlatform(OSPlatform.Linux) then "Monospace" // ?
elif RuntimeInformation.IsOSPlatform(OSPlatform.OSX) then "Menlo" // ?
else "Monospace"


let private nerd_typeface =
let name = if RuntimeInformation.IsOSPlatform(OSPlatform.OSX) then "Iosevka NF"
else "Iosevka"
Typeface($"resm:fvim.Fonts.nerd.ttf?assembly=FVim#{name}")
let private emoji_typeface = Typeface(DefaultFontEmoji)
let private braille_typeface = Typeface(DefaultFontBraille)
let private fontcache = System.Collections.Generic.Dictionary<string*bool*bool, Typeface>()

let InvalidateFontCache () =
Expand Down Expand Up @@ -190,7 +182,7 @@ let GetTypeface(txt, italic, bold, font, wfont) =
| CharType.Powerline
| CharType.Nerd when not states.font_nonerd -> nerd_typeface
| CharType.Emoji -> emoji_typeface
| CharType.Braille -> braille_typeface
| CharType.Braille -> nerd_typeface
| _ -> _get font

let MeasureText (rune: Rune, font: string, wfont: string, fontSize: float, scaling: float) =
Expand Down

0 comments on commit 5190942

Please sign in to comment.