Umlaut--Success!
Devin Asay
devin_asay at byu.edu
Wed Feb 28 12:57:55 EST 2007
On Feb 28, 2007, at 3:03 AM, Signe Marie Sanne wrote:
> Hello
> Perhaps someone of you may find a better solution to a small
> problem. I need to have the letter n with umlaut (tréma) in a text
> fld set to an ordinary textfont (verdana). So far I have used the
> imagesource, but I would like to know if there is a font (among
> those always present on both Mac and Windows) which will accomplish
> the same.
You *can* do this in Rev. Here's how I did it in OS X (I'm using rev
2.8 in OSX 10.4.8):
1. Create a field and set its textfont to a unicode font:
set the textFont of fld "unistuff" to "Verdana,unicode"
2. Enable the Unicode Hex Input method in the International system
prefs under the input tab. This will cause the Unicode Hex Input
method to appear in the input menu (the one with the little flags on
the right side of the menubar.)
3. Position the insert cursor in the field, choose Unicode Hex Input
from the input menu, then type :
n (then, holding alt/option key down) 0308
the n with umlaut should appear.
Sorry, don't know how to do this via direct input in Windows.
However, the following should work on either OS:
1. Create a UTF-8 encoded text file that includes the desired
character. I used BBedit, making sure I chose a font that supported
unicode (Tahoma or Lucida Grande should work) and that the document
encoding was set to UTF-8, then created the n-umlaut character just
as I described in #3 above.
2. Save the file to disk.
3. Read it in to your rev fld using the uniencode() function.
I've created a stack that shows how to do this.
go stack url "http://revolution.byu.edu/unicode/testUnicode.rev"
You may also want to download the utf-8 file from http://
revolution.byu.edu/unicode/textUni.ut8. This is the file that the
sample stack reads from.
HTH
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list