A few days ago, I opted to use fontconfig and freetype for this task, as I was operating in a macOS/Linux environment. However, the native Linux technology had issues, such as static linking not functioning in macOS (See #10), which led me to consider a macOS native technology (CoreText, See #18). This approach, however, required a deep understanding of the system API, and to be frank, I’m not a fan of Objective C.
Currently, I primarily use a Windows PC during my non-working hours, and this small tool remains crucial for my typography and writing projects. Therefore, I’ve decided to transition to a pure Rust implementation, with the assistance of the excellent crates, fontdb and ab-glyph.
I’ve already made some progress, such as updating and fixing clippy/rustfmt, upgrading the Rust edition, cleaning up dependencies, and so on. I’ve also commenced the rewriting process:
[x] workspace
[x] edition 2018 -> 2021
[x] rustfmt configure, error fix
[x] clippy configure, error fix
[x] dependencies
[x] remove: fontconfig, freetype
[x] update: many
[x] change: tui -> ratatui
[x] use fontdb to load system fonts
[x] filter font faces contains the asked character
A few days ago, I opted to use fontconfig and freetype for this task, as I was operating in a macOS/Linux environment. However, the native Linux technology had issues, such as static linking not functioning in macOS (See #10), which led me to consider a macOS native technology (CoreText, See #18). This approach, however, required a deep understanding of the system API, and to be frank, I’m not a fan of Objective C.
Currently, I primarily use a Windows PC during my non-working hours, and this small tool remains crucial for my typography and writing projects. Therefore, I’ve decided to transition to a pure Rust implementation, with the assistance of the excellent crates, fontdb and ab-glyph.
I’ve already made some progress, such as updating and fixing clippy/rustfmt, upgrading the Rust edition, cleaning up dependencies, and so on. I’ve also commenced the rewriting process:
fontconfig
,freetype
tui
->ratatui
Current state: all feature works.