Skip to content

RFont

Class in Core Module
Header: #include <src/core/RFont.h>

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD. Represents a CXF font.

Scriptable: This class is available in script environments.

RFont()
RFont(const QString &fileName)
Constructor.
~RFont()
const QStringList getAuthors() const
QList< double > getAuxLinePositions() const
QString getAuxLinePositionsString() const
QString getEncoding() const
QString getFileName() const
RPainterPath getGlyph(const QChar &ch, bool draft=false) const
QMap< QChar, RPainterPath > getGlyphMap() const
QList< QChar > getGlyphNames() const
double getLetterSpacing() const
double getLineSpacingFactor() const
const QStringList getNames() const
RPainterPath getShape(const QString &name) const
QString getShapeName(const QChar &ch) const
QList< QString > getShapeNames() const
double getWordSpacing() const
bool isLoaded() const
bool isValid() const
bool load()
Loads the font into memory.
QStringList authors
Authors.
QList< double > auxLinePositions
Aux line positions for CXF editing.
QString encoding
Font encoding (see docu for QTextCodec).
QString fileName
Font file name.
QMap< QChar, QPainterPath > glyphDraftMap
QMap< QChar, RPainterPath > glyphMap
list of glyphs as painter paths (letters)
double letterSpacing
Default letter spacing for this font.
double lineSpacingFactor
Default line spacing factor for this font.
bool loaded
Is this font currently loaded into memory?
QStringList names
Font names.
QMap< QChar, QString > numNameMap
QMap< QString, RPainterPath > shapeMap
list of shapes (used for complex line types)
double wordSpacing
Default word spacing for this font.

RFont::RFont()

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD. Constructor.

RFont::RFont(const QString &fileName)

Constructor.

RFont::~RFont()

const QStringList RFont::getAuthors() const

inline const

Returns: the author(s) of this font.

QList< double > RFont::getAuxLinePositions() const

inline const

QString RFont::getAuxLinePositionsString() const

inline const

QString RFont::getEncoding() const

inline const

Returns: the encoding of this font.

QString RFont::getFileName() const

inline const

Returns: the fileName of this font.

RPainterPath RFont::getGlyph(const QChar &ch, bool draft=false) const

const

QMap< QChar, RPainterPath > RFont::getGlyphMap() const

inline const

Non-Scriptable: This function is not available in script environments.

QList< QChar > RFont::getGlyphNames() const

inline const

double RFont::getLetterSpacing() const

inline const

Returns: Default letter spacing for this font

double RFont::getLineSpacingFactor() const

inline const

Returns: Default line spacing factor for this font

const QStringList RFont::getNames() const

inline const

Returns: the alternative names of this font.

RPainterPath RFont::getShape(const QString &name) const

const

QString RFont::getShapeName(const QChar &ch) const

const

Non-Scriptable: This function is not available in script environments.

QList< QString > RFont::getShapeNames() const

inline const

double RFont::getWordSpacing() const

inline const

Returns: Default word spacing for this font

bool RFont::isLoaded() const

inline const

Returns: True if this font is already loaded.

bool RFont::isValid() const

inline const

bool RFont::load()

Loads the font into memory.

Return values:

  • true: font was already loaded or is loaded now.
  • false: font could not be loaded.

QStringList RFont::authors

private

Authors.

QList<double> RFont::auxLinePositions

private

Aux line positions for CXF editing.

QString RFont::encoding

private

Font encoding (see docu for QTextCodec).

QString RFont::fileName

private

Font file name.

QMap<QChar, QPainterPath> RFont::glyphDraftMap

private

QMap<QChar, RPainterPath> RFont::glyphMap

private

list of glyphs as painter paths (letters)

double RFont::letterSpacing

private

Default letter spacing for this font.

double RFont::lineSpacingFactor

private

Default line spacing factor for this font.

bool RFont::loaded

private

Is this font currently loaded into memory?

QStringList RFont::names

private

Font names.

QMap<QChar, QString> RFont::numNameMap

private

QMap<QString, RPainterPath> RFont::shapeMap

private

list of shapes (used for complex line types)

double RFont::wordSpacing

private

Default word spacing for this font.