Author Topic: TTF - True Type Fonts  (Read 898 times)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10656
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
TTF - True Type Fonts
« on: 2018-Mar-24 »
The attached library can load converted TTF fonts and render them in real time. This gives the option to dynamically scale fonts and use colours.
I've not done any performance tests on mobile devices, yet.

I also attached a tiny command line program that generates the font from your installed ttf files in windows.
Just run:
TTF-create.exe arial
and it will create an arial.glbvf file (GLBasic Vector Font).
Characters 33 to 255 are supported. The font must be available as C:\Windows\Fonts\****.ttf


Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4099
    • View Profile
    • Portfolio
Re: TTF - True Type Fonts
« Reply #1 on: 2018-Mar-24 »
Nice! Thanks Kitty! :good:
I´m sure going to give a go with it as soon as I finish current project.

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4122
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: TTF - True Type Fonts
« Reply #2 on: 2018-Mar-27 »
Thanks Gernot :)
I came. I saw. I played.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2510
    • View Profile
Re: TTF - True Type Fonts
« Reply #3 on: 2018-Mar-28 »
Thank you Gernot. Very timely as I was current pondering how to support foreign fonts in my game. The answer, not easily. This should give me a decent option.  :good:
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline adaz

  • Mc. Print
  • *
  • Posts: 48
    • View Profile
Re: TTF - True Type Fonts
« Reply #4 on: 2018-Apr-03 »
Thanks Gernot! Probably it's worth rewriting my font engine in my upcoming game.