Recent

Author Topic: LazFreeType portability  (Read 7338 times)

dblaszijk

  • New Member
  • *
  • Posts: 15
LazFreeType portability
« on: April 04, 2012, 10:35:25 pm »
Hi, I would like to use LazFreeType in an OpenGL project of mine. The reason to use it is to remove the dependency on the freetype dll. But looking at the sources I got a bit worried about the portability. There seems to be a bit of assembler in there, which will not work on Mac (or other architectures) I suppose (see ttcalc*.inc).

Another question is about the usability. Does this code (FT1) read all the ttf files? What are the known limitations?

Is it possible to read the curve data directly from a ttf file using this code? I would like to be able to add support to that later on in my project.

TIA

dblaszijk

  • New Member
  • *
  • Posts: 15
Re: LazFreeType portability
« Reply #1 on: April 04, 2012, 10:41:58 pm »
Oh yes, forgot to mention. The project is pure FPC, so no LCL.

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: LazFreeType portability
« Reply #2 on: April 05, 2012, 12:09:49 am »
Did you see the example about OpenGl, that comes with Lazarus?. I think I don't have any DLL installed, and I tested the example and it's works nice.

What dll are you talking?.

/BlueIcaro

dblaszijk

  • New Member
  • *
  • Posts: 15
Re: LazFreeType portability
« Reply #3 on: April 05, 2012, 12:21:38 am »
Are you talking about uglyfont.pas? That was a patch supplied by me. This unit implements a "hardcoded" vector font. But it's not what I need now. I want to have truetype font support in my app. For this I have created a freetype2 based class once earlier. However freetype2 under FPC is just a wrapper to the freetype2 dynamic library. I was thinking about using the freetype1 pascal code which I can link in my project and lose the dependency on a third party library.
I hope this explains everything.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LazFreeType portability
« Reply #4 on: April 05, 2012, 07:32:03 am »
which will not work on Mac (or other architectures) I suppose (see ttcalc*.inc).

It works great in my Mac OS X, but it is a x86 Mac. I haven't tested yet in other architectures, it would be good if you could.

Quote
Another question is about the usability. Does this code (FT1) read all the ttf files? What are the known limitations?

From all TTF files in my Windows system it failed to load only 1: http://bugs.freepascal.org/view.php?id=21456

It also has issues with FPC 2.7.x: http://bugs.freepascal.org/view.php?id=21456

 

TinyPortal © 2005-2018