⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qfontinfo.3qt

📁 linux下GUI编程工具qt的在线连接帮助手册
💻 3QT
字号:
'\" t.TH QFontInfo 3qt "11 October 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.PP\fC#include <qfontinfo.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQFontInfo\fR ( const QFont & font )".br.ti -1c.BI "\fBQFontInfo\fR ( const QFontInfo & fi )".br.ti -1c.BI "\fB~QFontInfo\fR ()".br.ti -1c.BI "QFontInfo & \fBoperator=\fR ( const QFontInfo & fi )".br.ti -1c.BI "QString \fBfamily\fR () const".br.ti -1c.BI "int \fBpixelSize\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 \fBfixedPitch\fR () const".br.ti -1c.BI "QFont::StyleHint \fBstyleHint\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 provides the same access functions as QFont, e.g. family(), pointSize(), italic(), weight(), fixedPitch(), styleHint() etc. But whilst the QFont access functions return the values that were set, a QFontInfo object returns the values that apply to the font that will actually be used to draw the text..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..PPThere are three ways to create a QFontInfo object. <ol type=1>.IP 1Calling the QFontInfo constructor with a QFont creates a font info object for a screen-compatible font, i.e. the font cannot be a printer font<sup>*</sup>. If the font is changed later, the font info object is \fInot\fR updated..IP 2QWidget::fontInfo() returns the font info for a widget's font. This is equivalent to calling QFontInfo(widget->font()). If the widget's font is changed later, the font info object is \fInot\fR updated..IP 3QPainter::fontInfo() returns the font info for a painter's current font. The font info object is \fIautomatically\fR updated if you set a new painter font..PP<sup>*</sup> If you use a printer font the values returned will almost certainly be inaccurate. Printer fonts are not always accessible so the nearest screen font is used if a printer font is supplied..PPSee also QFont, QFontMetrics, QFontDatabase, Graphics Classes and Implicitly and Explicitly Shared Classes..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..PPThe font info object holds the information for the font that is passed in the constructor at the time it is created, and is not updated if the font's attributes are changed later..PPUse the QPainter::fontInfo() function to get the font info when painting. This is a little slower than using this constructor, but it always gives correct results because the font info data is updated..SH "QFontInfo::QFontInfo ( const QFontInfo & fi )"Constructs a copy of \fIfi\fR..SH "QFontInfo::~QFontInfo ()"Destroys the font info object..SH "bool QFontInfo::bold () const"Returns TRUE if weight() would return a value greater than QFont::Normal; otherwise returns FALSE..PPSee also weight() and QFont::bold()..SH "bool QFontInfo::exactMatch () const"Returns TRUE if the matched window system font is exactly the same as 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()..PPExample: fonts/simple-qfont-demo/viewer.cpp..SH "bool QFontInfo::fixedPitch () const"Returns the fixed pitch value of the matched window system font..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 )"Assigns the font info in \fIfi\fR..SH "int QFontInfo::pixelSize () const"Returns the pixel size of the matched window system font..PPSee also QFont::pointSize()..SH "int QFontInfo::pointSize () const"Returns the point size of the matched window system font..PPSee also QFont::pointSize()..PPExample: fonts/simple-qfont-demo/viewer.cpp..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 "QFont::StyleHint QFontInfo::styleHint () const"Returns the style of the matched window system font..PPCurrently only returns the style hint set in QFont..PPSee also QFont::styleHint() and QFont::StyleHint..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 help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qfontinfo.3qt) and the Qtversion (3.0.0).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -