#include <gr_CairoGraphics.h>
Public Member Functions | |
| GR_PangoFont (const char *pDesc, double dSize, GR_CairoGraphics *pG, const char *pLang, bool bGuiFont=false) | |
| virtual | ~GR_PangoFont () |
| virtual UT_sint32 | measureUnremappedCharForCache (UT_UCS4Char cChar) const |
| virtual bool | doesGlyphExist (UT_UCS4Char g) const |
| virtual bool | glyphBox (UT_UCS4Char g, UT_Rect &rec, GR_Graphics *pG) |
| PangoFont * | getPangoFont () const |
| PangoFont * | getPangoLayoutFont () const |
| void | reloadFont (GR_CairoGraphics *pG) |
| double | getPointSize () const |
| UT_uint32 | getZoom () const |
| bool | isGuiFont () const |
| const UT_String & | getDescription () const |
| virtual const char * | getFamily () const |
| const PangoFontDescription * | getPangoDescription () const |
| UT_uint32 | getAscent () const |
| UT_uint32 | getDescent () const |
| PangoCoverage * | getPangoCoverage () const |
| PangoLanguage * | getPangoLanguage () const |
| void | setLanguage (const char *pLang) |
Private Attributes | |
| UT_String | m_sDesc |
| UT_String | m_sLayoutDesc |
| double | m_dPointSize |
| UT_uint32 | m_iZoom |
| PangoFont * | m_pf |
| bool | m_bGuiFont |
| PangoCoverage * | m_pCover |
| PangoFontDescription * | m_pfdDev |
| PangoFontDescription * | m_pfdLay |
| PangoLanguage * | m_pPLang |
| UT_uint32 | m_iAscent |
| UT_uint32 | m_iDescent |
| PangoFont * | m_pLayoutF |
| GR_PangoFont::GR_PangoFont | ( | const char * | pDesc, | |
| double | dSize, | |||
| GR_CairoGraphics * | pG, | |||
| const char * | pLang, | |||
| bool | bGuiFont = false | |||
| ) |
References GR_Font::m_eType, m_sDesc, m_sLayoutDesc, reloadFont(), setLanguage(), UT_DEBUGMSG, and UT_return_if_fail.
| GR_PangoFont::~GR_PangoFont | ( | ) | [virtual] |
References m_pCover, m_pf, m_pfdDev, m_pfdLay, and m_pLayoutF.
| bool GR_PangoFont::doesGlyphExist | ( | UT_UCS4Char | g | ) | const [virtual] |
Determine if character g exists in this font. We assume here that coverage is not affected by font size -- since we only operate with single fonts and assume scalable fonts, this should be OK.
NB: it is essential that this function is fast
Reimplemented from GR_Font.
References getPangoCoverage(), m_pf, and UT_return_val_if_fail.
| UT_uint32 GR_PangoFont::getAscent | ( | ) | const [inline] |
| UT_uint32 GR_PangoFont::getDescent | ( | ) | const [inline] |
Referenced by GR_CairoGraphics::getFontDescent(), and GR_CairoGraphics::getFontHeight().
| const UT_String& GR_PangoFont::getDescription | ( | ) | const [inline] |
Referenced by GR_CairoGraphics::shape().
| const char * GR_PangoFont::getFamily | ( | ) | const [virtual] |
Reimplemented from GR_Font.
References m_pfdLay, and UT_return_val_if_fail.
| PangoCoverage * GR_PangoFont::getPangoCoverage | ( | ) | const |
References m_pCover, m_pf, m_pPLang, and UT_return_val_if_fail.
Referenced by doesGlyphExist(), and GR_CairoGraphics::getCoverage().
| const PangoFontDescription* GR_PangoFont::getPangoDescription | ( | ) | const [inline] |
| PangoFont* GR_PangoFont::getPangoFont | ( | ) | const [inline] |
| PangoLanguage* GR_PangoFont::getPangoLanguage | ( | ) | const [inline] |
| PangoFont* GR_PangoFont::getPangoLayoutFont | ( | ) | const [inline] |
Referenced by GR_CairoGraphics::_adjustedLayoutPangoFont(), and GR_CairoGraphics::measureString().
| double GR_PangoFont::getPointSize | ( | ) | const [inline] |
| UT_uint32 GR_PangoFont::getZoom | ( | ) | const [inline] |
Referenced by GR_CairoGraphics::setZoomPercentage().
| bool GR_PangoFont::glyphBox | ( | UT_UCS4Char | g, | |
| UT_Rect & | rec, | |||
| GR_Graphics * | pG | |||
| ) | [virtual] |
| bool GR_PangoFont::isGuiFont | ( | ) | const [inline] |
Referenced by GR_CairoGraphics::setZoomPercentage(), and GR_CairoGraphics::shape().
| UT_sint32 GR_PangoFont::measureUnremappedCharForCache | ( | UT_UCS4Char | cChar | ) | const [virtual] |
Measure the unremapped char to be put into the cache. That means measuring it for a font size of 120
References UT_ASSERT_HARMLESS, and UT_NOT_IMPLEMENTED.
| void GR_PangoFont::reloadFont | ( | GR_CairoGraphics * | pG | ) |
Reloads the Pango font associated with this font, taking into account the current level of zoom
References UT_String::c_str(), GR_Graphics::DGP_SCREEN, GR_CairoGraphics::getContext(), GR_CairoGraphics::getLayoutContext(), GR_Graphics::getZoomPercentage(), m_bGuiFont, m_dPointSize, m_iAscent, m_iDescent, m_iZoom, m_pf, m_pfdDev, m_pfdLay, m_pLayoutF, m_pPLang, m_sDesc, m_sLayoutDesc, GR_CairoGraphics::queryProperties(), UT_DEBUGMSG, UT_return_if_fail, UT_std_string_sprintf(), and xxx_UT_DEBUGMSG.
Referenced by GR_PangoFont(), and GR_CairoGraphics::setZoomPercentage().
| void GR_PangoFont::setLanguage | ( | const char * | pLang | ) |
References m_pPLang, and UT_return_if_fail.
Referenced by GR_PangoFont().
bool GR_PangoFont::m_bGuiFont [private] |
Referenced by reloadFont().
double GR_PangoFont::m_dPointSize [private] |
Referenced by reloadFont().
UT_uint32 GR_PangoFont::m_iAscent [private] |
Referenced by reloadFont().
UT_uint32 GR_PangoFont::m_iDescent [private] |
Referenced by reloadFont().
UT_uint32 GR_PangoFont::m_iZoom [private] |
Referenced by reloadFont().
PangoCoverage* GR_PangoFont::m_pCover [mutable, private] |
Referenced by getPangoCoverage(), and ~GR_PangoFont().
PangoFont* GR_PangoFont::m_pf [private] |
Referenced by doesGlyphExist(), getPangoCoverage(), glyphBox(), reloadFont(), and ~GR_PangoFont().
PangoFontDescription* GR_PangoFont::m_pfdDev [private] |
Referenced by reloadFont(), and ~GR_PangoFont().
PangoFontDescription* GR_PangoFont::m_pfdLay [private] |
Referenced by getFamily(), reloadFont(), and ~GR_PangoFont().
PangoFont* GR_PangoFont::m_pLayoutF [private] |
Referenced by glyphBox(), reloadFont(), and ~GR_PangoFont().
PangoLanguage* GR_PangoFont::m_pPLang [private] |
Referenced by getPangoCoverage(), reloadFont(), and setLanguage().
UT_String GR_PangoFont::m_sDesc [private] |
Referenced by GR_PangoFont(), and reloadFont().
UT_String GR_PangoFont::m_sLayoutDesc [private] |
Referenced by GR_PangoFont(), and reloadFont().
1.7.1