Me again : )
I have a multiline field with text in it. I am trying to change the font on it to a different font but no matter what I do, the font remains the same. If I use the property inspector or message command line box, a change in font still retains the old font. I imagine this has to do with the custom property shown below.
I populate this field using:
put field "Gloss" & uniEncode(comma & space) & field "Vernacular" & \
uniEncode(comma & space) & UniEncode(id of this card) into tEnglishCardName
set the EnglishCardName of this card to tEnglishCardName --THIS IS ALREADY IN UTF16
put the EnglishCardName of this card & UniEncode(return) into line (the number of this card) of fld "listEnglish"
Thanks,
Larry
Font of field won't change
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Larry,
Unicode text often doesn't adhere to the owner's font. Instead, try this.
First, you need to build the complete index in unicode. You can't put unicodeText into a field. You can only set the unicodeText property. Once you have built the complete index, you can set the unicodeText to a variable, e.g. myUCIndex
Note that ValidFont needs to be a font with the necessary glyphs. Otherwise, you may see a lot of meaningless symbols, usually Chinese glyphs. You may need to replace UTF16 with a different value, but I think it will work for you.
Best,
Mark
Unicode text often doesn't adhere to the owner's font. Instead, try this.
First, you need to build the complete index in unicode. You can't put unicodeText into a field. You can only set the unicodeText property. Once you have built the complete index, you can set the unicodeText to a variable, e.g. myUCIndex
Code: Select all
set the unicodeText of fld "listEnglish" to myUCIndex
set the textFont of char 1 to -1 of fld "listEnglish" to "ValidFont,UTF16"
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode