Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiQueryFont

hiQueryFont(
S_fontType 
) 
=> l_fontAttributes

Description

Returns the values of the attributes of S_fontType.

Argument

S_fontType

Type of the font you want to use.

Valid values: "text", 'text, "label", 'label, "ciw", or 'ciw.

Values Returned

l_fontAttributes

The font attributes in a disembodied property list. The attributes returned are:

fontName: String representing the font name.

When fontName is passed as an argument, one of the special-case strings is the Qt font name being used, and the metrics is Qt metrics, which can be different from the Xfont metrics.

fontAscent: Integer representing the number of pixels above the font baseline.

fontDescent: Integer representing the number of pixels below the font baseline.

fontHeight: Integer representing the maximum height of the specified font (fontAscent + fontDescent).

fontWidth: Integer representing width of the specified font.

minfontWidth: Integer representing minimum width of the specified font.

maxFontWidth: Integer representing maximum width of the specified font.

lineSpacing: Integer representing the distance between two consecutive text lines.

leading: Integer representing the space between the text lines.

For a fixed-width font, such as Courier, the three width values, fontWidth, minfontWidth, and maxfontWidth, remains the same. For a variable-width font, such as Helvetica, fontWidth is the average width, minFontWidth is the width of the narrowest character (typically the lowercase “i”), and maxFontWidth is the width of the widest character.

Examples

hiQueryFont( "text" )
=> ( ( nil fontname "Roboto Mono" fontAscent 12 fontDescent 2 fontHeight 14 fontWidth 7 minfontWidth 7 maxFontWidth 13 lineSpacing 15 leading 0 )
hiQueryFont( "label" )
=> ( nil fontname "Open Sans" fontAscent 12 fontDescent 3 fontHeight 15 fontWidth 6 minfontWidth 3 maxFontWidth 13 lineSpacing 15 leading -1 )

Related Topics

Text Attribute Functions


Return to top
 ⠀
X