KLayout 0.29.8 (2024-10-28 63dd591e5) [master]

API reference - Class QRawFont

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QRawFont

Sub-classes: AntialiasingType, QFlags_AntialiasingType, LayoutFlag, QFlags_LayoutFlag

Public constructors

new QRawFontnewConstructor QRawFont::QRawFont()
new QRawFontnew(string fileName,
double pixelSize,
const QFont_HintingPreference hintingPreference = QFont::PreferDefaultHinting)
Constructor QRawFont::QRawFont(const QString &fileName, double pixelSize, QFont::HintingPreference hintingPreference)
new QRawFontnew(bytes fontData,
double pixelSize,
const QFont_HintingPreference hintingPreference = QFont::PreferDefaultHinting)
Constructor QRawFont::QRawFont(const QByteArray &fontData, double pixelSize, QFont::HintingPreference hintingPreference)
new QRawFontnew(const QRawFont other)Constructor QRawFont::QRawFont(const QRawFont &other)

Public methods

[const]bool!=(const QRawFont other)Method bool QRawFont::operator!=(const QRawFont &other)
[const]bool==(const QRawFont other)Method bool QRawFont::operator==(const QRawFont &other)
void_assign(const QRawFont other)Assigns another object to self
[const]QRawFont ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]QPointF[]advancesForGlyphIndexes(unsigned int[] glyphIndexes)Method QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes)
[const]QPointF[]advancesForGlyphIndexes(unsigned int[] glyphIndexes,
QRawFont_QFlags_LayoutFlag layoutFlags)
Method QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes, QFlags<QRawFont::LayoutFlag> layoutFlags)
[const]booladvancesForGlyphIndexes(unsigned int ptr glyphIndexes,
QPointF ptr advances,
int numGlyphs)
Method bool QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs)
[const]booladvancesForGlyphIndexes(unsigned int ptr glyphIndexes,
QPointF ptr advances,
int numGlyphs,
QRawFont_QFlags_LayoutFlag layoutFlags)
Method bool QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs, QFlags<QRawFont::LayoutFlag> layoutFlags)
[const]QImagealphaMapForGlyph(unsigned int glyphIndex,
const QRawFont_AntialiasingType antialiasingType = QRawFont::SubPixelAntialiasing,
const QTransform transform = QTransform())
Method QImage QRawFont::alphaMapForGlyph(quint32 glyphIndex, QRawFont::AntialiasingType antialiasingType, const QTransform &transform)
[const]doubleascentMethod double QRawFont::ascent()
QRawFontassign(const QRawFont other)Method QRawFont &QRawFont::operator=(const QRawFont &other)
[const]doubleaverageCharWidthMethod double QRawFont::averageCharWidth()
[const]QRectFboundingRect(unsigned int glyphIndex)Method QRectF QRawFont::boundingRect(quint32 glyphIndex)
[const]doublecapHeightMethod double QRawFont::capHeight()
[const]doubledescentMethod double QRawFont::descent()
[const]new QRawFont ptrdupCreates a copy of self
[const]stringfamilyNameMethod QString QRawFont::familyName()
[const]bytesfontTable(string tagName)Method QByteArray QRawFont::fontTable(const char *tagName)
[const]boolglyphIndexesForChars(unsigned int ptr chars,
int numChars,
unsigned int ptr glyphIndexes,
int ptr numGlyphs)
Method bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *glyphIndexes, int *numGlyphs)
[const]unsigned int[]glyphIndexesForString(string text)Method QVector<quint32> QRawFont::glyphIndexesForString(const QString &text)
[const]QFont_HintingPreferencehintingPreferenceMethod QFont::HintingPreference QRawFont::hintingPreference()
[const]boolisValid?Method bool QRawFont::isValid()
[const]doubleleadingMethod double QRawFont::leading()
[const]doublelineThicknessMethod double QRawFont::lineThickness()
voidloadFromData(bytes fontData,
double pixelSize,
const QFont_HintingPreference hintingPreference)
Method void QRawFont::loadFromData(const QByteArray &fontData, double pixelSize, QFont::HintingPreference hintingPreference)
voidloadFromFile(string fileName,
double pixelSize,
const QFont_HintingPreference hintingPreference)
Method void QRawFont::loadFromFile(const QString &fileName, double pixelSize, QFont::HintingPreference hintingPreference)
[const]doublemaxCharWidthMethod double QRawFont::maxCharWidth()
[const]QPainterPathpathForGlyph(unsigned int glyphIndex)Method QPainterPath QRawFont::pathForGlyph(quint32 glyphIndex)
[const]doublepixelSizeMethod double QRawFont::pixelSize()
voidpixelSize=(double pixelSize)Method void QRawFont::setPixelSize(double pixelSize)
voidsetPixelSize(double pixelSize)Method void QRawFont::setPixelSize(double pixelSize)
[const]QFont_StylestyleMethod QFont::Style QRawFont::style()
[const]stringstyleNameMethod QString QRawFont::styleName()
[const]QFontDatabase_WritingSystem[]supportedWritingSystemsMethod QList<QFontDatabase::WritingSystem> QRawFont::supportedWritingSystems()
[const]boolsupportsCharacter(unsigned int character)Method bool QRawFont::supportsCharacter(QChar character)
[const]boolsupportsCharacter_ucs4(unsigned int ucs4)Method bool QRawFont::supportsCharacter(unsigned int ucs4)
voidswap(QRawFont other)Method void QRawFont::swap(QRawFont &other)
[const]doubleunderlinePositionMethod double QRawFont::underlinePosition()
[const]doubleunitsPerEmMethod double QRawFont::unitsPerEm()
[const]intweightMethod int QRawFont::weight()
[const]doublexHeightMethod double QRawFont::xHeight()

