|
SDL3pp
A slim C++ wrapper for SDL3
|
Header file for SDL_ttf library. More...
Classes | |
| class | SDL::Font |
| The internal structure containing font information. More... | |
| struct | SDL::FontRef |
| Reference for Font. More... | |
| class | SDL::TextEngine |
| A text engine used to create text objects. More... | |
| struct | SDL::SurfaceTextEngine |
| A surface based text engine. More... | |
| struct | SDL::RendererTextEngine |
| A renderer based text engine. More... | |
| struct | SDL::GPUTextEngine |
| A GPU based text engine. More... | |
| class | SDL::Text |
| Text created with TextEngine.CreateText(). More... | |
| struct | SDL::TextRef |
| Reference for Text. More... | |
| class | SDL::SubStringIterator |
| Iterator for substrings. More... | |
Macros | |
| #define | SDL_TTF_VERSION |
| This is the version number macro for the current SDL_ttf version. | |
| #define | SDL_TTF_VERSION_ATLEAST(X, Y, Z) |
| This macro will evaluate to true if compiled with SDL_ttf at least X.Y.Z. | |
Typedefs | |
| using | SDL::FontRaw = TTF_Font* |
| Alias to raw representation for Font. | |
| using | SDL::TextEngineRaw = TTF_TextEngine* |
| Alias to raw representation for TextEngine. | |
| using | SDL::TextEngineRef = ObjParam<TextEngineRaw> |
| Safely wrap TextEngine for non owning parameters. | |
| using | SDL::TextRaw = TTF_Text* |
| Alias to raw representation for Text. | |
| using | SDL::TextRawConst = const TTF_Text* |
| Alias to const raw representation for Text. | |
| using | SDL::TextConstRef = ObjConstParam<TextRaw, TextRawConst> |
| Safely wrap Text for non owning const parameters. | |
| using | SDL::FontStyleFlags = Uint32 |
| Font style flags for Font. | |
| using | SDL::HintingFlags = TTF_HintingFlags |
| Hinting flags for TTF (TrueType Fonts). | |
| using | SDL::HorizontalAlignment = TTF_HorizontalAlignment |
| The horizontal alignment used when rendering wrapped text. | |
| using | SDL::Direction = TTF_Direction |
| Direction flags. | |
| using | SDL::ImageType = TTF_ImageType |
| The type of data in a glyph image. | |
| using | SDL::SubStringFlags = Uint32 |
| Flags for SubString. | |
| using | SDL::GPUTextEngineWinding = TTF_GPUTextEngineWinding |
| The winding order of the vertices returned by Text.GetGPUDrawData. | |
| using | SDL::GPUAtlasDrawSequence = TTF_GPUAtlasDrawSequence |
| Draw sequence returned by Text.GetGPUDrawData. | |
| using | SDL::SubString = TTF_SubString |
| The representation of a substring within text. | |
| using | SDL::TextData = TTF_TextData |
| Internal data for Text. | |
Functions | |
| void | SDL::GetFreeTypeVersion (int *major, int *minor, int *patch) |
| Query the version of the FreeType library in use. | |
| void | SDL::GetHarfBuzzVersion (int *major, int *minor, int *patch) |
| Query the version of the HarfBuzz library in use. | |
| Font | SDL::OpenFont (StringParam file, float ptsize) |
| Create a font from a file, using a specified point size. | |
| Font | SDL::OpenFontIO (IOStreamRef src, float ptsize, bool closeio=false) |
| Create a font from an IOStream, using a specified point size. | |
| Font | SDL::OpenFontWithProperties (PropertiesRef props) |
| Create a font with the specified properties. | |
| Font | SDL::CopyFont (FontRef existing_font) |
| Create a copy of an existing font. | |
| PropertiesRef | SDL::GetFontProperties (FontRef font) |
| Get the properties associated with a font. | |
| Uint32 | SDL::GetFontGeneration (FontRef font) |
| Get the font generation. | |
| void | SDL::AddFallbackFont (FontRef font, FontRef fallback) |
| Add a fallback font. | |
| void | SDL::RemoveFallbackFont (FontRef font, FontRef fallback) |
| Remove a fallback font. | |
| void | SDL::ClearFallbackFonts (FontRef font) |
| Remove all fallback fonts. | |
| void | SDL::SetFontSize (FontRef font, float ptsize) |
| Set a font's size dynamically. | |
| void | SDL::SetFontSizeDPI (FontRef font, float ptsize, int hdpi, int vdpi) |
| Set font size dynamically with target resolutions, in dots per inch. | |
| float | SDL::GetFontSize (FontRef font) |
| Get the size of a font. | |
| void | SDL::GetFontDPI (FontRef font, int *hdpi, int *vdpi) |
| Get font target resolutions, in dots per inch. | |
| void | SDL::SetFontStyle (FontRef font, FontStyleFlags style) |
| Set a font's current style. | |
| FontStyleFlags | SDL::GetFontStyle (FontRef font) |
| Query a font's current style. | |
| void | SDL::SetFontOutline (FontRef font, int outline) |
| Set a font's current outline. | |
| int | SDL::GetFontOutline (FontRef font) |
| Query a font's current outline. | |
| void | SDL::SetFontHinting (FontRef font, HintingFlags hinting) |
| Set a font's current hinter setting. | |
| int | SDL::GetNumFontFaces (FontRef font) |
| Query the number of faces of a font. | |
| HintingFlags | SDL::GetFontHinting (FontRef font) |
| Query a font's current FreeType hinter setting. | |
| void | SDL::SetFontSDF (FontRef font, bool enabled) |
| Enable Signed Distance Field rendering for a font. | |
| bool | SDL::GetFontSDF (FontRef font) |
| Query whether Signed Distance Field rendering is enabled for a font. | |
| int | SDL::GetFontWeight (FontRef font) |
| Query a font's weight, in terms of the lightness/heaviness of the strokes. | |
| void | SDL::SetFontWrapAlignment (FontRef font, HorizontalAlignment align) |
| Set a font's current wrap alignment option. | |
| HorizontalAlignment | SDL::GetFontWrapAlignment (FontRef font) |
| Query a font's current wrap alignment option. | |
| int | SDL::GetFontHeight (FontRef font) |
| Query the total height of a font. | |
| int | SDL::GetFontAscent (FontRef font) |
| Query the offset from the baseline to the top of a font. | |
| int | SDL::GetFontDescent (FontRef font) |
| Query the offset from the baseline to the bottom of a font. | |
| void | SDL::SetFontLineSkip (FontRef font, int lineskip) |
| Set the spacing between lines of text for a font. | |
| int | SDL::GetFontLineSkip (FontRef font) |
| Query the spacing between lines of text for a font. | |
| void | SDL::SetFontKerning (FontRef font, bool enabled) |
| Set if kerning is enabled for a font. | |
| bool | SDL::GetFontKerning (FontRef font) |
| Query whether or not kerning is enabled for a font. | |
| bool | SDL::FontIsFixedWidth (FontRef font) |
| Query whether a font is fixed-width. | |
| bool | SDL::FontIsScalable (FontRef font) |
| Query whether a font is scalable or not. | |
| const char * | SDL::GetFontFamilyName (FontRef font) |
| Query a font's family name. | |
| const char * | SDL::GetFontStyleName (FontRef font) |
| Query a font's style name. | |
| void | SDL::SetFontDirection (FontRef font, Direction direction) |
| Set the direction to be used for text shaping by a font. | |
| Direction | SDL::GetFontDirection (FontRef font) |
| Get the direction to be used for text shaping by a font. | |
| Uint32 | SDL::StringToTag (StringParam string) |
| Convert from a 4 character string to a 32-bit tag. | |
| void | SDL::TagToString (Uint32 tag, char *string, size_t size) |
| Convert from a 32-bit tag to a 4 character string. | |
| void | SDL::SetFontScript (FontRef font, Uint32 script) |
| Set the script to be used for text shaping by a font. | |
| Uint32 | SDL::GetFontScript (FontRef font) |
| Get the script used for text shaping a font. | |
| Uint32 | SDL::GetGlyphScript (Uint32 ch) |
| Get the script used by a 32-bit codepoint. | |
| void | SDL::SetFontLanguage (FontRef font, StringParam language_bcp47) |
| Set language to be used for text shaping by a font. | |
| bool | SDL::FontHasGlyph (FontRef font, Uint32 ch) |
| Check whether a glyph is provided by the font for a UNICODE codepoint. | |
| Surface | SDL::GetGlyphImage (FontRef font, Uint32 ch, ImageType *image_type) |
| Get the pixel image for a UNICODE codepoint. | |
| Surface | SDL::GetGlyphImageForIndex (FontRef font, Uint32 glyph_index, ImageType *image_type) |
| Get the pixel image for a character index. | |
| void | SDL::GetGlyphMetrics (FontRef font, Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance) |
| Query the metrics (dimensions) of a font's glyph for a UNICODE codepoint. | |
| int | SDL::GetGlyphKerning (FontRef font, Uint32 previous_ch, Uint32 ch) |
| Query the kerning size between the glyphs of two UNICODE codepoints. | |
| void | SDL::GetStringSize (FontRef font, std::string_view text, int *w, int *h) |
| Calculate the dimensions of a rendered string of UTF-8 text. | |
| void | SDL::GetStringSizeWrapped (FontRef font, std::string_view text, int wrap_width, int *w, int *h) |
| Calculate the dimensions of a rendered string of UTF-8 text. | |
| void | SDL::MeasureString (FontRef font, std::string_view text, int max_width, int *measured_width, size_t *measured_length) |
| Calculate how much of a UTF-8 string will fit in a given width. | |
| Surface | SDL::RenderText_Solid (FontRef font, std::string_view text, Color fg) |
| Render UTF-8 text at fast quality to a new 8-bit surface. | |
| Surface | SDL::RenderText_Solid_Wrapped (FontRef font, std::string_view text, Color fg, int wrapLength) |
| Render word-wrapped UTF-8 text at fast quality to a new 8-bit surface. | |
| Surface | SDL::RenderGlyph_Solid (FontRef font, Uint32 ch, ColorRaw fg) |
| Render a single 32-bit glyph at fast quality to a new 8-bit surface. | |
| Surface | SDL::RenderText_Shaded (FontRef font, std::string_view text, Color fg, Color bg) |
| Render UTF-8 text at high quality to a new 8-bit surface. | |
| Surface | SDL::RenderText_Shaded_Wrapped (FontRef font, std::string_view text, Color fg, Color bg, int wrap_width) |
| Render word-wrapped UTF-8 text at high quality to a new 8-bit surface. | |
| Surface | SDL::RenderGlyph_Shaded (FontRef font, Uint32 ch, ColorRaw fg, ColorRaw bg) |
| Render a single UNICODE codepoint at high quality to a new 8-bit surface. | |
| Surface | SDL::RenderText_Blended (FontRef font, std::string_view text, Color fg) |
| Render UTF-8 text at high quality to a new ARGB surface. | |
| Surface | SDL::RenderText_Blended_Wrapped (FontRef font, std::string_view text, Color fg, int wrap_width) |
| Render word-wrapped UTF-8 text at high quality to a new ARGB surface. | |
| Surface | SDL::RenderGlyph_Blended (FontRef font, Uint32 ch, ColorRaw fg) |
| Render a single UNICODE codepoint at high quality to a new ARGB surface. | |
| Surface | SDL::RenderText_LCD (FontRef font, std::string_view text, Color fg, Color bg) |
| Render UTF-8 text at LCD subpixel quality to a new ARGB surface. | |
| Surface | SDL::RenderText_LCD_Wrapped (FontRef font, std::string_view text, Color fg, Color bg, int wrap_width) |
| Render word-wrapped UTF-8 text at LCD subpixel quality to a new ARGB surface. | |
| Surface | SDL::RenderGlyph_LCD (FontRef font, Uint32 ch, ColorRaw fg, ColorRaw bg) |
| Render a single UNICODE codepoint at LCD subpixel quality to a new ARGB surface. | |
| SurfaceTextEngine | SDL::CreateSurfaceTextEngine () |
| Create a text engine for drawing text on SDL surfaces. | |
| void | SDL::DrawSurfaceText (TextConstRef text, Point p, SurfaceRef surface) |
| Draw text to an SDL surface. | |
| void | SDL::DestroySurfaceTextEngine (TextEngineRaw engine) |
| Destroy a text engine created for drawing text on SDL surfaces. | |
| RendererTextEngine | SDL::CreateRendererTextEngine (RendererRef renderer) |
| Create a text engine for drawing text on an SDL renderer. | |
| RendererTextEngine | SDL::CreateRendererTextEngineWithProperties (PropertiesRef props) |
| Create a text engine for drawing text on an SDL renderer, with the specified properties. | |
| void | SDL::DrawRendererText (TextConstRef text, FPoint p) |
| Draw text to an SDL renderer. | |
| void | SDL::DestroyRendererTextEngine (TextEngineRaw engine) |
| Destroy a text engine created for drawing text on an SDL renderer. | |
| GPUTextEngine | SDL::CreateGPUTextEngine (GPUDeviceRef device) |
| Create a text engine for drawing text with the SDL GPU API. | |
| GPUTextEngine | SDL::CreateGPUTextEngineWithProperties (PropertiesRef props) |
| Create a text engine for drawing text with the SDL GPU API, with the specified properties. | |
| GPUAtlasDrawSequence * | SDL::GetGPUTextDrawData (TextConstRef text) |
| Get the geometry data needed for drawing the text. | |
| void | SDL::DestroyGPUTextEngine (TextEngineRaw engine) |
| Destroy a text engine created for drawing text with the SDL GPU API. | |
| void | SDL::SetGPUTextEngineWinding (TextEngineRef engine, GPUTextEngineWinding winding) |
| Sets the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine. | |
| GPUTextEngineWinding | SDL::GetGPUTextEngineWinding (TextEngineRef engine) |
| Get the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine. | |
| Text | SDL::CreateText (TextEngineRef engine, FontRef font, std::string_view text) |
| Create a text object from UTF-8 text and a text engine. | |
| PropertiesRef | SDL::GetTextProperties (TextConstRef text) |
| Get the properties associated with a text object. | |
| void | SDL::SetTextEngine (TextRef text, TextEngineRef engine) |
| Set the text engine used by a text object. | |
| TextEngineRef | SDL::GetTextEngine (TextConstRef text) |
| Get the text engine used by a text object. | |
| bool | SDL::SetTextFont (TextRef text, FontRef font) |
| Set the font used by a text object. | |
| FontRef | SDL::GetTextFont (TextConstRef text) |
| Get the font used by a text object. | |
| void | SDL::SetTextDirection (TextRef text, Direction direction) |
| Set the direction to be used for text shaping a text object. | |
| Direction | SDL::GetTextDirection (TextConstRef text) |
| Get the direction to be used for text shaping a text object. | |
| void | SDL::SetTextScript (TextRef text, Uint32 script) |
| Set the script to be used for text shaping a text object. | |
| Uint32 | SDL::GetTextScript (TextConstRef text) |
| Get the script used for text shaping a text object. | |
| void | SDL::SetTextColor (TextRef text, Color c) |
| Set the color of a text object. | |
| void | SDL::SetTextColorFloat (TextRef text, FColor c) |
| Set the color of a text object. | |
| void | SDL::GetTextColor (TextConstRef text, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a) |
| Get the color of a text object. | |
| Color | SDL::GetTextColor (TextRef text) |
| Get the color of a text object. | |
| void | SDL::GetTextColorFloat (TextConstRef text, float *r, float *g, float *b, float *a) |
| Get the color of a text object. | |
| FColor | SDL::GetTextColorFloat (TextRef text) |
| Get the color of a text object. | |
| void | SDL::SetTextPosition (TextRef text, const PointRaw &p) |
| Set the position of a text object. | |
| void | SDL::GetTextPosition (TextConstRef text, int *x, int *y) |
| Get the position of a text object. | |
| Point | SDL::GetTextPosition (TextRef text) |
| Get the position of a text object. | |
| void | SDL::SetTextWrapWidth (TextRef text, int wrap_width) |
| Set whether wrapping is enabled on a text object. | |
| int | SDL::GetTextWrapWidth (TextConstRef text) |
| Get whether wrapping is enabled on a text object. | |
| void | SDL::SetTextWrapWhitespaceVisible (TextRef text, bool visible) |
| Set whether whitespace should be visible when wrapping a text object. | |
| bool | SDL::TextWrapWhitespaceVisible (TextConstRef text) |
| Return whether whitespace is shown when wrapping a text object. | |
| void | SDL::SetTextString (TextRef text, std::string_view string) |
| Set the UTF-8 text used by a text object. | |
| void | SDL::InsertTextString (TextRef text, int offset, std::string_view string) |
| Insert UTF-8 text into a text object. | |
| void | SDL::AppendTextString (TextRef text, std::string_view string) |
| Append UTF-8 text to a text object. | |
| void | SDL::DeleteTextString (TextRef text, int offset, int length) |
| Delete UTF-8 text from a text object. | |
| void | SDL::GetTextSize (TextConstRef text, int *w, int *h) |
| Get the size of a text object. | |
| Point | SDL::GetTextSize (TextRef text) |
| Get the size of a text object. | |
| void | SDL::GetTextSubString (TextConstRef text, int offset, SubString *substring) |
| Get the substring of a text object that surrounds a text offset. | |
| void | SDL::GetTextSubStringForLine (TextConstRef text, int line, SubString *substring) |
| Get the substring of a text object that contains the given line. | |
| OwnArray< SubString * > | SDL::GetTextSubStringsForRange (TextConstRef text, int offset, int length) |
| Get the substrings of a text object that contain a range of text. | |
| void | SDL::GetTextSubStringForPoint (TextConstRef text, Point p, SubString *substring) |
| Get the portion of a text string that is closest to a point. | |
| void | SDL::GetPreviousTextSubString (TextConstRef text, const SubString &substring, SubString *previous) |
| Get the previous substring in a text object. | |
| void | SDL::GetNextTextSubString (TextConstRef text, const SubString &substring, SubString *next) |
| Get the next substring in a text object. | |
| void | SDL::UpdateText (TextRef text) |
| Update the layout of a text object. | |
| void | SDL::DestroyText (TextRaw text) |
| Destroy a text object created by a text engine. | |
| void | SDL::CloseFont (FontRaw font) |
| Dispose of a previously-created font. | |
| SDL::Font::Font (StringParam file, float ptsize) | |
| Create a font from a file, using a specified point size. | |
| SDL::Font::Font (IOStreamRef src, float ptsize, bool closeio=false) | |
| Create a font from an IOStream, using a specified point size. | |
| SDL::Font::Font (PropertiesRef props) | |
| Create a font with the specified properties. | |
| Font | SDL::Font::Copy () const |
| Create a copy of an existing font. | |
| PropertiesRef | SDL::Font::GetProperties () |
| Get the properties associated with a font. | |
| Uint32 | SDL::Font::GetGeneration () const |
| Get the font generation. | |
| void | SDL::Font::AddFallback (FontRef fallback) |
| Add a fallback font. | |
| void | SDL::Font::RemoveFallback (FontRef fallback) |
| Remove a fallback font. | |
| void | SDL::Font::ClearFallbacks () |
| Remove all fallback fonts. | |
| void | SDL::Font::SetSize (float ptsize) |
| Set a font's size dynamically. | |
| void | SDL::Font::SetSizeDPI (float ptsize, int hdpi, int vdpi) |
| Set font size dynamically with target resolutions, in dots per inch. | |
| float | SDL::Font::GetSize () const |
| Get the size of a font. | |
| void | SDL::Font::GetDPI (int *hdpi, int *vdpi) const |
| Get font target resolutions, in dots per inch. | |
| void | SDL::Font::SetStyle (FontStyleFlags style) |
| Set a font's current style. | |
| FontStyleFlags | SDL::Font::GetStyle () const |
| Query a font's current style. | |
| void | SDL::Font::SetOutline (int outline) |
| Set a font's current outline. | |
| int | SDL::Font::GetOutline () const |
| Query a font's current outline. | |
| void | SDL::Font::SetHinting (HintingFlags hinting) |
| Set a font's current hinter setting. | |
| int | SDL::Font::GetNumFaces () const |
| Query the number of faces of a font. | |
| HintingFlags | SDL::Font::GetHinting () const |
| Query a font's current FreeType hinter setting. | |
| void | SDL::Font::SetSDF (bool enabled) |
| Enable Signed Distance Field rendering for a font. | |
| bool | SDL::Font::GetSDF () const |
| Query whether Signed Distance Field rendering is enabled for a font. | |
| int | SDL::Font::GetWeight () const |
| Query a font's weight, in terms of the lightness/heaviness of the strokes. | |
| void | SDL::Font::SetWrapAlignment (HorizontalAlignment align) |
| Set a font's current wrap alignment option. | |
| HorizontalAlignment | SDL::Font::GetWrapAlignment () const |
| Query a font's current wrap alignment option. | |
| int | SDL::Font::GetHeight () const |
| Query the total height of a font. | |
| int | SDL::Font::GetAscent () const |
| Query the offset from the baseline to the top of a font. | |
| int | SDL::Font::GetDescent () const |
| Query the offset from the baseline to the bottom of a font. | |
| void | SDL::Font::SetLineSkip (int lineskip) |
| Set the spacing between lines of text for a font. | |
| int | SDL::Font::GetLineSkip () const |
| Query the spacing between lines of text for a font. | |
| void | SDL::Font::SetKerning (bool enabled) |
| Set if kerning is enabled for a font. | |
| bool | SDL::Font::GetKerning () const |
| Query whether or not kerning is enabled for a font. | |
| bool | SDL::Font::IsFixedWidth () const |
| Query whether a font is fixed-width. | |
| bool | SDL::Font::IsScalable () const |
| Query whether a font is scalable or not. | |
| const char * | SDL::Font::GetFamilyName () const |
| Query a font's family name. | |
| const char * | SDL::Font::GetStyleName () const |
| Query a font's style name. | |
| void | SDL::Font::SetDirection (Direction direction) |
| Set the direction to be used for text shaping by a font. | |
| Direction | SDL::Font::GetDirection () const |
| Get the direction to be used for text shaping by a font. | |
| void | SDL::Font::SetScript (Uint32 script) |
| Set the script to be used for text shaping by a font. | |
| Uint32 | SDL::Font::GetScript () const |
| Get the script used for text shaping a font. | |
| static Uint32 | SDL::Font::GetGlyphScript (Uint32 ch) |
| Get the script used by a 32-bit codepoint. | |
| void | SDL::Font::SetLanguage (StringParam language_bcp47) |
| Set language to be used for text shaping by a font. | |
| bool | SDL::Font::HasGlyph (Uint32 ch) const |
| Check whether a glyph is provided by the font for a UNICODE codepoint. | |
| Surface | SDL::Font::GetGlyphImage (Uint32 ch, ImageType *image_type) const |
| Get the pixel image for a UNICODE codepoint. | |
| Surface | SDL::Font::GetGlyphImageForIndex (Uint32 glyph_index, ImageType *image_type) const |
| Get the pixel image for a character index. | |
| void | SDL::Font::GetGlyphMetrics (Uint32 ch, int *minx, int *maxx, int *miny, int *maxy, int *advance) const |
| Query the metrics (dimensions) of a font's glyph for a UNICODE codepoint. | |
| int | SDL::Font::GetGlyphKerning (Uint32 previous_ch, Uint32 ch) const |
| Query the kerning size between the glyphs of two UNICODE codepoints. | |
| void | SDL::Font::GetStringSize (std::string_view text, int *w, int *h) const |
| Calculate the dimensions of a rendered string of UTF-8 text. | |
| void | SDL::Font::GetStringSizeWrapped (std::string_view text, int wrap_width, int *w, int *h) const |
| Calculate the dimensions of a rendered string of UTF-8 text. | |
| void | SDL::Font::MeasureString (std::string_view text, int max_width, int *measured_width, size_t *measured_length) const |
| Calculate how much of a UTF-8 string will fit in a given width. | |
| Surface | SDL::Font::RenderText_Solid (std::string_view text, Color fg) const |
| Render UTF-8 text at fast quality to a new 8-bit surface. | |
| Surface | SDL::Font::RenderText_Solid_Wrapped (std::string_view text, Color fg, int wrapLength) const |
| Render word-wrapped UTF-8 text at fast quality to a new 8-bit surface. | |
| Surface | SDL::Font::RenderGlyph_Solid (Uint32 ch, ColorRaw fg) const |
| Render a single 32-bit glyph at fast quality to a new 8-bit surface. | |
| Surface | SDL::Font::RenderText_Shaded (std::string_view text, Color fg, Color bg) const |
| Render UTF-8 text at high quality to a new 8-bit surface. | |
| Surface | SDL::Font::RenderText_Shaded_Wrapped (std::string_view text, Color fg, Color bg, int wrap_width) const |
| Render word-wrapped UTF-8 text at high quality to a new 8-bit surface. | |
| Surface | SDL::Font::RenderGlyph_Shaded (Uint32 ch, ColorRaw fg, ColorRaw bg) const |
| Render a single UNICODE codepoint at high quality to a new 8-bit surface. | |
| Surface | SDL::Font::RenderText_Blended (std::string_view text, Color fg) const |
| Render UTF-8 text at high quality to a new ARGB surface. | |
| Surface | SDL::Font::RenderText_Blended_Wrapped (std::string_view text, Color fg, int wrap_width) const |
| Render word-wrapped UTF-8 text at high quality to a new ARGB surface. | |
| Surface | SDL::Font::RenderGlyph_Blended (Uint32 ch, ColorRaw fg) const |
| Render a single UNICODE codepoint at high quality to a new ARGB surface. | |
| Surface | SDL::Font::RenderText_LCD (std::string_view text, Color fg, Color bg) const |
| Render UTF-8 text at LCD subpixel quality to a new ARGB surface. | |
| Surface | SDL::Font::RenderText_LCD_Wrapped (std::string_view text, Color fg, Color bg, int wrap_width) const |
| Render word-wrapped UTF-8 text at LCD subpixel quality to a new ARGB surface. | |
| Surface | SDL::Font::RenderGlyph_LCD (Uint32 ch, ColorRaw fg, ColorRaw bg) const |
| Render a single UNICODE codepoint at LCD subpixel quality to a new ARGB surface. | |
| SDL::SurfaceTextEngine::SurfaceTextEngine () | |
| Create a text engine for drawing text on SDL surfaces. | |
| void | SDL::Text::DrawSurface (Point p, SurfaceRef surface) const |
| Draw text to an SDL surface. | |
| void | SDL::SurfaceTextEngine::Destroy () final |
| Destroy a text engine created for drawing text on SDL surfaces. | |
| SDL::RendererTextEngine::RendererTextEngine (RendererRef renderer) | |
| Create a text engine for drawing text on an SDL renderer. | |
| SDL::RendererTextEngine::RendererTextEngine (PropertiesRef props) | |
| Create a text engine for drawing text on an SDL renderer, with the specified properties. | |
| void | SDL::Text::DrawRenderer (FPoint p) const |
| Draw text to an SDL renderer. | |
| void | SDL::RendererTextEngine::Destroy () final |
| Destroy a text engine created for drawing text on an SDL renderer. | |
| SDL::GPUTextEngine::GPUTextEngine (GPUDeviceRef device) | |
| Create a text engine for drawing text with the SDL GPU API. | |
| SDL::GPUTextEngine::GPUTextEngine (PropertiesRef props) | |
| Create a text engine for drawing text with the SDL GPU API, with the specified properties. | |
| GPUAtlasDrawSequence * | SDL::Text::GetGPUDrawData () const |
| Get the geometry data needed for drawing the text. | |
| void | SDL::GPUTextEngine::Destroy () final |
| Destroy a text engine created for drawing text with the SDL GPU API. | |
| void | SDL::GPUTextEngine::SetGPUWinding (GPUTextEngineWinding winding) |
| Sets the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine. | |
| GPUTextEngineWinding | SDL::GPUTextEngine::GetGPUWinding () const |
| Get the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine. | |
| Text | SDL::TextEngine::CreateText (FontRef font, std::string_view text) |
| Create a text object from UTF-8 text and a text engine. | |
| SDL::Text::Text (TextEngineRef engine, FontRef font, std::string_view text) | |
| Create a text object from UTF-8 text and a text engine. | |
| PropertiesRef | SDL::Text::GetProperties () const |
| Get the properties associated with a text object. | |
| void | SDL::Text::SetEngine (TextEngineRef engine) |
| Set the text engine used by a text object. | |
| TextEngineRef | SDL::Text::GetEngine () const |
| Get the text engine used by a text object. | |
| bool | SDL::Text::SetFont (FontRef font) |
| Set the font used by a text object. | |
| FontRef | SDL::Text::GetFont () const |
| Get the font used by a text object. | |
| void | SDL::Text::SetDirection (Direction direction) |
| Set the direction to be used for text shaping a text object. | |
| Direction | SDL::Text::GetDirection () const |
| Get the direction to be used for text shaping a text object. | |
| void | SDL::Text::SetScript (Uint32 script) |
| Set the script to be used for text shaping a text object. | |
| Uint32 | SDL::Text::GetScript () const |
| Get the script used for text shaping a text object. | |
| void | SDL::Text::SetColor (Color c) |
| Set the color of a text object. | |
| void | SDL::Text::SetColorFloat (FColor c) |
| Set the color of a text object. | |
| void | SDL::Text::GetColor (Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a) const |
| Get the color of a text object. | |
| Color | SDL::Text::GetColor () const |
| Get the color of a text object. | |
| void | SDL::Text::GetColorFloat (float *r, float *g, float *b, float *a) const |
| Get the color of a text object. | |
| FColor | SDL::Text::GetColorFloat () const |
| Get the color of a text object. | |
| void | SDL::Text::SetPosition (const PointRaw &p) |
| Set the position of a text object. | |
| void | SDL::Text::GetPosition (int *x, int *y) const |
| Get the position of a text object. | |
| Point | SDL::Text::GetPosition () const |
| Get the position of a text object. | |
| void | SDL::Text::SetWrapWidth (int wrap_width) |
| Set whether wrapping is enabled on a text object. | |
| int | SDL::Text::GetWrapWidth () const |
| Get whether wrapping is enabled on a text object. | |
| void | SDL::Text::SetWrapWhitespaceVisible (bool visible) |
| Set whether whitespace should be visible when wrapping a text object. | |
| bool | SDL::Text::IsWrapWhitespaceVisible () const |
| Return whether whitespace is shown when wrapping a text object. | |
| void | SDL::Text::SetString (std::string_view string) |
| Set the UTF-8 text used by a text object. | |
| void | SDL::Text::InsertString (int offset, std::string_view string) |
| Insert UTF-8 text into a text object. | |
| void | SDL::Text::AppendString (std::string_view string) |
| Append UTF-8 text to a text object. | |
| void | SDL::Text::DeleteString (int offset, int length) |
| Delete UTF-8 text from a text object. | |
| void | SDL::Text::GetSize (int *w, int *h) const |
| Get the size of a text object. | |
| Point | SDL::Text::GetSize () const |
| Get the size of a text object. | |
| void | SDL::Text::GetSubString (int offset, SubString *substring) const |
| Get the substring of a text object that surrounds a text offset. | |
| void | SDL::Text::GetSubStringForLine (int line, SubString *substring) const |
| Get the substring of a text object that contains the given line. | |
| OwnArray< SubString * > | SDL::Text::GetSubStringsForRange (int offset, int length=-1) const |
| Get the substrings of a text object that contain a range of text. | |
| void | SDL::Text::GetSubStringForPoint (Point p, SubString *substring) const |
| Get the portion of a text string that is closest to a point. | |
| void | SDL::Text::GetPreviousSubString (const SubString &substring, SubString *previous) const |
| Get the previous substring in a text object. | |
| void | SDL::Text::GetNextSubString (const SubString &substring, SubString *next) const |
| Get the next substring in a text object. | |
| void | SDL::Text::Update () |
| Update the layout of a text object. | |
| void | SDL::Text::Destroy () |
| Destroy a text object created by a text engine. | |
| void | SDL::Font::Close () |
| Dispose of a previously-created font. | |
Variables | |
| constexpr FontStyleFlags | SDL::STYLE_NORMAL = TTF_STYLE_NORMAL |
| No special style. | |
| constexpr FontStyleFlags | SDL::STYLE_BOLD = TTF_STYLE_BOLD |
| Bold style. | |
| constexpr FontStyleFlags | SDL::STYLE_ITALIC = TTF_STYLE_ITALIC |
| Italic style. | |
| constexpr FontStyleFlags | SDL::STYLE_UNDERLINE |
| Underlined text. | |
| constexpr FontStyleFlags | SDL::STYLE_STRIKETHROUGH |
| Strikethrough text. | |
| constexpr HintingFlags | SDL::HINTING_INVALID = TTF_HINTING_INVALID |
| INVALID. | |
| constexpr HintingFlags | SDL::HINTING_NORMAL |
| Normal hinting applies standard grid-fitting. | |
| constexpr HintingFlags | SDL::HINTING_LIGHT = TTF_HINTING_LIGHT |
| Light hinting applies subtle adjustments to improve rendering. | |
| constexpr HintingFlags | SDL::HINTING_MONO = TTF_HINTING_MONO |
| Monochrome hinting adjusts the font for better rendering at lower resolutions. | |
| constexpr HintingFlags | SDL::HINTING_NONE = TTF_HINTING_NONE |
| No hinting, the font is rendered without any grid-fitting. | |
| constexpr HintingFlags | SDL::HINTING_LIGHT_SUBPIXEL = TTF_HINTING_LIGHT_SUBPIXEL |
| Light hinting with subpixel rendering for more precise font edges. | |
| constexpr HorizontalAlignment | SDL::HORIZONTAL_ALIGN_INVALID |
| INVALID. | |
| constexpr HorizontalAlignment | SDL::HORIZONTAL_ALIGN_LEFT |
| LEFT. | |
| constexpr HorizontalAlignment | SDL::HORIZONTAL_ALIGN_CENTER |
| CENTER. | |
| constexpr HorizontalAlignment | SDL::HORIZONTAL_ALIGN_RIGHT |
| RIGHT. | |
| constexpr Direction | SDL::DIRECTION_INVALID = TTF_DIRECTION_INVALID |
| INVALID. | |
| constexpr Direction | SDL::DIRECTION_LTR = TTF_DIRECTION_LTR |
| Left to Right. | |
| constexpr Direction | SDL::DIRECTION_RTL = TTF_DIRECTION_RTL |
| Right to Left. | |
| constexpr Direction | SDL::DIRECTION_TTB = TTF_DIRECTION_TTB |
| Top to Bottom. | |
| constexpr Direction | SDL::DIRECTION_BTT = TTF_DIRECTION_BTT |
| Bottom to Top. | |
| constexpr ImageType | SDL::IMAGE_INVALID = TTF_IMAGE_INVALID |
| INVALID. | |
| constexpr ImageType | SDL::IMAGE_ALPHA |
| The color channels are white. | |
| constexpr ImageType | SDL::IMAGE_COLOR |
| The color channels have image data. | |
| constexpr ImageType | SDL::IMAGE_SDF = TTF_IMAGE_SDF |
| The alpha channel has signed distance field information. | |
| constexpr int | SDL::FONT_WEIGHT_THIN |
| Thin (100) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_EXTRA_LIGHT |
| ExtraLight (200) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_LIGHT |
| Light (300) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_NORMAL |
| Normal (400) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_MEDIUM |
| Medium (500) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_SEMI_BOLD |
| SemiBold (600) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_BOLD |
| Bold (700) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_EXTRA_BOLD |
| ExtraBold (800) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_BLACK |
| Black (900) named font weight value. | |
| constexpr int | SDL::FONT_WEIGHT_EXTRA_BLACK |
| ExtraBlack (950) named font weight value. | |
| constexpr SubStringFlags | SDL::SUBSTRING_DIRECTION_MASK |
| The mask for the flow direction for this substring. | |
| constexpr SubStringFlags | SDL::SUBSTRING_TEXT_START |
| This substring contains the beginning of the text. | |
| constexpr SubStringFlags | SDL::SUBSTRING_LINE_START = TTF_SUBSTRING_LINE_START |
| This substring contains the beginning of line line_index. | |
| constexpr SubStringFlags | SDL::SUBSTRING_LINE_END = TTF_SUBSTRING_LINE_END |
| This substring contains the end of line line_index. | |
| constexpr SubStringFlags | SDL::SUBSTRING_TEXT_END |
| This substring contains the end of the text. | |
| constexpr GPUTextEngineWinding | SDL::GPU_TEXTENGINE_WINDING_INVALID |
| INVALID. | |
| constexpr GPUTextEngineWinding | SDL::GPU_TEXTENGINE_WINDING_CLOCKWISE |
| CLOCKWISE. | |
| constexpr GPUTextEngineWinding | SDL::GPU_TEXTENGINE_WINDING_COUNTER_CLOCKWISE |
| COUNTER_CLOCKWISE. | |
Header file for SDL_ttf library.
This library is a wrapper around the excellent FreeType 2.0 library, available at: https://www.freetype.org/
| #define SDL_TTF_VERSION |
This is the version number macro for the current SDL_ttf version.
| #define SDL_TTF_VERSION_ATLEAST | ( | X, | |
| Y, | |||
| Z ) |
This macro will evaluate to true if compiled with SDL_ttf at least X.Y.Z.
| using SDL::Direction = TTF_Direction |
Direction flags.
The values here are chosen to match hb_direction_t
| using SDL::FontStyleFlags = Uint32 |
These are the flags which can be used to set the style of a font in SDL_ttf. A combination of these flags can be used with functions that set or query font style, such as Font.SetStyle or Font.GetStyle.
| using SDL::GPUAtlasDrawSequence = TTF_GPUAtlasDrawSequence |
Draw sequence returned by Text.GetGPUDrawData.
| using SDL::GPUTextEngineWinding = TTF_GPUTextEngineWinding |
The winding order of the vertices returned by Text.GetGPUDrawData.
| using SDL::HintingFlags = TTF_HintingFlags |
Hinting flags for TTF (TrueType Fonts).
This enum specifies the level of hinting to be applied to the font rendering. The hinting level determines how much the font's outlines are adjusted for better alignment on the pixel grid.
| using SDL::HorizontalAlignment = TTF_HorizontalAlignment |
The horizontal alignment used when rendering wrapped text.
| using SDL::ImageType = TTF_ImageType |
The type of data in a glyph image.
| using SDL::SubString = TTF_SubString |
The representation of a substring within text.
| using SDL::SubStringFlags = Uint32 |
| using SDL::TextData = TTF_TextData |
Internal data for Text.
|
inline |
Add a fallback font.
Add a font that will be used for glyphs that are not in the current font. The fallback font should have the same size and style as the current font.
If there are multiple fallback fonts, they are used in the order added.
This updates any Text objects using this font.
| fallback | the font to add as a fallback. |
| Error | on failure. |
Add a fallback font.
Add a font that will be used for glyphs that are not in the current font. The fallback font should have the same size and style as the current font.
If there are multiple fallback fonts, they are used in the order added.
This updates any Text objects using this font.
| font | the font to modify. |
| fallback | the font to add as a fallback. |
| Error | on failure. |
|
inline |
Append UTF-8 text to a text object.
This function may cause the internal text representation to be rebuilt.
| string | the UTF-8 text to insert. |
| Error | on failure. |
|
inline |
Append UTF-8 text to a text object.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| string | the UTF-8 text to insert. |
| Error | on failure. |
|
inline |
Remove all fallback fonts.
This updates any Text objects using this font.
| font | the font to modify. |
|
inline |
Remove all fallback fonts.
This updates any Text objects using this font.
|
inline |
Dispose of a previously-created font.
Call this when done with a font. This function will free any resources associated with it. It is safe to call this function on nullptr, for example on the result of a failed call to OpenFont().
The font is not valid after being passed to this function. String pointers from functions that return information on this font, such as Font.GetFamilyName() and Font.GetStyleName(), are no longer valid after this call, as well.
|
inline |
Dispose of a previously-created font.
Call this when done with a font. This function will free any resources associated with it. It is safe to call this function on nullptr, for example on the result of a failed call to OpenFont().
The font is not valid after being passed to this function. String pointers from functions that return information on this font, such as Font.GetFamilyName() and Font.GetStyleName(), are no longer valid after this call, as well.
| font | the font to dispose of. |
|
inline |
Create a copy of an existing font.
The copy will be distinct from the original, but will share the font file and have the same size and style as the original.
| Error | on failure. |
Create a copy of an existing font.
The copy will be distinct from the original, but will share the font file and have the same size and style as the original.
When done with the returned Font, use Font.Close() to dispose of it.
| existing_font | the font to copy. |
| Error | on failure. |
|
inline |
Create a text engine for drawing text with the SDL GPU API.
| device | the GPUDevice to use for creating textures and drawing text. |
|
inline |
Create a text engine for drawing text with the SDL GPU API, with the specified properties.
These are the supported properties:
| props | the properties to use. |
|
inline |
Create a text engine for drawing text on an SDL renderer.
| renderer | the renderer to use for creating textures and drawing text. |
|
inline |
Create a text engine for drawing text on an SDL renderer, with the specified properties.
These are the supported properties:
| props | the properties to use. |
|
inline |
Create a text engine for drawing text on SDL surfaces.
|
inline |
Create a text object from UTF-8 text and a text engine.
| engine | the text engine to use when creating the text object, may be nullptr. |
| font | the font to render with. |
| text | the text to use, in UTF-8 encoding. |
Create a text object from UTF-8 text and a text engine.
| font | the font to render with. |
| text | the text to use, in UTF-8 encoding. |
|
inline |
Delete UTF-8 text from a text object.
This function may cause the internal text representation to be rebuilt.
| offset | the offset, in bytes, from the beginning of the string if >= 0, the offset from the end of the string if < 0. Note that this does not do UTF-8 validation, so you should only delete at UTF-8 sequence boundaries. |
| length | the length of text to delete, in bytes, or -1 for the remainder of the string. |
| Error | on failure. |
|
inline |
Delete UTF-8 text from a text object.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| offset | the offset, in bytes, from the beginning of the string if >= 0, the offset from the end of the string if < 0. Note that this does not do UTF-8 validation, so you should only delete at UTF-8 sequence boundaries. |
| length | the length of text to delete, in bytes, or -1 for the remainder of the string. |
| Error | on failure. |
|
inlinefinalvirtual |
Destroy a text engine created for drawing text with the SDL GPU API.
All text created by this engine should be destroyed before calling this function.
Implements SDL::TextEngine.
|
inlinefinalvirtual |
Destroy a text engine created for drawing text on an SDL renderer.
All text created by this engine should be destroyed before calling this function.
Implements SDL::TextEngine.
|
inlinefinalvirtual |
Destroy a text engine created for drawing text on SDL surfaces.
All text created by this engine should be destroyed before calling this function.
Implements SDL::TextEngine.
|
inline |
Destroy a text object created by a text engine.
|
inline |
Destroy a text engine created for drawing text with the SDL GPU API.
All text created by this engine should be destroyed before calling this function.
| engine | a TextEngine object created with CreateGPUTextEngine(). |
|
inline |
Destroy a text engine created for drawing text on an SDL renderer.
All text created by this engine should be destroyed before calling this function.
| engine | a TextEngine object created with CreateRendererTextEngine(). |
|
inline |
Destroy a text engine created for drawing text on SDL surfaces.
All text created by this engine should be destroyed before calling this function.
| engine | a TextEngine object created with CreateSurfaceTextEngine(). |
|
inline |
Destroy a text object created by a text engine.
| text | the text to destroy. |
|
inline |
Draw text to an SDL renderer.
text must have been created using a TextEngine from CreateRendererTextEngine(), and will draw using the renderer passed to that function.
| p | the x,y coordinates in pixels, positive from the top-left edge towards the bottom-right. |
| Error | on failure. |
|
inline |
Draw text to an SDL renderer.
text must have been created using a TextEngine from CreateRendererTextEngine(), and will draw using the renderer passed to that function.
| text | the text to draw. |
| p | the (x, y) coordinate in pixels, positive from the left edge towards the right and from the top edge towards the bottom. |
| Error | on failure. |
|
inline |
Draw text to an SDL surface.
text must have been created using a TextEngine from CreateSurfaceTextEngine().
| p | the x,y coordinates in pixels, positive from the top-left edge towards the bottom-right. |
| surface | the surface to draw on. |
| Error | on failure. |
|
inline |
Draw text to an SDL surface.
text must have been created using a TextEngine from CreateSurfaceTextEngine().
| text | the text to draw. |
| p | the (x, y) coordinate in pixels, positive from the left edge towards the right and from the top edge towards the bottom. |
| surface | the surface to draw on. |
| Error | on failure. |
|
inline |
Create a font from an IOStream, using a specified point size.
Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
If closeio is true, src will be automatically closed once the font is closed. Otherwise you should keep src open until the font is closed.
| src | an IOStream to provide a font file's data. |
| ptsize | point size to use for the newly-opened font. |
| closeio | true to close src when the font is closed, false to leave it open. |
| Error | on failure. |
|
inline |
Create a font with the specified properties.
These are the supported properties:
| props | the properties to use. |
| Error | on failure. |
|
inline |
Create a font from a file, using a specified point size.
Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
| file | path to font file. |
| ptsize | point size to use for the newly-opened font. |
| Error | on failure. |
Check whether a glyph is provided by the font for a UNICODE codepoint.
| font | the font to query. |
| ch | the codepoint to check. |
|
inline |
Query whether a font is fixed-width.
A "fixed-width" font means all glyphs are the same width across; a lowercase 'i' will be the same size across as a capital 'W', for example. This is common for terminals and text editors, and other apps that treat text as a grid. Most other things (WYSIWYG word processors, web pages, etc) are more likely to not be fixed-width in most cases.
| font | the font to query. |
|
inline |
Query whether a font is scalable or not.
Scalability lets us distinguish between outline and bitmap fonts.
| font | the font to query. |
|
inline |
Query the offset from the baseline to the top of a font.
This is a positive value, relative to the baseline.
|
inline |
Get the color of a text object.
| Error | on failure. |
Get the color of a text object.
| r | a pointer filled in with the red color value in the range of 0-255, may be nullptr. |
| g | a pointer filled in with the green color value in the range of 0-255, may be nullptr. |
| b | a pointer filled in with the blue color value in the range of 0-255, may be nullptr. |
| a | a pointer filled in with the alpha value in the range of 0-255, may be nullptr. |
| Error | on failure. |
|
inline |
Get the color of a text object.
| Error | on failure. |
|
inline |
Get the color of a text object.
| r | a pointer filled in with the red color value, normally in the range of 0-1, may be nullptr. |
| g | a pointer filled in with the green color value, normally in the range of 0-1, may be nullptr. |
| b | a pointer filled in with the blue color value, normally in the range of 0-1, may be nullptr. |
| a | a pointer filled in with the alpha value in the range of 0-1, may be nullptr. |
| Error | on failure. |
|
inline |
Query the offset from the baseline to the bottom of a font.
This is a negative value, relative to the baseline.
|
inline |
Get the direction to be used for text shaping by a font.
This defaults to DIRECTION_INVALID if it hasn't been set.
|
inline |
Get the direction to be used for text shaping a text object.
This defaults to the direction of the font used by the text object.
|
inline |
Get font target resolutions, in dots per inch.
| hdpi | a pointer filled in with the target horizontal DPI. |
| vdpi | a pointer filled in with the target vertical DPI. |
| Error | on failure. |
|
inline |
Get the text engine used by a text object.
| Error | on failure. |
|
inline |
Query a font's family name.
This string is dictated by the contents of the font file.
Note that the returned string is to internal storage, and should not be modified or free'd by the caller. The string becomes invalid, with the rest of the font, when font is handed to Font.Close().
|
inline |
Get the font used by a text object.
| Error | on failure. |
|
inline |
Query the offset from the baseline to the top of a font.
This is a positive value, relative to the baseline.
| font | the font to query. |
|
inline |
Query the offset from the baseline to the bottom of a font.
This is a negative value, relative to the baseline.
| font | the font to query. |
Get the direction to be used for text shaping by a font.
This defaults to DIRECTION_INVALID if it hasn't been set.
| font | the font to query. |
|
inline |
Get font target resolutions, in dots per inch.
| font | the font to query. |
| hdpi | a pointer filled in with the target horizontal DPI. |
| vdpi | a pointer filled in with the target vertical DPI. |
| Error | on failure. |
|
inline |
Query a font's family name.
This string is dictated by the contents of the font file.
Note that the returned string is to internal storage, and should not be modified or free'd by the caller. The string becomes invalid, with the rest of the font, when font is handed to Font.Close().
| font | the font to query. |
Get the font generation.
The generation is incremented each time font properties change that require rebuilding glyphs, such as style, size, etc.
| font | the font to query. |
|
inline |
Query the total height of a font.
This is usually equal to point size.
| font | the font to query. |
|
inline |
Query a font's current FreeType hinter setting.
The hinter setting is a single value:
| font | the font to query. |
|
inline |
Query whether or not kerning is enabled for a font.
| font | the font to query. |
|
inline |
Query the spacing between lines of text for a font.
| font | the font to query. |
|
inline |
Query a font's current outline.
| font | the font to query. |
|
inline |
Get the properties associated with a font.
The following read-write properties are provided by SDL:
| font | the font to query. |
| Error | on failure. |
Get the script used for text shaping a font.
| font | the font to query. |
|
inline |
Query whether Signed Distance Field rendering is enabled for a font.
| font | the font to query. |
|
inline |
Get the size of a font.
| font | the font to query. |
|
inline |
Query a font's current style.
The font styles are a set of bit flags, OR'd together:
| font | the font to query. |
|
inline |
Query a font's style name.
This string is dictated by the contents of the font file.
Note that the returned string is to internal storage, and should not be modified or free'd by the caller. The string becomes invalid, with the rest of the font, when font is handed to Font.Close().
| font | the font to query. |
|
inline |
Query a font's weight, in terms of the lightness/heaviness of the strokes.
| font | the font to query. |
|
inline |
Query a font's current wrap alignment option.
| font | the font to query. |
|
inline |
Query the version of the FreeType library in use.
TTF.Init() should be called before calling this function.
| major | to be filled in with the major version number. Can be nullptr. |
| minor | to be filled in with the minor version number. Can be nullptr. |
| patch | to be filled in with the param version number. Can be nullptr. |
|
inline |
Get the font generation.
The generation is incremented each time font properties change that require rebuilding glyphs, such as style, size, etc.
Get the pixel image for a UNICODE codepoint.
| ch | the codepoint to check. |
| image_type | a pointer filled in with the glyph image type, may be nullptr. |
| Error | on failure. |
Get the pixel image for a UNICODE codepoint.
| font | the font to query. |
| ch | the codepoint to check. |
| image_type | a pointer filled in with the glyph image type, may be nullptr. |
| Error | on failure. |
|
inline |
Get the pixel image for a character index.
This is useful for text engine implementations, which can call this with the glyph_index in a TTF_CopyOperation
| glyph_index | the index of the glyph to return. |
| image_type | a pointer filled in with the glyph image type, may be nullptr. |
| Error | on failure. |
|
inline |
Get the pixel image for a character index.
This is useful for text engine implementations, which can call this with the glyph_index in a TTF_CopyOperation
| font | the font to query. |
| glyph_index | the index of the glyph to return. |
| image_type | a pointer filled in with the glyph image type, may be nullptr. |
| Error | on failure. |
Query the kerning size between the glyphs of two UNICODE codepoints.
| previous_ch | the previous codepoint. |
| ch | the current codepoint. |
| Error | on failure. |
Query the kerning size between the glyphs of two UNICODE codepoints.
| font | the font to query. |
| previous_ch | the previous codepoint. |
| ch | the current codepoint. |
| Error | on failure. |
|
inline |
Query the metrics (dimensions) of a font's glyph for a UNICODE codepoint.
To understand what these metrics mean, here is a useful link:
https://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html
| ch | the codepoint to check. |
| minx | a pointer filled in with the minimum x coordinate of the glyph from the left edge of its bounding box. This value may be negative. |
| maxx | a pointer filled in with the maximum x coordinate of the glyph from the left edge of its bounding box. |
| miny | a pointer filled in with the minimum y coordinate of the glyph from the bottom edge of its bounding box. This value may be negative. |
| maxy | a pointer filled in with the maximum y coordinate of the glyph from the bottom edge of its bounding box. |
| advance | a pointer filled in with the distance to the next glyph from the left edge of this glyph's bounding box. |
| Error | on failure. |
|
inline |
Query the metrics (dimensions) of a font's glyph for a UNICODE codepoint.
To understand what these metrics mean, here is a useful link:
https://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html
| font | the font to query. |
| ch | the codepoint to check. |
| minx | a pointer filled in with the minimum x coordinate of the glyph from the left edge of its bounding box. This value may be negative. |
| maxx | a pointer filled in with the maximum x coordinate of the glyph from the left edge of its bounding box. |
| miny | a pointer filled in with the minimum y coordinate of the glyph from the bottom edge of its bounding box. This value may be negative. |
| maxy | a pointer filled in with the maximum y coordinate of the glyph from the bottom edge of its bounding box. |
| advance | a pointer filled in with the distance to the next glyph from the left edge of this glyph's bounding box. |
| Error | on failure. |
Get the script used by a 32-bit codepoint.
| ch | the character code to check. |
| Error | on failure. |
Get the script used by a 32-bit codepoint.
| ch | the character code to check. |
| Error | on failure. |
|
inline |
Get the geometry data needed for drawing the text.
text must have been created using a TextEngine from CreateGPUTextEngine().
The positive X-axis is taken towards the right and the positive Y-axis is taken upwards for both the vertex and the texture coordinates, i.e, it follows the same convention used by the SDL_GPU API. If you want to use a different coordinate system you will need to transform the vertices yourself.
If the text looks blocky use linear filtering.
|
inline |
Get the geometry data needed for drawing the text.
text must have been created using a TextEngine from CreateGPUTextEngine().
The positive X-axis is taken towards the right and the positive Y-axis is taken upwards for both the vertex and the texture coordinates, i.e, it follows the same convention used by the SDL_GPU API. If you want to use a different coordinate system you will need to transform the vertices yourself.
If the text looks blocky use linear filtering.
| text | the text to draw. |
|
inline |
Get the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine.
| engine | a TextEngine object created with GPUTextEngine.GPUTextEngine(). |
|
inline |
Get the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine.
|
inline |
Query the version of the HarfBuzz library in use.
If HarfBuzz is not available, the version reported is 0.0.0.
| major | to be filled in with the major version number. Can be nullptr. |
| minor | to be filled in with the minor version number. Can be nullptr. |
| patch | to be filled in with the param version number. Can be nullptr. |
|
inline |
Query the total height of a font.
This is usually equal to point size.
|
inline |
Query a font's current FreeType hinter setting.
The hinter setting is a single value:
|
inline |
Query whether or not kerning is enabled for a font.
|
inline |
Query the spacing between lines of text for a font.
Get the next substring in a text object.
If called at the end of the text, this will return a zero length substring with the SUBSTRING_TEXT_END flag set.
| substring | the SubString to query. |
| next | a pointer filled in with the next substring. |
| Error | on failure. |
|
inline |
Get the next substring in a text object.
If called at the end of the text, this will return a zero length substring with the SUBSTRING_TEXT_END flag set.
| text | the Text to query. |
| substring | the SubString to query. |
| next | a pointer filled in with the next substring. |
| Error | on failure. |
|
inline |
Query the number of faces of a font.
|
inline |
Query the number of faces of a font.
| font | the font to query. |
|
inline |
Query a font's current outline.
|
inline |
Get the position of a text object.
| Error | on failure. |
|
inline |
Get the position of a text object.
| x | a pointer filled in with the x offset of the upper left corner of this text in pixels, may be nullptr. |
| y | a pointer filled in with the y offset of the upper left corner of this text in pixels, may be nullptr. |
| Error | on failure. |
|
inline |
Get the previous substring in a text object.
If called at the start of the text, this will return a zero length substring with the SUBSTRING_TEXT_START flag set.
| substring | the SubString to query. |
| previous | a pointer filled in with the previous substring in the text object. |
| Error | on failure. |
|
inline |
Get the previous substring in a text object.
If called at the start of the text, this will return a zero length substring with the SUBSTRING_TEXT_START flag set.
| text | the Text to query. |
| substring | the SubString to query. |
| previous | a pointer filled in with the previous substring in the text object. |
| Error | on failure. |
|
inline |
Get the properties associated with a font.
The following read-write properties are provided by SDL:
| Error | on failure. |
|
inline |
Get the properties associated with a text object.
| Error | on failure. |
|
inline |
Get the script used for text shaping a font.
|
inline |
Get the script used for text shaping a text object.
This defaults to the script of the font used by the text object.
|
inline |
Query whether Signed Distance Field rendering is enabled for a font.
|
inline |
Get the size of a font.
|
inline |
Get the size of a text object.
The size of the text may change when the font or font style and size change.
| Error | on failure. |
|
inline |
Get the size of a text object.
The size of the text may change when the font or font style and size change.
| w | a pointer filled in with the width of the text, in pixels, may be nullptr. |
| h | a pointer filled in with the height of the text, in pixels, may be nullptr. |
| Error | on failure. |
|
inline |
Calculate the dimensions of a rendered string of UTF-8 text.
This will report the width and height, in pixels, of the space that the specified string will take to fully render.
| text | text to calculate, in UTF-8 encoding. |
| w | will be filled with width, in pixels, on return. |
| h | will be filled with height, in pixels, on return. |
| Error | on failure. |
|
inline |
Calculate the dimensions of a rendered string of UTF-8 text.
This will report the width and height, in pixels, of the space that the specified string will take to fully render.
| font | the font to query. |
| text | text to calculate, in UTF-8 encoding. |
| w | will be filled with width, in pixels, on return. |
| h | will be filled with height, in pixels, on return. |
| Error | on failure. |
|
inline |
Calculate the dimensions of a rendered string of UTF-8 text.
This will report the width and height, in pixels, of the space that the specified string will take to fully render.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
| text | text to calculate, in UTF-8 encoding. |
| wrap_width | the maximum width or 0 to wrap on newline characters. |
| w | will be filled with width, in pixels, on return. |
| h | will be filled with height, in pixels, on return. |
| Error | on failure. |
|
inline |
Calculate the dimensions of a rendered string of UTF-8 text.
This will report the width and height, in pixels, of the space that the specified string will take to fully render.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
| font | the font to query. |
| text | text to calculate, in UTF-8 encoding. |
| wrap_width | the maximum width or 0 to wrap on newline characters. |
| w | will be filled with width, in pixels, on return. |
| h | will be filled with height, in pixels, on return. |
| Error | on failure. |
|
inline |
Query a font's current style.
The font styles are a set of bit flags, OR'd together:
|
inline |
Query a font's style name.
This string is dictated by the contents of the font file.
Note that the returned string is to internal storage, and should not be modified or free'd by the caller. The string becomes invalid, with the rest of the font, when font is handed to Font.Close().
|
inline |
Get the substring of a text object that surrounds a text offset.
If offset is less than 0, this will return a zero length substring at the beginning of the text with the SUBSTRING_TEXT_START flag set. If offset is greater than or equal to the length of the text string, this will return a zero length substring at the end of the text with the SUBSTRING_TEXT_END flag set.
| offset | a byte offset into the text string. |
| substring | a pointer filled in with the substring containing the offset. |
| Error | on failure. |
|
inline |
Get the substring of a text object that contains the given line.
If line is less than 0, this will return a zero length substring at the beginning of the text with the SUBSTRING_TEXT_START flag set. If line is greater than or equal to text->num_lines this will return a zero length substring at the end of the text with the SUBSTRING_TEXT_END flag set.
| line | a zero-based line index, in the range [0 .. text->num_lines-1]. |
| substring | a pointer filled in with the substring containing the offset. |
| Error | on failure. |
Get the portion of a text string that is closest to a point.
This will return the closest substring of text to the given point.
| p | the coordinates relative to the top-left side of the text, may be outside the bounds of the text area. |
| substring | a pointer filled in with the closest substring of text to the given point. |
| Error | on failure. |
|
inline |
Get the substrings of a text object that contain a range of text.
| offset | a byte offset into the text string. |
| length | the length of the range being queried, in bytes, or -1 for the remainder of the string. |
|
inline |
Get the color of a text object.
| text | the Text to query. |
| r | a pointer filled in with the red color value in the range of 0-255, may be nullptr. |
| g | a pointer filled in with the green color value in the range of 0-255, may be nullptr. |
| b | a pointer filled in with the blue color value in the range of 0-255, may be nullptr. |
| a | a pointer filled in with the alpha value in the range of 0-255, may be nullptr. |
| Error | on failure. |
Get the color of a text object.
| text | the Text to query. |
| Error | on failure. |
|
inline |
Get the color of a text object.
| text | the Text to query. |
| r | a pointer filled in with the red color value, normally in the range of 0-1, may be nullptr. |
| g | a pointer filled in with the green color value, normally in the range of 0-1, may be nullptr. |
| b | a pointer filled in with the blue color value, normally in the range of 0-1, may be nullptr. |
| a | a pointer filled in with the alpha value in the range of 0-1, may be nullptr. |
| Error | on failure. |
Get the color of a text object.
| text | the Text to query. |
| Error | on failure. |
|
inline |
Get the direction to be used for text shaping a text object.
This defaults to the direction of the font used by the text object.
| text | the text to query. |
|
inline |
Get the text engine used by a text object.
| text | the Text to query. |
| Error | on failure. |
|
inline |
Get the font used by a text object.
| text | the Text to query. |
| Error | on failure. |
|
inline |
Get the position of a text object.
| text | the Text to query. |
| x | a pointer filled in with the x offset of the upper left corner of this text in pixels, may be nullptr. |
| y | a pointer filled in with the y offset of the upper left corner of this text in pixels, may be nullptr. |
| Error | on failure. |
Get the position of a text object.
| text | the Text to query. |
| Error | on failure. |
|
inline |
|
inline |
Get the script used for text shaping a text object.
This defaults to the script of the font used by the text object.
| text | the text to query. |
|
inline |
Get the size of a text object.
The size of the text may change when the font or font style and size change.
| text | the Text to query. |
| w | a pointer filled in with the width of the text, in pixels, may be nullptr. |
| h | a pointer filled in with the height of the text, in pixels, may be nullptr. |
| Error | on failure. |
Get the size of a text object.
The size of the text may change when the font or font style and size change.
| text | the Text to query. |
| Error | on failure. |
|
inline |
Get the substring of a text object that surrounds a text offset.
If offset is less than 0, this will return a zero length substring at the beginning of the text with the SUBSTRING_TEXT_START flag set. If offset is greater than or equal to the length of the text string, this will return a zero length substring at the end of the text with the SUBSTRING_TEXT_END flag set.
| text | the Text to query. |
| offset | a byte offset into the text string. |
| substring | a pointer filled in with the substring containing the offset. |
| Error | on failure. |
|
inline |
Get the substring of a text object that contains the given line.
If line is less than 0, this will return a zero length substring at the beginning of the text with the SUBSTRING_TEXT_START flag set. If line is greater than or equal to text->num_lines this will return a zero length substring at the end of the text with the SUBSTRING_TEXT_END flag set.
| text | the Text to query. |
| line | a zero-based line index, in the range [0 .. text->num_lines-1]. |
| substring | a pointer filled in with the substring containing the offset. |
| Error | on failure. |
|
inline |
Get the portion of a text string that is closest to a point.
This will return the closest substring of text to the given point.
| text | the Text to query. |
| p | the coordinates relative to the top-left side of the text, may be outside the bounds of the text area. |
| substring | a pointer filled in with the closest substring of text to the given point. |
| Error | on failure. |
|
inline |
Get the substrings of a text object that contain a range of text.
| text | the Text to query. |
| offset | a byte offset into the text string. |
| length | the length of the range being queried, in bytes, or -1 for the remainder of the string. |
|
inline |
Get whether wrapping is enabled on a text object.
| text | the Text to query. |
| Error | on failure. |
|
inline |
Query a font's weight, in terms of the lightness/heaviness of the strokes.
|
inline |
Query a font's current wrap alignment option.
|
inline |
Get whether wrapping is enabled on a text object.
| Error | on failure. |
|
inline |
Create a text engine for drawing text with the SDL GPU API.
| device | the GPUDevice to use for creating textures and drawing text. |
|
inline |
Create a text engine for drawing text with the SDL GPU API, with the specified properties.
These are the supported properties:
| props | the properties to use. |
|
inline |
Check whether a glyph is provided by the font for a UNICODE codepoint.
| ch | the codepoint to check. |
|
inline |
Insert UTF-8 text into a text object.
This function may cause the internal text representation to be rebuilt.
| offset | the offset, in bytes, from the beginning of the string if >= 0, the offset from the end of the string if < 0. Note that this does not do UTF-8 validation, so you should only insert at UTF-8 sequence boundaries. |
| string | the UTF-8 text to insert. |
| Error | on failure. |
|
inline |
Insert UTF-8 text into a text object.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| offset | the offset, in bytes, from the beginning of the string if >= 0, the offset from the end of the string if < 0. Note that this does not do UTF-8 validation, so you should only insert at UTF-8 sequence boundaries. |
| string | the UTF-8 text to insert. |
| Error | on failure. |
|
inline |
Query whether a font is fixed-width.
A "fixed-width" font means all glyphs are the same width across; a lowercase 'i' will be the same size across as a capital 'W', for example. This is common for terminals and text editors, and other apps that treat text as a grid. Most other things (WYSIWYG word processors, web pages, etc) are more likely to not be fixed-width in most cases.
|
inline |
Query whether a font is scalable or not.
Scalability lets us distinguish between outline and bitmap fonts.
|
inline |
Return whether whitespace is shown when wrapping a text object.
|
inline |
Calculate how much of a UTF-8 string will fit in a given width.
This reports the number of characters that can be rendered before reaching max_width.
This does not need to render the string to do this calculation.
| text | text to calculate, in UTF-8 encoding. |
| max_width | maximum width, in pixels, available for the string, or 0 for unbounded width. |
| measured_width | a pointer filled in with the width, in pixels, of the string that will fit, may be nullptr. |
| measured_length | a pointer filled in with the length, in bytes, of the string that will fit, may be nullptr. |
| Error | on failure. |
|
inline |
Calculate how much of a UTF-8 string will fit in a given width.
This reports the number of characters that can be rendered before reaching max_width.
This does not need to render the string to do this calculation.
| font | the font to query. |
| text | text to calculate, in UTF-8 encoding. |
| max_width | maximum width, in pixels, available for the string, or 0 for unbounded width. |
| measured_width | a pointer filled in with the width, in pixels, of the string that will fit, may be nullptr. |
| measured_length | a pointer filled in with the length, in bytes, of the string that will fit, may be nullptr. |
| Error | on failure. |
|
inline |
Create a font from a file, using a specified point size.
Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
When done with the returned Font, use Font.Close() to dispose of it.
| file | path to font file. |
| ptsize | point size to use for the newly-opened font. |
| Error | on failure. |
|
inline |
Create a font from an IOStream, using a specified point size.
Some .fon fonts will have several sizes embedded in the file, so the point size becomes the index of choosing which size. If the value is too high, the last indexed size will be the default.
If closeio is true, src will be automatically closed once the font is closed. Otherwise you should keep src open until the font is closed.
When done with the returned Font, use Font.Close() to dispose of it.
| src | an IOStream to provide a font file's data. |
| ptsize | point size to use for the newly-opened font. |
| closeio | true to close src when the font is closed, false to leave it open. |
| Error | on failure. |
|
inline |
Create a font with the specified properties.
These are the supported properties:
| props | the properties to use. |
| Error | on failure. |
|
inline |
Remove a fallback font.
This updates any Text objects using this font.
| fallback | the font to remove as a fallback. |
Remove a fallback font.
This updates any Text objects using this font.
| font | the font to modify. |
| fallback | the font to remove as a fallback. |
|
inline |
Create a text engine for drawing text on an SDL renderer, with the specified properties.
These are the supported properties:
| props | the properties to use. |
|
inline |
Create a text engine for drawing text on an SDL renderer.
| renderer | the renderer to use for creating textures and drawing text. |
Render a single UNICODE codepoint at high quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, using alpha blending to dither the font with the given color. This function returns the new surface, or nullptr if there was an error.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Solid, Font.RenderGlyph_Shaded, and Font.RenderGlyph_LCD.
| ch | the codepoint to render. |
| fg | the foreground color for the text. |
Render a single UNICODE codepoint at high quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, using alpha blending to dither the font with the given color. This function returns the new surface, or nullptr if there was an error.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Solid, Font.RenderGlyph_Shaded, and Font.RenderGlyph_LCD.
| font | the font to render with. |
| ch | the codepoint to render. |
| fg | the foreground color for the text. |
Render a single UNICODE codepoint at LCD subpixel quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, and render alpha-blended text using FreeType's LCD subpixel rendering. This function returns the new surface, or nullptr if there was an error.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Solid, Font.RenderGlyph_Shaded, and Font.RenderGlyph_Blended.
| ch | the codepoint to render. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
Render a single UNICODE codepoint at LCD subpixel quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, and render alpha-blended text using FreeType's LCD subpixel rendering. This function returns the new surface, or nullptr if there was an error.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Solid, Font.RenderGlyph_Shaded, and Font.RenderGlyph_Blended.
| font | the font to render with. |
| ch | the codepoint to render. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
Render a single UNICODE codepoint at high quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the specified background color, while other pixels have varying degrees of the foreground color. This function returns the new surface, or nullptr if there was an error.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Solid, Font.RenderGlyph_Blended, and Font.RenderGlyph_LCD.
| ch | the codepoint to render. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
Render a single UNICODE codepoint at high quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the specified background color, while other pixels have varying degrees of the foreground color. This function returns the new surface, or nullptr if there was an error.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Solid, Font.RenderGlyph_Blended, and Font.RenderGlyph_LCD.
| font | the font to render with. |
| ch | the codepoint to render. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
Render a single 32-bit glyph at fast quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the colorkey, giving a transparent background. The 1 pixel will be set to the text color.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Shaded, Font.RenderGlyph_Blended, and Font.RenderGlyph_LCD.
| ch | the character to render. |
| fg | the foreground color for the text. |
Render a single 32-bit glyph at fast quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the colorkey, giving a transparent background. The 1 pixel will be set to the text color.
The glyph is rendered without any padding or centering in the X direction, and aligned normally in the Y direction.
You can render at other quality levels with Font.RenderGlyph_Shaded, Font.RenderGlyph_Blended, and Font.RenderGlyph_LCD.
| font | the font to render with. |
| ch | the character to render. |
| fg | the foreground color for the text. |
Render UTF-8 text at high quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, using alpha blending to dither the font with the given color. This function returns the new surface, or nullptr if there was an error.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_Blended_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid, Font.RenderText_Shaded, and Font.RenderText_LCD.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
Render UTF-8 text at high quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, using alpha blending to dither the font with the given color. This function returns the new surface, or nullptr if there was an error.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_Blended_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid, Font.RenderText_Shaded, and Font.RenderText_LCD.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
|
inline |
Render word-wrapped UTF-8 text at high quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, using alpha blending to dither the font with the given color. This function returns the new surface, or nullptr if there was an error.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid_Wrapped, Font.RenderText_Shaded_Wrapped, and Font.RenderText_LCD_Wrapped.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| wrap_width | the maximum width of the text surface or 0 to wrap on newline characters. |
|
inline |
Render word-wrapped UTF-8 text at high quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, using alpha blending to dither the font with the given color. This function returns the new surface, or nullptr if there was an error.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid_Wrapped, Font.RenderText_Shaded_Wrapped, and Font.RenderText_LCD_Wrapped.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| wrap_width | the maximum width of the text surface or 0 to wrap on newline characters. |
Render UTF-8 text at LCD subpixel quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, and render alpha-blended text using FreeType's LCD subpixel rendering. This function returns the new surface, or nullptr if there was an error.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_LCD_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid, Font.RenderText_Shaded, and Font.RenderText_Blended.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
Render UTF-8 text at LCD subpixel quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, and render alpha-blended text using FreeType's LCD subpixel rendering. This function returns the new surface, or nullptr if there was an error.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_LCD_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid, Font.RenderText_Shaded, and Font.RenderText_Blended.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
|
inline |
Render word-wrapped UTF-8 text at LCD subpixel quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, and render alpha-blended text using FreeType's LCD subpixel rendering. This function returns the new surface, or nullptr if there was an error.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid_Wrapped, Font.RenderText_Shaded_Wrapped, and Font.RenderText_Blended_Wrapped.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
| wrap_width | the maximum width of the text surface or 0 to wrap on newline characters. |
|
inline |
Render word-wrapped UTF-8 text at LCD subpixel quality to a new ARGB surface.
This function will allocate a new 32-bit, ARGB surface, and render alpha-blended text using FreeType's LCD subpixel rendering. This function returns the new surface, or nullptr if there was an error.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid_Wrapped, Font.RenderText_Shaded_Wrapped, and Font.RenderText_Blended_Wrapped.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
| wrap_width | the maximum width of the text surface or 0 to wrap on newline characters. |
Render UTF-8 text at high quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the specified background color, while other pixels have varying degrees of the foreground color. This function returns the new surface, or nullptr if there was an error.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_Shaded_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid, Font.RenderText_Blended, and Font.RenderText_LCD.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
Render UTF-8 text at high quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the specified background color, while other pixels have varying degrees of the foreground color. This function returns the new surface, or nullptr if there was an error.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_Shaded_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid, Font.RenderText_Blended, and Font.RenderText_LCD.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
|
inline |
Render word-wrapped UTF-8 text at high quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the specified background color, while other pixels have varying degrees of the foreground color. This function returns the new surface, or nullptr if there was an error.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid_Wrapped, Font.RenderText_Blended_Wrapped, and Font.RenderText_LCD_Wrapped.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
| wrap_width | the maximum width of the text surface or 0 to wrap on newline characters. |
|
inline |
Render word-wrapped UTF-8 text at high quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the specified background color, while other pixels have varying degrees of the foreground color. This function returns the new surface, or nullptr if there was an error.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrap_width in pixels.
If wrap_width is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Solid_Wrapped, Font.RenderText_Blended_Wrapped, and Font.RenderText_LCD_Wrapped.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| bg | the background color for the text. |
| wrap_width | the maximum width of the text surface or 0 to wrap on newline characters. |
Render UTF-8 text at fast quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the colorkey, giving a transparent background. The 1 pixel will be set to the text color.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_Solid_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Shaded, Font.RenderText_Blended, and Font.RenderText_LCD.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
Render UTF-8 text at fast quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the colorkey, giving a transparent background. The 1 pixel will be set to the text color.
This will not word-wrap the string; you'll get a surface with a single line of text, as long as the string requires. You can use Font.RenderText_Solid_Wrapped() instead if you need to wrap the output to multiple lines.
This will not wrap on newline characters.
You can render at other quality levels with Font.RenderText_Shaded, Font.RenderText_Blended, and Font.RenderText_LCD.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
|
inline |
Render word-wrapped UTF-8 text at fast quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the colorkey, giving a transparent background. The 1 pixel will be set to the text color.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrapLength in pixels.
If wrapLength is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Shaded_Wrapped, Font.RenderText_Blended_Wrapped, and Font.RenderText_LCD_Wrapped.
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| wrapLength | the maximum width of the text surface or 0 to wrap on newline characters. |
|
inline |
Render word-wrapped UTF-8 text at fast quality to a new 8-bit surface.
This function will allocate a new 8-bit, palettized surface. The surface's 0 pixel will be the colorkey, giving a transparent background. The 1 pixel will be set to the text color.
Text is wrapped to multiple lines on line endings and on word boundaries if it extends beyond wrapLength in pixels.
If wrapLength is 0, this function will only wrap on newline characters.
You can render at other quality levels with Font.RenderText_Shaded_Wrapped, Font.RenderText_Blended_Wrapped, and Font.RenderText_LCD_Wrapped.
| font | the font to render with. |
| text | text to render, in UTF-8 encoding. |
| fg | the foreground color for the text. |
| wrapLength | the maximum width of the text surface or 0 to wrap on newline characters. |
|
inline |
Set the color of a text object.
The default text color is white (255, 255, 255, 255).
| c | the color values in the range of 0-255. |
| Error | on failure. |
|
inline |
Set the color of a text object.
The default text color is white (1.0f, 1.0f, 1.0f, 1.0f).
| c | the color value, normally in the range of 0-1. |
| Error | on failure. |
|
inline |
Set the direction to be used for text shaping by a font.
This function only supports left-to-right text shaping if SDL_ttf was not built with HarfBuzz support.
This updates any Text objects using this font.
| direction | the new direction for text to flow. |
| Error | on failure. |
|
inline |
Set the direction to be used for text shaping a text object.
This function only supports left-to-right text shaping if SDL_ttf was not built with HarfBuzz support.
| direction | the new direction for text to flow. |
| Error | on failure. |
|
inline |
Set the text engine used by a text object.
This function may cause the internal text representation to be rebuilt.
| engine | the text engine to use for drawing. |
| Error | on failure. |
|
inline |
Set the font used by a text object.
When a text object has a font, any changes to the font will automatically regenerate the text. If you set the font to nullptr, the text will continue to render but changes to the font will no longer affect the text.
This function may cause the internal text representation to be rebuilt.
| font | the font to use, may be nullptr. |
Set the direction to be used for text shaping by a font.
This function only supports left-to-right text shaping if SDL_ttf was not built with HarfBuzz support.
This updates any Text objects using this font.
| font | the font to modify. |
| direction | the new direction for text to flow. |
| Error | on failure. |
|
inline |
Set a font's current hinter setting.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
The hinter setting is a single value:
| font | the font to set a new hinter setting on. |
| hinting | the new hinter setting. |
|
inline |
Set if kerning is enabled for a font.
Newly-opened fonts default to allowing kerning. This is generally a good policy unless you have a strong reason to disable it, as it tends to produce better rendering (with kerning disabled, some fonts might render the word kerning as something that looks like keming for example).
This updates any Text objects using this font.
| font | the font to set kerning on. |
| enabled | true to enable kerning, false to disable. |
|
inline |
Set language to be used for text shaping by a font.
If SDL_ttf was not built with HarfBuzz support, this function returns false.
This updates any Text objects using this font.
| font | the font to specify a language for. |
| language_bcp47 | a null-terminated string containing the desired language's BCP47 code. Or null to reset the value. |
| Error | on failure. |
|
inline |
Set the spacing between lines of text for a font.
This updates any Text objects using this font.
| font | the font to modify. |
| lineskip | the new line spacing for the font. |
|
inline |
Set a font's current outline.
This uses the font properties prop::Font.OUTLINE_LINE_CAP_NUMBER, prop::Font.OUTLINE_LINE_JOIN_NUMBER, and prop::Font.OUTLINE_MITER_LIMIT_NUMBER when setting the font outline.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| font | the font to set a new outline on. |
| outline | positive outline value, 0 to default. |
| Error | on failure. |
Set the script to be used for text shaping by a font.
This returns false if SDL_ttf isn't built with HarfBuzz support.
This updates any Text objects using this font.
| font | the font to modify. |
| script | an ISO 15924 code. |
| Error | on failure. |
|
inline |
Enable Signed Distance Field rendering for a font.
SDF is a technique that helps fonts look sharp even when scaling and rotating, and requires special shader support for display.
This works with Blended APIs, and generates the raw signed distance values in the alpha channel of the resulting texture.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| font | the font to set SDF support on. |
| enabled | true to enable SDF, false to disable. |
| Error | on failure. |
|
inline |
Set a font's size dynamically.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| font | the font to resize. |
| ptsize | the new point size. |
| Error | on failure. |
|
inline |
Set font size dynamically with target resolutions, in dots per inch.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| font | the font to resize. |
| ptsize | the new point size. |
| hdpi | the target horizontal DPI. |
| vdpi | the target vertical DPI. |
| Error | on failure. |
|
inline |
Set a font's current style.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
The font styles are a set of bit flags, OR'd together:
| font | the font to set a new style on. |
| style | the new style values to set, OR'd together. |
|
inline |
Set a font's current wrap alignment option.
This updates any Text objects using this font.
| font | the font to set a new wrap alignment option on. |
| align | the new wrap alignment option. |
|
inline |
Sets the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine.
| engine | a TextEngine object created with GPUTextEngine.GPUTextEngine(). |
| winding | the new winding order option. |
|
inline |
Sets the winding order of the vertices returned by Text.GetGPUDrawData for a particular GPU text engine.
| winding | the new winding order option. |
|
inline |
Set a font's current hinter setting.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
The hinter setting is a single value:
| hinting | the new hinter setting. |
|
inline |
Set if kerning is enabled for a font.
Newly-opened fonts default to allowing kerning. This is generally a good policy unless you have a strong reason to disable it, as it tends to produce better rendering (with kerning disabled, some fonts might render the word kerning as something that looks like keming for example).
This updates any Text objects using this font.
| enabled | true to enable kerning, false to disable. |
|
inline |
Set language to be used for text shaping by a font.
If SDL_ttf was not built with HarfBuzz support, this function returns false.
This updates any Text objects using this font.
| language_bcp47 | a null-terminated string containing the desired language's BCP47 code. Or null to reset the value. |
| Error | on failure. |
|
inline |
Set the spacing between lines of text for a font.
This updates any Text objects using this font.
| lineskip | the new line spacing for the font. |
|
inline |
Set a font's current outline.
This uses the font properties prop::Font.OUTLINE_LINE_CAP_NUMBER, prop::Font.OUTLINE_LINE_JOIN_NUMBER, and prop::Font.OUTLINE_MITER_LIMIT_NUMBER when setting the font outline.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| outline | positive outline value, 0 to default. |
| Error | on failure. |
|
inline |
Set the position of a text object.
This can be used to position multiple text objects within a single wrapping text area.
This function may cause the internal text representation to be rebuilt.
| p | the x, y offset of the upper left corner of this text in pixels. |
| Error | on failure. |
|
inline |
Set the script to be used for text shaping by a font.
This returns false if SDL_ttf isn't built with HarfBuzz support.
This updates any Text objects using this font.
| script | an ISO 15924 code. |
| Error | on failure. |
|
inline |
Set the script to be used for text shaping a text object.
This returns false if SDL_ttf isn't built with HarfBuzz support.
| script | an ISO 15924 code. |
| Error | on failure. |
|
inline |
Enable Signed Distance Field rendering for a font.
SDF is a technique that helps fonts look sharp even when scaling and rotating, and requires special shader support for display.
This works with Blended APIs, and generates the raw signed distance values in the alpha channel of the resulting texture.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| enabled | true to enable SDF, false to disable. |
| Error | on failure. |
|
inline |
Set a font's size dynamically.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| ptsize | the new point size. |
| Error | on failure. |
|
inline |
Set font size dynamically with target resolutions, in dots per inch.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
| ptsize | the new point size. |
| hdpi | the target horizontal DPI. |
| vdpi | the target vertical DPI. |
| Error | on failure. |
|
inline |
Set the UTF-8 text used by a text object.
This function may cause the internal text representation to be rebuilt.
| string | the UTF-8 text to use. |
| Error | on failure. |
|
inline |
Set a font's current style.
This updates any Text objects using this font, and clears already-generated glyphs, if any, from the cache.
The font styles are a set of bit flags, OR'd together:
| style | the new style values to set, OR'd together. |
Set the color of a text object.
The default text color is white (255, 255, 255, 255).
| text | the Text to modify. |
| c | the color value in the range of 0-255. |
| Error | on failure. |
Set the color of a text object.
The default text color is white (1.0f, 1.0f, 1.0f, 1.0f).
| text | the Text to modify. |
| c | the color value, normally in the range of 0-1. |
| Error | on failure. |
Set the direction to be used for text shaping a text object.
This function only supports left-to-right text shaping if SDL_ttf was not built with HarfBuzz support.
| text | the text to modify. |
| direction | the new direction for text to flow. |
| Error | on failure. |
|
inline |
Set the text engine used by a text object.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| engine | the text engine to use for drawing. |
| Error | on failure. |
Set the font used by a text object.
When a text object has a font, any changes to the font will automatically regenerate the text. If you set the font to nullptr, the text will continue to render but changes to the font will no longer affect the text.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| font | the font to use, may be nullptr. |
Set the position of a text object.
This can be used to position multiple text objects within a single wrapping text area.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| p | the x, y offset of the upper left corner of this text in pixels. |
| Error | on failure. |
Set the script to be used for text shaping a text object.
This returns false if SDL_ttf isn't built with HarfBuzz support.
| text | the text to modify. |
| script | an ISO 15924 code. |
| Error | on failure. |
|
inline |
Set the UTF-8 text used by a text object.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| string | the UTF-8 text to use, may be nullptr. |
| Error | on failure. |
|
inline |
Set whether whitespace should be visible when wrapping a text object.
If the whitespace is visible, it will take up space for purposes of alignment and wrapping. This is good for editing, but looks better when centered or aligned if whitespace around line wrapping is hidden. This defaults false.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| visible | true to show whitespace when wrapping text, false to hide it. |
| Error | on failure. |
|
inline |
Set whether wrapping is enabled on a text object.
This function may cause the internal text representation to be rebuilt.
| text | the Text to modify. |
| wrap_width | the maximum width in pixels, 0 to wrap on newline characters. |
| Error | on failure. |
|
inline |
Set a font's current wrap alignment option.
This updates any Text objects using this font.
| align | the new wrap alignment option. |
|
inline |
Set whether whitespace should be visible when wrapping a text object.
If the whitespace is visible, it will take up space for purposes of alignment and wrapping. This is good for editing, but looks better when centered or aligned if whitespace around line wrapping is hidden. This defaults false.
This function may cause the internal text representation to be rebuilt.
| visible | true to show whitespace when wrapping text, false to hide it. |
| Error | on failure. |
|
inline |
Set whether wrapping is enabled on a text object.
This function may cause the internal text representation to be rebuilt.
| wrap_width | the maximum width in pixels, 0 to wrap on newline characters. |
| Error | on failure. |
|
inline |
Convert from a 4 character string to a 32-bit tag.
| string | the 4 character string to convert. |
|
inline |
Create a text engine for drawing text on SDL surfaces.
|
inline |
Convert from a 32-bit tag to a 4 character string.
| tag | the 32-bit tag to convert. |
| string | a pointer filled in with the 4 character representation of the tag. |
| size | the size of the buffer pointed at by string, should be at least 4. |
|
inline |
Create a text object from UTF-8 text and a text engine.
| engine | the text engine to use when creating the text object, may be nullptr. |
| font | the font to render with. |
| text | the text to use, in UTF-8 encoding. |
|
inline |
Return whether whitespace is shown when wrapping a text object.
| text | the Text to query. |
|
inline |
Update the layout of a text object.
This is automatically done when the layout is requested or the text is rendered, but you can call this if you need more control over the timing of when the layout and text engine representation are updated.
| Error | on failure. |
|
inline |
Update the layout of a text object.
This is automatically done when the layout is requested or the text is rendered, but you can call this if you need more control over the timing of when the layout and text engine representation are updated.
| text | the Text to update. |
| Error | on failure. |
|
constexpr |
Black (900) named font weight value.
|
constexpr |
Bold (700) named font weight value.
|
constexpr |
ExtraBlack (950) named font weight value.
|
constexpr |
ExtraBold (800) named font weight value.
|
constexpr |
ExtraLight (200) named font weight value.
|
constexpr |
Light (300) named font weight value.
|
constexpr |
Medium (500) named font weight value.
|
constexpr |
Normal (400) named font weight value.
|
constexpr |
SemiBold (600) named font weight value.
|
constexpr |
Thin (100) named font weight value.
|
constexpr |
CLOCKWISE.
|
constexpr |
COUNTER_CLOCKWISE.
|
constexpr |
INVALID.
|
constexpr |
Normal hinting applies standard grid-fitting.
|
constexpr |
CENTER.
|
constexpr |
INVALID.
|
constexpr |
LEFT.
|
constexpr |
RIGHT.
|
constexpr |
The color channels are white.
|
constexpr |
The color channels have image data.
|
constexpr |
Strikethrough text.
|
constexpr |
Underlined text.
|
constexpr |
The mask for the flow direction for this substring.
|
constexpr |
This substring contains the end of the text.
|
constexpr |
This substring contains the beginning of the text.