Public Member Functions | Private Attributes

GR_PangoFont Class Reference

#include <gr_CairoGraphics.h>

Inheritance diagram for GR_PangoFont:

List of all members.

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_StringgetDescription () 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

Constructor & Destructor Documentation

GR_PangoFont::GR_PangoFont ( const char *  pDesc,
double  dSize,
GR_CairoGraphics pG,
const char *  pLang,
bool  bGuiFont = false 
GR_PangoFont::~GR_PangoFont (  )  [virtual]

References m_pCover, m_pf, m_pfdDev, m_pfdLay, and m_pLayoutF.

Member Function Documentation

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]
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
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]
double GR_PangoFont::getPointSize (  )  const [inline]
UT_uint32 GR_PangoFont::getZoom (  )  const [inline]
bool GR_PangoFont::isGuiFont (  )  const [inline]
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


void GR_PangoFont::setLanguage ( const char *  pLang  ) 

References m_pPLang, and UT_return_if_fail.

Referenced by GR_PangoFont().

Member Data Documentation

bool GR_PangoFont::m_bGuiFont [private]

Referenced by reloadFont().

double GR_PangoFont::m_dPointSize [private]

Referenced by reloadFont().

Referenced by reloadFont().

PangoCoverage* GR_PangoFont::m_pCover [mutable, private]

Referenced by getPangoCoverage(), and ~GR_PangoFont().

PangoFontDescription* GR_PangoFont::m_pfdDev [private]

Referenced by reloadFont(), and ~GR_PangoFont().

PangoFontDescription* GR_PangoFont::m_pfdLay [private]
PangoFont* GR_PangoFont::m_pLayoutF [private]

Referenced by glyphBox(), reloadFont(), and ~GR_PangoFont().

PangoLanguage* GR_PangoFont::m_pPLang [private]

The documentation for this class was generated from the following files: