#pragma once #include "ppsspp_config.h" #if PPSSPP_PLATFORM(MAC) || PPSSPP_PLATFORM(IOS) #include #include "Common/Render/Text/draw_text.h" struct TextDrawerContext; // Internal struct but all details in .cpp file (pimpl to avoid pulling in excessive headers here) class TextDrawerFontContext; class TextDrawerCocoa : public TextDrawer { public: TextDrawerCocoa(Draw::DrawContext *draw); ~TextDrawerCocoa(); void SetOrCreateFont(const FontStyle &style) override; bool DrawStringBitmap(std::vector &bitmapData, TextStringEntry &entry, Draw::DataFormat texFormat, std::string_view str, int align, bool fullColor) override; protected: void MeasureStringInternal(std::string_view str, float *w, float *h) override; bool SupportsColorEmoji() const override { return true; } void ClearFonts() override; TextDrawerContext *ctx_; std::map> fontMap_; }; #endif