Using non-system fonts in your apps

  • If I decide to use a font other that System or SmallSystem in my application, do I need to install it on the users machine in the event they don’t have the font installed? What is the procedure?

  • If it matters I am only talking on OS X at the moment but may be of benefit to me and others if there is a cross platform response.

  • Does anyone know what fonts are installed on all OS X machines by default?

use the FONTS collection built into XOJO to see what fonts are installed…
bear in mind that that naming conventions and use have changed from CARBON to COCOA…

  dim i as integer
  for i=0 to FontCount-1
    msgbox font(i)
  next i

crude but you get the idea.

[quote=145912:@Mike Charlesworth]- If I decide to use a font other that System or SmallSystem in my application, do I need to install it on the users machine in the event they don’t have the font installed? What is the procedure?

  • If it matters I am only talking on OS X at the moment but may be of benefit to me and others if there is a cross platform response.

  • Does anyone know what fonts are installed on all OS X machines by default?[/quote]

You can add a custom font to your app, so if it is not installed it will be available to it anyway. See
https://forum.xojo.com/5179-mac-os-custom-fonts

I use the discussed techniques in all my font applications in the MAS. Both ATSFonts and CTFontManagerRegisterFontsForURL.

For font lists, see
https://en.wikipedia.org/wiki/List_of_typefaces_included_with_OS_X
http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html

[quote=145914:@Dave S]use the FONTS collection built into XOJO to see what fonts are installed…
bear in mind that that naming conventions and use have changed from CARBON to COCOA…

  dim i as integer
  for i=0 to FontCount-1
    msgbox font(i)
  next i

crude but you get the idea.[/quote]

Dave, I get that but what I am saying is, lets say I chose ‘Helvetica’ on my interface, as i’m sure it is on OS X as default, could someone delete Helvetica on their mac and if they have done and they install my app, what is shown instead in the interface.

[quote=145917:@Michel Bujardet]You can add a custom font to your app, so if it is not installed it will be available to it anyway. See
https://forum.xojo.com/5179-mac-os-custom-fonts

I use the discussed techniques in all my font applications in the MAS. Both ATSFonts and CTFontManagerRegisterFontsForURL.

For font lists, see


http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html[/quote]

Thanks Michel, I will take a look at this.

It is impossible to disable Helvetica in Font Book. A crazy user can always open Library/Fonts and delete or move the Helvetica font file, but at this point, he is probably beyond help.

When a user font is not in the system, it uses something that looks like Helvetica, but is not Helvetica. Maybe it is Arial. The control still keeps TextFont as what you have set it, though.

Love it…

What is the situation regarding purchased fonts?

I recently purchased a font, and would like to include it in my app, but if I installed it on my user’s machine - they will not have paid for it.

Any ideas how that would work?

Thank you all in advance.

every purchased font has a different set of rules. check your EULA with the font(s).

Hmmm, will need to check that out then.
Thanks Scott.

Sometimes you can get away with using rendered images for your sentences with licensed fonts since you’re not including the source font directly, but as Scott said, it entirely depends on your license agreement with the creator.

You have to request permission from the font publisher to add it to your app, as it is extremely rare the EULA grants permission to do so. Actually I have never seen any professional doing it yet, apart from open source projects.

What font EULAs permit, though, is to use graphics created with that font, since that falls into printing, which is by essence what a font is intended to do.