struct FontFallback
Swift
struct FontFallback
A fallback face named rather than loaded.
The chain a primary consults is spelled as file paths because loading one is the expensive part of starting up, and most of it is never needed: opening a face reads the whole file and hashes it for its content address, which for the two faces a terminal wants — a 12 MiB Nerd Font and a 19 MiB CJK collection — was ~250 ms spent twice, once in the client to shape with and once in the compositor to rasterize with, before the window existed. A shell prompt needs none of it.
So the chain is names, and UIFont.fallbackFace turns one into a face the
first time a character misses everything ahead of it. A terminal that
never prints braille never loads Iosevka; one that never prints Chinese
never loads Noto CJK.
Sources/LavaUI/Font.swift:914
Constructors
init(path: String, pixelSize: Float)
Not documented.
Sources/LavaUI/Font.swift:918
Properties
var name: String { get }
Just the file name, for logs.
Sources/LavaUI/Font.swift:924
let path: String
Not documented.
Sources/LavaUI/Font.swift:915
let pixelSize: Float
Not documented.
Sources/LavaUI/Font.swift:916