8 #ifndef __VRV_GLYPH_H__
9 #define __VRV_GLYPH_H__
17 #include "devicecontextbase.h"
39 Glyph(
int unitsPerEm);
57 int GetUnitsPerEm()
const {
return m_unitsPerEm; }
58 void SetUnitsPerEm(
int units) { m_unitsPerEm = units; }
65 const std::string &GetCodeStr()
const {
return m_codeStr; }
66 void SetCodeStr(
const std::string &codeStr) { m_codeStr = codeStr; }
73 int GetHorizAdvX()
const {
return m_horizAdvX; }
74 void SetHorizAdvX(
double horizAdvX) { m_horizAdvX = (int)(horizAdvX * 10.0); }
81 void SetAnchor(std::string anchorStr,
double x,
double y);
97 void SetFace(uint64_t faceIdentity,
int glyphId)
99 m_faceIdentity = faceIdentity;
102 uint64_t GetFaceIdentity()
const {
return m_faceIdentity; }
103 int GetGlyphId()
const {
return m_glyphId; }
121 std::string m_codeStr;
123 std::map<SMuFLGlyphAnchor, Point> m_anchors;
125 uint64_t m_faceIdentity;
This class is used for storing a music font glyph.
Definition: glyph.h:32
void SetAnchor(std::string anchorStr, double x, double y)
Add an anchor for the glyph.
void SetBoundingBox(double x, double y, double w, double h)
Set the bounds of the glyph These are original values from the font and will be stored as (int)(10....
bool HasAnchor(SMuFLGlyphAnchor anchor) const
Check if the glyph has anchor provided.
const Point * GetAnchor(SMuFLGlyphAnchor anchor) const
Return the SMuFL anchor for the glyph.
void GetBoundingBox(int &x, int &y, int &w, int &h) const
Get the bounds of the glyph.
Simple class for representing points.
Definition: devicecontextbase.h:203