20#ifndef LIBREPCB_CORE_STROKEFONT_H
21#define LIBREPCB_CORE_STROKEFONT_H
26#include "../fileio/filepath.h"
27#include "../geometry/path.h"
28#include "../types/alignment.h"
29#include "../types/length.h"
30#include "../types/ratio.h"
40class GlyphListAccessor;
73 Point& topRight) const noexcept;
76 const
Length& letterSpacing,
Length& width) const noexcept;
78 const
Length& letterSpacing,
79 Length& width) const noexcept;
81 Length& spacing) const noexcept;
90 const QVector<
fontobene::Polyline>& polylines,
97 qreal length) const noexcept;
99 Point& topRight) noexcept;
The Alignment class.
Definition alignment.h:115
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The Length class is used to represent a length (for example 12.75 millimeters)
Definition length.h:82
The Path class represents a list of vertices connected by straight lines or circular arc segments.
Definition path.h:57
The Point class is used to represent a point/coordinate/vector, for example (1.2mm; 5....
Definition point.h:78
The Ratio class is used to represent a ratio number (e.g. 13.37%)
Definition ratio.h:44
The StrokeFont class.
Definition strokefont.h:56
QVector< Path > strokeLine(const QString &text, const PositiveLength &height, const Length &letterSpacing, Length &width) const noexcept
Definition strokefont.cpp:156
QScopedPointer< fontobene::GlyphListCache > mGlyphListCache
Definition strokefont.h:106
Length convertLength(const PositiveLength &height, qreal length) const noexcept
Definition strokefont.cpp:263
StrokeFont(const StrokeFont &other)=delete
QScopedPointer< fontobene::GlyphListAccessor > mGlyphListAccessor
Definition strokefont.h:107
QFutureWatcher< std::shared_ptr< fontobene::Font > > mWatcher
Definition strokefont.h:104
std::shared_ptr< fontobene::Font > mFont
Definition strokefont.h:105
Ratio getLetterSpacing() const noexcept
Definition strokefont.cpp:70
~StrokeFont() noexcept
Definition strokefont.cpp:63
FilePath mFilePath
Definition strokefont.h:102
QFuture< std::shared_ptr< fontobene::Font > > mFuture
Definition strokefont.h:103
static Vertex convertVertex(const fontobene::Vertex &v, const PositiveLength &height) noexcept
Definition strokefont.cpp:256
QVector< Path > strokeGlyph(const QChar &glyph, const PositiveLength &height, Length &spacing) const noexcept
Definition strokefont.cpp:186
QVector< Path > stroke(const QString &text, const PositiveLength &height, const Length &letterSpacing, const Length &lineSpacing, const Alignment &align, Point &bottomLeft, Point &topRight) const noexcept
Definition strokefont.cpp:84
void fontLoaded() noexcept
Definition strokefont.cpp:207
static Path polyline2path(const fontobene::Polyline &p, const PositiveLength &height) noexcept
Definition strokefont.cpp:247
const fontobene::GlyphListAccessor & accessor() const noexcept
Definition strokefont.cpp:211
QVector< QPair< QVector< Path >, Length > > strokeLines(const QString &text, const PositiveLength &height, const Length &letterSpacing, Length &width) const noexcept
Definition strokefont.cpp:143
static void computeBoundingRect(const QVector< Path > &paths, Point &bottomLeft, Point &topRight) noexcept
Definition strokefont.cpp:268
Ratio getLineSpacing() const noexcept
Definition strokefont.cpp:75
static QVector< Path > polylines2paths(const QVector< fontobene::Polyline > &polylines, const PositiveLength &height) noexcept
Definition strokefont.cpp:236
The Vertex class.
Definition vertex.h:43
Definition strokefont.h:39
Definition occmodel.cpp:76
type_safe::constrained_type< Length, PositiveLengthConstraint, PositiveLengthVerifier > PositiveLength
Definition length.h:810