class SDL::TTF::Font
- SDL::TTF::Font
- Reference
- Object
Defined in:
ttf.crConstructors
Class Method Summary
Instance Method Summary
-
#ascent
Returns the maximum pixel ascent of all glyphs of the font.
- #close
-
#descent
Returns the maximum pixel descent of all glyphs of the font.
- #face_family_name
- #face_fixed_width?
- #face_style_name
-
#faces
Returns the number of faces (sub-fonts) available in the font.
- #finalize
- #glyph_metrics(char : UInt16)
- #glyph_provided?(char : UInt16)
-
#height
Returns the maximum pixel height of all glyphs of the font.
-
#height_of(text : String, ascii = false)
Returns the
#height
of text if rendered with the current font. - #kerning=(allowed : Bool)
-
#line_skip
Returns the reccomended pixel height of a rendered line of text of the font.
- #outline
- #outline=(outline)
-
#render(text : String, color, background, ascii = false)
Renders text using this font as an
SDL::Surface
using the "slow and nice" shaded mode. -
#render_blended(text : String, color, ascii = false)
Renders text using this font as an
SDL::Surface
using the "slow, slow, slow but ultra nice over another image" blended mode. -
#render_shaded(text : String, color, background, ascii = false)
Renders text using this font as an
SDL::Surface
using the "slow and nice" shaded mode. -
#render_solid(text : String, color, ascii = false)
Renders text using this font as an
SDL::Surface
using the "quick and dirty" solid mode. -
#size_of(text : String, ascii = false)
Returns the
{width, height}
of text if rendered with the current font. - #style
- #style=(style : Style)
- #to_unsafe : Pointer(LibTTF::Font)
-
#width_of(text : String, ascii = false)
Returns the
width
of text if rendered with the current font.
Constructor Detail
Class Method Detail
Instance Method Detail
Returns the #height
of text if rendered with the current font.
Renders text using this font as an SDL::Surface
using the "slow and
nice" shaded mode.
Renders text using this font as an SDL::Surface
using the "slow, slow,
slow but ultra nice over another image" blended mode.
Renders text using this font as an SDL::Surface
using the "slow and
nice" shaded mode.
Renders text using this font as an SDL::Surface
using the "quick and
dirty" solid mode.
Returns the {width, height}
of text if rendered with the current font.
Returns the width
of text if rendered with the current font.