Error getting tags :
error 404Error getting tags :
error 404 textFont | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
textFont
Basics
Expander triangle
Type
Property
Syntax
set the textFont of object to fontName[,language] set the textFont of [chunk of] field to fontName[,language]
Introduced
1.0
Changed
2.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Specifies the font face of text in an object.
Examples

set the textFont of button "Hello" to "Courier"
set the textFont of the foundChunk to "Comic Sans"
set the textFont of field "Input" to "Arial,Japanese"
put item 2 of the textFont of the selectedChunk into theLanguage
set the textFont of field "Text" to ",Japanese"

Additional Comments
Expander triangle

Use the textFont property to change the appearance of text.

Value:

The textFont of an object or chunk is either empty or a string.

If the textFont includes a second item, it is one of the following:

* ANSI (synonym for "English")

* Arabic

* Bulgarian

* Chinese

* English

* Greek

* Hebrew

* Japanese (Shift-JIS)

* Korean

* Roman

* Russian (Cyrillic)

* Thai

* Turkish

* SimpleChinese (Simplified Chinese)

* Ukrainian

* Unicode (UTF-16)

* w (synonym for "Unicode")

Comments:

Setting the textFont of an object to empty allows the textFont of the object's owner to show through. Use the effective keyword to find out what font is used for the object, even if its own textFont is empty.

If the chunk contains more than one font, the chunk's textFont property reports "mixed".

Note: Setting the textFont to empty also sets the textSize and textStyleproperties of the object or chunk to empty.

To specify a Unicode font, append "Unicode" or the desired language name to the font name, separating it with a comma. For example, to set the font face of a button to a Japanese font, use a statement like the following:

set the textFont of button 1 to "Osaka,Japanese"

-- displays button label in Japanese, in the Osaka font

If the textFont of a field or a chunk includes a language, selecting in that field or chunk automatically switches the keyboard input method to the one for that language, ready to type text in the language. The htmlText property of the field or chunk uses the language to derive the HTML "lang" attribute.

On Mac OS systems, if the specified font isn't available, the system font (which is set in the Appearance control panel and specifies the font used for menus) is used. On Unix systems, if the specified font isn't available, Helvetica is used. On Windows systems, if the specified font isn't available, the current Windows font is used.

If the specified Unicode font is unavailable but the system supports Unicode, Revolution uses the default font for the specified language. If you specify a language, but leave the fontName empty, the object uses the default font for the specified language, as specified by the operating system's settings.

Changes to Revolution:

The ability to specify "Unicode" or a language name was introduced in version 2.0. In previous versions, display of double-byte characters was not supported.

User Comments
Expander triangle