Is it possible to embed a font in the executable or load it from resource folder?
I want to use an icon font for symbols; or is there a better way to use icon fonts? (Of course, could make an image from them)
Well you can also embed fonts in a resource inside exe, but u don’t think there is an interface to do this in Xojo.
But maybe an external resource editor could do that.
Not sure why you want that.
For font activation our plugin function will help on Mac and Windows.
So, I want to use an external font which may not be on destination PC.
Of course, it can be a normal resource in resource folder and Iwould load font into application.
Is that possible?
Font symbols are used in place of normal icons, expecially web site. They scale very well, if needed.
[quote=294572:@Hans-Norbert Gratzal]So, I want to use an external font which may not be on destination PC.
Of course, it can be a normal resource in resource folder and Iwould load font into application.
Is that possible?[/quote]
That is what I do. Get Tim Parnell’s TPSF class to access more easily the Resources folder http://timi.me/xojo
The same applies to other ways of doing this (without MBS Plugins), e.g. with the Declare (found in the Windows Functionality Suite).
The issue might be that the declare has no effect with Direct2D/DirectWrite (since 2016r4 used on Windows)?
Maybe Christian’s Plugin is using the same API calls?
I dont embed fonts in the .exe I place them in a folder next to the .exe and add them dynamically to the system for the app. has worked great for me for years.
[quote=327844:@Jürg Otter]this is exactly what the previous post mentioned…
…but how do you do it when you’re building a windows application with Xojo 2017r1.1?[/quote]
for windows I am still using 16R4. Let me see if I can clone one of the repositories and testing with 17R1.1. Only Mac apps do we run current version on. Windows we have to stay behind a few versions.
Font licensing often prohibits adding the font to the user’s system if it’s licensed for use in an app.
I need to be able to activate and use a font temporarily, stuck on 2016r3
I tried to create a workaround.
Is not complicated but AFAIK actually it can’t be done (William told me so)
I use customFont for app icons within the app. Actually I have extended my method to work with font on Mac and create automatically all the needed icons as picture for windows and Linux (btw since I never discovered how to load a temporary font for linux I already used this method for Linux)
William Yu just posted in <https://xojo.com/issue/46596> that has been fixed (Windows issue with custom fonts), and is waiting verification from the testing staff.