Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSvgFont Class Reference

#include <qsvgfont_p.h>

+ Inheritance diagram for QSvgFont:
+ Collaboration diagram for QSvgFont:

Public Member Functions

 QSvgFont (qreal horizAdvX)
 
void setFamilyName (const QString &name)
 
QString familyName () const
 
void setUnitsPerEm (qreal upem)
 
void addGlyph (QChar unicode, const QPainterPath &path, qreal horizAdvX=-1)
 
void draw (QPainter *p, const QPointF &point, const QString &str, qreal pixelSize, Qt::Alignment alignment) const
 
- Public Member Functions inherited from QSvgRefCounted
 QSvgRefCounted ()
 
virtual ~QSvgRefCounted ()
 
void ref ()
 
void deref ()
 

Public Attributes

QString m_familyName
 
qreal m_unitsPerEm = DEFAULT_UNITS_PER_EM
 
qreal m_horizAdvX
 
QHash< QChar, QSvgGlyphm_glyphs
 

Static Public Attributes

static constexpr qreal DEFAULT_UNITS_PER_EM = 1000
 

Detailed Description

Definition at line 38 of file qsvgfont_p.h.

Constructor & Destructor Documentation

◆ QSvgFont()

QSvgFont::QSvgFont ( qreal horizAdvX)

Definition at line 20 of file qsvgfont.cpp.

Member Function Documentation

◆ addGlyph()

void QSvgFont::addGlyph ( QChar unicode,
const QPainterPath & path,
qreal horizAdvX = -1 )

Definition at line 32 of file qsvgfont.cpp.

References QHash< Key, T >::insert(), m_glyphs, and m_horizAdvX.

+ Here is the call graph for this function:

◆ draw()

void QSvgFont::draw ( QPainter * p,
const QPointF & point,
const QString & str,
qreal pixelSize,
Qt::Alignment alignment ) const

Definition at line 39 of file qsvgfont.cpp.

References Qt::AlignHCenter, alignment, Qt::AlignRight, QString::constBegin(), QString::constEnd(), QHash< Key, T >::contains(), m_glyphs, m_horizAdvX, m_unitsPerEm, QPen::setWidthF(), and str.

+ Here is the call graph for this function:

◆ familyName()

QString QSvgFont::familyName ( ) const

Definition at line 26 of file qsvgfont.cpp.

References m_familyName.

◆ setFamilyName()

void QSvgFont::setFamilyName ( const QString & name)

Definition at line 90 of file qsvgfont.cpp.

References m_familyName.

◆ setUnitsPerEm()

void QSvgFont::setUnitsPerEm ( qreal upem)

Definition at line 95 of file qsvgfont.cpp.

References m_unitsPerEm.

Member Data Documentation

◆ DEFAULT_UNITS_PER_EM

constexpr qreal QSvgFont::DEFAULT_UNITS_PER_EM = 1000
staticconstexpr

Definition at line 41 of file qsvgfont_p.h.

Referenced by parseFontFaceNode().

◆ m_familyName

QString QSvgFont::m_familyName

Definition at line 53 of file qsvgfont_p.h.

Referenced by familyName(), and setFamilyName().

◆ m_glyphs

QHash<QChar, QSvgGlyph> QSvgFont::m_glyphs

Definition at line 56 of file qsvgfont_p.h.

Referenced by addGlyph(), and draw().

◆ m_horizAdvX

qreal QSvgFont::m_horizAdvX

Definition at line 55 of file qsvgfont_p.h.

Referenced by addGlyph(), and draw().

◆ m_unitsPerEm

qreal QSvgFont::m_unitsPerEm = DEFAULT_UNITS_PER_EM

Definition at line 54 of file qsvgfont_p.h.

Referenced by draw(), and setUnitsPerEm().


The documentation for this class was generated from the following files: