QFontInfo Class Reference


The QFontInfo class provides information about the current font for a widget or a painter. More...

#include <qfontinf.h>

List of all member functions.

Public Members


Detailed Description

The QFontInfo class provides information about the current font for a widget or a painter.

The QFont class might not always map exactly to the specified font for a paint device. The QFontInfo class provides information of the actual font that matched a QFont specification.

Notice that the constructors are private and you can only get a font info object by calling QWidget::fontInfo() or QPainter::fontInfo().

A font info object will always refer to the font currently set for the widget or painter that the font info object was obtained from. Changing a widget font will update all QFontInfo objects that refer to this widget.

See also: QFont and QFontMetrics.


Member Function Documentation

QFontInfo::QFontInfo ( const QFontInfo &fi)

Constructs a copy of fi.

QFontInfo::~QFontInfo ()

Destroys the font info object.

bool QFontInfo::bold () const

Returns TRUE if weight() would return a greater than QFont::Normal, and FALSE otherwise.

See also: weight() and QFont::bold().

QFont::CharSet QFontInfo::charSet() const

Returns the character set of the matched window system font.

See also: QFont::charSet().

bool QFontInfo::exactMatch () const

Returns TRUE if the matched window system font is exactly the one specified by the font.

See also: QFont::exactMatch().

const char * QFontInfo::family () const

Returns the family name of the matched window system font.

See also: QFont::family().

bool QFontInfo::fixedPitch () const

Returns the fixed pitch value of the matched window system font.

See also: QFont::fixedPitch().

const QFont & QFontInfo::font () const

Returns the font currently set for the widget or painter.

bool QFontInfo::italic () const

Returns the italic value of the matched window system font.

See also: QFont::italic().

QFontInfo & QFontInfo::operator= ( const QFontInfo &fi)

Font info assignment.

int QFontInfo::pointSize () const

Returns the point size of the matched window system font.

See also: QFont::pointSize().

bool QFontInfo::rawMode () const

Returns TRUE if the font is a raw mode font.

If it is a raw mode font, all other functions in QFontInfo will return the same values set in the QFont, regardless of the font actually used.

Warning: The default font is a raw-mode font.

See also: QFont::rawMode().

bool QFontInfo::strikeOut () const

Returns the strike out value of the matched window system font.

Implementation note: This is always TRUE for X Windows.

See also: QFont::strikeOut().

QFont::StyleHint QFontInfo::styleHint() const

Returns the style of the matched window system font.

Currently only returns the hint set in QFont.

See also: QFont::styleHint().

bool QFontInfo::underline () const

Returns the underline value of the matched window system font.

Implementation note: This is always TRUE for X Windows.

See also: QFont::underline().

int QFontInfo::weight () const

Returns the weight of the matched window system font.

See also: QFont::weight() and bold().


This file is part of the Qt toolkit, copyright © 1995-96 Troll Tech, all rights reserved.

It was generated from the following files:


Generated at 16:51, 1996/09/24 for Qt version 1.0 by the webmaster at Troll Tech