Saving a font as a custom property

Lars Brehmer larsbrehmer at mac.com
Fri Feb 17 12:33:06 EST 2012


I have been fooling around with revFontLoad in Windows for quite a while now with varying degrees of succes, nostly very little. I found an old post that suggested saving the font as a custom property, and then when the application loads, saves that custom property as its original font. So far so good.

revFontload works when this font is already in its place (in aplication data) and so does revFontUnLoad. However I can't get the script that right that gets the custom property and saves it as a font again.

To set the custom property, I used:

    set the myFont1 of stack "fireUp" to (url("binfile:" & (specialFolderPath(26) & "/vTrainerFiles/vDeuEng/Ipa93sr.ttf")))
    set the myFont2 of stack "fireUp" to (url("binfile:" & (specialFolderPath(26) & "/vTrainerFiles/vDeuEng/Ipa93sb.ttf")))

I think this worked because those two custom properties now contain a whole lot of gibberish characters, just like when I save a stack as a custom property. I am of course not sure if it really worked.

for then getting the custom property and saving it as its original font, I have tried both

    get the myFont1 of stack "fireUp"
    save it as URL(binfile: & specialFolderPath(26) & "\TrainerFiles\vDeuEng\Ipa93sr.ttf")

and 

    get the myFont1 of stack "fireUp"
    save it as (specialFolderPath(26) & "\TrainerFiles\vDeuEng\Ipa93sr.ttf")

Both of these reult in errors and and the fonts are not saved.

What am I doing wrong? 

Cheers,

Lars






More information about the use-livecode mailing list