Loading libs/hwui/hwui/Typeface.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -182,10 +182,11 @@ void Typeface::setRobotoTypefaceForTest() { std::shared_ptr<minikin::MinikinFont> font = std::make_shared<MinikinFontSkia>( std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>()); std::shared_ptr<minikin::FontFamily> family = std::make_shared<minikin::FontFamily>( std::vector<minikin::Font>({minikin::Font(std::move(font), minikin::FontStyle())})); std::shared_ptr<minikin::FontCollection> collection = std::make_shared<minikin::FontCollection>(std::move(family)); std::vector<minikin::Font> fonts; fonts.push_back(minikin::Font(std::move(font), minikin::FontStyle())); std::shared_ptr<minikin::FontCollection> collection = std::make_shared<minikin::FontCollection>( std::make_shared<minikin::FontFamily>(std::move(fonts))); Typeface* hwTypeface = new Typeface(); hwTypeface->fFontCollection = collection; Loading libs/hwui/tests/unit/TypefaceTests.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -56,8 +56,9 @@ std::shared_ptr<minikin::FontFamily> buildFamily(const char* fileName) { LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", fileName); std::shared_ptr<minikin::MinikinFont> font = std::make_shared<MinikinFontSkia>( std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>()); return std::make_shared<minikin::FontFamily>( std::vector<minikin::Font>({minikin::Font(std::move(font), minikin::FontStyle())})); std::vector<minikin::Font> fonts; fonts.push_back(minikin::Font(std::move(font), minikin::FontStyle())); return std::make_shared<minikin::FontFamily>(std::move(fonts)); } std::vector<std::shared_ptr<minikin::FontFamily>> makeSingleFamlyVector(const char* fileName) { Loading Loading
libs/hwui/hwui/Typeface.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -182,10 +182,11 @@ void Typeface::setRobotoTypefaceForTest() { std::shared_ptr<minikin::MinikinFont> font = std::make_shared<MinikinFontSkia>( std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>()); std::shared_ptr<minikin::FontFamily> family = std::make_shared<minikin::FontFamily>( std::vector<minikin::Font>({minikin::Font(std::move(font), minikin::FontStyle())})); std::shared_ptr<minikin::FontCollection> collection = std::make_shared<minikin::FontCollection>(std::move(family)); std::vector<minikin::Font> fonts; fonts.push_back(minikin::Font(std::move(font), minikin::FontStyle())); std::shared_ptr<minikin::FontCollection> collection = std::make_shared<minikin::FontCollection>( std::make_shared<minikin::FontFamily>(std::move(fonts))); Typeface* hwTypeface = new Typeface(); hwTypeface->fFontCollection = collection; Loading
libs/hwui/tests/unit/TypefaceTests.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -56,8 +56,9 @@ std::shared_ptr<minikin::FontFamily> buildFamily(const char* fileName) { LOG_ALWAYS_FATAL_IF(typeface == nullptr, "Failed to make typeface from %s", fileName); std::shared_ptr<minikin::MinikinFont> font = std::make_shared<MinikinFontSkia>( std::move(typeface), data, st.st_size, 0, std::vector<minikin::FontVariation>()); return std::make_shared<minikin::FontFamily>( std::vector<minikin::Font>({minikin::Font(std::move(font), minikin::FontStyle())})); std::vector<minikin::Font> fonts; fonts.push_back(minikin::Font(std::move(font), minikin::FontStyle())); return std::make_shared<minikin::FontFamily>(std::move(fonts)); } std::vector<std::shared_ptr<minikin::FontFamily>> makeSingleFamlyVector(const char* fileName) { Loading