Recent

Author Topic: What fonts to use in Linux and how to apply them  (Read 346 times)

CM630

  • Hero Member
  • *****
  • Posts: 1436
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
What fonts to use in Linux and how to apply them
« on: June 03, 2025, 11:22:32 am »
I am building an app in Linux (so far used only in Windows).
The fonts in (the distro that I use with GTK) are extremely wide...
So I wonder what to do.
Is it possible to change the "default" font in Linux that is used by the app?
Or if I use non-default font for all buttons in Windows, what will happen to it when I build and execute the app in Linux (fonts with the same names will not be present there)?
Also, it seems that the buttons have very huge borders in GTK, which actually brings teh necessity of even thinner fonts.

Лазар 4,0 32 bit (sometimes 64 bit); FPC3,2,2

Thaddy

  • Hero Member
  • *****
  • Posts: 17413
  • Ceterum censeo Trumpum esse delendum (Tnx Charlie)
Re: What fonts to use in Linux and how to apply them
« Reply #1 on: June 03, 2025, 11:58:54 am »
Always try to use the default font from your distribution, but that said, if that is ugly, simply choose a font that you like.
Actually, you need to choose at least two fonts: one GUI, one terminal.
I generally you the default system fonts for both unless I write special purpose thingies like games.
for the lazarus ide I use consolas.

The font property has subproperties to change the size.
« Last Edit: June 03, 2025, 12:04:58 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

wp

  • Hero Member
  • *****
  • Posts: 12909
Re: What fonts to use in Linux and how to apply them
« Reply #2 on: June 03, 2025, 12:48:58 pm »
Try to layout your forms in a way that the size of the font does not matter. Use the anchor editor to link controls together and use Autosizing to adjust size correctly.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8819
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What fonts to use in Linux and how to apply them
« Reply #3 on: June 04, 2025, 09:30:57 pm »
While you can enforce a font, my suggestion for cross platform programming is to use the default to make your app inline with the rest of the system. What your app needs to do is, however, adapting to various available fonts. Learn to use autosizing and layouting, properties like AutoSize, Anchors, ChildSizing, etc. could help a lot.

 

TinyPortal © 2005-2018