mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-03 17:29:04 +08:00
[test] Return early on error.
This commit is contained in:
parent
337742f9a5
commit
ca514ad91e
@ -317,6 +317,8 @@ bool PangoFontInfo::GetSpacingProperties(const std::string& utf8_char,
|
||||
int* x_bearing, int* x_advance) const {
|
||||
// Convert to equivalent PangoFont structure
|
||||
PangoFont* font = ToPangoFont();
|
||||
if (!font)
|
||||
return false;
|
||||
// Find the glyph index in the font for the supplied utf8 character.
|
||||
int total_advance = 0;
|
||||
int min_bearing = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user