Skip to content

Commit

Permalink
Fixed #21
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiYueCommentary committed Oct 20, 2024
1 parent 785a2d5 commit 0010bf7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gxruntime/gxfont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "gxcanvas.h"
#include "gxgraphics.h"
#include "gxutf8.h"
#include "../bbruntime/bbsys.h"

#include <inttypes.h>
#include <stdlib.h>
Expand All @@ -14,10 +15,12 @@ gxFont::gxFont(FT_Library ftLibrary, gxGraphics* gfx, const std::string& fn, int
filename = fn;
height = h;

FT_New_Face(ftLibrary,
if (FT_New_Face(ftLibrary,
filename.c_str(),
0,
&freeTypeFace);
&freeTypeFace)) {
RTEX(std::format("Failed to load file: {}", fn).c_str());
}

FT_Set_Pixel_Sizes(freeTypeFace,
0,
Expand Down

0 comments on commit 0010bf7

Please # to comment.