tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::PangoFontInfo Class Reference

#include <pango_font_info.h>

Collaboration diagram for tesseract::PangoFontInfo:

Public Types

enum  FontTypeEnum { UNKNOWN, SERIF, SANS_SERIF, DECORATIVE }
 

Public Member Functions

 PangoFontInfo ()
 
 ~PangoFontInfo ()
 
 PangoFontInfo (const std::string &name)
 
bool ParseFontDescriptionName (const std::string &name)
 
bool CoversUTF8Text (const char *utf8_text, int byte_length) const
 
int DropUncoveredChars (std::string *utf8_text) const
 
bool CanRenderString (const char *utf8_word, int len, std::vector< std::string > *graphemes) const
 
bool CanRenderString (const char *utf8_word, int len) const
 
bool GetSpacingProperties (const std::string &utf8_char, int *x_bearing, int *x_advance) const
 
std::string DescriptionName () const
 
const std::string & family_name () const
 
int font_size () const
 
FontTypeEnum font_type () const
 
int resolution () const
 
void set_resolution (const int resolution)
 

Static Public Member Functions

static void SoftInitFontConfig ()
 
static void HardInitFontConfig (const std::string &fonts_dir, const std::string &cache_dir)
 

Private Member Functions

void Clear ()
 
bool ParseFontDescription (const PangoFontDescription *desc)
 
PangoFont * ToPangoFont () const
 
 PangoFontInfo (const PangoFontInfo &)
 
void operator= (const PangoFontInfo &)
 

Private Attributes

std::string family_name_
 
int font_size_
 
FontTypeEnum font_type_
 
PangoFontDescription * desc_
 
int resolution_
 

Static Private Attributes

static std::string fonts_dir_
 
static std::string cache_dir_
 

Friends

class FontUtils
 

Member Enumeration Documentation

◆ FontTypeEnum

Enumerator
UNKNOWN 
SERIF 
SANS_SERIF 
DECORATIVE 

Constructor & Destructor Documentation

◆ PangoFontInfo() [1/3]

tesseract::PangoFontInfo::PangoFontInfo ( )

◆ ~PangoFontInfo()

tesseract::PangoFontInfo::~PangoFontInfo ( )

◆ PangoFontInfo() [2/3]

tesseract::PangoFontInfo::PangoFontInfo ( const std::string &  name)
explicit

◆ PangoFontInfo() [3/3]

tesseract::PangoFontInfo::PangoFontInfo ( const PangoFontInfo )
private

Member Function Documentation

◆ CanRenderString() [1/2]

bool tesseract::PangoFontInfo::CanRenderString ( const char *  utf8_word,
int  len,
std::vector< std::string > *  graphemes 
) const

◆ CanRenderString() [2/2]

bool tesseract::PangoFontInfo::CanRenderString ( const char *  utf8_word,
int  len 
) const

◆ Clear()

void tesseract::PangoFontInfo::Clear ( )
private

◆ CoversUTF8Text()

bool tesseract::PangoFontInfo::CoversUTF8Text ( const char *  utf8_text,
int  byte_length 
) const

◆ DescriptionName()

std::string tesseract::PangoFontInfo::DescriptionName ( ) const

◆ DropUncoveredChars()

int tesseract::PangoFontInfo::DropUncoveredChars ( std::string *  utf8_text) const

◆ family_name()

const std::string& tesseract::PangoFontInfo::family_name ( ) const
inline

◆ font_size()

int tesseract::PangoFontInfo::font_size ( ) const
inline

◆ font_type()

FontTypeEnum tesseract::PangoFontInfo::font_type ( ) const
inline

◆ GetSpacingProperties()

bool tesseract::PangoFontInfo::GetSpacingProperties ( const std::string &  utf8_char,
int *  x_bearing,
int *  x_advance 
) const

◆ HardInitFontConfig()

void tesseract::PangoFontInfo::HardInitFontConfig ( const std::string &  fonts_dir,
const std::string &  cache_dir 
)
static

◆ operator=()

void tesseract::PangoFontInfo::operator= ( const PangoFontInfo )
private

◆ ParseFontDescription()

bool tesseract::PangoFontInfo::ParseFontDescription ( const PangoFontDescription *  desc)
private

◆ ParseFontDescriptionName()

bool tesseract::PangoFontInfo::ParseFontDescriptionName ( const std::string &  name)

◆ resolution()

int tesseract::PangoFontInfo::resolution ( ) const
inline

◆ set_resolution()

void tesseract::PangoFontInfo::set_resolution ( const int  resolution)
inline

◆ SoftInitFontConfig()

void tesseract::PangoFontInfo::SoftInitFontConfig ( )
static

◆ ToPangoFont()

PangoFont * tesseract::PangoFontInfo::ToPangoFont ( ) const
private

Friends And Related Function Documentation

◆ FontUtils

friend class FontUtils
friend

Member Data Documentation

◆ cache_dir_

std::string tesseract::PangoFontInfo::cache_dir_
staticprivate

◆ desc_

PangoFontDescription* tesseract::PangoFontInfo::desc_
private

◆ family_name_

std::string tesseract::PangoFontInfo::family_name_
private

◆ font_size_

int tesseract::PangoFontInfo::font_size_
private

◆ font_type_

FontTypeEnum tesseract::PangoFontInfo::font_type_
private

◆ fonts_dir_

std::string tesseract::PangoFontInfo::fonts_dir_
staticprivate

◆ resolution_

int tesseract::PangoFontInfo::resolution_
private

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