uobikiemukot / yaft-android

android port of yaft (yet another framebuffer terminal)
MIT License
24 stars 5 forks source link

Unreadable fonts in some devices #1

Open ismaell opened 10 years ago

ismaell commented 10 years ago

On devices with high-resolution screens (e.g. 1080x1920), the default font is unreadable.

It would be nice if yaft could check the DPI and scale the font accordingly for Android devices...

uobikiemukot commented 10 years ago

Font format of yaft-android is bitmap. It's not scalable. And now, only one size font (mplus 6x13) is included in.

If you want larger font, please generate "glyph.h" from BDF and rebuild yaft-android. Font converter, "mkfont_bdf" is found in "https://github.com/uobikiemukot/yaft". (check "how to use your favorite fonts" in above url.)

Or I can prepare another apk file including larger font. (But what font is required...?)

ismaell commented 10 years ago

Since there's no way to configure it at run-time, it would be useful if the font were scaled according to some "good default DPI value". It would be easy to at least have it as a compile-time option.

DPI reported by the system is a lie nowadays, we all know that, so perhaps it should take the real screen dimensions and compute the DPI itself, and use some heuristics to decide when to scale (something along the lines of "really tiny screen with very high resolution").

ismaell commented 10 years ago

If you don't mind it and would accept such patch, I can probably do the modification next weekend.