selfcustody / krux

Open-source signing device firmware for Bitcoin
https://selfcustody.github.io/krux/
Other
175 stars 34 forks source link

krux-font-format viewer: to inspect prior to editing font.c #438

Closed jdlcdl closed 1 month ago

jdlcdl commented 1 month ago

Description

Just before editing font.c's unicode variable, devs have likely converted a bdf to kff with a particular height-in-pixels. kffview.py can show them, in unicode-ish ascii art, what the font will look like from the command line.

For example, if a 14 pixel-high korean font file existed as "/tmp/korean-14.kff":

$ python kffview.py /tmp/korean-14.kff 14 를
/tmp/korean-14.kff contains 300 glyphs:

"를" is unicode: U+B97C, decimal: 47484
░░░░░░██████████████████████░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░██░░░░
░░░░░░████████████████████░░░░░░
░░░░░░██░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░████████████████████░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░██████████████████████████████
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░██████████████████████░░░░
░░░░░░░░░░░░░░░░░░░░░░░░░░██░░░░
░░░░░░████████████████████░░░░░░
░░░░░░██░░░░░░░░░░░░░░░░░░░░░░░░
░░░░░░░░████████████████████░░░░

What is the purpose of this pull request?

odudex commented 1 month ago

Thank you!