XAP_CocoaFont Class Reference

#include <xap_CocoaFont.h>

Inheritance diagram for XAP_CocoaFont:

GR_Font

List of all members.

Public Types

enum  RemapFont { rf_None = 0, rf_Symbols, rf_Dings }

Public Member Functions

 XAP_CocoaFont ()
 XAP_CocoaFont (NSFont *font)
 XAP_CocoaFont (const XAP_CocoaFont &copy)
 ~XAP_CocoaFont ()
ATSUStyle makeAtsuStyle (NSFont *font) const
NSFont * getNSFont (void) const
UT_uint32 getSize (void)
const char * getName (void)
float getAscent ()
float getDescent ()
float getHeight ()
void getCoverage (UT_NumberVector &coverage)
virtual UT_sint32 measureUnremappedCharForCache (UT_UCSChar cChar) const
virtual bool glyphBox (UT_UCS4Char g, UT_Rect &rec, GR_Graphics *)
bool needsRemap ()
UT_UCS4Char remapChar (UT_UCS4Char charCode) const

Static Public Member Functions

static RemapFont remapFont (NSFont *font)
static UT_UCS4Char remapChar (UT_UCS4Char charCode, RemapFont rf)

Private Member Functions

void _resetMetricsCache ()
UT_sint32 _measureChar (UT_UCSChar cChar, ATSUStyle style) const

Static Private Member Functions

static void _initMetricsLayouts (void)

Private Attributes

RemapFont m_rfRemap
NSFont * m_font
ATSUStyle m_styleForCache
UT_uint32 _m_size
volatile float _m_ascent
volatile float _m_descent
volatile float _m_height
UT_NumberVector_m_coverage
unichar _m_text [2]
 buffer for the text layout

Static Private Attributes

static ATSUTextLayout s_atsuLayout = NULL


Member Enumeration Documentation

Enumerator:
rf_None 
rf_Symbols 
rf_Dings 


Constructor & Destructor Documentation

XAP_CocoaFont::XAP_CocoaFont (  ) 

XAP_CocoaFont::XAP_CocoaFont ( NSFont *  font  ) 

XAP_CocoaFont::XAP_CocoaFont ( const XAP_CocoaFont copy  ) 

XAP_CocoaFont::~XAP_CocoaFont (  ) 


Member Function Documentation

ATSUStyle XAP_CocoaFont::makeAtsuStyle ( NSFont *  font  )  const

NSFont* XAP_CocoaFont::getNSFont ( void   )  const [inline]

UT_uint32 XAP_CocoaFont::getSize ( void   ) 

const char * XAP_CocoaFont::getName ( void   ) 

References m_font.

float XAP_CocoaFont::getAscent (  ) 

References _m_ascent, and m_font.

Referenced by GR_CocoaGraphics::getFontAscent(), and getHeight().

float XAP_CocoaFont::getDescent (  ) 

float XAP_CocoaFont::getHeight (  ) 

void XAP_CocoaFont::getCoverage ( UT_NumberVector coverage  ) 

UT_sint32 XAP_CocoaFont::measureUnremappedCharForCache ( UT_UCSChar  cChar  )  const [virtual]

bool XAP_CocoaFont::glyphBox ( UT_UCS4Char  g,
UT_Rect rec,
GR_Graphics  
) [virtual]

bool XAP_CocoaFont::needsRemap (  )  [inline]

References m_rfRemap.

Referenced by GR_CocoaGraphics::drawChars().

XAP_CocoaFont::RemapFont XAP_CocoaFont::remapFont ( NSFont *  font  )  [static]

References rf_Dings, rf_None, and rf_Symbols.

Referenced by _measureChar(), glyphBox(), and XAP_CocoaFont().

UT_UCS4Char XAP_CocoaFont::remapChar ( UT_UCS4Char  charCode,
RemapFont  rf 
) [static]

UT_UCS4Char XAP_CocoaFont::remapChar ( UT_UCS4Char  charCode  )  const [inline]

References m_rfRemap, and remapChar().

void XAP_CocoaFont::_resetMetricsCache (  )  [private]

void XAP_CocoaFont::_initMetricsLayouts ( void   )  [static, private]

References s_atsuLayout, and UT_ASSERT.

Referenced by _measureChar().

UT_sint32 XAP_CocoaFont::_measureChar ( UT_UCSChar  cChar,
ATSUStyle  style 
) const [private]

Measure the char for the given NSFont

References _initMetricsLayouts(), _m_text, after, m_font, m_styleForCache, remapChar(), remapFont(), s_atsuLayout, and UT_ASSERT.

Referenced by measureUnremappedCharForCache().


Member Data Documentation

NSFont* XAP_CocoaFont::m_font [private]

ATSUStyle XAP_CocoaFont::m_styleForCache [mutable, private]

Referenced by _resetMetricsCache(), and getSize().

volatile float XAP_CocoaFont::_m_ascent [private]

Referenced by _resetMetricsCache(), and getAscent().

volatile float XAP_CocoaFont::_m_descent [private]

Referenced by _resetMetricsCache(), and getDescent().

volatile float XAP_CocoaFont::_m_height [private]

Referenced by _resetMetricsCache(), and getHeight().

unichar XAP_CocoaFont::_m_text[2] [mutable, private]

buffer for the text layout

Referenced by _measureChar(), and _resetMetricsCache().

ATSUTextLayout XAP_CocoaFont::s_atsuLayout = NULL [static, private]

static metrics stuff

Referenced by _initMetricsLayouts(), and _measureChar().


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

Generated on Sat Jul 11 00:07:17 2009 for AbiWord by  doxygen 1.5.5