diff --git a/unittest/ligature_table_test.cc b/unittest/ligature_table_test.cc index 44ada686..404c2b12 100644 --- a/unittest/ligature_table_test.cc +++ b/unittest/ligature_table_test.cc @@ -17,6 +17,7 @@ namespace tesseract { +#if 0 // not with NFC normalization const char kEngNonLigatureText[] = "fidelity effigy ſteep"; // Same as above text, but with "fi" in the first word and "ffi" in the second // word replaced with their respective ligatures. @@ -24,6 +25,7 @@ const char kEngLigatureText[] = "fidelity effigy ſteep"; // Same as kEngLigatureText but with "fi" in both words replaced with their // ligature. The test Verdana font does not support the "ffi" or "ſt" ligature. const char kRenderableEngLigatureText[] = "fidelity effigy ſteep"; +#endif static PangoFontMap *font_map; @@ -54,6 +56,7 @@ TEST_F(LigatureTableTest, DoesFillLigatureTables) { EXPECT_GT(lig_table_->lig_to_norm_table().size(), 0); } +#if 0 // not with NFC normalization TEST_F(LigatureTableTest, DoesAddLigatures) { EXPECT_STREQ(kEngLigatureText, lig_table_->AddLigatures(kEngNonLigatureText, nullptr).c_str()); } @@ -76,6 +79,7 @@ TEST_F(LigatureTableTest, DoesNotAddLigaturesWithUnsupportedFont) { TEST_F(LigatureTableTest, DoesRemoveLigatures) { EXPECT_STREQ(kEngNonLigatureText, lig_table_->RemoveLigatures(kEngLigatureText).c_str()); } +#endif TEST_F(LigatureTableTest, TestCustomLigatures) { const char *kTestCases[] = { @@ -89,6 +93,7 @@ TEST_F(LigatureTableTest, TestCustomLigatures) { } } +#if 0 // not with NFC normalization TEST_F(LigatureTableTest, TestRemovesCustomLigatures) { const char *kTestCases[] = { "fiction", @@ -100,4 +105,6 @@ TEST_F(LigatureTableTest, TestRemovesCustomLigatures) { EXPECT_STREQ(kTestCases[i + 2], lig_table_->RemoveCustomLigatures(kTestCases[i + 1]).c_str()); } } +#endif + } // namespace tesseract diff --git a/unittest/stringrenderer_test.cc b/unittest/stringrenderer_test.cc index fd846a91..34a8e180 100644 --- a/unittest/stringrenderer_test.cc +++ b/unittest/stringrenderer_test.cc @@ -313,10 +313,12 @@ TEST_F(StringRendererTest, DoesLigatureTextForRendering) { EXPECT_EQ(strlen(kEngNonLigatureText), renderer_->RenderToImage(kEngNonLigatureText, strlen(kEngNonLigatureText), &pix)); pix.destroy(); +#if 0 // not with NFC normalization // There should be one less box than letters due to the 'fi' ligature. EXPECT_EQ(strlen(kEngNonLigatureText) - 1, renderer_->GetBoxes().size()); // The output box text should be ligatured. EXPECT_STREQ("fi", renderer_->GetBoxes()[0]->ch().c_str()); +#endif } TEST_F(StringRendererTest, DoesRetainInputLigatureForRendering) {