![]() |
Scribus
Open source desktop publishing at your fingertips
|
Base Class FtFace provides an ScFace private implementation for Freetype based fonts. Subclasses are ScFace_ps and ScFace_ttf. More...
#include <ftface.h>
Static Public Member Functions | |
static bool | hasMicrosoftUnicodeCmap (FT_Face face) |
static QString | adobeGlyphName (FT_ULong charcode) |
Protected Attributes | |
FT_Face | m_face |
QString | m_pdfAscent |
QString | m_pdfCapHeight |
QString | m_pdfDescender |
QString | m_italicAngle |
QString | m_pdfFontBBox |
int | m_encoding |
qreal | m_uniEM |
qreal | m_ascent |
qreal | m_descent |
qreal | m_height |
qreal | m_xHeight |
qreal | m_capHeight |
qreal | m_maxAdvanceWidth |
qreal | m_underlinePos |
qreal | m_strikeoutPos |
qreal | m_strokeWidth |
![]() | |
Status | cachedStatus |
QHash< gid_type, qreal > | m_glyphWidth |
QHash< gid_type, GlyphData > | m_glyphOutline |
Static Protected Attributes | |
static FT_Library | library = NULL |
Additional Inherited Members | |
![]() | |
int | refs |
controls destruction | |
int | usage |
controls load() | |
QString | scName |
QString | fontFile |
int | faceIndex |
QString | psName |
QString | family |
QString | style |
QString | variant |
QString | forDocument |
ScFace::Status | status |
ScFace::FontType | typeCode |
ScFace::FontFormat | formatCode |
bool | usable |
bool | embedPs |
bool | subset |
bool | outline |
bool | isStroked |
bool | isFixedPitch |
bool | hasGlyphNames |
gid_type | maxGlyph |
![]() | |
virtual QMap< QString, QString > | fontDictionary (qreal sz=1.0) const |
virtual GlyphMetrics | glyphBBox (gid_type gl, qreal sz) const |
virtual bool | EmbedFont (QByteArray &) const |
virtual bool | hasNames () const |
virtual bool | glyphNames (QMap< gid_type, std::pair< ucs4_type, QString > > &gList) const |
virtual qreal | glyphWidth (gid_type gl, qreal sz) const |
virtual FPointArray | glyphOutline (gid_type gl, qreal sz) const |
virtual FPoint | glyphOrigin (gid_type gl, qreal sz) const |
virtual bool | isSymbolic () const |
Base Class FtFace provides an ScFace private implementation for Freetype based fonts. Subclasses are ScFace_ps and ScFace_ttf.
Below is the old docs for class Foi:
This is subclassed by a class to handle Type1 fonts, a class to handle TrueType fonts, and potentially any other type that becomes appropriate in the future. Note the virtual destructor, needed to ensure that the correct destructor is called for subclasses
The RealName field has been changed from a data member to a member function. This is because the only place the PostScript real name of a font is required is the printing code, so it's cheaper to extract this information only when it is required, for just the used fonts, than for every one of potentially hundreds at application startup! This also allows for the fact that truetype fonts will require a different method of extracting their names.
One implication of using a base class/subclass model for fonts: It is no longer possible to store the ScFace structures in a QMap. This is because QMap allocates its own structures, and copies the supplied data to them. A QMap<QString,ScFace> would demote all subclasses to ScFace classes, and hence break the polymorphism. QDict can be used instead, with very little change to the rest of the code, since it stores references to the data instead of copying the data. With AutoDelete set to true, it will automatically dispose of all data when its destructor is called, so there are no extra cleaning-up chores to take care of.