welle.io icon indicating copy to clipboard operation
welle.io copied to clipboard

gui: add font settings

Open tenzap opened this issue 4 years ago • 15 comments

  • 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

welle-fonts

tenzap avatar Apr 17 '20 16:04 tenzap

Thanks for the code!

I don't see a advanced in changing the fonts. Do you use a different font?

AlbrechtL avatar Sep 09 '20 19:09 AlbrechtL

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 ?

tenzap avatar Sep 14 '20 07:09 tenzap

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.

AlbrechtL avatar Sep 30 '20 20:09 AlbrechtL

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.

tenzap avatar Feb 23 '21 08:02 tenzap

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.

ghost avatar Apr 27 '21 07:04 ghost

@Jasoroony Can you post a picture how it looks like now?

AlbrechtL avatar May 08 '21 09:05 AlbrechtL

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:

IMG174

(Changed the program name, added the time along with a close icon)

ghost avatar May 08 '21 09:05 ghost

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:

welle-GUI-scaled

gvanem avatar May 08 '21 10:05 gvanem

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.

ghost avatar May 08 '21 10:05 ghost

Font tinkering done, this is going into the Pi3A next time I do some maintenance:

IMG176_s

ghost avatar May 09 '21 09:05 ghost

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

alexmyczko avatar Jan 21 '22 09:01 alexmyczko

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!

AlbrechtL avatar Feb 09 '22 22:02 AlbrechtL

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)

alexmyczko avatar Feb 10 '22 05:02 alexmyczko

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?

AlbrechtL avatar Mar 12 '22 22:03 AlbrechtL

@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?

AlbrechtL avatar Feb 25 '24 08:02 AlbrechtL

Closed because of inactivity.

AlbrechtL avatar Apr 20 '24 09:04 AlbrechtL