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

#include <pango_font_info.h>

Collaboration diagram for tesseract::FontUtils:

Static Public Member Functions

static bool IsAvailableFont (const char *font_desc)
 
static bool IsAvailableFont (const char *font_desc, std::string *best_match)
 
static const std::vector< std::string > & ListAvailableFonts ()
 
static bool SelectFont (const char *utf8_word, const int utf8_len, std::string *font_name, std::vector< std::string > *graphemes)
 
static bool SelectFont (const char *utf8_word, const int utf8_len, const std::vector< std::string > &all_fonts, std::string *font_name, std::vector< std::string > *graphemes)
 
static void GetAllRenderableCharacters (std::vector< bool > *unichar_bitmap)
 
static void GetAllRenderableCharacters (const std::vector< std::string > &font_names, std::vector< bool > *unichar_bitmap)
 
static void GetAllRenderableCharacters (const std::string &font_name, std::vector< bool > *unichar_bitmap)
 
static std::string BestFonts (const std::unordered_map< char32, int64_t > &ch_map, std::vector< std::pair< const char *, std::vector< bool > > > *font_flag)
 
static int FontScore (const std::unordered_map< char32, int64_t > &ch_map, const std::string &fontname, int *raw_score, std::vector< bool > *ch_flags)
 
static void ReInit ()
 
static void PangoFontTypeInfo ()
 

Static Private Attributes

static std::vector< std::string > available_fonts_
 

Member Function Documentation

◆ BestFonts()

std::string tesseract::FontUtils::BestFonts ( const std::unordered_map< char32, int64_t > &  ch_map,
std::vector< std::pair< const char *, std::vector< bool > > > *  font_flag 
)
static

◆ FontScore()

int tesseract::FontUtils::FontScore ( const std::unordered_map< char32, int64_t > &  ch_map,
const std::string &  fontname,
int *  raw_score,
std::vector< bool > *  ch_flags 
)
static

◆ GetAllRenderableCharacters() [1/3]

void tesseract::FontUtils::GetAllRenderableCharacters ( std::vector< bool > *  unichar_bitmap)
static

◆ GetAllRenderableCharacters() [2/3]

void tesseract::FontUtils::GetAllRenderableCharacters ( const std::vector< std::string > &  font_names,
std::vector< bool > *  unichar_bitmap 
)
static

◆ GetAllRenderableCharacters() [3/3]

void tesseract::FontUtils::GetAllRenderableCharacters ( const std::string &  font_name,
std::vector< bool > *  unichar_bitmap 
)
static

◆ IsAvailableFont() [1/2]

static bool tesseract::FontUtils::IsAvailableFont ( const char *  font_desc)
inlinestatic

◆ IsAvailableFont() [2/2]

bool tesseract::FontUtils::IsAvailableFont ( const char *  font_desc,
std::string *  best_match 
)
static

◆ ListAvailableFonts()

const std::vector< std::string > & tesseract::FontUtils::ListAvailableFonts ( )
static

◆ PangoFontTypeInfo()

void tesseract::FontUtils::PangoFontTypeInfo ( )
static

◆ ReInit()

void tesseract::FontUtils::ReInit ( )
static

◆ SelectFont() [1/2]

bool tesseract::FontUtils::SelectFont ( const char *  utf8_word,
const int  utf8_len,
std::string *  font_name,
std::vector< std::string > *  graphemes 
)
static

◆ SelectFont() [2/2]

bool tesseract::FontUtils::SelectFont ( const char *  utf8_word,
const int  utf8_len,
const std::vector< std::string > &  all_fonts,
std::string *  font_name,
std::vector< std::string > *  graphemes 
)
static

Member Data Documentation

◆ available_fonts_

std::vector< std::string > tesseract::FontUtils::available_fonts_
staticprivate

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