diff --git a/third_party/txt/src/txt/font_collection.h b/third_party/txt/src/txt/font_collection.h index d7d294c4f3eaa..8c122790a3868 100644 --- a/third_party/txt/src/txt/font_collection.h +++ b/third_party/txt/src/txt/font_collection.h @@ -27,10 +27,13 @@ #include "third_party/googletest/googletest/include/gtest/gtest_prod.h" // nogncheck #include "third_party/skia/include/core/SkFontMgr.h" #include "third_party/skia/include/core/SkRefCnt.h" -#include "third_party/skia/modules/skparagraph/include/FontCollection.h" #include "txt/asset_font_manager.h" #include "txt/text_style.h" +#if FLUTTER_ENABLE_SKSHAPER +#include "third_party/skia/modules/skparagraph/include/FontCollection.h" +#endif + namespace txt { class FontCollection : public std::enable_shared_from_this { diff --git a/third_party/txt/src/txt/paragraph_builder.cc b/third_party/txt/src/txt/paragraph_builder.cc index a5a5b0a3f4322..6aaa7ba727dd7 100644 --- a/third_party/txt/src/txt/paragraph_builder.cc +++ b/third_party/txt/src/txt/paragraph_builder.cc @@ -15,11 +15,14 @@ */ #include "paragraph_builder.h" -#include "flutter/third_party/txt/src/skia/paragraph_builder_skia.h" #include "paragraph_builder_txt.h" #include "paragraph_style.h" #include "third_party/icu/source/common/unicode/unistr.h" +#if FLUTTER_ENABLE_SKSHAPER +#include "flutter/third_party/txt/src/skia/paragraph_builder_skia.h" +#endif + namespace txt { std::unique_ptr ParagraphBuilder::CreateTxtBuilder(