30 class re_FontInstance;
55 enum { BUFFER_CHUNK_SIZE = 4096 };
65 : myP(nullptr), myUV(nullptr), myCd(nullptr),
66 myNext(nullptr), myArraySize(0),
81 myOwnFontBuffers(false)
102 static RE_Font &
get(
const char *font_name,
float size);
131 float getDescender();
143 float getUnderlinePos();
147 float getUnderlineThickness();
150 bool hasGlyph(
utf32 cp);
156 float getHorizAdvance(
utf32 cp);
160 float getHorizAdvance(
utf32 cp,
utf32 cp_next);
163 float getStringWidth(
const utf8 *
s,
const utf8 *e =
nullptr,
168 return getStringWidth(str.
begin(), str.
end(), cp_xform);
173 return getStringWidth(str.
c_str(),
nullptr, cp_xform);
178 return getStringWidth(str.
begin(), str.
end(), cp_xform);
183 return getStringWidth(str.
begin(), str.
end(), cp_xform);
193 return isStringWiderThan(str.
begin(), str.
end(),
width, cp_xform);
198 bool getTrimmedString(
const utf8 *&
s,
const utf8 *&e,
const utf8 *ellipsis,
199 float max_width,
bool trim_right,
201 float *trimmed_width =
nullptr);
222 float max_width,
float max_height = FLT_MAX,
241 bool use_shared_font_buffers);
244 float getIntegerWidth(
const char*
s );
247 float getFloatWidth(
const char*
s );
257 bool splitStringImpl(
264 re_FontInstance *myInstance;
275 friend class re_FontCache;
SYS_FORCE_INLINE const_iterator begin() const
float getStringWidth(const UT_StringView &str, const UT_Unicode::transform *cp_xform=nullptr)
The size, in points, of this font.
float getSize() const
Get the size, in points, of this font.
SYS_NO_DISCARD_RESULT SYS_FORCE_INLINE const_iterator end() const
Returns a constant iterator pointing to the end of the string.
**But if you need a result
const char * c_str() const
SYS_FORCE_INLINE const_iterator end() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
GA_API const UT_StringHolder scale
A utility class to do read-only operations on a subset of an existing string.
SYS_FORCE_INLINE const char * end() const
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
SYS_FORCE_INLINE const char * begin() const
Iterator compatibility.
RE_FontBuffers(int bucket)
GLsizei const GLchar *const * strings
RE_StringSplitType
Specifies which method to use to split string in RE_Font::splitString.
bool operator!=(const RE_Font &other) const
SYS_NO_DISCARD_RESULT SYS_FORCE_INLINE const_iterator begin() const
Returns a constant iterator pointing to the beginning of the string.
float getStringWidth(const UT_StringRef &str, const UT_Unicode::transform *cp_xform=nullptr)
The size, in points, of this font.
float getStringWidth(const UT_String &str, const UT_Unicode::transform *cp_xform=nullptr)
The size, in points, of this font.
RE_FontBuffers * myTextGeo
const FONT_Info & getFontInfo() const
float getStringWidth(const UT_WorkBuffer &str, const UT_Unicode::transform *cp_xform=nullptr)
The size, in points, of this font.
MX_CORE_API StringVec splitString(const string &str, const string &sep)
bool isStringWiderThan(const UT_StringView &str, float width, const UT_Unicode::transform *cp_xform=nullptr)
The size, in points, of this font.