QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RFont Class Reference

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

#include <RFont.h>

List of all members.

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
double getWordSpacing () const
bool isLoaded () const
bool isValid () const
bool load ()
 Loads the font into memory.
 RFont ()
 Copyright (c) 2011-2013 by Andrew Mustun.
 RFont (const QString &fileName)
 Constructor.
 ~RFont ()

Private Attributes

QStringList authors
 Authors.
QString encoding
 Font encoding (see docu for QTextCodec)
QString fileName
 Font file name.
QMap< QChar, QPainterPath > glyphDraftMap
QMap< QChar, QPainterPath > 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.
double wordSpacing
 Default word spacing for this font.

Detailed Description

Copyright (c) 2011-2013 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 wrapped for script environments.

Constructor & Destructor Documentation

RFont::RFont ( )

Copyright (c) 2011-2013 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
   \par Non-Scriptable:

This function is not available in script environments.

QMap<QChar, QPainterPath> RFont::getGlyphMap ( ) const
inline
   \par 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.
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.

double RFont::wordSpacing
private

Default word spacing for this font.


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