Skip to main content

Crate sdl_ttf_sys

Crate sdl_ttf_sys 

Source

Modules§

constants
Generated constants

Structs§

TTF_Direction
Direction flags
TTF_Font
TTF_GPUAtlasDrawSequence
Draw sequence returned by TTF_GetGPUTextDrawData
TTF_GPUTextEngineWinding
The winding order of the vertices returned by TTF_GetGPUTextDrawData
TTF_HintingFlags
Hinting flags for TTF (TrueType Fonts)
TTF_HorizontalAlignment
The horizontal alignment used when rendering wrapped text.
TTF_ImageType
The type of data in a glyph image
TTF_SubString
The representation of a substring within text.
TTF_Text
Text created with TTF_CreateText()
TTF_TextData
TTF_TextEngine

Constants§

SDL_TTF_MAJOR_VERSION
SDL_TTF_MICRO_VERSION
SDL_TTF_MINOR_VERSION
TTF_FONT_WEIGHT_BLACK
TTF_FONT_WEIGHT_BOLD
TTF_FONT_WEIGHT_EXTRA_BLACK
TTF_FONT_WEIGHT_EXTRA_BOLD
TTF_FONT_WEIGHT_EXTRA_LIGHT
TTF_FONT_WEIGHT_LIGHT
TTF_FONT_WEIGHT_MEDIUM
TTF_FONT_WEIGHT_NORMAL
TTF_FONT_WEIGHT_SEMI_BOLD
TTF_FONT_WEIGHT_THIN
TTF_PROP_FONT_CREATE_EXISTING_FONT_POINTER
TTF_PROP_FONT_CREATE_FACE_NUMBER
TTF_PROP_FONT_CREATE_FILENAME_STRING
TTF_PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER
TTF_PROP_FONT_CREATE_IOSTREAM_AUTOCLOSE_BOOLEAN
TTF_PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER
TTF_PROP_FONT_CREATE_IOSTREAM_POINTER
TTF_PROP_FONT_CREATE_SIZE_FLOAT
TTF_PROP_FONT_CREATE_VERTICAL_DPI_NUMBER
TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER
TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER
TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER
TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER
TTF_PROP_GPU_TEXT_ENGINE_DEVICE_POINTER
TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE_NUMBER
TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER_POINTER
TTF_STYLE_BOLD
TTF_STYLE_ITALIC
TTF_STYLE_NORMAL
TTF_STYLE_STRIKETHROUGH
TTF_STYLE_UNDERLINE
TTF_SUBSTRING_DIRECTION_MASK
TTF_SUBSTRING_LINE_END
TTF_SUBSTRING_LINE_START
TTF_SUBSTRING_TEXT_END
TTF_SUBSTRING_TEXT_START

Functions§

