QCAD
Open Source 2D CAD
RFont Class Reference

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

#include <RFont.h>

Public Member Functions

const QStringList getAuthors () const
 
QString getEncoding () const
 
QString getFileName () const
 
QPainterPath getGlyph (const QChar &ch, bool draft=false) const
 
QMap< QChar, QPainterPath > getGlyphMap () const
 
double getLetterSpacing () const
 
double getLineSpacingFactor () const
 
const QStringList getNames () const
 
QPainterPath getShape (const QString &name) const
 
QString getShapeName (const QChar &ch) const
 
double getWordSpacing () const
 
bool isLoaded () const
 
bool isValid () const
 
bool load ()
 Loads the font into memory. More...
 
 RFont ()
 Copyright (c) 2011-2015 by Andrew Mustun. More...
 
 RFont (const QString &fileName)
 Constructor. More...
 
 ~RFont ()
 

Private Attributes

QStringList authors
 Authors. More...
 
QString encoding
 Font encoding (see docu for QTextCodec) More...
 
QString fileName
 Font file name. More...
 
QMap< QChar, QPainterPath > glyphDraftMap
 
QMap< QChar, QPainterPath > glyphMap
 list of glyphs as painter paths (letters) More...
 
double letterSpacing
 Default letter spacing for this font. More...
 
double lineSpacingFactor
 Default line spacing factor for this font. More...
 
bool loaded
 Is this font currently loaded into memory? More...
 
QStringList names
 Font names. More...
 
QMap< QChar, QString > numNameMap
 
QMap< QString, QPainterPath > shapeMap
 
double wordSpacing
 Default word spacing for this font. More...
 

Detailed Description

Copyright (c) 2011-2015 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:
This class is available in script environments.

Constructor & Destructor Documentation

RFont::RFont ( )

Copyright (c) 2011-2015 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::RFont ( const QString &  fileName)

Constructor.

RFont::~RFont ( )

Member Function Documentation

const QStringList RFont::getAuthors ( ) const
inline
Returns
the author(s) of this font.
QString RFont::getEncoding ( ) const
inline
Returns
the encoding of this font.
QString RFont::getFileName ( ) const
inline
Returns
the fileName of this font.
QPainterPath RFont::getGlyph ( const QChar &  ch,
bool  draft = false 
) const
Non-Scriptable:
This function is not available in script environments.
QMap<QChar, QPainterPath> RFont::getGlyphMap ( ) const
inline
Non-Scriptable:
This function is not available in script environments.
double RFont::getLetterSpacing ( ) const
inline
Returns
Default letter spacing for this font
double RFont::getLineSpacingFactor ( ) const
inline
Returns
Default line spacing factor for this font
const QStringList RFont::getNames ( ) const
inline
Returns
the alternative names of this font.
QPainterPath RFont::getShape ( const QString &  name) const
Non-Scriptable:
This function is not available in script environments.
QString RFont::getShapeName ( const QChar &  ch) const
Non-Scriptable:
This function is not available in script environments.
double RFont::getWordSpacing ( ) const
inline
Returns
Default word spacing for this font
bool RFont::isLoaded ( ) const
inline
Returns
True if this font is already loaded.
bool RFont::isValid ( ) const
inline
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

QStringList RFont::authors
private

Authors.

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, QPainterPath> 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, QPainterPath> RFont::shapeMap
private
double RFont::wordSpacing
private

Default word spacing for this font.


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