Bizarre behaviour! (was: Saving a font as a custom property)

Lars Brehmer larsbrehmer at mac.com
Fri Feb 17 20:04:44 EST 2012


First of all, thank you very much Mark for this:

> Hi Lars,
> 
> The save command is only for stacks. You need to use the write or put URL command. Make sure to open the file for binary write or start the URL with bin file.


I now have my fonts stored as custom properties, and when the stack or standalone is opened and the fonts are not yet where they should be, the custom properties are saved as the fonts in the correct folder. So far so good. This is all in Windows XP by the way.

But something very odd is happening. When the stack or the standalone opens, the fonts are loaded EXCEPT for the textSize and textStyle that I need in my fields! In other words, the fields that use this font are displayed with a different font. But when I switch the font of the field to a different size or change it from bold to plain, it displays the correct font!

Just to check this out, I did the following:

1. I closed the stack and in doing so revFontUnLoad unloads the font.

2. I confirm this in the message box with "put the fontnames"

3. I re-open the stack which uses revFontLoad to load the font

4. I confirm this with "put the fontNames"

5 I make a new stack with with nothing but 14 fields. The fonts of these fields are my font  -  textSizes 12,13,14,15,16,17,18 plain and 12,13,14,15,16,17,18 bold. The font I actually need to use in my stack is 15 plain.

6. I type the same characters in each of the fields. In all but the 15 bold field, the text is displayed with the correct font. The 15 bold field displays a different font than my font which it is set to!

7. I change the font of the fields in my main stack to 16 plain and re-open the test stack. All 14 fields EXCEPT the 16 plain field display the correct text!

What is the point of revFontLoad if the one textSize and textStyle that I actually need doesn't work, but the other sizes and styles do? This seems bizarre to me to say the least. The font I am using is a very old font that basically considered to be obsolete but it is the only free and re-distributable font I have found that has all of the characters that I need, and when  but when it is actually installed and revLoaded, it works perfectly. I just don't understand.

Has anyone ever seen behaviour like this? Any suggestions? I could of course distribute copies of the font with the standalone for the user to drag onto control panel>fonts, but I want to avoid this, if possible. What frustrates me is that on the Mac, plain old Arial does have all of the characters that I need, but not a single one of the standard fonts that are included in Windows does, including Arial. Sigh!

Cheers,

Lars






More information about the use-livecode mailing list