welle.io
welle.io copied to clipboard
gui: add font settings
- use system default fonts by default
- the user can choose another font through the settings
Among other reasons, this can be of interest for example for accessibility
Thanks for the code!
I don't see a advanced in changing the fonts. Do you use a different font?
I prefer to use the system font (the same as the one I use in my desktop) rather than a fixed font as it is done currently. I think the user should be able to choose the font he wants. Do you have any problem with that feature ?
Do you have any problem with that feature ?
I don't have a problem with these feature in general. I just don't see a advantage for the most of the users.
By default welle.io has a fixed font (Arial afair). Since my system font is not Arial (which btw doesn't exist natively in linux afair) I use another font. And would like to have that system font used in welle.io instead (or maybe another font if I wish so). Hence that PR.
I use Welle.io with Qt5 via its VNC backend running on my Pi3A in the car. I've compiled a (lib)VNC client for my car's original screen (after gaining root-access to its QNX OS by finding the root serial port traces on the board). Having different fonts available would be an advantage since the car's touch screen isn't designed for high-precision (basically two sheets of conductive plastic which detects a single point only). So, plus one here for this request.
@Jasoroony Can you post a picture how it looks like now?
Well, it's not your standard code anymore, I've made some changes, but the station selection menu is very small and hard to read while also being hard to change while driving:
(Changed the program name, added the time along with a close icon)
but the station selection menu is very small and hard to read
Qt supports scaling. E.g. with a set QT_SCREEN_SCALE_FACTORS=1.5
, here it looks like this:
I didn't know that - thanks. I'll check it out.
Edit: I checked it out... The screen in my car is only 800x480 (and I've already made minor changes to support that small size). From having a go with scaling, I can see I'd have to redesign a lot of things to support 400x240 and then scale up by 2.0 to get what I want. That's probably more work than just tinkering with font sizes, which I guess is my next task.
Font tinkering done, this is going into the Pi3A next time I do some maintenance:
By default welle.io has a fixed font (Arial afaik). Since my system font is not Arial (which btw doesn't exist natively in linux afair) I use another font. And would like to have that system font used in welle.io instead (or maybe another font if I wish so). Hence that PR.
also not on macOS
Oh, I see you are right Arial
is hard coded.
https://github.com/AlbrechtL/welle.io/blob/043bb2e366ad92793de25151565b4cd1d236d0f4/src/welle-gui/QML/texts/TextStyle.qml#L41
I think we should consider to use a font that is available on all system rather then are having a font setting dialog. The hard coded Arial
is most likely a left over when I started the welle.io GUI.
Ideas are welcome!
Well a font that is available is easy, a font that is most likely already installed on macOS, Linux, Windows much more.
Here's my suggestions: https://github.com/theleagueof/league-spartan (^ already using that for stacer, instead of the non-free ubuntu ones) (of course you can for macOS/Windows ship your own copy so it comes with the application)
(countrary general believe Arial is not a free font)
OR you could define a font per system (that is installed by default), easy for macOS -> Helvetica, Windows -> Arial, for Linux "sans-serif" (haha)
In the https://github.com/AlbrechtL/welle.io/tree/qt_6_support branch I removed the hard coded font. Can you check it is now better?
@tenzap Can you have a look about this PR? Because of the Qt6 port a lot of things are changed. Makes it sense to update it or can we close it without merging?
Closed because of inactivity.