#include <pgfont.h>
Public Types | |
| enum | Style { NORMAL = 0x00, BOLD = 0x01, ITALIC = 0x02, UNDERLINE = 0x04 } |
| Font styles. More... | |
Public Member Functions | |
| PG_Font (const std::string &fontfile, int size=14, int index=0) | |
| Construct a PG_Font object. | |
| PG_Font (const PG_Font &font) | |
| PG_Font & | operator= (const PG_Font &font) |
| virtual | ~PG_Font () |
| int | GetFontAscender () |
| int | GetFontDescender () |
| int | GetFontHeight () |
| Get the absolute height of the font (in pixels). | |
| void | SetColor (const PG_Color &c) |
| Set the color of the font. | |
| void | SetHighlightColor (const PG_Color &c) |
| PG_Color | GetColor () |
| Get the current color of the font. | |
| PG_Color | GetHighlightColor () |
| void | SetAlpha (int a) |
| Set the transparency of the font. | |
| int | GetAlpha () |
| Get the transparency of the font. | |
| void | SetSize (int s) |
| Set the size of the font. | |
| int | GetSize () |
| Get the size of the font. | |
| void | SetStyle (Style s) |
| Style | GetStyle () |
| bool | SetName (const std::string &fontfile) |
| Set the name (filename) of the font. | |
| const std::string & | GetName () |
| Get the current name of the font (filename). | |
| void | SetIndex (int index) |
| int | GetIndex () |
Friends | |
| class | PG_FontEngine |
This class defines the parameters of a font (size, style, ...)
Definition at line 63 of file pgfont.h.
|
|
Font styles.
|
|
||||||||||||||||
|
Construct a PG_Font object.
Definition at line 22 of file pgfont_impl.cpp. References PG_FontDataInternal::alpha, PG_FontDataInternal::color, PG_FontDataInternal::FaceCache, PG_FontDataInternal::highlightColor, PG_FontDataInternal::index, PG_FontDataInternal::name, NORMAL, PG_LogERR(), PG_FontDataInternal::size, and PG_FontDataInternal::style. |
|
|
Definition at line 60 of file pgfont_impl.cpp. |
|
|
Definition at line 75 of file pgfont_impl.cpp. |
|
|
Get the transparency of the font.
Definition at line 115 of file pgfont_impl.cpp. References PG_FontDataInternal::alpha. Referenced by PG_FontEngine::BlitFTBitmap(), and BlitTemplate(). |
|
|
Get the current color of the font.
Definition at line 103 of file pgfont_impl.cpp. References PG_FontDataInternal::color. Referenced by BlitTemplate(), PG_Widget::GetFontColor(), PG_Widget::RenderText(), and PG_FontEngine::RenderText(). |
|
|
Definition at line 80 of file pgfont_impl.cpp. References PG_FontFaceCacheItem::Face, PG_FontDataInternal::FaceCache, and FT_CEIL. Referenced by PG_Widget::GetFontAscender(), and PG_Widget::GetTextHeight(). |
|
|
Definition at line 85 of file pgfont_impl.cpp. References PG_FontFaceCacheItem::Face, PG_FontDataInternal::FaceCache, and FT_CEIL. |
|
|
Get the absolute height of the font (in pixels).
Definition at line 90 of file pgfont_impl.cpp. References PG_FontFaceCacheItem::Face, PG_FontDataInternal::FaceCache, and FT_CEIL. Referenced by PG_Widget::GetFontHeight(), and PG_Widget::GetTextSize(). |
|
|
Definition at line 107 of file pgfont_impl.cpp. References PG_FontDataInternal::highlightColor. Referenced by PG_Widget::GetFontHighlightColor(), and PG_Widget::RenderText(). |
|
|
Definition at line 177 of file pgfont_impl.cpp. References PG_FontDataInternal::index. |
|
|
Get the current name of the font (filename).
Definition at line 144 of file pgfont_impl.cpp. References PG_FontDataInternal::name. Referenced by PG_Widget::SetFont(), SetName(), and SetSize(). |
|
|
Get the size of the font.
Definition at line 165 of file pgfont_impl.cpp. References PG_FontDataInternal::size. Referenced by PG_Widget::GetFontSize(), PG_Application::LoadTheme(), PG_Widget::SetFont(), SetName(), and SetSize(). |
|
|
Definition at line 123 of file pgfont_impl.cpp. References PG_FontDataInternal::style. Referenced by PG_FontEngine::GetTextSize(), and PG_FontEngine::RenderText(). |
|
|
Definition at line 67 of file pgfont_impl.cpp. |
|
|
Set the transparency of the font.
Definition at line 111 of file pgfont_impl.cpp. References PG_FontDataInternal::alpha. Referenced by PG_Widget::SetFontAlpha(), and PG_Application::SetFontAlpha(). |
|
|
Set the color of the font.
Definition at line 95 of file pgfont_impl.cpp. References PG_FontDataInternal::color. Referenced by PG_Widget::RenderText(), PG_Widget::SetFontColor(), and PG_Application::SetFontColor(). |
|
|
Definition at line 99 of file pgfont_impl.cpp. References PG_FontDataInternal::highlightColor. Referenced by PG_Widget::SetFontHighlightColor(). |
|
|
Definition at line 173 of file pgfont_impl.cpp. References PG_FontDataInternal::index. |
|
|
Set the name (filename) of the font.
Definition at line 127 of file pgfont_impl.cpp. References PG_FontDataInternal::FaceCache, GetIndex(), GetName(), GetSize(), PG_FontDataInternal::name, and PG_LogERR(). Referenced by PG_Widget::SetFontName(), and PG_Application::SetFontName(). |
|
|
Set the size of the font.
Definition at line 148 of file pgfont_impl.cpp. References PG_FontDataInternal::FaceCache, GetIndex(), GetName(), GetSize(), PG_LogERR(), and PG_FontDataInternal::size. Referenced by PG_Widget::SetFontSize(), and PG_Application::SetFontSize(). |
|
|
Definition at line 119 of file pgfont_impl.cpp. References PG_FontDataInternal::style. Referenced by PG_Application::LoadTheme(), PG_Widget::SetFontStyle(), and PG_Application::SetFontStyle(). |
|
|
|
1.4.2