RFont
Class in Core Module
Header: #include <src/core/RFont.h>
Description
Section titled “Description”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.
Public Functions
Section titled “Public Functions”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. |
Private Attributes
Section titled “Private Attributes”| 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. |
Member Documentation
Section titled “Member Documentation”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
Section titled “~RFont”RFont::~RFont()getAuthors
Section titled “getAuthors”const QStringList RFont::getAuthors() constinline const
Returns: the author(s) of this font.
getAuxLinePositions
Section titled “getAuxLinePositions”QList< double > RFont::getAuxLinePositions() constinline const
getAuxLinePositionsString
Section titled “getAuxLinePositionsString”QString RFont::getAuxLinePositionsString() constinline const
getEncoding
Section titled “getEncoding”QString RFont::getEncoding() constinline const
Returns: the encoding of this font.
getFileName
Section titled “getFileName”QString RFont::getFileName() constinline const
Returns: the fileName of this font.
getGlyph
Section titled “getGlyph”RPainterPath RFont::getGlyph(const QChar &ch, bool draft=false) constconst
getGlyphMap
Section titled “getGlyphMap”QMap< QChar, RPainterPath > RFont::getGlyphMap() constinline const
Non-Scriptable: This function is not available in script environments.
getGlyphNames
Section titled “getGlyphNames”QList< QChar > RFont::getGlyphNames() constinline const
getLetterSpacing
Section titled “getLetterSpacing”double RFont::getLetterSpacing() constinline const
Returns: Default letter spacing for this font
getLineSpacingFactor
Section titled “getLineSpacingFactor”double RFont::getLineSpacingFactor() constinline const
Returns: Default line spacing factor for this font
getNames
Section titled “getNames”const QStringList RFont::getNames() constinline const
Returns: the alternative names of this font.
getShape
Section titled “getShape”RPainterPath RFont::getShape(const QString &name) constconst
getShapeName
Section titled “getShapeName”QString RFont::getShapeName(const QChar &ch) constconst
Non-Scriptable: This function is not available in script environments.
getShapeNames
Section titled “getShapeNames”QList< QString > RFont::getShapeNames() constinline const
getWordSpacing
Section titled “getWordSpacing”double RFont::getWordSpacing() constinline const
Returns: Default word spacing for this font
isLoaded
Section titled “isLoaded”bool RFont::isLoaded() constinline const
Returns: True if this font is already loaded.
isValid
Section titled “isValid”bool RFont::isValid() constinline 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.
authors
Section titled “authors”QStringList RFont::authorsprivate
Authors.
auxLinePositions
Section titled “auxLinePositions”QList<double> RFont::auxLinePositionsprivate
Aux line positions for CXF editing.
encoding
Section titled “encoding”QString RFont::encodingprivate
Font encoding (see docu for QTextCodec).
fileName
Section titled “fileName”QString RFont::fileNameprivate
Font file name.
glyphDraftMap
Section titled “glyphDraftMap”QMap<QChar, QPainterPath> RFont::glyphDraftMapprivate
glyphMap
Section titled “glyphMap”QMap<QChar, RPainterPath> RFont::glyphMapprivate
list of glyphs as painter paths (letters)
letterSpacing
Section titled “letterSpacing”double RFont::letterSpacingprivate
Default letter spacing for this font.
lineSpacingFactor
Section titled “lineSpacingFactor”double RFont::lineSpacingFactorprivate
Default line spacing factor for this font.
loaded
Section titled “loaded”bool RFont::loadedprivate
Is this font currently loaded into memory?
QStringList RFont::namesprivate
Font names.
numNameMap
Section titled “numNameMap”QMap<QChar, QString> RFont::numNameMapprivate
shapeMap
Section titled “shapeMap”QMap<QString, RPainterPath> RFont::shapeMapprivate
list of shapes (used for complex line types)
wordSpacing
Section titled “wordSpacing”double RFont::wordSpacingprivate
Default word spacing for this font.