Author Topic: Using FONTS on a MAC...  (Read 38 times)

JustinRichardsMusic

  • Sr. Member
  • ****
  • Posts: 282
  • Character names can be found in metal from the 90s
    • Email
Using FONTS on a MAC...
« on: April 19, 2013, 05:03:56 AM »
Hi all,

I've decided to use my MAC for coding in QB64.  My current project involves a level editor and I want to make a nice one ;)

For that I will need to find a nice font to use.  The example in the QB64 help file is a windows based sample and I was wondering if anyone knows how to set fonts using _LOADFONT on a MAC?

I just want a basic font like ARIAL or something similar...

P.S. - I'm using QB64GL if that makes a difference...

Thanks in advance,
Justin
James Hetter's Revenge has been unleashed! Follow the games progress here:
http://www.qb64.net/forum/index.php?topic=6762.0

Download the latest version here:
https://www.dropbox.com/s/8p8gguliw1y6ink/Hetters%20Revenge.zip?m

OlDosLover

  • Hero Member
  • *****
  • Posts: 3845
  • OlDosLover
    • Email
Re: Using FONTS on a MAC...
« Reply #1 on: April 19, 2013, 07:19:53 PM »
Hi all,
    I dont own a Mac. However this is how i did what you want on Linux (im a linux newb). Find the font file that you wish to use. Copy a copy of it into your QB64 folder. Firstly see if its there and OS can find it with _FILEEXISTS .Try to open it with _LOADFONT command. Check the handle for a valid (non error) number. Lastly try printing something with the font.
    See this post for examples.:http://www.qb64.net/forum/index.php?topic=10912.0
OlDosLover.

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4620
  • QB Forever
    • Email
Re: Using FONTS on a MAC...
« Reply #2 on: April 19, 2013, 09:22:02 PM »
_LOADFONT works identically on MacOSX, except the location of the OS's font folder is different. Your best bet is to always have a copy of the font you want in a local folder and distribute it with your program to avoid OS changes breaking your program in the future.

JustinRichardsMusic

  • Sr. Member
  • ****
  • Posts: 282
  • Character names can be found in metal from the 90s
    • Email
Re: Using FONTS on a MAC...
« Reply #3 on: April 19, 2013, 09:48:26 PM »
Ok thanks guys...

I'll find the fonts folder and extract a suitable one and store it in my program folder with the program...

Thanks
Justin
James Hetter's Revenge has been unleashed! Follow the games progress here:
http://www.qb64.net/forum/index.php?topic=6762.0

Download the latest version here:
https://www.dropbox.com/s/8p8gguliw1y6ink/Hetters%20Revenge.zip?m

OlDosLover

  • Hero Member
  • *****
  • Posts: 3845
  • OlDosLover
    • Email
Re: Using FONTS on a MAC...
« Reply #4 on: April 19, 2013, 10:15:28 PM »
Hi all,
    Dont be limited by onboard supplied fonts. Have a looky with gogle and download some that you like!
OlDosLover.