diff --git a/Common/Render/Text/draw_text_sdl.h b/Common/Render/Text/draw_text_sdl.h index 267028638f..7c073a8290 100644 --- a/Common/Render/Text/draw_text_sdl.h +++ b/Common/Render/Text/draw_text_sdl.h @@ -5,13 +5,15 @@ #include #include "Common/Render/Text/draw_text.h" +#if defined(USE_SDL2_TTF) + +#include "SDL2/SDL.h" +#include "SDL2/SDL_ttf.h" + #if defined(USE_SDL2_TTF_FONTCONFIG) #include #endif -// SDL2_ttf's TTF_Font is a typedef of _TTF_Font. -struct _TTF_Font; - class TextDrawerSDL : public TextDrawer { public: TextDrawerSDL(Draw::DrawContext *draw); @@ -32,9 +34,9 @@ private: uint32_t CheckMissingGlyph(std::string_view text); int FindFallbackFonts(uint32_t missingGlyph, int ptSize); - std::map fontMap_; + std::map fontMap_; - std::vector<_TTF_Font *> fallbackFonts_; + std::vector fallbackFonts_; std::vector> fallbackFontPaths_; // path and font face index std::map glyphFallbackFontIndex_; @@ -43,3 +45,5 @@ private: FcConfig *config; #endif }; + +#endif