#include <ttfont.h>
Definition at line 27 of file ttfont.h.
Public Member Functions | |
| TTFFont (char *file, int size, float wscale, float hmult) | |
| ~TTFFont () | |
| void | setColor (int color) |
| void | setColor (QColor c, kTTF_Color k=kTTF_Normal) |
| void | setOutline (bool outline) |
| void | setShadow (int xoff, int yoff) |
| bool | isValid (void) |
| void | DrawString (OSDSurface *surface, int x, int y, const QString &text, int maxx, int maxy, int alphamod=255, bool double_size=false) |
| void | CalcWidth (const QString &text, int *width_return) |
| int | SpaceWidth () |
| int | Size () |
| void | Reinit (float wscale, float hmult) |
Private Member Functions | |
| void | KillFace (void) |
| void | Init (void) |
| Raster_Map * | create_font_raster (int width, int height) |
| Raster_Map * | duplicate_raster (FT_BitmapGlyph bmap) |
| void | clear_raster (Raster_Map *rmap) |
| void | destroy_font_raster (Raster_Map *rmap) |
| Raster_Map * | calc_size (int *width, int *height, const QString &text, bool double_size=false) |
| void | render_text (Raster_Map *rmap, Raster_Map *rchr, const QString &text, int *xorblah, int *yor, bool double_size=false) |
| void | merge_text (OSDSurface *surface, Raster_Map *rmap, int offset_x, int offset_y, int xstart, int ystart, int width, int height, int alphamod, kTTF_Color k=kTTF_Normal) |
| bool | cache_glyph (unsigned short c) |
Private Attributes | |
| bool | valid |
| FT_Library | library |
| FT_Face | face |
| QMap< unsigned short, FT_Glyph > | glyphs |
| QMap< unsigned short, Raster_Map * > | glyphs_cached |
| int | max_descent |
| int | max_ascent |
| int | fontsize |
| int | vid_width |
| int | vid_height |
| bool | use_kerning |
| int | spacewidth |
| int | m_size |
| bool | m_outline |
| int | m_shadowxoff |
| int | m_shadowyoff |
| uint8_t | m_color_normal_y |
| uint8_t | m_color_normal_u |
| uint8_t | m_color_normal_v |
| uint8_t | m_color_outline_y |
| uint8_t | m_color_outline_u |
| uint8_t | m_color_outline_v |
| uint8_t | m_color_shadow_y |
| uint8_t | m_color_shadow_u |
| uint8_t | m_color_shadow_v |
| QString | m_file |
| int | loadedfontsize |
| float | m_wscale |
| float | m_hmult |
| TTFFont::TTFFont | ( | char * | file, | |
| int | size, | |||
| float | wscale, | |||
| float | hmult | |||
| ) |
Definition at line 549 of file ttfont.cpp.
| TTFFont::~TTFFont | ( | ) |
Definition at line 523 of file ttfont.cpp.
| void TTFFont::setColor | ( | int | color | ) |
Definition at line 48 of file ttfont.cpp.
Referenced by OSDType708CC::Draw(), OSDTypeCC::Draw(), OSD::parseFont(), and OSDTypeTeletext::SetForegroundColor().
| void TTFFont::setColor | ( | QColor | c, | |
| kTTF_Color | k = kTTF_Normal | |||
| ) |
Definition at line 69 of file ttfont.cpp.
| void TTFFont::setOutline | ( | bool | outline | ) | [inline] |
Definition at line 38 of file ttfont.h.
Referenced by OSDType708CC::Draw(), OSDTypeCC::Draw(), OSD::parseFont(), OSDTypeTeletext::SetForegroundColor(), and OSD::SetTextSubtitles().
| void TTFFont::setShadow | ( | int | xoff, | |
| int | yoff | |||
| ) | [inline] |
Definition at line 39 of file ttfont.h.
Referenced by OSDType708CC::Draw(), OSD::parseFont(), and OSDTypeTeletext::SetForegroundColor().
| bool TTFFont::isValid | ( | void | ) | [inline] |
| void TTFFont::DrawString | ( | OSDSurface * | surface, | |
| int | x, | |||
| int | y, | |||
| const QString & | text, | |||
| int | maxx, | |||
| int | maxy, | |||
| int | alphamod = 255, |
|||
| bool | double_size = false | |||
| ) |
Definition at line 433 of file ttfont.cpp.
Referenced by OSDType708CC::Draw(), OSDTypeCC::Draw(), OSDTypeTeletext::DrawCharacter(), OSDTypeText::DrawHiLiteString(), OSDTypeText::DrawString(), and OSDListBtnTypeItem::paint().
| void TTFFont::CalcWidth | ( | const QString & | text, | |
| int * | width_return | |||
| ) |
Definition at line 688 of file ttfont.cpp.
Referenced by OSDType708CC::CalcBounds(), OSDType708CC::Draw(), OSDTypeCC::Draw(), OSDTypeText::Draw(), OSDTypeText::DrawHiLiteString(), OSDTypeText::DrawString(), and Init().
| int TTFFont::SpaceWidth | ( | ) | [inline] |
| int TTFFont::Size | ( | ) | [inline] |
Definition at line 50 of file ttfont.h.
Referenced by OSDType708CC::CalcBounds(), OSDType708CC::Draw(), OSDTypeCC::Draw(), OSDTypeText::Draw(), OSDTypeText::DrawHiLiteString(), OSDTypeText::DrawString(), OSDListBtnType::Init(), and OSDListBtnTypeItem::paint().
| void TTFFont::Reinit | ( | float | wscale, | |
| float | hmult | |||
| ) |
| void TTFFont::KillFace | ( | void | ) | [private] |
| void TTFFont::Init | ( | void | ) | [private] |
| Raster_Map * TTFFont::create_font_raster | ( | int | width, | |
| int | height | |||
| ) | [private] |
| Raster_Map * TTFFont::duplicate_raster | ( | FT_BitmapGlyph | bmap | ) | [private] |
| void TTFFont::clear_raster | ( | Raster_Map * | rmap | ) | [private] |
| void TTFFont::destroy_font_raster | ( | Raster_Map * | rmap | ) | [private] |
| Raster_Map * TTFFont::calc_size | ( | int * | width, | |
| int * | height, | |||
| const QString & | text, | |||
| bool | double_size = false | |||
| ) | [private] |
| void TTFFont::render_text | ( | Raster_Map * | rmap, | |
| Raster_Map * | rchr, | |||
| const QString & | text, | |||
| int * | xorblah, | |||
| int * | yor, | |||
| bool | double_size = false | |||
| ) | [private] |
| void TTFFont::merge_text | ( | OSDSurface * | surface, | |
| Raster_Map * | rmap, | |||
| int | offset_x, | |||
| int | offset_y, | |||
| int | xstart, | |||
| int | ystart, | |||
| int | width, | |||
| int | height, | |||
| int | alphamod, | |||
| kTTF_Color | k = kTTF_Normal | |||
| ) | [private] |
| bool TTFFont::cache_glyph | ( | unsigned short | c | ) | [private] |
bool TTFFont::valid [private] |
FT_Library TTFFont::library [private] |
FT_Face TTFFont::face [private] |
Definition at line 73 of file ttfont.h.
Referenced by cache_glyph(), calc_size(), Init(), KillFace(), and render_text().
QMap<unsigned short, FT_Glyph> TTFFont::glyphs [private] |
Definition at line 74 of file ttfont.h.
Referenced by cache_glyph(), calc_size(), CalcWidth(), KillFace(), and render_text().
QMap<unsigned short, Raster_Map *> TTFFont::glyphs_cached [private] |
int TTFFont::max_descent [private] |
Definition at line 76 of file ttfont.h.
Referenced by cache_glyph(), calc_size(), Init(), and render_text().
int TTFFont::max_ascent [private] |
int TTFFont::fontsize [private] |
int TTFFont::vid_width [private] |
int TTFFont::vid_height [private] |
bool TTFFont::use_kerning [private] |
int TTFFont::spacewidth [private] |
int TTFFont::m_size [private] |
bool TTFFont::m_outline [private] |
int TTFFont::m_shadowxoff [private] |
int TTFFont::m_shadowyoff [private] |
uint8_t TTFFont::m_color_normal_y [private] |
uint8_t TTFFont::m_color_normal_u [private] |
uint8_t TTFFont::m_color_normal_v [private] |
uint8_t TTFFont::m_color_outline_y [private] |
uint8_t TTFFont::m_color_outline_u [private] |
uint8_t TTFFont::m_color_outline_v [private] |
uint8_t TTFFont::m_color_shadow_y [private] |
uint8_t TTFFont::m_color_shadow_u [private] |
uint8_t TTFFont::m_color_shadow_v [private] |
QString TTFFont::m_file [private] |
int TTFFont::loadedfontsize [private] |
float TTFFont::m_wscale [private] |
float TTFFont::m_hmult [private] |
1.5.5