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

📄 qfont.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 3 页
字号:
.)l chart/optionsform.cpp and fonts/simple-qfont-demo/viewer.cpp..SH "bool QFont::fixedPitch () const"Returns TRUE if fixed pitch has been set; otherwise returns FALSE..PPSee also setFixedPitch() and QFontInfo::fixedPitch()..SH "bool QFont::fromString ( const QString & descrip )"Sets this font to match the description \fIdescrip\fR. The description is a comma-separated list of the font attributes, as returned by toString()..PPSee also toString() and operator>>()..SH "HFONT QFont::handle () const"Returns the window system handle to the font, for low-level access. Using this function is \fInot\fR portable..SH "void QFont::insertSubstitution ( const QString & familyName, const QString & substituteName )\fC [static]\fR"Inserts the family name \fIsubstituteName\fR into the substitution table for \fIfamilyName\fR..PPSee also insertSubstitutions(), removeSubstitution(), substitutions(), substitute(), and substitutes()..PPExample: fonts/simple-qfont-demo/viewer.cpp..SH "void QFont::insertSubstitutions ( const QString & familyName, const QStringList & substituteNames )\fC [static]\fR"Inserts the list of families \fIsubstituteNames\fR into the substitution list for \fIfamilyName\fR..PPSee also insertSubstitution(), removeSubstitution(), substitutions(), and substitute()..PPExample: fonts/simple-qfont-demo/viewer.cpp..SH "bool QFont::isCopyOf ( const QFont & f ) const"Returns TRUE if this font and \fIf\fR are copies of each other, i.e. one of them was created as a copy of the other and neither has been modified since. This is much stricter than equality..PPSee also operator=() and operator==()..SH "bool QFont::italic () const"Returns TRUE if italic has been set; otherwise returns FALSE..PPSee also setItalic()..PPExample: chart/optionsform.cpp..SH "QString QFont::key () const"Returns the font's key, a textual representation of a font. It is typically used as the key for a cache or dictionary of fonts..PPSee also QMap..SH "QString QFont::lastResortFamily () const"Returns the "last resort" font family name..PPThe current implementation tries a wide variety of common fonts, returning the first one it finds. Is is possible that no family is found in which case a null string is returned..PPSee also lastResortFont()..SH "QString QFont::lastResortFont () const"Returns a "last resort" font name for the font matching algorithm. This is used if the last resort family is not available. It will always return a name, if necessary returning something like" fixed" or "system"..PPThe current implementation tries a wide variety of common fonts, returning the first one it finds. The implementation may change at any time, but this function will always return a string containing something..PPIt is theoretically possible that there really isn't a lastResortFont() in which case Qt will abort with an error message. We have not been able to identify a case where this happens. Please report it as a bug if it does, preferably with a list of the fonts you have installed..PPSee also lastResortFamily() and rawName()..SH "bool QFont::operator!= ( const QFont & f ) const"Returns TRUE if this font is different from \fIf\fR; otherwise returns FALSE..PPTwo QFonts are considered to be different if their font attributes are different. If rawMode() is enabled for both fonts, only the family fields are compared..PPSee also operator==()..SH "QFont & QFont::operator= ( const QFont & font )"Assigns \fIfont\fR to this font and returns a reference to it..SH "bool QFont::operator== ( const QFont & f ) const"Returns TRUE if this font is equal to \fIf\fR; otherwise returns FALSE..PPTwo QFonts are considered equal if their font attributes are equal. If rawMode() is enabled for both fonts, only the family fields are compared..PPSee also operator!=() and isCopyOf()..SH "int QFont::pixelSize () const"Returns the pixel size of the font if it was set with setPixelSize(). Returns -1 if the size was set with setPointSize() or setPointSizeFloat()..PPSee also setPixelSize(), pointSize(), QFontInfo::pointSize(), and QFontInfo::pixelSize()..SH "int QFont::pointSize () const"Returns the point size of the font. Returns -1 if the font size was specified in pixels..PPSee also setPointSize(), deciPointSize(), and pointSizeFloat()..PPExamples:.)l chart/optionsform.cpp and fonts/simple-qfont-demo/viewer.cpp..SH "float QFont::pointSizeFloat () const"Returns the point size of the font. Returns -1 if the font size was specified in pixels..PPSee also pointSize(), setPointSizeFloat(), pixelSize(), QFontInfo::pointSize(), and QFontInfo::pixelSize()..SH "void QFont::qwsRenderToDisk ( bool all = TRUE )"Saves the glyphs in the font that have previously been accessed as a QPF file. If \fIall\fR is TRUE (the default), then before saving, all glyphs are marked as used..PPIf the font is large and you are sure that only a subset of characters will ever be required on the target device, passing FALSE for the \fIall\fR parameter can save a significant amount of disk space..PPNote that this function is only applicable on Qt/Embedded..SH "bool QFont::rawMode () const"Returns TRUE if raw mode is used for font name matching; otherwise returns FALSE..PPSee also setRawMode() and rawName()..SH "QString QFont::rawName () const"Returns the name of the font within the underlying window system. On Windows, this is usually just the family name of a TrueType font. Under X, it is an XLFD (X Logical Font Description). Using the return value of this function is usually \fInot\fR \fIportable\fR..PPSee also setRawName()..SH "void QFont::removeSubstitution ( const QString & familyName )\fC [static]\fR"Removes all the substitutions for \fIfamilyName\fR..PPSee also insertSubstitutions(), insertSubstitution(), substitutions(), and substitute()..SH "void QFont::setBold ( bool enable )"If \fIenable\fR is true sets the font's weight to QFont::Bold; otherwise sets the weight to QFont::Normal..PPFor finer boldness control use setWeight()..PPSee also bold() and setWeight()..PPExamples:.)l menu/menu.cpp and themes/metal.cpp..SH "void QFont::setDefaultFont ( const QFont & f )\fC [static]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPPlease use QApplication::setFont() instead..SH "void QFont::setFamily ( const QString & family )"Sets the family name of the font. The name is case insensitive and may include a foundry name..PPThe \fIfamily\fR name may optionally also include a foundry name, e.g. "Helvetica [Cronyx]". (The Qt 2.x syntax, i.e." Cronyx-Helvetica", is also supported.) If the \fIfamily\fR is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen. If the family isn't available a family will be set using the font matching algorithm..PPSee also family(), setStyleHint(), and QFontInfo..SH "void QFont::setFixedPitch ( bool enable )"If \fIenable\fR is TRUE, sets fixed pitch on; otherwise sets fixed pitch off..PPSee also fixedPitch() and QFontInfo..SH "void QFont::setItalic ( bool enable )"If \fIenable\fR is TRUE, italic is set on; otherwise italic is set off..PPSee also italic() and QFontInfo..PPExamples:.)l fileiconview/qfileiconview.cpp, fonts/simple-qfont-demo/viewer.cpp, and themes/metal.cpp..SH "void QFont::setPixelSize ( int pixelSize )"Sets the font size to \fIpixelSize\fR pixels..PPUsing this function makes the font device dependent. Use setPointSize() or setPointSizeFloat() to set the size of the font in a device independent manner..PPSee also pixelSize()..PPExample: qwerty/qwerty.cpp..SH "void QFont::setPixelSizeFloat ( float pixelSize )"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPSets the logical pixel height of font characters when shown on the screen to \fIpixelSize\fR..SH "void QFont::setPointSize ( int pointSize )"Sets the point size to \fIpointSize\fR. The point size must be greater than zero..PPSee also pointSize() and setPointSizeFloat()..PPExample: fonts/simple-qfont-demo/viewer.cpp..SH "void QFont::setPointSizeFloat ( float pointSize )"Sets the point size to \fIpointSize\fR. The point size must be greater than zero. The requested precision may not be achieved on all platforms..PPSee also pointSizeFloat(), setPointSize(), and setPixelSize()..SH "void QFont::setRawMode ( bool enable )"If \fIenable\fR is TRUE, turns raw mode on; otherwise turns raw mode off. This function only has an effect under X11..PPIf raw mode is enabled, Qt will search for an X font with a complete font name matching the family name, ignoring all other values set for the QFont. If the font name matches several fonts, Qt will use the first font returned by X. QFontInfo \fIcannot\fR be used to fetch information about a QFont using raw mode (it will return the values set in the QFont for all parameters, including the family name)..PP\fBWarning:\fR Do not use raw mode unless you really, really need it! In most (if not all) cases, setRawName() is a much better choice..PPSee also rawMode() and setRawName()..SH "void QFont::setRawName ( const QString & name )"Sets a font by its system specific name. The function is particularly useful under X, where system font settings (for example X resources) are usually available in XLFD (X Logical Font Description) form only. You can pass an XLFD as \fIname\fR to this function..PPIn Qt 2.0 and later, a font set with setRawName() is still a full-featured QFont. It can be queried (for example with italic()) or modified (for example with setItalic()) and is therefore also suitable for rendering rich text..PPIf Qt's internal font database cannot resolve the raw name, the font becomes a raw font with \fIname\fR as its family..PPNote that the present implementation does not handle wildcards in XLFDs well, and that font aliases (file \fCfonts.alias\fR in the font directory on X11) are not supported..PPSee also rawName(), setRawMode(), and setFamily()..SH "void QFont::setStrikeOut ( bool enable )"If \fIenable\fR is TRUE, sets strikeout on; otherwise sets strikeout off..PPSee also strikeOut() and QFontInfo..SH "void QFont::setStyleHint ( StyleHint hint, StyleStrategy strategy = PreferDefault )"Sets the style hint and strategy to \fIhint\fR and \fIstrategy\fR, respectively..PPIf these aren't set explicitly the style hint will default to AnyStyle and the style strategy to PreferDefault..PPSee also StyleHint, styleHint(), StyleStrategy, styleStrategy(), and QFontInfo..PPExamples:.)l desktop/desktop.cpp and fonts/simple-qfont-demo/viewer.cpp..SH "void QFont::setStyleStrategy ( StyleStrategy s )"Sets the style strategy for the font to \fIs\fR..PPSee also QFont::StyleStrategy..SH "void QFont::setUnderline ( bool enable )"If \fIenable\fR is TRUE, sets underline on; otherwise sets underline off..PPSee also underline() and QFontInfo..PPExamples:.)l fonts/simple-qfont-demo/viewer.cpp and menu/menu.cpp..SH "void QFont::setWeight ( int weight )"Sets the weight the font to \fIweight\fR, which should be a value from the QFont::Weight enumeration..PPSee also weight() and QFontInfo..PPExample: fonts/simple-qfont-demo/viewer.cpp..SH "bool QFont::strikeOut () const"Returns TRUE if strikeout has been set; otherwise returns FALSE..PPSee also setStrikeOut()..SH "StyleHint QFont::styleHint () const"Returns the StyleHint..PPThe style hint affects the font matching algorithm. See QFont::StyleHint for the list of strategies..PPSee also setStyleHint(), QFont::StyleStrategy, and QFontInfo::styleHint()..SH "StyleStrategy QFont::styleStrategy () const"Returns the StyleStrategy..PPThe style strategy affects the font matching algorithm. See QFont::StyleStrategy for the list of strategies..PPSee also setStyleHint() and QFont::StyleHint..SH "QString QFont::substitute ( const QString & familyName )\fC [static]\fR"Returns the first family name to be used whenever \fIfamilyName\fR is specified. The lookup is case insensitive..PPIf there is no substitution for \fIfamilyName\fR, \fIfamilyName\fR is returned..PPTo obtain a list of substitutions use substitutes()..PPSee also setFamily(), insertSubstitutions(), insertSubstitution(), and removeSubstitution()..SH "QStringList QFont::substitutes ( const QString & familyName )\fC [static]\fR"Returns a list of family names to be used whenever \fIfamilyName\fR is specified. The lookup is case insensitive..PPIf there is no substitution for \fIfamilyName\fR, an empty list is returned..PPSee also substitute(), insertSubstitutions(), insertSubstitution(), and removeSubstitution()..PPExample: fonts/simple-qfont-demo/viewer.cpp..SH "QStringList QFont::substitutions ()\fC [static]\fR"Returns a sorted list of substituted family names..PPSee also insertSubstitution(), removeSubstitution(), and substitute()..SH "QString QFont::toString () const"Returns a description of the font. The description is a comma-separated list of the attributes, perfectly suited for use in QSettings..PPSee also fromString() and operator<<()..SH "bool QFont::underline () const"Returns TRUE if underline has been set; otherwise returns FALSE..PPSee also setUnderline()..SH "int QFont::weight () const"Returns the weight of the font which is one of the enumerated values from QFont::Weight..PPSee also setWeight(), Weight, and QFontInfo..SH RELATED FUNCTION DOCUMENTATION.SH "QDataStream & operator<< ( QDataStream & s, const QFont & font )"Writes the font \fIfont\fR to the data stream \fIs\fR. (toString() writes to a text stream.).PPSee also Format of the QDataStream operators..SH "QDataStream & operator>> ( QDataStream & s, QFont & font )"Reads the font \fIfont\fR from the data stream \fIs\fR. (fromString() reads from a text stream.).PPSee also Format of the QDataStream operators..SH "SEE ALSO".BR http://doc.trolltech.com/qfont.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 (qfont.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

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