This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
ofTrueTypeFont.h
Go to the documentation of this file.
47 }
50 }
57 };
137};
347 ofRectangle getStringBoundingBox(const std::string& s, float x, float y, bool vflip=true) const;
369 std::vector<ofPath> getStringAsPoints(const std::string & str, bool vflip=true, bool filled=true) const;
Definition ofTrueTypeFont.h:121
static const std::initializer_list< ofUnicode::range > Emoji
Definition ofTrueTypeFont.h:86
static const std::initializer_list< ofUnicode::range > Devanagari
Definition ofTrueTypeFont.h:136
static const std::initializer_list< ofUnicode::range > Korean
Definition ofTrueTypeFont.h:116
static const std::initializer_list< ofUnicode::range > Chinese
Definition ofTrueTypeFont.h:108
static const std::initializer_list< ofUnicode::range > Arabic
Definition ofTrueTypeFont.h:127
static const std::initializer_list< ofUnicode::range > Japanese
Definition ofTrueTypeFont.h:97
static const std::initializer_list< ofUnicode::range > Greek
Definition ofTrueTypeFont.h:149
static const std::initializer_list< ofUnicode::range > Cyrillic
Definition ofTrueTypeFont.h:155
static const std::initializer_list< ofUnicode::range > Latin
Definition ofTrueTypeFont.h:142
ofPath is a way to create a path or multiple paths consisting of points. It allows you to combine mul...
Definition ofPath.h:38
Definition ofTrueTypeFont.h:164
bool isLoaded() const
Has the font been loaded successfully?
Definition ofTrueTypeFont.cpp:896
int getSize() const
Returns the size of the font.
Definition ofTrueTypeFont.cpp:911
glm::vec2 getFirstGlyphPosForTexture(const std::string &str, bool vflip) const
Definition ofTrueTypeFont.cpp:1240
bool hasFullCharacterSet() const
Does the font have a full character set?
Definition ofTrueTypeFont.cpp:906
static void setGlobalDpi(int newDpi)
Set the default dpi for all typefaces.
Definition ofTrueTypeFont.cpp:426
float getAscenderHeight() const
Get the ascender distance for this font.
Definition ofTrueTypeFont.cpp:926
void setLineHeight(float height)
Sets line height for text drawn on screen.
Definition ofTrueTypeFont.cpp:916
bool load(const of::filesystem::path &filename, int fontsize, bool _bAntiAliased=true, bool _bFullCharacterSet=true, bool makeContours=false, float simplifyAmt=0.0f, int dpi=0)
Loads the font specified by filename, allows you to control size, aliasing, and other parameters.
Definition ofTrueTypeFont.cpp:697
float getDescenderHeight() const
Get the descender distance for this font.
Definition ofTrueTypeFont.cpp:931
ofTrueTypeFont()
Construct a default ofTrueTypeFont.
Definition ofTrueTypeFont.cpp:461
void setLetterSpacing(float spacing)
Sets the letter spacing of the font object.
Definition ofTrueTypeFont.cpp:941
bool isAntiAliased() const
Is the font anti-aliased?
Definition ofTrueTypeFont.cpp:901
ofPath getCharacterAsPoints(uint32_t character, bool vflip=true, bool filled=true) const
Definition ofTrueTypeFont.cpp:961
OF_DEPRECATED_MSG("Use load instead", bool loadFont(std::string filename, int fontsize, bool _bAntiAliased=true, bool _bFullCharacterSet=false, bool makeContours=false, float simplifyAmt=0.0f, int dpi=0))
float getLineHeight() const
Computes line height based on font size.
Definition ofTrueTypeFont.cpp:921
float stringHeight(const std::string &s) const
Returns the string height.
Definition ofTrueTypeFont.cpp:1215
void drawString(const std::string &s, float x, float y) const
Draws a string s at position x,y.
Definition ofTrueTypeFont.cpp:1339
void drawStringAsShapes(const std::string &s, float x, float y) const
Draws the string as if it was geometrical shapes.
Definition ofTrueTypeFont.cpp:1351
float getSpaceSize() const
Returns a variable that represents how wide spaces are.
Definition ofTrueTypeFont.cpp:956
std::size_t getNumCharacters() const
Get the number of characters in the loaded character set.
Definition ofTrueTypeFont.cpp:1369
std::vector< ofPath > getStringAsPoints(const std::string &str, bool vflip=true, bool filled=true) const
Definition ofTrueTypeFont.cpp:1106
const ofRectangle & getGlyphBBox() const
Get the global bounding box for this font.
Definition ofTrueTypeFont.cpp:936
ofRectangle getStringBoundingBox(const std::string &s, float x, float y, bool vflip=true) const
Returns the bounding box of a string as a rectangle.
Definition ofTrueTypeFont.cpp:1173
ofTexture getStringTexture(const std::string &s, bool vflip=true) const
Definition ofTrueTypeFont.cpp:1280
const ofMesh & getStringMesh(const std::string &s, float x, float y, bool vflip=true) const
Definition ofTrueTypeFont.cpp:1228
const ofTexture & getFontTexture() const
Definition ofTrueTypeFont.cpp:1235
ofTrueTypeFont & operator=(const ofTrueTypeFont &mom)
Definition ofTrueTypeFont.cpp:513
float stringWidth(const std::string &s) const
Returns the string width.
Definition ofTrueTypeFont.cpp:1159
float getLetterSpacing() const
Returns letter spacing of font object.
Definition ofTrueTypeFont.cpp:946
virtual ~ofTrueTypeFont()
Destroy the ofTrueTypeFont.
Definition ofTrueTypeFont.cpp:474
void setDirection(ofTrueTypeFontDirection direction)
Definition ofTrueTypeFont.cpp:1101
void setSpaceSize(float size)
Sets the width for the whitespace character for this font.
Definition ofTrueTypeFont.cpp:951
Definition ofTrueTypeFont.h:42
static const range LatinExtendedAdditional
Definition ofTrueTypeFont.h:38
static const range KatakanaHalfAndFullwidthForms
Definition ofTrueTypeFont.h:67
static const range AlphabeticPresentationForms
Definition ofTrueTypeFont.h:64
static const range MiscSymbolsAndPictographs
Definition ofTrueTypeFont.h:71
static const range AdditionalTransportAndMap
Definition ofTrueTypeFont.h:77
static const range KatakanaPhoneticExtensions
Definition ofTrueTypeFont.h:57
static const range CJKSymbolAndPunctuation
Definition ofTrueTypeFont.h:53
static const range RumiNumericalSymbols
Definition ofTrueTypeFont.h:69
static const range OtherAdditionalSymbols
Definition ofTrueTypeFont.h:78
#define c
Definition ofTrueTypeFont.h:139
void addRange(const ofUnicode::range &range)
Definition ofTrueTypeFont.h:159
void addRanges(std::initializer_list< ofUnicode::range > alphabet)
Definition ofTrueTypeFont.h:155
ofTrueTypeFontSettings(const of::filesystem::path &name, int size)
Definition ofTrueTypeFont.h:151
Definition ofTrueTypeFont.h:44