Recent

Author Topic: What is good Unicode font for components?  (Read 1949 times)

Borneq

  • Full Member
  • ***
  • Posts: 238
What is good Unicode font for components?
« on: December 06, 2019, 01:51:28 pm »
In Windows I test 'Arial Unicode' but:
- is also available for Linux?
- Arial is good for button texts
My example:
Quote
procedure TEdNotebook.Paint;
begin
  inherited Paint;
  Canvas.Brush.Color:=clRed;
  Canvas.FillRect(0,0,100,100);
  Canvas.Font.Name:='Arial Unicode';
  Canvas.TextOut(10,10,'Ξ ξ');
end;

winni

  • Hero Member
  • *****
  • Posts: 1807
Re: What is good Unicode font for components?
« Reply #1 on: December 06, 2019, 02:06:13 pm »
Hi!

If you want to have the same appearance of Arial (and Times New Roman) in Linux then use
the Liberation font. It was created > 10 years ago on behalf of Red Hat to solve that problem.

Liberation Sans ≙ Arial
Liberation Serif ≙ Times New Roman

And Liberation Mono is a very good font for the IDE for synedit.

If Liberation is not already installed on your system: It is part of the most distributions.

Winni


[Edit]
Homepage at https://github.com/liberationfonts
« Last Edit: December 06, 2019, 02:14:46 pm by winni »

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: What is good Unicode font for components?
« Reply #2 on: December 06, 2019, 03:38:30 pm »
Arial is good for button texts
A very opinion-based statement.
I think it's better to leave this decision to end user's preferences, what's good and what's not.
That's why they use look and feel themes.

Not to say about availability of particular typeface on all supported platforms, desktop environments and subdistros,
there's also a font substitution, so it's impossible to guarantee your font will be rendered on the end user's machine exactly as you see it on your one.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

winni

  • Hero Member
  • *****
  • Posts: 1807
Re: What is good Unicode font for components?
« Reply #3 on: December 06, 2019, 03:48:55 pm »
Liberation is a True Type Font.
So you can use it on all systems  Linux, Windows, Mac.

Winni

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: What is good Unicode font for components?
« Reply #4 on: December 06, 2019, 03:58:35 pm »
Liberation is a True Type Font.
So you can use it on all systems  Linux, Windows, Mac.

Arial isn't? :)
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

winni

  • Hero Member
  • *****
  • Posts: 1807
Re: What is good Unicode font for components?
« Reply #5 on: December 06, 2019, 04:06:37 pm »
I wanted to point out that liberation is a True Type Font, Mr. nosy!

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: What is good Unicode font for components?
« Reply #6 on: December 06, 2019, 04:39:14 pm »
I wanted to point out that liberation is a True Type Font, Mr. nosy!
Should I call you mr. obvious then?

Yet you missed my point about font substitutions. There is absolutely no guarantee your Liberation will work.
Linux fonts rendering is a complex thing. With many circumstances involved, like hinting, dpi etc.
Same font looks ok on desktop, but awful in browser or let's say in java's apps. So they use aliases.
So you can't rely on typeface name.

And it's an actually a bad practice in therms of UI to hardcode a font name. It should be either a system default or selectable by user.
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

winni

  • Hero Member
  • *****
  • Posts: 1807
Re: What is good Unicode font for components?
« Reply #7 on: December 06, 2019, 04:55:36 pm »
I know there are a lot of coders around who don't care about design and the look of their app.

I think I don't want the apperance of my app to be ruined by the user or ugly themes. Especially when I do some grahic stuff.

So you have to take care about the possibilities of the different widget sets, but I would never leave the decision up to them.

But your oppinion leads to the fact, that the most lazarus applications have the same design: a no-design.

Winni

« Last Edit: December 06, 2019, 05:06:57 pm by winni »

sash

  • Sr. Member
  • ****
  • Posts: 366
Re: What is good Unicode font for components?
« Reply #8 on: December 06, 2019, 07:42:40 pm »
I think I don't want the apperance of my app to be ruined by the user or ugly themes. Especially when I do some grahic stuff.
What about users, who don't want their look and feel being ruined by your ugly app?


But your oppinion leads to the fact, that the most lazarus applications have the same design: a no-design.

Exactly. This is called system-wide widgetset, UI unification and respect to users.

My opinion, neither yours, doesn't matter. User's one does.
And he (user) already picked a suitable OS, look and feel theme, fonts and stuff. At least he's accepting it.
So respect it. If you want to promote your very personal point of view about "what beauty is" - make it optionally customizable.

I'm also developing an application where customization is a must: an owner-drawn timeline-like control, where font size (kerning)
should be appropriate with other box sizes in pixels.

A TFontDialog and Inifile is doing that simple trick.




Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

Borneq

  • Full Member
  • ***
  • Posts: 238
Re: What is good Unicode font for components?
« Reply #9 on: December 10, 2019, 12:26:05 am »
I have not installed Liberation (how to install?) Is not in C:\Windows\fonts not in Screen.Fonts, not in EnumFontFamiliesExW. Controls have 'default' font, if I chcnge to Liberation, property Font.Face is changed and Canvas.Font.Face changed but how is true font?

winni

  • Hero Member
  • *****
  • Posts: 1807
Re: What is good Unicode font for components?
« Reply #10 on: December 10, 2019, 01:45:09 am »
Hi!

Load the three liberations fonts down: liberation sans, liberation serif, liberation mono.
If you find no other source then take this

https://www.dafont.com/de/search.php?q=Liberation

Then you have to double click in the Mozilla Download Dropdown Menu. 3 times. Or in the Eplorer. Then they are installed.

Winni

 

TinyPortal © 2005-2018