Recent

Author Topic: TBGRAFreeTypeFontRenderer and linux font paths  (Read 1261 times)

nomad

  • New Member
  • *
  • Posts: 36
TBGRAFreeTypeFontRenderer and linux font paths
« on: October 15, 2024, 06:20:42 am »
Hey everyone,

I am trying to use the TBGRAFreeTypeFontRenderer and I setup the font collection as per the examples.

https://wiki.freepascal.org/BGRABitmap_tutorial_Font_rendering

I copied a ttf font into the directory with the binary and specified the font name. When I compile it is giving an error that it cannot find the Arial font. I think it is defaulting to that font. Does anyone have any fix to this. I wold love to use the fontdialog with the TBGRAFreeTypeFontRenderer.

Any help is appreciated.

Thanks in advance.

bobby100

  • Sr. Member
  • ****
  • Posts: 267
    • Malzilla
Re: TBGRAFreeTypeFontRenderer and linux font paths
« Reply #1 on: October 15, 2024, 05:56:42 pm »
From your link:
Quote
Note that in the current implementation, it is necessary to provide Arial font even if you are not using it.

Dzandaa

  • Sr. Member
  • ****
  • Posts: 409
  • From C# to Lazarus
Re: TBGRAFreeTypeFontRenderer and linux font paths
« Reply #2 on: October 15, 2024, 07:23:26 pm »
Hi,

@nomad:
 Have you installed "Ttf-mscorefonts-installer"?
I'm using Mint Linux ttf-mscorefonts-installer

B->
Regards,
Dzandaa

nomad

  • New Member
  • *
  • Posts: 36
Re: TBGRAFreeTypeFontRenderer and linux font paths
« Reply #3 on: October 17, 2024, 04:30:31 am »
From your link:
Quote
Note that in the current implementation, it is necessary to provide Arial font even if you are not using it.

If that was true then it should have worked. It did not. I am using debian linux. Mate desktop.

nomad

  • New Member
  • *
  • Posts: 36
Re: TBGRAFreeTypeFontRenderer and linux font paths
« Reply #4 on: October 17, 2024, 04:32:28 am »
Hi,

@nomad:
 Have you installed "Ttf-mscorefonts-installer"?
I'm using Mint Linux ttf-mscorefonts-installer

B->

I will give it a try and see if it works. Thanks.

nomad

  • New Member
  • *
  • Posts: 36
Re: TBGRAFreeTypeFontRenderer and linux font paths
« Reply #5 on: October 18, 2024, 06:28:29 am »
Hi,

@nomad:
 Have you installed "Ttf-mscorefonts-installer"?
I'm using Mint Linux ttf-mscorefonts-installer

B->

I could not get it working in my vm. So I decided to write my own functions to the same thing without the issue with the font nonsense. trying to figure out how to do blur with lazarus native libraries. Trying to stick with lgpl components. Do not want to deal with the nonsense of gpl.


circular

  • Hero Member
  • *****
  • Posts: 4391
    • Personal webpage
Re: TBGRAFreeTypeFontRenderer and linux font paths
« Reply #6 on: October 22, 2024, 07:28:39 am »
Hi nomad,

If I understand correctly, you are getting a runtime error about a missing font. Can you provide a sample project to debug?

In fact, it is not needed anymore to have specifically Arial font. It tries the following fonts: Helvetica, Helvetica Neue, Arial, Nimbus Sans L, Microsoft Sans Serif, FreeSans, Liberation Sans, DejaVu Sans Condensed, Tahoma. I'll update the wiki accordingly.

Regards
Conscience is the debugger of the mind

nomad

  • New Member
  • *
  • Posts: 36
Re: TBGRAFreeTypeFontRenderer and linux font paths
« Reply #7 on: October 28, 2024, 04:42:19 am »
Hi nomad,

If I understand correctly, you are getting a runtime error about a missing font. Can you provide a sample project to debug?

In fact, it is not needed anymore to have specifically Arial font. It tries the following fonts: Helvetica, Helvetica Neue, Arial, Nimbus Sans L, Microsoft Sans Serif, FreeSans, Liberation Sans, DejaVu Sans Condensed, Tahoma. I'll update the wiki accordingly.

Regards

I am trying a different approach. I am trying out the svg control and I can do alot of cool text designs with that. I made a new post "need help with BCSVGViewer..." asking help with the text wrapping in svg. Apparently it uses svg 1.0.
« Last Edit: October 28, 2024, 04:44:36 am by nomad »

 

TinyPortal © 2005-2018