19#ifndef TESSERACT_CCSTRUCT_FONTINFO_H_
20#define TESSERACT_CCSTRUCT_FONTINFO_H_
80 spacing_vec =
new std::vector<FontSpacingInfo *>(unicharset_size);
87 (*spacing_vec)[uch_id] = spacing_info;
93 : (*spacing_vec)[uch_id];
101 if (prev_fsi ==
nullptr || fsi ==
nullptr) {
110 if (i < prev_fsi->kerned_unichar_ids.size()) {
void FontInfoDeleteCallback(FontInfo f)
bool write_set(FILE *f, const FontSet &fs)
bool write_info(FILE *f, const FontInfo &fi)
bool write_spacing_info(FILE *f, const FontInfo &fi)
std::vector< int > FontSet
bool read_info(TFile *f, FontInfo *fi)
bool read_spacing_info(TFile *f, FontInfo *fi)
ScoredFont(int font_id, uint16_t classifier_score)
std::vector< int16_t > kerned_x_gaps
std::vector< UNICHAR_ID > kerned_unichar_ids
const FontSpacingInfo * get_spacing(UNICHAR_ID uch_id) const
bool get_spacing(UNICHAR_ID prev_uch_id, UNICHAR_ID uch_id, int *spacing) const
bool operator==(const FontInfo &rhs) const
bool DeSerialize(TFile *fp)
std::vector< FontSpacingInfo * > * spacing_vec
bool is_fixed_pitch() const
bool Serialize(FILE *fp) const
void init_spacing(int unicharset_size)
void add_spacing(UNICHAR_ID uch_id, FontSpacingInfo *spacing_info)
TESS_API bool DeSerialize(TFile *fp)
TESS_API void MoveSpacingInfoFrom(FontInfoTable *other)
TESS_API ~FontInfoTable()
TESS_API bool SetContainsFontProperties(int font_id, const std::vector< ScoredFont > &font_set) const
TESS_API bool Serialize(FILE *fp) const
TESS_API void MoveTo(UnicityTable< FontInfo > *target)
TESS_API bool SetContainsMultipleFontProperties(const std::vector< ScoredFont > &font_set) const