21 #ifndef TESSERACT_CCSTRUCT_FONTINFO_H_
22 #define TESSERACT_CCSTRUCT_FONTINFO_H_
75 spacing_vec->init_to_size(unicharset_size,
nullptr);
82 (*spacing_vec)[uch_id] = spacing_info;
88 nullptr : (*spacing_vec)[uch_id];
98 if (prev_fsi ==
nullptr || fsi ==
nullptr)
return false;
103 if (i < prev_fsi->kerned_unichar_ids.size()) {
bool CompareFontInfo(const FontInfo &fi1, const FontInfo &fi2)
void FontInfoDeleteCallback(FontInfo f)
bool CompareFontSet(const FontSet &fs1, const FontSet &fs2)
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)
bool read_set(TFile *f, FontSet *fs)
bool read_info(TFile *f, FontInfo *fi)
void FontSetDeleteCallback(FontSet fs)
bool read_spacing_info(TFile *f, FontInfo *fi)
ScoredFont(int font_id, uint16_t classifier_score)
GenericVector< UNICHAR_ID > kerned_unichar_ids
GenericVector< int16_t > kerned_x_gaps
bool get_spacing(UNICHAR_ID prev_uch_id, UNICHAR_ID uch_id, int *spacing) const
bool DeSerialize(TFile *fp)
bool is_fixed_pitch() const
bool Serialize(FILE *fp) const
const FontSpacingInfo * get_spacing(UNICHAR_ID uch_id) const
void init_spacing(int unicharset_size)
GenericVector< FontSpacingInfo * > * spacing_vec
void add_spacing(UNICHAR_ID uch_id, FontSpacingInfo *spacing_info)
bool DeSerialize(TFile *fp)
bool SetContainsMultipleFontProperties(const GenericVector< ScoredFont > &font_set) const
void MoveSpacingInfoFrom(FontInfoTable *other)
bool SetContainsFontProperties(int font_id, const GenericVector< ScoredFont > &font_set) const
bool Serialize(FILE *fp) const
void MoveTo(UnicityTable< FontInfo > *target)