63 uint32_t properties =
get(font_id).properties;
64 for (
int f = 0; f < font_set.
size(); ++f) {
65 if (
get(font_set[f].fontinfo_id).properties == properties)
74 if (font_set.
empty())
return false;
75 int first_font = font_set[0].fontinfo_id;
76 uint32_t properties =
get(first_font).properties;
77 for (
int f = 1; f < font_set.
size(); ++f) {
78 if (
get(font_set[f].fontinfo_id).properties != properties)
88 for (
int i = 0; i < other->
size(); ++i) {
90 if (spacing_vec !=
nullptr) {
92 if (target_index < 0) {
95 other->
get(i).name =
nullptr;
97 delete []
get(target_index).spacing_vec;
98 get(target_index).spacing_vec = other->
get(i).spacing_vec;
100 other->
get(i).spacing_vec =
nullptr;
110 for (
int i = 0; i <
size(); ++i) {
113 get(i).name =
nullptr;
114 get(i).spacing_vec =
nullptr;
125 return strcmp(fi1.
name, fi2.
name) == 0;
131 for (
int i = 0; i < fs1.
size; ++i) {
155 char* font_name =
new char[size + 1];
156 fi->
name = font_name;
157 if (!f->
DeSerialize(font_name, size))
return false;
158 font_name[size] =
'\0';
163 int32_t size = strlen(fi.
name);
170 int32_t vec_size, kern_size;
173 if (vec_size == 0)
return true;
175 for (
int i = 0; i < vec_size; ++i) {
200 int16_t x_gap_invalid = -1;
201 for (
int i = 0; i < vec_size; ++i) {
void MoveTo(UnicityTable< FontInfo > *target)
bool write_spacing_info(FILE *f, const FontInfo &fi)
bool write_info(FILE *f, const FontInfo &fi)
void add_spacing(UNICHAR_ID uch_id, FontSpacingInfo *spacing_info)
void MoveSpacingInfoFrom(FontInfoTable *other)
bool DeSerialize(char *data, size_t count=1)
void set_clear_callback(TessCallback1< FontInfo > *cb)
bool DeSerialize(TFile *fp)
bool SerializeClasses(FILE *fp) const
bool SetContainsMultipleFontProperties(const GenericVector< ScoredFont > &font_set) const
GenericVector< int16_t > kerned_x_gaps
bool DeSerialize(bool swap, FILE *fp)
bool Serialize(FILE *fp, const char *data, size_t n)
_ConstTessMemberResultCallback_0_0< false, R, T1 >::base * NewPermanentTessCallback(const T1 *obj, R(T2::*member)() const)
bool CompareFontSet(const FontSet &fs1, const FontSet &fs2)
bool Serialize(FILE *fp) const
void set_compare_callback(TessResultCallback2< bool, FontInfo const &, FontInfo const & > *cb)
GenericVector< UNICHAR_ID > kerned_unichar_ids
int get_index(const FontInfo &object) const
void init_spacing(int unicharset_size)
void set_clear_callback(TessCallback1< T > *cb)
void set_compare_callback(TessResultCallback2< bool, T const &, T const &> *cb)
bool CompareFontInfo(const FontInfo &fi1, const FontInfo &fi2)
bool read_spacing_info(TFile *f, FontInfo *fi)
bool DeSerialize(TFile *fp)
bool SetContainsFontProperties(int font_id, const GenericVector< ScoredFont > &font_set) const
void FontSetDeleteCallback(FontSet fs)
bool read_info(TFile *f, FontInfo *fi)
int push_back(T object)
Add an element in the table.
int push_back(FontInfo object)
void FontInfoDeleteCallback(FontInfo f)
GenericVector< FontSpacingInfo * > * spacing_vec
bool DeSerializeClasses(bool swap, FILE *fp)
bool Serialize(FILE *fp) const
bool Serialize(FILE *fp) const
bool read_set(TFile *f, FontSet *fs)
bool write_set(FILE *f, const FontSet &fs)