Public static methods and constants

[static,const]QRawFont_LayoutFlagKernedAdvancesEnum constant QRawFont::KernedAdvances
[static,const]QRawFont_AntialiasingTypePixelAntialiasingEnum constant QRawFont::PixelAntialiasing
[static,const]QRawFont_LayoutFlagSeparateAdvancesEnum constant QRawFont::SeparateAdvances
[static,const]QRawFont_AntialiasingTypeSubPixelAntialiasingEnum constant QRawFont::SubPixelAntialiasing
[static,const]QRawFont_LayoutFlagUseDesignMetricsEnum constant QRawFont::UseDesignMetrics
QRawFontfromFont(const QFont font,
const QFontDatabase_WritingSystem writingSystem = QFontDatabase::Any)
Static method QRawFont QRawFont::fromFont(const QFont &font, QFontDatabase::WritingSystem writingSystem)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

!=

Signature: [const] bool != (const QRawFont other)

Description: Method bool QRawFont::operator!=(const QRawFont &other)

==

Signature: [const] bool == (const QRawFont other)

Description: Method bool QRawFont::operator==(const QRawFont &other)

KernedAdvances

Signature: [static,const] QRawFont_LayoutFlag KernedAdvances

Description: Enum constant QRawFont::KernedAdvances

Python specific notes:
The object exposes a readable attribute 'KernedAdvances'. This is the getter.

PixelAntialiasing

Signature: [static,const] QRawFont_AntialiasingType PixelAntialiasing

Description: Enum constant QRawFont::PixelAntialiasing

Python specific notes:
The object exposes a readable attribute 'PixelAntialiasing'. This is the getter.

SeparateAdvances

Signature: [static,const] QRawFont_LayoutFlag SeparateAdvances

Description: Enum constant QRawFont::SeparateAdvances

Python specific notes:
The object exposes a readable attribute 'SeparateAdvances'. This is the getter.

SubPixelAntialiasing

Signature: [static,const] QRawFont_AntialiasingType SubPixelAntialiasing

Description: Enum constant QRawFont::SubPixelAntialiasing

Python specific notes:
The object exposes a readable attribute 'SubPixelAntialiasing'. This is the getter.

