timower / rM2-stuff

Collection of reMarkable related apps, utilities and libraries.
GNU General Public License v3.0
125 stars 10 forks source link

[yaft] missing characters in font #22

Closed 22-42 closed 9 months ago

22-42 commented 11 months ago

Hey, Im new to tmux, but encountered it very useful in combination with yaft and the type folio. Ive been trying around a bit with the colour configuration and how the colours are displayed in yaft.

The problem I have is: I cant figure out which colour I could set for the border which can be seen fort instance in splitview, like the grey one between vim and htop in this screenshot: Yaft with tmux

Whatever I do - it stays white on white for me in yaft... So could you maybe share your tmux.conf? I think that would be a great help :)

22-42 commented 10 months ago

ok - Im sorry for my ignorance, now I figured out the real reason of the issue: the font yaft uses seams to (no longer) contain the unicode box drawing characters which are used f.i. by a couple of TUI programms like tmux. They are listed in this PDF: https://www.unicode.org/charts/PDF/U2500.pdf Ive also tested it by opening a textfile containing such chars in vim; wherever there should be such a box drawing character there is only empty space. How big would the effort be to add these chars to the font yaft uses? Because its like half of the tmux-ui is missing... 😅

timower commented 10 months ago

Interesting, the font yaft uses is defined here: https://github.com/timower/rM2-stuff/blob/master/libs/libYaft/glyph.h Seems like I last touched it here: https://github.com/timower/rM2-stuff/commit/ec66601d90d26bd5b4e5b4ca75ba86d30bb30ac4 Adding a bold variant, but losing some stuff maybe?

https://uobikiemukot.github.io/yaft/ has some info on creating fonts

timower commented 10 months ago

Weirdly it does work on my host PC with emulation on. So I suspect this is actually a utf8 -> utf32 conversion error, for which I'm using deprecated stl APIs.

timower commented 10 months ago

Turns out this is actually the locale. Yaft does setlocale(LC_ALL, "") at startup, expecting that to configure a utf locale. But the system local on the reMarkable seems to be "C", so that doesn't work. Setting it to en_US.UTF-8 should fix it.

22-42 commented 9 months ago

Hey, thanks for your work :) I installed the yaft.ipk from the most recent github action run and the issue is fixed.