TTF_AddFallbackFont
Add a fallback font.
TTF_AppendTextString
Append UTF-8 text to a text object.
TTF_ClearFallbackFonts
Remove all fallback fonts.
TTF_CloseFont
Dispose of a previously-created font.
TTF_CopyFont
Create a copy of an existing font.
TTF_CreateGPUTextEngine
Create a text engine for drawing text with the SDL GPU API.
TTF_CreateGPUTextEngineWithProperties
Create a text engine for drawing text with the SDL GPU API, with the specified properties.
TTF_CreateRendererTextEngine
Create a text engine for drawing text on an SDL renderer.
TTF_CreateRendererTextEngineWithProperties
Create a text engine for drawing text on an SDL renderer, with the specified properties.
TTF_CreateSurfaceTextEngine
Create a text engine for drawing text on SDL surfaces.
TTF_CreateText
Create a text object from UTF-8 text and a text engine.
TTF_DeleteTextString
Delete UTF-8 text from a text object.
TTF_DestroyGPUTextEngine
Destroy a text engine created for drawing text with the SDL GPU API.
TTF_DestroyRendererTextEngine
Destroy a text engine created for drawing text on an SDL renderer.
TTF_DestroySurfaceTextEngine
Destroy a text engine created for drawing text on SDL surfaces.
TTF_DestroyText
Destroy a text object created by a text engine.
TTF_DrawRendererText
Draw text to an SDL renderer.
TTF_DrawSurfaceText
Draw text to an SDL surface.
TTF_FontHasGlyph
Check whether a glyph is provided by the font for a UNICODE codepoint.
TTF_FontIsFixedWidth
Query whether a font is fixed-width.
TTF_FontIsScalable
Query whether a font is scalable or not.
TTF_GetFontAscent
Query the offset from the baseline to the top of a font.
TTF_GetFontCharSpacing
Get the additional character spacing in pixels to be applied between any two rendered characters.
TTF_GetFontDPI
Get font target resolutions, in dots per inch.
TTF_GetFontDescent
Query the offset from the baseline to the bottom of a font.
TTF_GetFontDirection
Get the direction to be used for text shaping by a font.
TTF_GetFontFamilyName
Query a font’s family name.
TTF_GetFontGeneration
Get the font generation.
TTF_GetFontHeight
Query the total height of a font.
TTF_GetFontHinting
Query a font’s current FreeType hinter setting.
TTF_GetFontKerning
Query whether or not kerning is enabled for a font.
TTF_GetFontLineSkip
Query the spacing between lines of text for a font.
TTF_GetFontOutline
Query a font’s current outline.
TTF_GetFontProperties
Get the properties associated with a font.
TTF_GetFontSDF
Query whether Signed Distance Field rendering is enabled for a font.
TTF_GetFontScript
Get the script used for text shaping a font.
TTF_GetFontSize
Get the size of a font.
TTF_GetFontStyle
Query a font’s current style.
TTF_GetFontStyleName
Query a font’s style name.
TTF_GetFontWeight
Query a font’s weight, in terms of the lightness/heaviness of the strokes.
TTF_GetFontWrapAlignment
Query a font’s current wrap alignment option.
TTF_GetFreeTypeVersion
Query the version of the FreeType library in use.
TTF_GetGPUTextDrawData
Get the geometry data needed for drawing the text.
TTF_GetGPUTextEngineWinding
Get the winding order of the vertices returned by TTF_GetGPUTextDrawData for a particular GPU text engine
TTF_GetGlyphImage
Get the pixel image for a UNICODE codepoint.
TTF_GetGlyphImageForIndex
Get the pixel image for a character index.
TTF_GetGlyphKerning
Query the kerning size between the glyphs of two UNICODE codepoints.
TTF_GetGlyphMetrics
Query the metrics (dimensions) of a font’s glyph for a UNICODE codepoint.
TTF_GetGlyphScript
Get the script used by a 32-bit codepoint.
TTF_GetHarfBuzzVersion
Query the version of the HarfBuzz library in use.
TTF_GetNextTextSubString
Get the next substring in a text object
TTF_GetNumFontFaces
Query the number of faces of a font.
TTF_GetPreviousTextSubString
Get the previous substring in a text object
TTF_GetStringSize
Calculate the dimensions of a rendered string of UTF-8 text.
TTF_GetStringSizeWrapped
Calculate the dimensions of a rendered string of UTF-8 text.
TTF_GetTextColor
Get the color of a text object.
TTF_GetTextColorFloat
Get the color of a text object.
TTF_GetTextDirection
Get the direction to be used for text shaping a text object.
TTF_GetTextEngine
Get the text engine used by a text object.
TTF_GetTextFont
Get the font used by a text object.
TTF_GetTextPosition
Get the position of a text object.
TTF_GetTextProperties
Get the properties associated with a text object.
TTF_GetTextScript
Get the script used for text shaping a text object.
TTF_GetTextSize
Get the size of a text object.
TTF_GetTextSubString
Get the substring of a text object that surrounds a text offset.
TTF_GetTextSubStringForLine
Get the substring of a text object that contains the given line.
TTF_GetTextSubStringForPoint
Get the portion of a text string that is closest to a point.
TTF_GetTextSubStringsForRange
Get the substrings of a text object that contain a range of text.
TTF_GetTextWrapWidth
Get whether wrapping is enabled on a text object.
TTF_Init
Initialize SDL_ttf.
TTF_InsertTextString
Insert UTF-8 text into a text object.
TTF_MeasureString
Calculate how much of a UTF-8 string will fit in a given width.
TTF_OpenFont
Create a font from a file, using a specified point size.
TTF_OpenFontIO
Create a font from an SDL_IOStream, using a specified point size.
TTF_OpenFontWithProperties
Create a font with the specified properties.
TTF_Quit
Deinitialize SDL_ttf.
TTF_RemoveFallbackFont
Remove a fallback font.
TTF_RenderGlyph_Blended
Render a single UNICODE codepoint at high quality to a new ARGB surface.
TTF_RenderGlyph_LCD
Render a single UNICODE codepoint at LCD subpixel quality to a new ARGB surface.
TTF_RenderGlyph_Shaded
Render a single UNICODE codepoint at high quality to a new 8-bit surface.
TTF_RenderGlyph_Solid
Render a single 32-bit glyph at fast quality to a new 8-bit surface.
TTF_RenderText_Blended
Render UTF-8 text at high quality to a new ARGB surface.
TTF_RenderText_Blended_Wrapped
Render word-wrapped UTF-8 text at high quality to a new ARGB surface.
TTF_RenderText_LCD
Render UTF-8 text at LCD subpixel quality to a new ARGB surface.
TTF_RenderText_LCD_Wrapped
Render word-wrapped UTF-8 text at LCD subpixel quality to a new ARGB surface.
TTF_RenderText_Shaded
Render UTF-8 text at high quality to a new 8-bit surface.
TTF_RenderText_Shaded_Wrapped
Render word-wrapped UTF-8 text at high quality to a new 8-bit surface.
TTF_RenderText_Solid
Render UTF-8 text at fast quality to a new 8-bit surface.
TTF_RenderText_Solid_Wrapped
Render word-wrapped UTF-8 text at fast quality to a new 8-bit surface.
TTF_SetFontCharSpacing
Set additional space in pixels to be applied between any two rendered characters.
TTF_SetFontDirection
Set the direction to be used for text shaping by a font.
TTF_SetFontHinting
Set a font’s current hinter setting.
TTF_SetFontKerning
Set if kerning is enabled for a font.
TTF_SetFontLanguage
Set language to be used for text shaping by a font.
TTF_SetFontLineSkip
Set the spacing between lines of text for a font.
TTF_SetFontOutline
Set a font’s current outline.
TTF_SetFontSDF
Enable Signed Distance Field rendering for a font.
TTF_SetFontScript
Set the script to be used for text shaping by a font.
TTF_SetFontSize
Set a font’s size dynamically.
TTF_SetFontSizeDPI
Set font size dynamically with target resolutions, in dots per inch.
TTF_SetFontStyle
Set a font’s current style.
TTF_SetFontWrapAlignment
Set a font’s current wrap alignment option.
TTF_SetGPUTextEngineWinding
Sets the winding order of the vertices returned by TTF_GetGPUTextDrawData for a particular GPU text engine.
TTF_SetTextColor
Set the color of a text object.
TTF_SetTextColorFloat
Set the color of a text object.
TTF_SetTextDirection
Set the direction to be used for text shaping a text object.
TTF_SetTextEngine
Set the text engine used by a text object.
TTF_SetTextFont
Set the font used by a text object.
TTF_SetTextPosition
Set the position of a text object.
TTF_SetTextScript
Set the script to be used for text shaping a text object.
TTF_SetTextString
Set the UTF-8 text used by a text object.
TTF_SetTextWrapWhitespaceVisible
Set whether whitespace should be visible when wrapping a text object.
TTF_SetTextWrapWidth
Set whether wrapping is enabled on a text object.
TTF_StringToTag
Convert from a 4 character string to a 32-bit tag.
TTF_TagToString
Convert from a 32-bit tag to a 4 character string.
TTF_TextWrapWhitespaceVisible
Return whether whitespace is shown when wrapping a text object.
TTF_UpdateText
Update the layout of a text object.
TTF_Version
This function gets the version of the dynamically linked SDL_ttf library.
TTF_WasInit
Check if SDL_ttf is initialized.

Type Aliases§

TTF_FontStyleFlags
Font style flags for TTF_Font
TTF_SubStringFlags
Flags for TTF_SubString