mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-24 11:09:06 +08:00
Applied patch to fix issue 1098
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@1066 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
bfb0e392d1
commit
a9f483cffc
@ -186,6 +186,7 @@ bool read_spacing_info(FILE *f, FontInfo* fi, bool swap) {
|
||||
if (fread(&fs->x_gap_before, sizeof(fs->x_gap_before), 1, f) != 1 ||
|
||||
fread(&fs->x_gap_after, sizeof(fs->x_gap_after), 1, f) != 1 ||
|
||||
fread(&kern_size, sizeof(kern_size), 1, f) != 1) {
|
||||
delete fs;
|
||||
return false;
|
||||
}
|
||||
if (swap) {
|
||||
@ -199,6 +200,7 @@ bool read_spacing_info(FILE *f, FontInfo* fi, bool swap) {
|
||||
}
|
||||
if (kern_size > 0 && (!fs->kerned_unichar_ids.DeSerialize(swap, f) ||
|
||||
!fs->kerned_x_gaps.DeSerialize(swap, f))) {
|
||||
delete fs;
|
||||
return false;
|
||||
}
|
||||
fi->add_spacing(i, fs);
|
||||
|
Loading…
Reference in New Issue
Block a user