UseDesignMetrics

Signature: [static,const] QRawFont_LayoutFlag UseDesignMetrics

Description: Enum constant QRawFont::UseDesignMetrics

Python specific notes:
The object exposes a readable attribute 'UseDesignMetrics'. This is the getter.

_assign

Signature: void _assign (const QRawFont other)

Description: Assigns another object to self

_const_cast

Signature: [const] QRawFont ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

advancesForGlyphIndexes

(1) Signature: [const] QPointF[] advancesForGlyphIndexes (unsigned int[] glyphIndexes)

Description: Method QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes)

(2) Signature: [const] QPointF[] advancesForGlyphIndexes (unsigned int[] glyphIndexes, QRawFont_QFlags_LayoutFlag layoutFlags)

Description: Method QVector<QPointF> QRawFont::advancesForGlyphIndexes(const QVector<quint32> &glyphIndexes, QFlags<QRawFont::LayoutFlag> layoutFlags)

(3) Signature: [const] bool advancesForGlyphIndexes (unsigned int ptr glyphIndexes, QPointF ptr advances, int numGlyphs)

Description: Method bool QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs)

(4) Signature: [const] bool advancesForGlyphIndexes (unsigned int ptr glyphIndexes, QPointF ptr advances, int numGlyphs, QRawFont_QFlags_LayoutFlag layoutFlags)

Description: Method bool QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes, QPointF *advances, int numGlyphs, QFlags<QRawFont::LayoutFlag> layoutFlags)

alphaMapForGlyph

Signature: [const] QImage alphaMapForGlyph (unsigned int glyphIndex, const QRawFont_AntialiasingType antialiasingType = QRawFont::SubPixelAntialiasing, const QTransform transform = QTransform())

Description: Method QImage QRawFont::alphaMapForGlyph(quint32 glyphIndex, QRawFont::AntialiasingType antialiasingType, const QTransform &transform)

ascent

Signature: [const] double ascent

Description: Method double QRawFont::ascent()

assign

Signature: QRawFont assign (const QRawFont other)

Description: Method QRawFont &QRawFont::operator=(const QRawFont &other)

averageCharWidth

Signature: [const] double averageCharWidth

Description: Method double QRawFont::averageCharWidth()

boundingRect

Signature: [const] QRectF boundingRect (unsigned int glyphIndex)

Description: Method QRectF QRawFont::boundingRect(quint32 glyphIndex)

capHeight

Signature: [const] double capHeight

Description: Method double QRawFont::capHeight()

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

descent

Signature: [const] double descent

Description: Method double QRawFont::descent()

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

dup

Signature: [const] new QRawFont ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

familyName

Signature: [const] string familyName

Description: Method QString QRawFont::familyName()

fontTable

Signature: [const] bytes fontTable (string tagName)

Description: Method QByteArray QRawFont::fontTable(const char *tagName)

fromFont

Signature: [static] QRawFont fromFont (const QFont font, const QFontDatabase_WritingSystem writingSystem = QFontDatabase::Any)

Description: Static method QRawFont QRawFont::fromFont(const QFont &font, QFontDatabase::WritingSystem writingSystem)

This method is static and can be called without an instance.

glyphIndexesForChars

Signature: [const] bool glyphIndexesForChars (unsigned int ptr chars, int numChars, unsigned int ptr glyphIndexes, int ptr numGlyphs)

Description: Method bool QRawFont::glyphIndexesForChars(const QChar *chars, int numChars, quint32 *glyphIndexes, int *numGlyphs)

glyphIndexesForString

Signature: [const] unsigned int[] glyphIndexesForString (string text)

Description: Method QVector<quint32> QRawFont::glyphIndexesForString(const QString &text)

hintingPreference

Signature: [const] QFont_HintingPreference hintingPreference

Description: Method QFont::HintingPreference QRawFont::hintingPreference()

isValid?

Signature: [const] bool isValid?

Description: Method bool QRawFont::isValid()

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

leading

