WFONT()

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Function to return current font information


Syntax

WFONT(<expN> [,<window-name>])


See Also

AFONT(), FONTMETRIC(), GETFONT(), WOUTPUT()


Description

The WFONT() function returns information about either the current font or the active font in the specified window.


Parameters Description
<expN> 1 returns the font name as a string

2 returns the font size as a number

3 returns the font styles as a string

<window-name> If the optional <window-name> is specified, the information returned will be based on the active font in that window.


Font Styles:


Code Style
B Bold
I Italic
N Normal
O Outline
Q Opaque
S Shadow
T Transparent
U Underline


Example

dialog box "Font name is " + wfont(1)
dialog box "Font size is " + alltrim(str(wfont(2)))
dialog box "Font attributes are " + wfont(3)
define window window1 from 1,1 to 20,40
activate window window1
dialog box "Font name is " + wfont(1, "window1")
dialog box "Font size is " + alltrim(str(wfont(2,"window1")))
dialog box "Font attributes are " + wfont(3, "window1")


Products

Recital