diff --git a/src/gfx_layout.h b/src/gfx_layout.h --- a/src/gfx_layout.h +++ b/src/gfx_layout.h @@ -80,7 +80,7 @@ public: Font(FontSize size, TextColour colour); }; -/** Mapping from index to font. */ +/** Mapping from index to font. The pointer is owned by FontColourMap. */ using FontMap = std::map; /** @@ -169,7 +169,7 @@ private: static LineCacheItem &GetCachedParagraphLayout(std::string_view str, const FontState &state); - using FontColourMap = std::map; + using FontColourMap = std::map>; static FontColourMap fonts[FS_END]; public: static Font *GetFont(FontSize size, TextColour colour);