Signature: [const] double leading

Description: Method double QRawFont::leading()

lineThickness

Signature: [const] double lineThickness

Description: Method double QRawFont::lineThickness()

loadFromData

Signature: void loadFromData (bytes fontData, double pixelSize, const QFont_HintingPreference hintingPreference)

Description: Method void QRawFont::loadFromData(const QByteArray &fontData, double pixelSize, QFont::HintingPreference hintingPreference)

loadFromFile

Signature: void loadFromFile (string fileName, double pixelSize, const QFont_HintingPreference hintingPreference)

Description: Method void QRawFont::loadFromFile(const QString &fileName, double pixelSize, QFont::HintingPreference hintingPreference)

maxCharWidth

Signature: [const] double maxCharWidth

Description: Method double QRawFont::maxCharWidth()

new

(1) Signature: [static] new QRawFont new

Description: Constructor QRawFont::QRawFont()

This method creates an object of class QRawFont.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QRawFont new (string fileName, double pixelSize, const QFont_HintingPreference hintingPreference = QFont::PreferDefaultHinting)

Description: Constructor QRawFont::QRawFont(const QString &fileName, double pixelSize, QFont::HintingPreference hintingPreference)

This method creates an object of class QRawFont.

Python specific notes:
This method is the default initializer of the object.

(3) Signature: [static] new QRawFont new (bytes fontData, double pixelSize, const QFont_HintingPreference hintingPreference = QFont::PreferDefaultHinting)

Description: Constructor QRawFont::QRawFont(const QByteArray &fontData, double pixelSize, QFont::HintingPreference hintingPreference)

This method creates an object of class QRawFont.

Python specific notes:
This method is the default initializer of the object.

(4) Signature: [static] new QRawFont new (const QRawFont other)

Description: Constructor QRawFont::QRawFont(const QRawFont &other)

This method creates an object of class QRawFont.

Python specific notes:
This method is the default initializer of the object.

pathForGlyph

Signature: [const] QPainterPath pathForGlyph (unsigned int glyphIndex)

Description: Method QPainterPath QRawFont::pathForGlyph(quint32 glyphIndex)

pixelSize

Signature: [const] double pixelSize

Description: Method double QRawFont::pixelSize()

Python specific notes:
The object exposes a readable attribute 'pixelSize'. This is the getter.

pixelSize=

Signature: void pixelSize= (double pixelSize)

Description: Method void QRawFont::setPixelSize(double pixelSize)

Python specific notes:
The object exposes a writable attribute 'pixelSize'. This is the setter.

setPixelSize

Signature: void setPixelSize (double pixelSize)

Description: Method void QRawFont::setPixelSize(double pixelSize)

Python specific notes:
The object exposes a writable attribute 'pixelSize'. This is the setter.

style

Signature: [const] QFont_Style style

Description: Method QFont::Style QRawFont::style()

styleName

Signature: [const] string styleName

Description: Method QString QRawFont::styleName()

supportedWritingSystems

Signature: [const] QFontDatabase_WritingSystem[] supportedWritingSystems

Description: Method QList<QFontDatabase::WritingSystem> QRawFont::supportedWritingSystems()

supportsCharacter

Signature: [const] bool supportsCharacter (unsigned int character)

Description: Method bool QRawFont::supportsCharacter(QChar character)

supportsCharacter_ucs4

Signature: [const] bool supportsCharacter_ucs4 (unsigned int ucs4)

Description: Method bool QRawFont::supportsCharacter(unsigned int ucs4)

swap

Signature: void swap (QRawFont other)

Description: Method void QRawFont::swap(QRawFont &other)

underlinePosition

Signature: [const] double underlinePosition

Description: Method double QRawFont::underlinePosition()

unitsPerEm

Signature: [const] double unitsPerEm

Description: Method double QRawFont::unitsPerEm()

weight

Signature: [const] int weight

Description: Method int QRawFont::weight()

xHeight

Signature: [const] double xHeight

Description: Method double QRawFont::xHeight()