#include <gr_Graphics.h>
GR_Font::~GR_Font | ( | ) | [virtual] |
GR_Font::GR_Font | ( | ) | [protected] |
References m_iAllocNo, and s_iAllocCount.
GR_CharWidths* GR_Font::_getCharWidths | ( | ) | const [inline, protected] |
Reimplemented in GR_Win32Font.
Referenced by GR_Win32Font::_getCharWidths().
bool GR_Font::doesGlyphExist | ( | UT_UCS4Char | g | ) | const [virtual] |
Reimplemented in GR_PangoFont.
References getCharWidthFromCache(), GR_CW_ABSENT, and UT_DEBUGMSG.
Referenced by s_doesGlyphExist(), and GR_Graphics::shape().
UT_uint32 GR_Font::getAllocNumber | ( | ) | const [inline] |
UT_sint32 GR_Font::getCharWidthFromCache | ( | UT_UCSChar | c | ) | const |
Return the char width from the cache. Compute the width if needed, and cache it.
References GR_CharWidthsCache::getCharWidthCache(), GR_CharWidths::getWidth(), GR_CharWidthsCache::getWidthsForFont(), GR_CW_UNKNOWN, m_pCharWidths, measureUnremappedCharForCache(), GR_CharWidths::setWidth(), UCS_LIGATURE_PLACEHOLDER, UT_NOT_IMPLEMENTED, and UT_return_val_if_fail.
Referenced by doesGlyphExist(), GR_Win32Font::GR_Win32Font(), and GR_Win32Font::measureUnRemappedChar().
virtual const char* GR_Font::getFamily | ( | ) | const [inline, virtual] |
Reimplemented in GR_PangoFont.
Referenced by fl_BlockLayout::itemizeSpan(), and XAP_Draw_Symbol::setFontToGC().
GrFontType GR_Font::getType | ( | void | ) | const [inline] |
Referenced by GR_CairoGraphics::setFont().
virtual bool GR_Font::glyphBox | ( | UT_UCS4Char | g, | |
UT_Rect & | rec, | |||
GR_Graphics * | pG | |||
) | [pure virtual] |
Implemented in GR_Win32Font, and GR_PangoFont.
const std::string & GR_Font::hashKey | ( | void | ) | const [virtual] |
Return the hash key used by the cache to fetch the font This method may be overridden to compute it in real time if needed
References m_hashKey.
Referenced by fp_TextRun::_draw(), GR_CharWidthsCache::addFont(), and GR_CharWidthsCache::getWidthsForFont().
virtual UT_sint32 GR_Font::measureUnremappedCharForCache | ( | UT_UCSChar | cChar | ) | const [pure virtual] |
Measure the unremapped char to be put into the cache. That means measuring it for a font size of 120
Implemented in GR_Win32Font.
Referenced by getCharWidthFromCache().
GR_CharWidths * GR_Font::newFontWidths | ( | void | ) | const [virtual] |
Implements a GR_CharWidths. Override if you which to instanciate a subclass.
Reimplemented in GR_Win32Font.
Referenced by GR_CharWidthsCache::addFont().
static bool GR_Font::s_doesGlyphExist | ( | UT_UCS4Char | g, | |
void * | instance | |||
) | [inline, static] |
References doesGlyphExist(), and UT_return_val_if_fail.
void GR_Font::s_getGenericFontProperties | ( | const char * | szFontName, | |
FontFamilyEnum * | pff, | |||
FontPitchEnum * | pfp, | |||
bool * | pbTrueType | |||
) | [static] |
References UT_Win32LocaleString::c_str(), UT_Win32LocaleString::fromUTF8(), and xx.
Referenced by _rtf_font_info::init().
friend class GR_Graphics [friend] |
friend class std::map< std::string, GR_Font * > [friend] |
GrFontType GR_Font::m_eType [protected] |
Referenced by GR_PangoFont::GR_PangoFont().
std::string GR_Font::m_hashKey [mutable, protected] |
hash key for font cache. Must be initialized in ctor otherwise override hashKey() method
Referenced by GR_Win32Font::GR_Win32Font(), and hashKey().
UT_uint32 GR_Font::m_iAllocNo [private] |
Referenced by GR_Font().
GR_CharWidths* GR_Font::m_pCharWidths [mutable, private] |
Referenced by getCharWidthFromCache().
UT_uint32 GR_Font::s_iAllocCount = 0 [static, private] |
Referenced by GR_Font().