mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-05 02:47:00 +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 {
|
int* x_bearing, int* x_advance) const {
|
||||||
// Convert to equivalent PangoFont structure
|
// Convert to equivalent PangoFont structure
|
||||||
PangoFont* font = ToPangoFont();
|
PangoFont* font = ToPangoFont();
|
||||||
|
if (!font)
|
||||||
|
return false;
|
||||||
// Find the glyph index in the font for the supplied utf8 character.
|
// Find the glyph index in the font for the supplied utf8 character.
|
||||||
int total_advance = 0;
|
int total_advance = 0;
|
||||||
int min_bearing = 0;
|
int min_bearing = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user