diff --git a/engine/src/flutter/BUILD.gn b/engine/src/flutter/BUILD.gn index 9e169f9149a..aa8aee4ab84 100644 --- a/engine/src/flutter/BUILD.gn +++ b/engine/src/flutter/BUILD.gn @@ -49,7 +49,6 @@ group("flutter") { "$flutter_root/fml:fml_unittests", "$flutter_root/sky/engine/wtf:wtf_unittests", "$flutter_root/synchronization:synchronization_unittests", - "$flutter_root/third_party/txt:txt_benchmarks", "$flutter_root/third_party/txt:txt_unittests", "//garnet/public/lib/fxl:fxl_unittests", ] diff --git a/engine/src/flutter/third_party/txt/BUILD.gn b/engine/src/flutter/third_party/txt/BUILD.gn index a4bc85fdf29..7731f6d7419 100644 --- a/engine/src/flutter/third_party/txt/BUILD.gn +++ b/engine/src/flutter/third_party/txt/BUILD.gn @@ -100,6 +100,7 @@ source_set("txt") { "src/utils/JenkinsHash.h", "src/utils/LruCache.h", "src/utils/TypeHelpers.h", + "src/utils/WindowsUtils.h", ] if (is_mac || is_ios) { @@ -144,8 +145,6 @@ executable("txt_unittests") { "tests/ICUTestBase.h", "tests/LayoutUtilsTest.cpp", "tests/MeasurementTests.cpp", - "tests/MinikinFontForTest.cpp", - "tests/MinikinFontForTest.h", "tests/SparseBitSetTest.cpp", "tests/UnicodeUtils.cpp", "tests/UnicodeUtils.h", @@ -169,6 +168,13 @@ executable("txt_unittests") { # "tests/LayoutTest.cpp", ] + if (!is_win) { + sources += [ + "tests/MinikinFontForTest.cpp", + "tests/MinikinFontForTest.h", + ] + } + deps = [ ":txt", "//third_party/gtest", diff --git a/engine/src/flutter/third_party/txt/benchmarks/utils.h b/engine/src/flutter/third_party/txt/benchmarks/utils.h index dcdeb12bcf5..e75929a524b 100644 --- a/engine/src/flutter/third_party/txt/benchmarks/utils.h +++ b/engine/src/flutter/third_party/txt/benchmarks/utils.h @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include #include "lib/fxl/command_line.h" diff --git a/engine/src/flutter/third_party/txt/src/log/log.h b/engine/src/flutter/third_party/txt/src/log/log.h index 9dfd5e9bde1..1eaa637a387 100644 --- a/engine/src/flutter/third_party/txt/src/log/log.h +++ b/engine/src/flutter/third_party/txt/src/log/log.h @@ -20,6 +20,11 @@ #include "lib/fxl/logging.h" +#if defined(_WIN32) +// Conflicts with macro on Windows. +#undef ERROR +#endif + #ifndef LOG_ALWAYS_FATAL_IF #define LOG_ALWAYS_FATAL_IF(cond, ...) \ ((cond) ? (FXL_LOG(FATAL) << #cond) : (void)0) diff --git a/engine/src/flutter/third_party/txt/src/minikin/CmapCoverage.cpp b/engine/src/flutter/third_party/txt/src/minikin/CmapCoverage.cpp index 6de0618aed0..c61cd766e27 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/CmapCoverage.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/CmapCoverage.cpp @@ -295,7 +295,7 @@ SparseBitSet CmapCoverage::getCoverage(const uint8_t* cmap_data, } else { success = getCoverageFormat12(coverageVec, tableData, tableSize); } - if (success) { + if (success && (coverageVec.size() != 0)) { return SparseBitSet(&coverageVec.front(), coverageVec.size() >> 1); } else { return SparseBitSet(); diff --git a/engine/src/flutter/third_party/txt/src/minikin/GraphemeBreak.cpp b/engine/src/flutter/third_party/txt/src/minikin/GraphemeBreak.cpp index 30262391d56..6a7775a9e6f 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/GraphemeBreak.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/GraphemeBreak.cpp @@ -22,6 +22,7 @@ #include #include #include "MinikinInternal.h" +#include "utils/WindowsUtils.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/src/minikin/Hyphenator.cpp b/engine/src/flutter/third_party/txt/src/minikin/Hyphenator.cpp index 33ac1e7e133..321a0ec5c0d 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/Hyphenator.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/Hyphenator.cpp @@ -27,6 +27,7 @@ #define LOG_TAG "Minikin" #include "minikin/Hyphenator.h" +#include "utils/WindowsUtils.h" using std::vector; @@ -375,7 +376,7 @@ HyphenationType Hyphenator::alphabetLookup(uint16_t* alpha_codes, alpha_codes[0] = 0; for (size_t i = 0; i < len; i++) { uint16_t c = word[i]; - auto p = std::lower_bound(begin, end, c << 11); + auto p = std::lower_bound(begin, end, c << 11); if (p == end) { return HyphenationType::DONT_BREAK; } diff --git a/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp b/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp index 3f73385bbdb..b361f3010d0 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/Layout.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -577,7 +578,8 @@ BidiText::BidiText(const uint16_t* buf, } else if (bidiFlags == kBidi_Default_RTL) { bidiReq = UBIDI_DEFAULT_RTL; } - ubidi_setPara(mBidi, buf, mBufSize, bidiReq, NULL, &status); + ubidi_setPara(mBidi, reinterpret_cast(buf), mBufSize, bidiReq, + NULL, &status); if (!U_SUCCESS(status)) { ALOGE("error calling ubidi_setPara, status = %d", status); return; diff --git a/engine/src/flutter/third_party/txt/src/minikin/LineBreaker.cpp b/engine/src/flutter/third_party/txt/src/minikin/LineBreaker.cpp index 6b2d5cb8dfc..0245e579b12 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/LineBreaker.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/LineBreaker.cpp @@ -18,12 +18,14 @@ #define LOG_TAG "Minikin" +#include #include #include #include #include +#include #include "LayoutUtils.h" using std::vector; diff --git a/engine/src/flutter/third_party/txt/src/minikin/SparseBitSet.cpp b/engine/src/flutter/third_party/txt/src/minikin/SparseBitSet.cpp index 002eacae3fa..edb5160c383 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/SparseBitSet.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/SparseBitSet.cpp @@ -22,6 +22,7 @@ #include #include +#include namespace minikin { @@ -106,10 +107,16 @@ void SparseBitSet::initFromRanges(const uint32_t* ranges, size_t nRanges) { } } +#if defined(_WIN32) +int SparseBitSet::CountLeadingZeros(element x) { + return sizeof(element) <= sizeof(int) ? clz_win(x) : clzl_win(x); +} +#else int SparseBitSet::CountLeadingZeros(element x) { // Note: GCC / clang builtin return sizeof(element) <= sizeof(int) ? __builtin_clz(x) : __builtin_clzl(x); } +#endif uint32_t SparseBitSet::nextSetBit(uint32_t fromIndex) const { if (fromIndex >= mMaxVal) { diff --git a/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.cpp b/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.cpp index 5b69acd3430..3e1dec1c95f 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.cpp +++ b/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.cpp @@ -50,7 +50,8 @@ void WordBreaker::setText(const uint16_t* data, size_t size) { mScanOffset = 0; mInEmailOrUrl = false; UErrorCode status = U_ZERO_ERROR; - utext_openUChars(&mUText, data, size, &status); + utext_openUChars(&mUText, reinterpret_cast(data), size, + &status); mBreakIterator->setText(&mUText, status); mBreakIterator->first(); } diff --git a/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.h b/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.h index 60424783d4d..27072517ce2 100644 --- a/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.h +++ b/engine/src/flutter/third_party/txt/src/minikin/WordBreaker.h @@ -25,6 +25,7 @@ #include #include "unicode/brkiter.h" +#include "utils/WindowsUtils.h" namespace minikin { diff --git a/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.cc b/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.cc index 223e3839f1f..08f9c98aca6 100644 --- a/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.cc +++ b/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.cc @@ -15,6 +15,7 @@ */ #include "txt/asset_font_manager.h" +#include #include "lib/fxl/logging.h" namespace txt { diff --git a/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.h b/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.h index 6c78bea9853..646caf3446c 100644 --- a/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.h +++ b/engine/src/flutter/third_party/txt/src/txt/asset_font_manager.h @@ -19,6 +19,7 @@ #include #include "lib/fxl/macros.h" +#include "third_party/skia/include/core/SkStream.h" #include "third_party/skia/include/ports/SkFontMgr.h" #include "txt/asset_data_provider.h" diff --git a/engine/src/flutter/third_party/txt/src/txt/directory_asset_data_provider.cc b/engine/src/flutter/third_party/txt/src/txt/directory_asset_data_provider.cc index c8247697892..0a78bcb95cf 100644 --- a/engine/src/flutter/third_party/txt/src/txt/directory_asset_data_provider.cc +++ b/engine/src/flutter/third_party/txt/src/txt/directory_asset_data_provider.cc @@ -3,16 +3,44 @@ // found in the LICENSE file. #include "txt/directory_asset_data_provider.h" -#include #include #include "lib/fxl/logging.h" #include "third_party/skia/include/core/SkStream.h" #include "third_party/skia/include/core/SkTypeface.h" +#include "utils/WindowsUtils.h" + +#if !defined(_WIN32) +#include +#endif namespace txt { DirectoryAssetDataProvider::DirectoryAssetDataProvider( const std::string& directory_path) { +#if defined(_WIN32) + std::string path = directory_path + "\\*"; + WIN32_FIND_DATAA ffd; + HANDLE directory = FindFirstFileA(path.c_str(), &ffd); + if (directory == INVALID_HANDLE_VALUE) { + return; + } + + do { + if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) { + continue; + } + + std::string file_name(ffd.cFileName); + + std::stringstream file_path; + file_path << directory_path << "/" << file_name; + + RegisterTypeface(SkTypeface::MakeFromFile(file_path.str().c_str())); + } while (FindNextFileA(directory, &ffd) != 0); + + // TODO(bkonyi): check for error here? + FindClose(directory); +#else auto directory_closer = [](DIR* directory) { if (directory != nullptr) { ::closedir(directory); @@ -39,6 +67,7 @@ DirectoryAssetDataProvider::DirectoryAssetDataProvider( RegisterTypeface(SkTypeface::MakeFromFile(file_path.str().c_str())); } +#endif } DirectoryAssetDataProvider::~DirectoryAssetDataProvider() = default; diff --git a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc index 466b8c35c3e..9c1c281d6bf 100644 --- a/engine/src/flutter/third_party/txt/src/txt/paragraph.cc +++ b/engine/src/flutter/third_party/txt/src/txt/paragraph.cc @@ -78,6 +78,8 @@ int GetWeight(const FontWeight weight) { return 8; case FontWeight::w900: return 9; + default: + return -1; } } @@ -87,10 +89,11 @@ int GetWeight(const TextStyle& style) { bool GetItalic(const TextStyle& style) { switch (style.font_style) { - case FontStyle::normal: - return false; case FontStyle::italic: return true; + case FontStyle::normal: + default: + return false; } } diff --git a/engine/src/flutter/third_party/txt/src/txt/paragraph.h b/engine/src/flutter/third_party/txt/src/txt/paragraph.h index cd421d7a2ba..deb955dc048 100644 --- a/engine/src/flutter/third_party/txt/src/txt/paragraph.h +++ b/engine/src/flutter/third_party/txt/src/txt/paragraph.h @@ -32,6 +32,7 @@ #include "third_party/skia/include/core/SkPoint.h" #include "third_party/skia/include/core/SkRect.h" #include "third_party/skia/include/core/SkTextBlob.h" +#include "utils/WindowsUtils.h" class SkCanvas; @@ -164,10 +165,10 @@ class Paragraph { FRIEND_TEST(ParagraphTest, RainbowParagraph); FRIEND_TEST(ParagraphTest, DefaultStyleParagraph); FRIEND_TEST(ParagraphTest, BoldParagraph); - FRIEND_TEST(ParagraphTest, LeftAlignParagraph); - FRIEND_TEST(ParagraphTest, RightAlignParagraph); - FRIEND_TEST(ParagraphTest, CenterAlignParagraph); - FRIEND_TEST(ParagraphTest, JustifyAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, LeftAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, RightAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, CenterAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, JustifyAlignParagraph); FRIEND_TEST(ParagraphTest, DecorationsParagraph); FRIEND_TEST(ParagraphTest, ItalicsParagraph); FRIEND_TEST(ParagraphTest, ChineseParagraph); @@ -175,8 +176,8 @@ class Paragraph { FRIEND_TEST(ParagraphTest, SpacingParagraph); FRIEND_TEST(ParagraphTest, LongWordParagraph); FRIEND_TEST(ParagraphTest, KernScaleParagraph); - FRIEND_TEST(ParagraphTest, NewlineParagraph); - FRIEND_TEST(ParagraphTest, EmojiParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, NewlineParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, EmojiParagraph); FRIEND_TEST(ParagraphTest, HyphenBreakParagraph); FRIEND_TEST(ParagraphTest, RepeatLayoutParagraph); FRIEND_TEST(ParagraphTest, Ellipsize); diff --git a/engine/src/flutter/third_party/txt/src/txt/styled_runs.cc b/engine/src/flutter/third_party/txt/src/txt/styled_runs.cc index 54b61daadc1..966817d0882 100644 --- a/engine/src/flutter/third_party/txt/src/txt/styled_runs.cc +++ b/engine/src/flutter/third_party/txt/src/txt/styled_runs.cc @@ -17,6 +17,7 @@ #include "styled_runs.h" #include "lib/fxl/logging.h" +#include "utils/WindowsUtils.h" namespace txt { diff --git a/engine/src/flutter/third_party/txt/src/txt/styled_runs.h b/engine/src/flutter/third_party/txt/src/txt/styled_runs.h index 10ddb872d72..0eb4b41d7fb 100644 --- a/engine/src/flutter/third_party/txt/src/txt/styled_runs.h +++ b/engine/src/flutter/third_party/txt/src/txt/styled_runs.h @@ -22,6 +22,7 @@ #include "text_style.h" #include "third_party/gtest/include/gtest/gtest_prod.h" +#include "utils/WindowsUtils.h" namespace txt { @@ -66,10 +67,10 @@ class StyledRuns { FRIEND_TEST(ParagraphTest, RainbowParagraph); FRIEND_TEST(ParagraphTest, DefaultStyleParagraph); FRIEND_TEST(ParagraphTest, BoldParagraph); - FRIEND_TEST(ParagraphTest, LeftAlignParagraph); - FRIEND_TEST(ParagraphTest, RightAlignParagraph); - FRIEND_TEST(ParagraphTest, CenterAlignParagraph); - FRIEND_TEST(ParagraphTest, JustifyAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, LeftAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, RightAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, CenterAlignParagraph); + FRIEND_TEST_WINDOWS_DISABLED(ParagraphTest, JustifyAlignParagraph); FRIEND_TEST(ParagraphTest, DecorationsParagraph); FRIEND_TEST(ParagraphTest, ItalicsParagraph); FRIEND_TEST(ParagraphTest, ChineseParagraph); @@ -84,6 +85,9 @@ class StyledRuns { size_t style_index = 0; size_t start = 0; size_t end = 0; + + explicit IndexedRun(size_t style_index, size_t start, size_t end) + : style_index(style_index), start(start), end(end) {} }; std::vector styles_; diff --git a/engine/src/flutter/third_party/txt/src/utils/WindowsUtils.h b/engine/src/flutter/third_party/txt/src/utils/WindowsUtils.h new file mode 100644 index 00000000000..d846b193c69 --- /dev/null +++ b/engine/src/flutter/third_party/txt/src/utils/WindowsUtils.h @@ -0,0 +1,59 @@ +/* + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef WINDOWS_UTILS_H +#define WINDOWS_UTILS_H + +#if defined(_WIN32) +#define DISABLE_TEST_WINDOWS(TEST_NAME) DISABLED_##TEST_NAME +#define FRIEND_TEST_WINDOWS_DISABLED_EXPANDED(SUITE, TEST_NAME) \ + FRIEND_TEST(SUITE, TEST_NAME) +#define FRIEND_TEST_WINDOWS_DISABLED(SUITE, TEST_NAME) \ + FRIEND_TEST_WINDOWS_DISABLED_EXPANDED(SUITE, DISABLE_TEST_WINDOWS(TEST_NAME)) + +#define NOMINMAX +#include +#include +#include + +#undef ERROR + +inline unsigned int clz_win(unsigned int num) { + unsigned long r = 0; + _BitScanReverse(&r, num); + return r; +} + +inline unsigned int clzl_win(unsigned long num) { + unsigned long r = 0; + _BitScanReverse64(&r, num); + return r; +} + +inline unsigned int ctz_win(unsigned int num) { + unsigned long r = 0; + _BitScanForward(&r, num); + return r; +} + +typedef SSIZE_T ssize_t; + +#else +#define DISABLE_TEST_WINDOWS(TEST_NAME) TEST_NAME +#define FRIEND_TEST_WINDOWS_DISABLED(SUITE, TEST_NAME) \ + FRIEND_TEST(SUITE, TEST_NAME) +#endif // defined(_WIN32) +#endif // WINDOWS_UTILS_H diff --git a/engine/src/flutter/third_party/txt/tests/CmapCoverageTest.cpp b/engine/src/flutter/third_party/txt/tests/CmapCoverageTest.cpp index f32c76653dd..08c5521cf06 100644 --- a/engine/src/flutter/third_party/txt/tests/CmapCoverageTest.cpp +++ b/engine/src/flutter/third_party/txt/tests/CmapCoverageTest.cpp @@ -20,6 +20,7 @@ #include #include #include +#include namespace minikin { @@ -65,8 +66,12 @@ static std::vector buildCmapFormat4Table( head = writeU16(segmentCount * 2, out.data(), head); // segCountX2 head = writeU16(searchRange, out.data(), head); // searchRange +#if defined(_WIN32) + head = writeU16(ctz_win(searchRange) - 1, out.data(), head); +#else head = writeU16(__builtin_ctz(searchRange) - 1, out.data(), head); // entrySelector +#endif head = writeU16(segmentCount * 2 - searchRange, out.data(), head); // rangeShift diff --git a/engine/src/flutter/third_party/txt/tests/UnicodeUtils.cpp b/engine/src/flutter/third_party/txt/tests/UnicodeUtils.cpp index 7df5fe32607..4e959e77db7 100644 --- a/engine/src/flutter/third_party/txt/tests/UnicodeUtils.cpp +++ b/engine/src/flutter/third_party/txt/tests/UnicodeUtils.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc b/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc index e6b636904d8..494012da9a2 100644 --- a/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc +++ b/engine/src/flutter/third_party/txt/tests/paragraph_unittests.cc @@ -24,6 +24,8 @@ #include "txt/paragraph_builder.h" #include "utils.h" +#define DISABLE_ON_WINDOWS(TEST) DISABLE_TEST_WINDOWS(TEST) + namespace txt { using ParagraphTest = RenderTest; @@ -253,7 +255,7 @@ TEST_F(ParagraphTest, BoldParagraph) { ASSERT_TRUE(Snapshot()); } -TEST_F(ParagraphTest, LeftAlignParagraph) { +TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(LeftAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " @@ -349,7 +351,7 @@ TEST_F(ParagraphTest, LeftAlignParagraph) { ASSERT_TRUE(Snapshot()); } -TEST_F(ParagraphTest, RightAlignParagraph) { +TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(RightAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " @@ -452,7 +454,7 @@ TEST_F(ParagraphTest, RightAlignParagraph) { ASSERT_TRUE(Snapshot()); } -TEST_F(ParagraphTest, CenterAlignParagraph) { +TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(CenterAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " @@ -559,7 +561,7 @@ TEST_F(ParagraphTest, CenterAlignParagraph) { ASSERT_TRUE(Snapshot()); } -TEST_F(ParagraphTest, JustifyAlignParagraph) { +TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(JustifyAlignParagraph)) { const char* text = "This is a very long sentence to test if the text will properly wrap " "around and go to the next line. Sometimes, short sentence. Longer " @@ -913,7 +915,7 @@ TEST_F(ParagraphTest, GetGlyphPositionAtCoordinateParagraph) { ASSERT_EQ(paragraph->GetGlyphPositionAtCoordinate(85, 10000).position, 74ull); } -TEST_F(ParagraphTest, GetRectsForRangeParagraph) { +TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(GetRectsForRangeParagraph)) { const char* text = "12345, \"67890\" 12345 67890 12345 67890 12345 67890 12345 67890 12345 " "67890 12345"; @@ -1305,7 +1307,7 @@ TEST_F(ParagraphTest, KernScaleParagraph) { EXPECT_DOUBLE_EQ(paragraph->records_[4].offset().x(), 253.36328125f); } -TEST_F(ParagraphTest, NewlineParagraph) { +TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(NewlineParagraph)) { txt::ParagraphStyle paragraph_style; paragraph_style.break_strategy = minikin::kBreakStrategy_HighQuality; @@ -1344,7 +1346,7 @@ TEST_F(ParagraphTest, NewlineParagraph) { EXPECT_DOUBLE_EQ(paragraph->records_[6].offset().x(), 0); } -TEST_F(ParagraphTest, EmojiParagraph) { +TEST_F(ParagraphTest, DISABLE_ON_WINDOWS(EmojiParagraph)) { const char* text = "πŸ˜€πŸ˜ƒπŸ˜„πŸ˜πŸ˜†πŸ˜…πŸ˜‚πŸ€£β˜ΊπŸ˜‡πŸ™‚πŸ˜πŸ˜‘πŸ˜ŸπŸ˜’πŸ˜»πŸ‘½πŸ’©πŸ‘πŸ‘ŽπŸ™πŸ‘ŒπŸ‘‹πŸ‘„πŸ‘πŸ‘¦πŸ‘ΌπŸ‘¨β€πŸš€πŸ‘¨β€πŸš’πŸ™‹β€β™‚οΈπŸ‘³πŸ‘¨β€πŸ‘¨β€πŸ‘§β€πŸ‘§\ πŸ’ΌπŸ‘‘πŸ‘ β˜‚πŸΆπŸ°πŸ»πŸΌπŸ·πŸ’πŸ΅πŸ”πŸ§πŸ¦πŸ‹πŸŸπŸ‘πŸ•ΈπŸŒπŸ΄πŸŠπŸ„πŸͺ🐘🌸🌏πŸ”₯πŸŒŸπŸŒšπŸŒπŸ’¦πŸ’§\