Futurebasic/Language/Reference/text

TEXTEdit

StatementEdit

(+) Appearance (+) Standard (+) Console

SyntaxEdit

TEXT [font%][,[size%][,[face%][,copyMode%]]]

DescriptionEdit

This statement sets the text characteristics for the current output window or printer. It affects subsequent PRINT statements (in the current window or printer), subsequent LPRINT statements, and subsequently-created edit fields (in the current window). It does not change the appearance of any existing text, except in buttons created using the _useWFont type modifier (see the BUTTON statement). Each of the parameters is optional. If you omit a parameter, the corresponding characteristic won't be changed. The parameters are interpreted as follows: font% A number which identifies the font family. Certain common fonts have standard numbers which are identified by these constants: _newYork_venice_geneva _monaco_times_helvetica _courier_symbol The following constants are also available: _sysFont (System font; usually Chicago or Charcoal) _applFont (Default application font; usually Geneva) For other fonts, the best way to determine the font number is to pass the font's name to the GETFNUM Toolbox procedure, as here: CALL GETFNUM(fontName$, font%) When you do this, the font's number is returned in the font% variable, which you can then pass to the TEXT statement. size% The font size, in points. This usually gives some indication of the height in pixels of the tallest character; however, you shouldn't rely on this. Use the USR FONTHEIGHT function to determine the pixel height of a line of text. * face% The text style. To set the face to "plain," set this parameter to zero; otherwise, you can set it to the sum of any of the following bitmask values: _boldBit%_outlineBit% _italicBit%_shadowBit% _ulineBit%_condenseBit% _extendBit% Example: TEXT _geneva, 12, _boldBit% + _italicBit% copyMode% This determines how the text interacts with the existing background. The most commonly used values are _srcCopy (the entire character's rectangle replaces the background), and _srcOr (only the character's glyph replaces the background). Other transfer modes include: _srcXor_addOver _srcBic_subPin _notSrcCopy_transparent _notSrcOr_adMax _notSrcXor_subOver _notSrcBic_adMin _blend_grayishTextOr _addPin_ditherCopy(mask) See the "QuickDraw Text" chapter in Inside Macintosh: Text, and the chapters "QuickDraw Drawing" and "Color QuickDraw" in Inside Macintosh: Imaging with QuickDraw, for more information about text transfer modes. Note: Each screen window maintains its own text characteristics separately from the others. The TEXT statement affects only the characteristics in the current window. To change the characteristics of text in existing edit fields, use the EDIT TEXT statement. To change the color of subsequently printed text, use the COLOR or LONG COLOR statement.

See AlsoEdit

EDIT TEXT; ROUTE; PRINT; BUTTON statement; USR FONTHEIGHT; COLOR; LONG COLOR