QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RFont Class Reference

Copyright (c) 2011-2018 by Andrew Mustun. More...

#include <RFont.h>

Inheritance diagram for RFont:
RShxFont

Public Member Functions

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, RPainterPathgetGlyphMap () 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.
 
 RFont ()
 Copyright (c) 2011-2018 by Andrew Mustun.
 
 RFont (const QString &fileName)
 Constructor.
 
 ~RFont ()
 

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, RPainterPathglyphMap
 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, RPainterPathshapeMap
 list of shapes (used for complex line types)
 
double wordSpacing
 Default word spacing for this font.
 

Detailed Description

Copyright (c) 2011-2018 by Andrew Mustun.

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:\nThis class is available in script environments.\n

Constructor & Destructor Documentation

◆ RFont() [1/2]

RFont::RFont ( )

Copyright (c) 2011-2018 by Andrew Mustun.

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() [2/2]

RFont::RFont ( const QString & fileName)

Constructor.

◆ ~RFont()

RFont::~RFont ( )

Member Function Documentation

◆ getAuthors()

const QStringList RFont::getAuthors ( ) const
inline
Returns
the author(s) of this font.

◆ getAuxLinePositions()

QList< double > RFont::getAuxLinePositions ( ) const
inline

◆ getAuxLinePositionsString()

QString RFont::getAuxLinePositionsString ( ) const
inline

◆ getEncoding()

QString RFont::getEncoding ( ) const
inline
Returns
the encoding of this font.

◆ getFileName()

QString RFont::getFileName ( ) const
inline
Returns
the fileName of this font.

◆ getGlyph()

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

◆ getGlyphMap()

QMap< QChar, RPainterPath > RFont::getGlyphMap ( ) const
inline
Non-Scriptable:\nThis function is not available in script environments.\n

◆ getGlyphNames()

QList< QChar > RFont::getGlyphNames ( ) const
inline

◆ getLetterSpacing()

double RFont::getLetterSpacing ( ) const
inline
Returns
Default letter spacing for this font

◆ getLineSpacingFactor()

double RFont::getLineSpacingFactor ( ) const
inline
Returns
Default line spacing factor for this font

◆ getNames()

const QStringList RFont::getNames ( ) const
inline
Returns
the alternative names of this font.

◆ getShape()

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

◆ getShapeName()

QString RFont::getShapeName ( const QChar & ch) const
Non-Scriptable:\nThis function is not available in script environments.\n

◆ getShapeNames()

QList< QString > RFont::getShapeNames ( ) const
inline

◆ getWordSpacing()

double RFont::getWordSpacing ( ) const
inline
Returns
Default word spacing for this font

◆ isLoaded()

bool RFont::isLoaded ( ) const
inline
Returns
True if this font is already loaded.

◆ isValid()

bool RFont::isValid ( ) const
inline

◆ load()

bool RFont::load ( )

Loads the font into memory.

Return values
truefont was already loaded or is loaded now.
falsefont could not be loaded.

Member Data Documentation

◆ authors

QStringList RFont::authors
private

Authors.

◆ auxLinePositions

QList<double> RFont::auxLinePositions
private

Aux line positions for CXF editing.

◆ encoding

QString RFont::encoding
private

Font encoding (see docu for QTextCodec)

◆ fileName

QString RFont::fileName
private

Font file name.

◆ glyphDraftMap

QMap<QChar, QPainterPath> RFont::glyphDraftMap
private

◆ glyphMap

QMap<QChar, RPainterPath> RFont::glyphMap
private

list of glyphs as painter paths (letters)

◆ letterSpacing

double RFont::letterSpacing
private

Default letter spacing for this font.

◆ lineSpacingFactor

double RFont::lineSpacingFactor
private

Default line spacing factor for this font.

◆ loaded

bool RFont::loaded
private

Is this font currently loaded into memory?

◆ names

QStringList RFont::names
private

Font names.

◆ numNameMap

QMap<QChar, QString> RFont::numNameMap
private

◆ shapeMap

QMap<QString, RPainterPath> RFont::shapeMap
private

list of shapes (used for complex line types)

◆ wordSpacing

double RFont::wordSpacing
private

Default word spacing for this font.


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