From 5939dd5b412fcc1ef857711a137589aa865bd442 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 22 Apr 2016 10:38:42 -0700 Subject: [core] Use the proper type for font stacks --- include/mbgl/storage/resource.hpp | 3 ++- include/mbgl/style/types.hpp | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mbgl/storage/resource.hpp b/include/mbgl/storage/resource.hpp index edd9f58c72..296dff7f3d 100644 --- a/include/mbgl/storage/resource.hpp +++ b/include/mbgl/storage/resource.hpp @@ -3,6 +3,7 @@ #include #include +#include #include @@ -42,7 +43,7 @@ public: int32_t y, int8_t z); static Resource glyphs(const std::string& urlTemplate, - const std::string& fontStack, + const FontStack& fontStack, const std::pair& glyphRange); static Resource spriteImage(const std::string& base, float pixelRatio); static Resource spriteJSON(const std::string& base, float pixelRatio); diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index 999b8d8b79..ca56d39991 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -5,12 +5,21 @@ #include #include +#include namespace mbgl { // Stores a premultiplied color, with all four channels ranging from 0..1 -typedef std::array Color; +using Color = std::array; +// An array of font names +using FontStack = std::vector; + +std::string fontStackToString(const FontStack&); + +struct FontStackHash { + std::size_t operator()(const FontStack&) const; +}; template struct Faded { -- cgit v1.2.1