[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
void TTF_SetFontStyle(TTF_Font *font, int style)
Set the rendering style of the loaded font.
NOTE: Passing a NULL font into this function will cause a segfault.
NOTE: This will flush the internal cache of previously rendered glyphs, even if
there is no change in style, so it may be best to check the current style using TTF_GetFontStyle
first.
NOTE: I've seen that TTF_STYLE_UNDERLINE does not work when using TTF_RenderGlyph_*
functions, and that TTF_STYLE_STRIKETHROUGH looks like underlines on some glyphs when using TTF_RenderGlyph_*
functions. However both seem to work correctly when using the other full string TTF_Render*
functions. I've sent in a patch to fix this partially, however I do not alter the surface size and glyph metrics, so sometimes the underline or strikethrough may be outside of the generated surface, and thus not visible when blitted to the screen. In this case, you should probably turn off these styles and draw your own strikethroughs and underlines.
|
See Also:
3.3.2 TTF_GetFontStyle,
5. Defines