📄 qfontinfo.3qt
字号:
'\" t.TH QFontInfo 3qt "5 March 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQFontInfo \- General information about fonts.br.PP\fC#include <qfontinfo.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQFontInfo\fR ( const QFont & ) ".br.ti -1c.BI "\fBQFontInfo\fR ( const QFontInfo & ) ".br.ti -1c.BI "\fB~QFontInfo\fR () ".br.ti -1c.BI "QFontInfo& \fBoperator=\fR ( const QFontInfo & ) ".br.ti -1c.BI "QString \fBfamily\fR () const".br.ti -1c.BI "int \fBpointSize\fR () const".br.ti -1c.BI "bool \fBitalic\fR () const".br.ti -1c.BI "int \fBweight\fR () const".br.ti -1c.BI "bool \fBbold\fR () const".br.ti -1c.BI "bool \fBunderline\fR () const".br.ti -1c.BI "bool \fBstrikeOut\fR () const".br.ti -1c.BI "bool \fBfixedPitch\fR () const".br.ti -1c.BI "QFont::StyleHint \fBstyleHint\fR () const".br.ti -1c.BI "QFont::CharSet \fBcharSet\fR () const".br.ti -1c.BI "bool \fBrawMode\fR () const".br.ti -1c.BI "bool \fBexactMatch\fR () const".br.in -1c.SH DESCRIPTIONThe QFontInfo class provides general information about fonts..PPThe QFontInfo class mirrors QFont exactly, but where QFont access functions return set values, QFontInfo returns the values that apply to the font in use..PPFor example, when the program asks for a 25pt Courier font on a machine that has a 24pt Courier font but not a scalable one, QFont will (normally) use the 24pt Courier for rendering. In this case, QFont::pointSize() returns 25 and QFontInfo::pointSize() 24..PPThe access functions in QFontInfo mirror QFont exactly, except for this difference..PPThere are three ways to create a QFontInfo object..PPThe QFontInfo constructor with a QFont creates a font info object for a screen-compatible font, i.e. the font can not be a printer font..PPQWidget::fontInfo() returns the font info for a widget's font. This is equivalent to QFontInfo(widget->font()). Setting a new font for the widget later does not affect the font info object..PPQPainter::fontInfo() returns the font info for a painter's current font. The font info object is automatically updated if somebody sets a new painter font, unlike the two above cases, which take a" snapshot" of a font..PPSee also QFont and QFontMetrics..SH MEMBER FUNCTION DOCUMENTATION.SH "QFontInfo::QFontInfo ( const QFont & font )"Constructs a font info object for \fIfont.\fR.PPThe font must be screen-compatible, i.e. a font you use when drawing text in widgets or pixmaps. If \fIfont\fR is a printer font, you'll probably get wrong results..PPUse the QPainter::fontInfo() to get the font info when painting. This is a little slower than using this constructor, but it always gives correct results..SH "QFontInfo::QFontInfo ( const QFontInfo & fi )"Constructs a copy of \fIfi.\fR.SH "QFontInfo::~QFontInfo ()"Destructs the font info object..SH "bool QFontInfo::bold () const"Returns TRUE if weight() would return a greater than \fCQFont::Normal,\fR and FALSE otherwise..PPSee also weight() and QFont::bold()..SH "QFont::CharSet QFontInfo::charSet() const"Returns the character set of the matched window system font..PPSee also QFont::charSet()..SH "bool QFontInfo::exactMatch () const"Returns TRUE if the matched window system font is exactly the one specified by the font..PPSee also QFont::exactMatch()..SH "QString QFontInfo::family () const"Returns the family name of the matched window system font..PPSee also QFont::family()..SH "bool QFontInfo::fixedPitch () const"Returns the fixed pitch value of the matched window system font. A fixed pitch font is a font that has constant character pixel width..PPSee also QFont::fixedPitch()..SH "bool QFontInfo::italic () const"Returns the italic value of the matched window system font..PPSee also QFont::italic()..SH "QFontInfo & QFontInfo::operator= ( const QFontInfo & fi )"Font info assignment..SH "int QFontInfo::pointSize () const"Returns the point size of the matched window system font..PPSee also QFont::pointSize()..SH "bool QFontInfo::rawMode () const"Returns TRUE if the font is a raw mode font..PPIf 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..PPSee also QFont::rawMode()..SH "bool QFontInfo::strikeOut () const"Returns the strike out value of the matched window system font..PPSee also QFont::strikeOut()..SH "QFont::StyleHint QFontInfo::styleHint() const"Returns the style of the matched window system font..PPCurrently only returns the hint set in QFont..PPSee also QFont::styleHint()..SH "bool QFontInfo::underline () const"Returns the underline value of the matched window system font..PPSee also QFont::underline()..SH "int QFontInfo::weight () const"Returns the weight of the matched window system font..PPSee also QFont::weight() and bold()..SH "SEE ALSO".BR http://doc.trolltech.com/qfontinfo.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qfontinfo.3qt) and the Qtversion (2.3.0).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -