Photon 1.0.0
Loading...
Searching...
No Matches
cairo_font Class Reference

#include <container_cairo_pango.h>

Public Member Functions

 cairo_font (IMLangFontLink2 *fl, HFONT hFont, int size)
 
 cairo_font (IMLangFontLink2 *fl, LPCWSTR facename, int size, int weight, BOOL italic, BOOL strikeout, BOOL underline)
 
void init ()
 
 ~cairo_font ()
 
void show_text (cairo_t *cr, int x, int y, const char *)
 
int text_width (cairo_t *cr, const char *str)
 
void load_metrics (cairo_t *cr)
 
cairo_font_metricsmetrics ()
 

Static Public Member Functions

static std::wstring utf8_to_wchar (const std::string &src)
 
static std::string wchar_to_utf8 (const std::wstring &src)
 

Public Attributes

PangoFontDescription * font
 
int size
 
bool underline
 
bool strikeout
 
int ascent
 
int descent
 
int underline_thickness
 
int underline_position
 
int strikethrough_thickness
 
int strikethrough_position
 

Static Public Attributes

static CRITICAL_SECTION m_sync
 

Private Member Functions

void split_text (const char *str, text_chunk::vector &chunks)
 
void free_text_chunks (text_chunk::vector &chunks)
 
cairo_font_face_t * create_font_face (HFONT fnt)
 
void set_font (HFONT hFont)
 
void clear ()
 
int text_width (cairo_t *cr, text_chunk::vector &chunks)
 
void lock ()
 
void unlock ()
 
int round_d (double val)
 
void get_metrics (cairo_t *cr, cairo_font_metrics *fm)
 

Private Attributes

HFONT m_hFont
 
cairo_font_face_t * m_font_face
 
IMLangFontLink2 * m_font_link
 
DWORD m_font_code_pages
 
linked_font::vector m_linked_fonts
 
int m_size
 
BOOL m_bUnderline
 
BOOL m_bStrikeOut
 
cairo_font_metrics m_metrics
 

Constructor & Destructor Documentation

◆ cairo_font() [1/2]

cairo_font::cairo_font ( IMLangFontLink2 *  fl,
HFONT  hFont,
int  size 
)

◆ cairo_font() [2/2]

cairo_font::cairo_font ( IMLangFontLink2 *  fl,
LPCWSTR  facename,
int  size,
int  weight,
BOOL  italic,
BOOL  strikeout,
BOOL  underline 
)

◆ ~cairo_font()

cairo_font::~cairo_font ( )

Member Function Documentation

◆ clear()

void cairo_font::clear ( )
private

◆ create_font_face()

cairo_font_face_t * cairo_font::create_font_face ( HFONT  fnt)
private

◆ free_text_chunks()

void cairo_font::free_text_chunks ( text_chunk::vector chunks)
private

◆ get_metrics()

void cairo_font::get_metrics ( cairo_t *  cr,
cairo_font_metrics fm 
)
private

◆ init()

void cairo_font::init ( )

◆ load_metrics()

void cairo_font::load_metrics ( cairo_t *  cr)
inline

◆ lock()

void cairo_font::lock ( )
inlineprivate

◆ metrics()

cairo_font_metrics & cairo_font::metrics ( )
inline

◆ round_d()

int cairo_font::round_d ( double  val)
inlineprivate

◆ set_font()

void cairo_font::set_font ( HFONT  hFont)
private

◆ show_text()

void cairo_font::show_text ( cairo_t *  cr,
int  x,
int  y,
const char *  str 
)

◆ split_text()

void cairo_font::split_text ( const char *  str,
text_chunk::vector chunks 
)
private

◆ text_width() [1/2]

int cairo_font::text_width ( cairo_t *  cr,
const char *  str 
)

◆ text_width() [2/2]

int cairo_font::text_width ( cairo_t *  cr,
text_chunk::vector chunks 
)
private

◆ unlock()

void cairo_font::unlock ( )
inlineprivate

◆ utf8_to_wchar()

std::wstring cairo_font::utf8_to_wchar ( const std::string &  src)
static

◆ wchar_to_utf8()

std::string cairo_font::wchar_to_utf8 ( const std::wstring &  src)
static

Member Data Documentation

◆ ascent

int cairo_font::ascent

◆ descent

int cairo_font::descent

◆ font

PangoFontDescription* cairo_font::font

◆ m_bStrikeOut

BOOL cairo_font::m_bStrikeOut
private

◆ m_bUnderline

BOOL cairo_font::m_bUnderline
private

◆ m_font_code_pages

DWORD cairo_font::m_font_code_pages
private

◆ m_font_face

cairo_font_face_t* cairo_font::m_font_face
private

◆ m_font_link

IMLangFontLink2* cairo_font::m_font_link
private

◆ m_hFont

HFONT cairo_font::m_hFont
private

◆ m_linked_fonts

linked_font::vector cairo_font::m_linked_fonts
private

◆ m_metrics

cairo_font_metrics cairo_font::m_metrics
private

◆ m_size

int cairo_font::m_size
private

◆ m_sync

CRITICAL_SECTION cairo_font::m_sync
static

◆ size

int cairo_font::size

◆ strikeout

bool cairo_font::strikeout

◆ strikethrough_position

int cairo_font::strikethrough_position

◆ strikethrough_thickness

int cairo_font::strikethrough_thickness

◆ underline

bool cairo_font::underline

◆ underline_position

int cairo_font::underline_position

◆ underline_thickness

int cairo_font::underline_thickness

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