19 #include FT_FREETYPE_H 2693 const std::vector<SymId>&
symList()
const {
return _ids; }
2695 FT_UInt
index()
const {
return _index; }
2701 QRectF
bbox()
const {
return _bbox; }
2722 static const char* id2name(
SymId id);
2724 static QString
id2userName(
SymId id) {
return qApp->translate(
"symUserNames", symUserNames[
int(
id)]); }
2725 static SymId userName2id(
const QString& s);
2727 static const std::array<const char*, int (SymId::lastSym)+1>
symNames;
2750 : face(_f), id(_id), magX(mx), magY(my), worldScale(s), color(c) {}
2751 bool operator==(
const GlyphKey&)
const;
2761 return (
int(k.
id) << 16) + (int(k.
magX * 100) << 8) + k.
magY * 100;
2776 QCache<GlyphKey, GlyphPixmap>* cache { 0 };
2778 double _textEnclosureThickness = 0;
2779 mutable QFont* font { 0 };
2784 void computeMetrics(
Sym* sym,
int code);
2789 ScoreFont(
const char* n,
const char* f,
const char* p,
const char* fn)
2790 : _name(n), _family(f), _fontPath(p), _filename(fn) {
2795 const QString&
name()
const {
return _name; }
2796 const QString&
family()
const {
return _family; }
2804 static const char* fallbackTextFont();
2805 static const QVector<ScoreFont>&
scoreFonts() {
return _scoreFonts; }
2806 static QJsonObject initGlyphNamesJson();
2811 void draw(
SymId id, QPainter*,
const QSizeF& mag,
const QPointF& pos, qreal scale)
const;
2812 void draw(
SymId id, QPainter*, qreal mag,
const QPointF& pos, qreal scale)
const;
2813 void draw(
SymId id, QPainter*, qreal mag,
const QPointF& pos)
const;
2814 void draw(
SymId id, QPainter*,
const QSizeF& mag,
const QPointF& pos)
const;
2815 void draw(
SymId id, QPainter*, qreal mag,
const QPointF& pos,
int n)
const;
2816 void draw(
const std::vector<SymId>&, QPainter*, qreal mag,
const QPointF& pos)
const;
2817 void draw(
const std::vector<SymId>&, QPainter*,
const QSizeF& mag,
const QPointF& pos)
const;
2818 void draw(
const std::vector<SymId>&, QPainter*, qreal mag,
const QPointF& pos, qreal scale)
const;
2819 void draw(
const std::vector<SymId>&, QPainter*,
const QSizeF& mag,
const QPointF& pos, qreal scale)
const;
2821 qreal
height(
SymId id, qreal mag)
const {
return bbox(
id, mag).height(); }
2822 qreal
width(
SymId id, qreal mag)
const {
return bbox(
id, mag).width(); }
2823 qreal advance(
SymId id, qreal mag)
const;
2824 qreal width(
const std::vector<SymId>&, qreal mag)
const;
2826 const QRectF bbox(
SymId id,
const QSizeF&)
const;
2827 const QRectF bbox(
SymId id, qreal mag)
const;
2828 const QRectF bbox(
const std::vector<SymId>& s,
const QSizeF& mag)
const;
2829 const QRectF bbox(
const std::vector<SymId>& s, qreal mag)
const;
2830 QPointF stemDownNW(
SymId id, qreal mag)
const;
2831 QPointF stemUpSE(
SymId id, qreal mag)
const;
2832 QPointF cutOutNE(
SymId id, qreal mag)
const;
2833 QPointF cutOutNW(
SymId id, qreal mag)
const;
2834 QPointF cutOutSE(
SymId id, qreal mag)
const;
2835 QPointF cutOutSW(
SymId id, qreal mag)
const;
2838 bool useFallbackFont(
SymId id)
const;
static SymId name2id(const QString &s)
Definition: sym.h:2720
QPointF _cutOutSW
Definition: sym.h:2684
FT_UInt _index
Definition: sym.h:2675
void setBbox(QRectF val)
Definition: sym.h:2702
qreal height(SymId id, qreal mag) const
Definition: sym.h:2821
int code() const
Definition: sym.h:2698
QRectF bbox() const
Definition: sym.h:2701
FT_UInt index() const
Definition: sym.h:2695
QPointF cutOutNW() const
Definition: sym.h:2713
void setCutOutSW(const QPointF &r)
Definition: sym.h:2718
static std::array< uint, size_t(SymId::lastSym)+1 > _mainSymCodeTable
Definition: sym.h:2782
std::list< std::pair< Sid, QVariant > > _engravingDefaults
Definition: sym.h:2777
SymId id
Definition: sym.h:2742
const QString & family() const
Definition: sym.h:2796
std::vector< SymId > _ids
Definition: sym.h:2685
qreal magY
Definition: sym.h:2744
static QVector< ScoreFont > _scoreFonts
Definition: sym.h:2781
SymId
Definition: sym.h:30
QPointF _cutOutSE
Definition: sym.h:2683
QPointF _cutOutNE
Definition: sym.h:2681
static QString id2userName(SymId id)
Definition: sym.h:2724
QString _filename
Definition: sym.h:2774
QString _name
Definition: sym.h:2771
QPointF offset
Definition: sym.h:2756
qreal magX
Definition: sym.h:2743
const char * toString(Direction val)
Definition: mscore.cpp:176
qreal _advance
Definition: sym.h:2677
QString _family
Definition: sym.h:2772
void setSymList(const std::vector< SymId > &sl)
Definition: sym.h:2692
qreal worldScale
Definition: sym.h:2745
Sym()
Definition: sym.h:2688
void setCutOutNW(const QPointF &r)
Definition: sym.h:2714
void setCutOutNE(const QPointF &r)
Definition: sym.h:2712
QRectF _bbox
Definition: sym.h:2676
void setCode(int val)
Definition: sym.h:2699
static QHash< QString, SymId > lonhash
Definition: sym.h:2732
QPointF cutOutSE() const
Definition: sym.h:2715
const std::vector< SymId > & symList() const
Definition: sym.h:2693
qreal width(SymId id, qreal mag) const
Definition: sym.h:2822
QString fontPath() const
Definition: sym.h:2800
void setStemDownNW(const QPointF &r)
Definition: sym.h:2708
bool isValid() const
Definition: sym.h:2690
QByteArray fontImage
Definition: sym.h:2775
double textEnclosureThickness()
Definition: sym.h:2798
QString _fontPath
Definition: sym.h:2773
static SymId oldName2id(const QString s)
Definition: sym.h:2721
static const QVector< SymId > commonScoreSymbols
Definition: sym.h:2729
QPointF cutOutSW() const
Definition: sym.h:2717
FT_Face face
Definition: sym.h:2741
Definition: aeolus.cpp:26
void setCutOutSE(const QPointF &r)
Definition: sym.h:2716
std::list< std::pair< Sid, QVariant > > engravingDefaults()
Definition: sym.h:2797
QPointF stemUpSE() const
Definition: sym.h:2709
Sid
Definition: style.h:33
QVector< Sym > _symbols
Definition: sym.h:2770
QPointF _stemDownNW
Definition: sym.h:2679
const QString & name() const
Definition: sym.h:2795
static const std::array< const char *, int(SymId::lastSym)+1 > symNames
Definition: sym.h:2727
void setAdvance(qreal val)
Definition: sym.h:2705
void setIndex(FT_UInt i)
Definition: sym.h:2696
QPointF stemDownNW() const
Definition: sym.h:2707
static const QVector< ScoreFont > & scoreFonts()
Definition: sym.h:2805
void initScoreFonts()
Definition: sym.cpp:5836
QPointF _stemUpSE
Definition: sym.h:2680
static QHash< QString, SymId > lnhash
Definition: sym.h:2731
QColor color
Definition: sym.h:2746
const Sym & sym(SymId id) const
Definition: sym.h:2840
ScoreFont(const char *n, const char *f, const char *p, const char *fn)
Definition: sym.h:2789
bool isValid(SymId id) const
Definition: sym.h:2837
ScoreFont()
Definition: sym.h:2787
QPixmap pm
Definition: sym.h:2755
QPointF _cutOutNW
Definition: sym.h:2682
qreal advance() const
Definition: sym.h:2704
static const std::array< const char *, int(SymId::lastSym)+1 > symUserNames
Definition: sym.h:2728
uint qHash(const GlyphKey &k)
Definition: sym.h:2759
QPixmap sym2pixmap(SymId, qreal)
Definition: sym.h:2809
QPointF cutOutNE() const
Definition: sym.h:2711
GlyphKey(FT_Face _f, SymId _id, float mx, float my, float s, QColor c)
Definition: sym.h:2749
void setStemUpSE(const QPointF &r)
Definition: sym.h:2710