#include <fontinfo.h>
Definition at line 62 of file fontinfo.h.
◆ FontInfo()
tesseract::FontInfo::FontInfo |
( |
| ) |
|
|
inline |
Definition at line 63 of file fontinfo.h.
GenericVector< FontSpacingInfo * > * spacing_vec
◆ ~FontInfo()
tesseract::FontInfo::~FontInfo |
( |
| ) |
|
|
default |
◆ add_spacing()
Definition at line 80 of file fontinfo.h.
82 (*spacing_vec)[uch_id] = spacing_info;
GenericVector< FontSpacingInfo * > * spacing_vec
◆ DeSerialize()
bool tesseract::FontInfo::DeSerialize |
( |
TFile * |
fp | ) |
|
Definition at line 34 of file fontinfo.cpp.
bool read_spacing_info(TFile *f, FontInfo *fi)
bool read_info(TFile *f, FontInfo *fi)
◆ get_spacing() [1/2]
Definition at line 86 of file fontinfo.h.
GenericVector< FontSpacingInfo * > * spacing_vec
◆ get_spacing() [2/2]
bool tesseract::FontInfo::get_spacing |
( |
UNICHAR_ID |
prev_uch_id, |
|
|
UNICHAR_ID |
uch_id, |
|
|
int * |
spacing |
|
) |
| const |
|
inline |
Definition at line 93 of file fontinfo.h.
96 const FontSpacingInfo *prev_fsi = this->
get_spacing(prev_uch_id);
97 const FontSpacingInfo *fsi = this->
get_spacing(uch_id);
98 if (prev_fsi ==
nullptr || fsi ==
nullptr)
return false;
100 for (; i < prev_fsi->kerned_unichar_ids.size(); ++i) {
101 if (prev_fsi->kerned_unichar_ids[i] == uch_id)
break;
103 if (i < prev_fsi->kerned_unichar_ids.size()) {
104 *spacing = prev_fsi->kerned_x_gaps[i];
106 *spacing = prev_fsi->x_gap_after + fsi->x_gap_before;
const FontSpacingInfo * get_spacing(UNICHAR_ID uch_id) const
◆ init_spacing()
void tesseract::FontInfo::init_spacing |
( |
int |
unicharset_size | ) |
|
|
inline |
Definition at line 73 of file fontinfo.h.
75 spacing_vec->init_to_size(unicharset_size,
nullptr);
GenericVector< FontSpacingInfo * > * spacing_vec
◆ is_bold()
bool tesseract::FontInfo::is_bold |
( |
| ) |
const |
|
inline |
◆ is_fixed_pitch()
bool tesseract::FontInfo::is_fixed_pitch |
( |
| ) |
const |
|
inline |
◆ is_fraktur()
bool tesseract::FontInfo::is_fraktur |
( |
| ) |
const |
|
inline |
◆ is_italic()
bool tesseract::FontInfo::is_italic |
( |
| ) |
const |
|
inline |
◆ is_serif()
bool tesseract::FontInfo::is_serif |
( |
| ) |
const |
|
inline |
◆ Serialize()
bool tesseract::FontInfo::Serialize |
( |
FILE * |
fp | ) |
const |
Definition at line 27 of file fontinfo.cpp.
bool write_spacing_info(FILE *f, const FontInfo &fi)
bool write_info(FILE *f, const FontInfo &fi)
◆ name
char* tesseract::FontInfo::name |
◆ properties
uint32_t tesseract::FontInfo::properties |
◆ spacing_vec
◆ universal_id
int32_t tesseract::FontInfo::universal_id |
The documentation for this struct was generated from the following files: