Recent

Author Topic: to detect the default/standard font of the OS/Widgetset  (Read 945 times)

winni

  • Full Member
  • ***
  • Posts: 172
Re: to detect the default/standard font of the OS/Widgetset
« Reply #15 on: August 30, 2019, 08:00:08 pm »

winni

  • Full Member
  • ***
  • Posts: 172
Re: to detect the default/standard font of the OS/Widgetset
« Reply #16 on: August 30, 2019, 09:32:18 pm »
@sash

Quote
I always thought it's possible to do on per user basis:

cp yourfont.ttf ~/.fonts



In Fedora the folder path is /home/{user}/.local/share/fonts

Winni

sash

  • Sr. Member
  • ****
  • Posts: 265
Re: to detect the default/standard font of the OS/Widgetset
« Reply #17 on: August 30, 2019, 09:57:30 pm »
IMO, should work both, I just wrote ~/.fonts beacuse it's shorter (and actually it is deprecated in favor of ~/.local/share/fonts). But point was there's no need for root.
Lazarus 2.0.2 FPC 3.0.4 x86_64-linux-gtk2 -- Ubuntu 19.04 XFCE

af0815

  • Sr. Member
  • ****
  • Posts: 344
Re: to detect the default/standard font of the OS/Widgetset
« Reply #18 on: August 30, 2019, 10:43:50 pm »
back to topic - i want the actual font, not to inject my own font.
regards
Andreas

af0815

  • Sr. Member
  • ****
  • Posts: 344
Re: to detect the default/standard font of the OS/Widgetset
« Reply #19 on: August 30, 2019, 10:47:06 pm »
If your application relies on a font being present it may be a better idea to include the font as a resource.
No, i want to know, what is the default font. Background: Between Jessi and Wheezy there must be a change in Raspbian in the default font (from liberationSans to freeSans).

Actual i have update my installscripts and install booth font-package.

fpreport cannot detect the font and use a predefined, not existing font :-( and on a LCL printout you see NOTHING. But there is another Bug ? prevent for a correct printout. I have fixed this with a 'hard' patch, but the issue with the font was only prevent by install all fonts on the systems. Regardless if they are Jessi or Wheezy (Buster) based.
« Last Edit: August 30, 2019, 10:51:49 pm by af0815 »
regards
Andreas

winni

  • Full Member
  • ***
  • Posts: 172
Re: to detect the default/standard font of the OS/Widgetset
« Reply #20 on: August 30, 2019, 11:31:27 pm »
After installing new fonts in Linux you must update the cache:

Code: Bash  [Select]
  1. fc-cache -fv

Did you do it?

Winni

sash

  • Sr. Member
  • ****
  • Posts: 265
Re: to detect the default/standard font of the OS/Widgetset
« Reply #21 on: August 31, 2019, 12:46:22 pm »
If your application relies on a font being present it may be a better idea to include the font as a resource.

And maybe even introduce an option where user selects a font explicitly with TFontDialog.
Lazarus 2.0.2 FPC 3.0.4 x86_64-linux-gtk2 -- Ubuntu 19.04 XFCE