Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a56cda

Browse files
committed
Fix compilation
1 parent 8dae818 commit 4a56cda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ft2font.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#define NO_IMPORT_ARRAY
44

5+
#include <string>
6+
57
#include "ft2font.h"
68
#include "mplutils.h"
79

@@ -649,8 +651,7 @@ void FT2Font::set_text(
649651
}
650652
error = FT_Load_Glyph(face, glyph_index, flags);
651653
if (error) {
652-
std::cerr << "\tcould not load glyph for " << thischar << std::endl;
653-
continue;
654+
throw "could not load glyph";
654655
}
655656
// ignore errors, jump to next glyph
656657

@@ -660,8 +661,7 @@ void FT2Font::set_text(
660661
error = FT_Get_Glyph(face->glyph, &thisGlyph);
661662

662663
if (error) {
663-
std::cerr << "\tcould not get glyph for " << thischar << std::endl;
664-
continue;
664+
throw "could not get glyph";
665665
}
666666
// ignore errors, jump to next glyph
667667

0 commit comments

Comments
 (0)