fonts included in standalone?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
fm31
Posts: 22
Joined: Tue Apr 23, 2013 2:08 pm

fonts included in standalone?

Post by fm31 » Tue Jan 19, 2016 1:08 pm

Hello

I have a stack in which I am obliged to use a special font. this font is installed on my computer but not necessary on others computers

the problem is with the standalone application (SA). when I create it and use the SA on another computer where the font is not installed, the font text is not the same as initial and a default font replace my font.

it is possible to insert the font directly in the standalone application ?

Best regards and thanks for answer

François

PS : I use the livecode 7.1.0

Klaus
Posts: 14186
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: fonts included in standalone?

Post by Klaus » Tue Jan 19, 2016 1:16 pm

Bonjour François,

yes, this is possible!

Do like this:
1. Add these font(s) via the "Copy files..." tab in the standalone builder,
then they will be found at -> specialfolderpath("resources")
in the standalone.

2. Add a little script to your mainstack, maybe in the "pre-/openstack" handler:
...
start using font file (specialfolderpath("resources") & "/name_of_your_font_file_here.ttf")
## Same for every font file you need to use
...

Best

Klaus

fm31
Posts: 22
Joined: Tue Apr 23, 2013 2:08 pm

Re: fonts included in standalone?

Post by fm31 » Tue Jan 19, 2016 3:31 pm

hello

thanks for answer but .......... it doesn't work. do we have to use RevfontLoad before the start using font ?

Best regards

Klaus
Posts: 14186
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: fonts included in standalone?

Post by Klaus » Tue Jan 19, 2016 3:37 pm

Bonjour François,

nope, "RevLoadFont" has been deprecated in favour of "start using font file..."
Hm, It SHOULD work :D

So "the fontnames" and/or "the fontfilesinuse" do not contain your custom font(s)?
Could you please check this in the standalone?

And also check "the result" right after "start using font file..."
Should be empty on success and may give a hint otherwise.

What did you script and what type of fonts (TTF or else?) are you using?


Best

Klaus

fm31
Posts: 22
Joined: Tue Apr 23, 2013 2:08 pm

Re: fonts included in standalone?

Post by fm31 » Tue Jan 19, 2016 4:29 pm

Hello

In fact, it seems that specialFolderPath("Resources") return ...... empty

specialFolderPath("engine") is OK
specialFolderPath("desktop") also
.....
......

all are OK except "Resources"

Klaus
Posts: 14186
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: fonts included in standalone?

Post by Klaus » Tue Jan 19, 2016 4:54 pm

Hm, please try again with LC 7.1.1!
Get it here: http://downloads.livecode.com/livecode/

SparkOut
Posts: 2944
Joined: Sun Sep 23, 2007 4:58 pm

Re: fonts included in standalone?

Post by SparkOut » Tue Jan 19, 2016 8:01 pm

Is this on Windows? When you distribute the standalone, do you just provide the executable file? Or do you bundle it with the extra resource files (the font file) and subfolder of any external files found in the same folder as the compiled standalone executable? The font, other resources and any folder of externals also needs to be copied onto the target computer, in the same folder as the executable.
If on mobile, "resources" is case sensitive and needs to be all lower case.

Post Reply