LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StrokeFont Class Referencefinal

The StrokeFont class. More...

#include <strokefont.h>

Inherits QObject.

+ Collaboration diagram for StrokeFont:

Public Member Functions

 StrokeFont (const FilePath &fontFilePath) noexcept
 
 StrokeFont (const StrokeFont &other)=delete
 
 ~StrokeFont () noexcept
 
Ratio getLetterSpacing () const noexcept
 
Ratio getLineSpacing () const noexcept
 
QVector< Pathstroke (const QString &text, const PositiveLength &height, const Length &letterSpacing, const Length &lineSpacing, const Alignment &align, Point &bottomLeft, Point &topRight) const noexcept
 
QVector< QPair< QVector< Path >
, Length > > 
strokeLines (const QString &text, const PositiveLength &height, const Length &letterSpacing, Length &width) const noexcept
 
QVector< PathstrokeLine (const QString &text, const PositiveLength &height, const Length &letterSpacing, Length &width) const noexcept
 
QVector< PathstrokeGlyph (const QChar &glyph, const PositiveLength &height, Length &spacing) const noexcept
 
StrokeFontoperator= (const StrokeFont &rhs)=delete
 

Private Member Functions

void fontLoaded () noexcept
 
const
fontobene::GlyphListAccessor & 
accessor () const noexcept
 
Length convertLength (const PositiveLength &height, qreal length) const noexcept
 

Static Private Member Functions

static QVector< Pathpolylines2paths (const QVector< fontobene::Polyline > &polylines, const PositiveLength &height) noexcept
 
static Path polyline2path (const fontobene::Polyline &p, const PositiveLength &height) noexcept
 
static Vertex convertVertex (const fontobene::Vertex &v, const PositiveLength &height) noexcept
 
static void computeBoundingRect (const QVector< Path > &paths, Point &bottomLeft, Point &topRight) noexcept
 

Private Attributes

FilePath mFilePath
 
QFuture< fontobene::Font > mFuture
 
QFutureWatcher< fontobene::Font > mWatcher
 
QScopedPointer< fontobene::Font > mFont
 
QScopedPointer
< fontobene::GlyphListCache > 
mGlyphListCache
 
QScopedPointer
< fontobene::GlyphListAccessor > 
mGlyphListAccessor
 

Detailed Description

The StrokeFont class.

Constructor & Destructor Documentation

StrokeFont ( const FilePath fontFilePath)
noexcept

+ Here is the call graph for this function:

StrokeFont ( const StrokeFont other)
delete
~StrokeFont ( )
noexcept

Member Function Documentation

Ratio getLetterSpacing ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ratio getLineSpacing ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QVector< Path > stroke ( const QString &  text,
const PositiveLength height,
const Length letterSpacing,
const Length lineSpacing,
const Alignment align,
Point bottomLeft,
Point topRight 
) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QVector< QPair< QVector< Path >, Length > > strokeLines ( const QString &  text,
const PositiveLength height,
const Length letterSpacing,
Length width 
) const
noexcept
QVector< Path > strokeLine ( const QString &  text,
const PositiveLength height,
const Length letterSpacing,
Length width 
) const
noexcept

+ Here is the call graph for this function:

QVector< Path > strokeGlyph ( const QChar &  glyph,
const PositiveLength height,
Length spacing 
) const
noexcept
StrokeFont& operator= ( const StrokeFont rhs)
delete
void fontLoaded ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const fb::GlyphListAccessor & accessor ( ) const
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QVector< Path > polylines2paths ( const QVector< fontobene::Polyline > &  polylines,
const PositiveLength height 
)
staticprivatenoexcept
Path polyline2path ( const fontobene::Polyline &  p,
const PositiveLength height 
)
staticprivatenoexcept

+ Here is the call graph for this function:

Vertex convertVertex ( const fontobene::Vertex &  v,
const PositiveLength height 
)
staticprivatenoexcept

+ Here is the call graph for this function:

Length convertLength ( const PositiveLength height,
qreal  length 
) const
privatenoexcept
void computeBoundingRect ( const QVector< Path > &  paths,
Point bottomLeft,
Point topRight 
)
staticprivatenoexcept

+ Here is the call graph for this function:

Member Data Documentation

FilePath mFilePath
private
QFuture<fontobene::Font> mFuture
private
QFutureWatcher<fontobene::Font> mWatcher
private
QScopedPointer<fontobene::Font> mFont
mutableprivate
QScopedPointer<fontobene::GlyphListCache> mGlyphListCache
mutableprivate
QScopedPointer<fontobene::GlyphListAccessor> mGlyphListAccessor
mutableprivate

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