FutureBasic Logo

<<    Index    >> FutureBasic 5

text   statement

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

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:
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.
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.
* 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%

   text _geneva, 12, _boldBit% + _italicBit%
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 backgound). Other transfer modes include:
_srcXor _addOver
_srcBic _subPin
_notSrcCopy _transparent
_notSrcOr _adMax
_notSrcXor _subOver
_notSrcBic _adMin
_blend _grayishTextOr
_addPin _ditherCopy (mask)

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 Also:
edit text; route; print; button statement; color; long color