Method XbpWindow():setFontCompoundName() Foundation

Sets or returns the font "compound name".

Syntax
:setFontCompoundName( [<cCompoundName>] ) --> cOldName
Parameters
<cCompoundName>
<cCompoundName> is a character string containing the compound name of a font. It consists of the point size followed by the name of the font family plus an optional font attribute "normal", "italic" or "bold" (for example, "10.Courier Italic"). The optional attribute defaults to "normal".
Note that the optional font attribute is translated to the language that corresponds with the country version of Windows.
Return

This method returns the "compound name" of the font that was current before the method was called. If a new "compound name" is not specified, the method simply returns the "compound name" of the current font.

Description

The method :setFontCompoundName() sets the default font that is used within the Xbase Part to display character strings. This allows fonts to be installed without requiring an XbpFont object.

The font can be set using #define constants from the FONT.CH file. This is the preferred way and assures platform and language independence of programs, since font names vary between operating systems and countries. For example:

#include "Font.ch" 

oXbp:setFontCompoundName( FONT_COURIER_SMALL + FONT_STYLE_BOLD ) 

The font used by XbpMenu and XbpMenuBar objects cannot be defined by an Xbase++ program. Instead, instances of these Xbase Part classes use a system font defined in Control Panel.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.