fix viewer build Fixes an issue I introduced when adding the features functionality. I imported harfbuzz from our text header which causes all downstream users to need to know where the harfbuzz includes are. This isn't necessary and slows down the compiler too. Diffs= 500d878a2 fix viewer build (#5493) Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
diff --git a/.rive_head b/.rive_head index c5fb219..af36ab6 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -31d9a54243e694ede76dc133cf209d7b67c13708 +500d878a23cb0f8a5a65aca9ac80d5c79fc92eb6
diff --git a/include/rive/text/font_hb.hpp b/include/rive/text/font_hb.hpp index 23b7a11..05e0c1a 100644 --- a/include/rive/text/font_hb.hpp +++ b/include/rive/text/font_hb.hpp
@@ -7,10 +7,13 @@ #include "rive/factory.hpp" #include "rive/text_engine.hpp" -#include "hb.h" #include <unordered_map> +struct hb_font_t; +struct hb_draw_funcs_t; +struct hb_feature_t; + class HBFont : public rive::Font { public: @@ -37,8 +40,8 @@ private: HBFont(hb_font_t* font, - std::unordered_map<hb_tag_t, float> axisValues, - std::unordered_map<hb_tag_t, uint32_t> featureValues, + std::unordered_map<uint32_t, float> axisValues, + std::unordered_map<uint32_t, uint32_t> featureValues, std::vector<hb_feature_t> features); // If the platform can supply fallback font(s), set this function pointer. @@ -60,10 +63,10 @@ hb_draw_funcs_t* m_drawFuncs; // Feature value lookup based on tag. - std::unordered_map<hb_tag_t, uint32_t> m_featureValues; + std::unordered_map<uint32_t, uint32_t> m_featureValues; // Axis value lookup based on for the feature. - std::unordered_map<hb_tag_t, float> m_axisValues; + std::unordered_map<uint32_t, float> m_axisValues; }; #endif