Embed font to project

Hi,

is it possible to embed own font to project and use this for labels?
For win, lin and mac.

Thanks

[quote=47817:@Jukka Leino]Hi,

is it possible to embed own font to project and use this for labels?
For win, lin and mac.
[/quote]

Yes for Mac. Search “Custom font” for how to.

On Mac you can put them in the app in a subfolder and add a info.plist entry.
Also we have folderitem.FontActivateMBS in our MBS plugins to activate any font when you have a folderitem on Mac + Win.

@Christian Schmitz Is your MBS font plug-in free ? :smiley: I found the documentation on your website but was not able to find a download link.

It’s not free of course.
see
http://www.monkeybreadsoftware.de/xojo/plugins.shtml

Thanks but which one would I have to purchase to use custom fonts in my project? (DynaPdf?)

Edit: For this http://www.mbsplugins.eu/FontActivate.shtml

Edit: I think it is file maker 99€ ? #@&!%& I think I will undo any custom fonts out of my project :smiley:

You need MBS Xojo Util Plugin, 49 Euro.

The FileMaker plugin is a different tool for FileMaker, not for Xojo.

I have over half a dozen apps in the MAS using the techniques described in this thread :
https://forum.xojo.com/5179-mac-os-custom-fonts

Have you not read the advice in post number 2 of this thread to search for “custom fonts” to find advice ?

@Michel Bujardet Yes, I found your 28 Sep 2013 post… but I was hunting a hassle free and affordable plan B :smiley: Would require to extract something more out of that 49 eur plug in … will give it glance now, thanks @Christian Schmitz and @Michel Bujardet

Knowing Christian products quality, 49 € is not a lot if you want a solution that works right away without much effort. How many sales of your software would that represent to break even ?

Yes, no doubts on Christian products quality. And on top of that, it has an European brain behind (lolol) mine? It’s freeware

If it is freeware, here goes the simplest free solution possible selected and copied from the other thread :

  • Add a Copy Files to the project build steps (insert) and copy all fonts into the Resources folder in a subfolder called appfonts (in this example, any name will do)
  • Build an app. In the package contents folder, pick the info.plist file, copy it into your development folder, and add to it the following line:

<key>ATSApplicationFontsPath</key> <string>appfonts</string>

  • Add a Copy Files which copies the modified info.plist back into the Contents folder.

Voilà. That’s it.

Yep, already had that one on my Favs :wink: will do some tests on it very soon

If you want to update your Plugin to support Linux - have a look at the example project (which doesn’t require any plugins, and shows how to embed fonts for Windows, macOS, Linux) which I posted in this Forum-Thread.
On Linux it uses Declares to fontconfig.