@@ -441,9 +441,10 @@ int main(int argc, char** argv) {
441
441
if (!FLAGS_find_fonts && !FontUtils::IsAvailableFont (FLAGS_font.c_str ())) {
442
442
string pango_name;
443
443
if (!FontUtils::IsAvailableFont (FLAGS_font.c_str (), &pango_name)) {
444
- tprintf (" Could not find font named %s. Pango suggested font %s\n " ,
444
+ tprintf (" Could not find font named %s. Pango suggested font %s\n "
445
+ " Please correct --font arg.\n " ,
445
446
FLAGS_font.c_str (), pango_name.c_str ());
446
- TLOG_FATAL ( " Please correct --font arg. " );
447
+ exit ( 1 );
447
448
}
448
449
}
449
450
@@ -487,7 +488,8 @@ int main(int argc, char** argv) {
487
488
render.set_gravity_hint_strong (true );
488
489
render.set_render_fullwidth_latin (true );
489
490
} else {
490
- TLOG_FATAL (" Invalid writing mode : %s\n " , FLAGS_writing_mode.c_str ());
491
+ tprintf (" Invalid writing mode: %s\n " , FLAGS_writing_mode.c_str ());
492
+ exit (1 );
491
493
}
492
494
493
495
string src_utf8;
@@ -512,8 +514,9 @@ int main(int argc, char** argv) {
512
514
UNICHARSET unicharset;
513
515
if (FLAGS_render_ngrams && !FLAGS_unicharset_file.empty () &&
514
516
!unicharset.load_from_file (FLAGS_unicharset_file.c_str ())) {
515
- TLOG_FATAL (" Failed to load unicharset from file %s\n " ,
517
+ tprintf (" Failed to load unicharset from file %s\n " ,
516
518
FLAGS_unicharset_file.c_str ());
519
+ exit (1 );
517
520
}
518
521
519
522
// If we are rendering ngrams that will be OCRed later, shuffle them so that
0 commit comments