Lines Matching defs:text
73 std::u16string mirror(const std::string& text) {
76 for (auto i = text.size(); i > 0; --i) {
77 result += text[i - 1];
83 std::u16string straight(const std::string& text) {
86 for (auto ch : text) {
207 const char* text = "Hello World Text Dialog";
208 const size_t len = strlen(text);
218 builder.addText(text, len);
247 const char* text = "AAAAAAAAAA";
248 const size_t len = strlen(text);
261 builder.addText(text, len);
285 const char* text = "012 34";
286 const size_t len = strlen(text);
302 builder.addText(text, len);
306 builder.addText(text, len);
313 builder.addText(text, len);
315 builder.addText(text, len);
316 builder.addText(text, len);
323 builder.addText(text, len);
324 builder.addText(text, len);
325 builder.addText(text, len);
326 builder.addText(text, len);
327 builder.addText(text, len);
330 builder.addText(text, len);
331 builder.addText(text, len);
384 const char* text = "012 34";
385 const size_t len = strlen(text);
401 builder.addText(text, len);
405 builder.addText(text, len);
440 const char* text = "012 34";
441 const size_t len = strlen(text);
457 builder.addText(text, len);
461 builder.addText(text, len);
496 const char* text = "012 34";
497 const size_t len = strlen(text);
513 builder.addText(text, len);
517 builder.addText(text, len);
552 const char* text = "012 34";
553 const size_t len = strlen(text);
569 builder.addText(text, len);
573 builder.addText(text, len);
606 const char* text = "012 34";
607 const size_t len = strlen(text);
623 builder.addText(text, len);
627 builder.addText(text, len);
660 const char* text = "012 34";
661 const size_t len = strlen(text);
677 builder.addText(text, len);
681 builder.addText(text, len);
714 const char* text = "給能上目秘使";
715 const size_t len = strlen(text);
731 builder.addText(text, len);
734 builder.addText(text, len);
767 const char* text = "012 34";
768 const size_t len = strlen(text);
784 builder.addText(text, len);
794 builder.addText(text, len);
818 builder.addText(text, len);
822 builder.addText(text, len);
823 builder.addText(text, len);
824 builder.addText(text, len);
825 builder.addText(text, len);
830 builder.addText(text, len);
834 builder.addText(text, len);
835 builder.addText(text, len);
836 builder.addText(text, len);
837 builder.addText(text, len);
838 builder.addText(text, len);
839 builder.addText(text, len);
840 builder.addText(text, len);
841 builder.addText(text, len);
842 builder.addText(text, len);
843 builder.addText(text, len);
844 builder.addText(text, len);
845 builder.addText(text, len);
846 builder.addText(text, len);
847 builder.addText(text, len);
848 builder.addText(text, len);
849 builder.addText(text, len);
850 builder.addText(text, len);
851 builder.addText(text, len);
852 builder.addText(text, len);
902 const char* text = "012 34";
903 const size_t len = strlen(text);
919 builder.addText(text, len);
948 builder.addText(text, len);
957 builder.addText(text, len);
958 builder.addText(text, len);
959 builder.addText(text, len);
960 builder.addText(text, len);
961 builder.addText(text, len);
962 builder.addText(text, len);
963 builder.addText(text, len);
964 builder.addText(text, len);
965 builder.addText(text, len);
966 builder.addText(text, len);
967 builder.addText(text, len); // 11
975 builder.addText(text, len);
1028 const char* text = "I am RED";
1029 const size_t len = strlen(text);
1039 builder.addText(text, len);
1138 auto rects = paragraph->getRectsForRange(0, impl->text().size(), RectHeightStyle::kMax, RectWidthStyle::kTight);
1148 REPORTER_ASSERT(reporter, equal(impl->text().begin(), textRange, text1));
1152 REPORTER_ASSERT(reporter, equal(impl->text().begin(), textRange, text2));
1156 REPORTER_ASSERT(reporter, equal(impl->text().begin(), textRange, text3));
1160 REPORTER_ASSERT(reporter, equal(impl->text().begin(), textRange, text41));
1175 REPORTER_ASSERT(reporter, equal(impl->text().begin(), textRange, text42));
1191 const char* text = "No TextStyle! Uh Oh!";
1192 const size_t len = strlen(text);
1201 builder.addText(text, len);
1220 REPORTER_ASSERT(reporter, equal(impl->text().begin(), textRange, text));
1231 const char* text = "This is Red max bold text!";
1232 const size_t len = strlen(text);
1246 builder.addText(text, len);
1266 REPORTER_ASSERT(reporter, equal(impl->text().begin(), textRange, text));
1277 const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可";
1278 const size_t len = strlen(text);
1292 builder.addText(text, len);
1335 const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可";
1336 const size_t len = strlen(text);
1354 builder.addText(text);
1379 // line spacing is distributed evenly over and under the text.
1384 // Half leading does not move the text horizontally.
1396 const char* text = "Cookies need love";
1397 const size_t len = strlen(text);
1417 builder.addText(text);
1422 builder.addText(text);
1478 // Half leading does not move the text horizontally.
1489 const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可";
1490 const size_t len = strlen(text);
1516 builder.addText(text);
1540 // line spacing is distributed evenly over and under the text.
1545 // Half leading does not move the text horizontally.
1556 const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可";
1557 const size_t len = strlen(text);
1576 builder.addText(text);
1605 // line spacing is distributed evenly over and under the text.
1610 // Half leading does not move the text horizontally.
1619 const char* text =
1620 "This is a very long sentence to test if the text will properly wrap "
1637 const size_t len = strlen(text);
1655 builder.addText(text, len);
1664 REPORTER_ASSERT(reporter, impl->text().size() == std::string{text}.length());
1703 const char* text =
1704 "This is a very long sentence to test if the text will properly wrap "
1721 const size_t len = strlen(text);
1739 builder.addText(text, len);
1790 const char* text =
1791 "This is a very long sentence to test if the text will properly wrap "
1808 const size_t len = strlen(text);
1826 builder.addText(text, len);
1835 REPORTER_ASSERT(reporter, impl->text().size() == std::string{text}.length());
1877 const char* text =
1878 "This is a very long sentence to test if the text will properly wrap "
1893 const size_t len = strlen(text);
1911 builder.addText(text, len);
1925 REPORTER_ASSERT(reporter, impl->text().size() == std::string{text}.length());
1965 const char* text =
1969 const size_t len = strlen(text);
1983 builder.addText(text, len);
2003 // Just make sure the the text is actually RTL
2029 const char* text =
2033 const size_t len = strlen(text);
2047 builder.addText(text, len);
2105 const char* text = " leading space";
2106 const size_t len = strlen(text);
2120 builder.addText(text, len);
2147 const char* text1 = "This text should be";
2332 const char* text =
2338 const size_t len = strlen(text);
2359 builder.addText(text, len);
2381 const char* text =
2384 const size_t len = strlen(text);
2404 builder.addText(text, len);
2427 const char* text = "بمباركة التقليدية قام عن. تصفح يد ";
2428 const size_t len = strlen(text);
2445 builder.addText(text, len);
2471 // [36:38) for arabic text and [38:39) for the last space
2478 const char* text = "Helloبمباركة التقليدية قام عن. تصفح يد ";
2479 const size_t len = strlen(text);
2496 builder.addText(text, len);
2526 const char* text = "Helloبمباركة التقليدية قام عن. تصفح يد ";
2527 const size_t len = strlen(text);
2544 builder.addText(text, len);
2572 const char* text =
2575 const size_t len = strlen(text);
2593 builder.addText(text, len);
2602 // the original text because the final trailing whitespaces are sometimes not
2636 const char* text =
2639 const size_t len = strlen(text);
2654 builder.addText(text, len);
2732 const char* text =
2736 const size_t len = strlen(text);
2757 builder.addText(text, len);
2804 const char* text =
2808 const size_t len = strlen(text);
2825 builder.addText(text, len);
2926 const char* text =
2930 const size_t len = strlen(text);
2947 builder.addText(text, len);
3048 const char* text =
3052 const size_t len = strlen(text);
3069 builder.addText(text, len);
3166 // Any text range gets a smallest glyph rectangle
3171 const char* text = "ดีสวัสดีชาวโลกที่น่ารัก";
3172 const size_t len = strlen(text);
3189 builder.addText(text, len);
3238 const char* text = "01234 "; // includes ideographic space and english space.
3239 const size_t len = strlen(text);
3256 builder.addText(text, len);
3332 const char* text = "01234\n";
3333 const size_t len = strlen(text);
3350 builder.addText(text, len);
3394 const char* text = "01234 \n0123 "; // includes ideographic space and english space.
3395 const size_t len = strlen(text);
3412 builder.addText(text, len);
3496 const char* text = "Chinese 字典";
3497 const size_t len = strlen(text);
3514 builder.addText(text, len);
3543 const char* text = "Chinese 字典";
3544 const size_t len = strlen(text);
3559 builder.addText(text, len);
3583 const char* text = "12345 67890 12345 67890 12345 67890 12345 "
3585 const size_t len = strlen(text);
3601 builder.addText(text, len);
3650 auto outLen = static_cast<ParagraphImpl*>(paragraph.get())->text().size();
3742 const char* text =
3746 const size_t len = strlen(text);
3761 builder.addText(text, len);
3769 REPORTER_ASSERT(reporter, impl->text().size() == std::string{text}.length());
3831 const char* text =
3834 const size_t len = strlen(text);
3847 builder.addText(text, len);
3872 const char* text =
3877 const size_t len = strlen(text);
3889 builder.addText(text, len);
3916 const char* text =
3923 const size_t len = strlen(text);
3934 builder.addText(text, len);
3977 const char* text =
3982 const size_t len = strlen(text);
3993 builder.addText(text, len);
4017 const char* text =
4018 "This is a very long sentence to test if the text will properly wrap "
4021 const size_t len = strlen(text);
4035 builder.addText(text, len);
4044 // Check that the ellipsizer limited the text to one line and did not wrap to a second line.
4126 const char* text = "Hello World Text Dialog";
4127 const size_t len = strlen(text);
4138 builder.addText(text, len);
4164 const char* text = "Text Chunk ";
4165 const size_t len = strlen(text);
4176 builder.addText(text, len);
4181 builder.addText(text, len);
4184 builder.addText(text, len);
4188 builder.addText(text, len);
4191 builder.addText(text, len);
4234 const char* text =
4237 const size_t len = strlen(text);
4254 builder.addText(text, len);
4372 const char* text = "01234満毎冠p来É本可\nabcd\n満毎É行p昼本可";
4373 const size_t len = strlen(text);
4398 builder.addText(text, len);
4477 const char* text = "01234ABCDEFGH\nabcd\nABCDEFGH";
4478 const size_t len = strlen(text);
4504 builder.addText(text, len);
4585 const char* text = "01234満毎p行来昼本可\nabcd\n満毎冠行来昼本可";
4586 const size_t len = strlen(text);
4611 builder.addText(text, len);
4691 const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可";
4692 const size_t len = strlen(text);
4718 builder.addText(text, len);
4791 const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可";
4792 const size_t len = strlen(text);
4815 builder.addText(text, len);
4854 const char* text = "12ab\n";
4867 builder.addText(text);
4873 builder.addText(text);
4903 const char* text = "English English 字典 字典 ??? ???";
4904 const size_t len = strlen(text);
4915 builder.addText(text, len);
4935 const char* text = "????";
4936 const size_t len = strlen(text);
4945 builder.addText(text, len);
4957 text, 0, std::strlen(text), run.glyphs(), run.clusterIndexes(),
4961 SkASSERT(std::strcmp(text, utf1to1.data()) == 0);
4974 const char* text = "p〠q";
4975 const size_t len = strlen(text);
4986 builder.addText(text, len);
4998 impl->text().begin() + run.textRange().start, 0, run.textRange().width(),
5004 SkASSERT(std::strcmp(text, utf1to1.data()) == 0);
5027 auto test = [&](const char* text, int count, bool expectedToBeFound) {
5030 builder.addText(text, strlen(text));
5061 const char* text = "text";
5062 const size_t len = strlen(text);
5067 builder.addText(text, len);
5127 test("text", "", "Roboto", "Homemade Apple", 0, false);
5131 test("text", "", "Roboto", "Homemade Apple", 4, true);
5147 const char* text = "text";
5148 const size_t len = strlen(text);
5153 builder.addText(text, len);
5208 const SkString text("null terminator ->\u0000<- on purpose did you see it?");
5216 builder.addText(text.c_str(), text.size());
5486 builder.addText("Default text\n");
5528 const char* text = "This\n"
5547 builder.addText(text);
5552 auto result = paragraph->getRectsForRange(0, strlen(text), RectHeightStyle::kTight, RectWidthStyle::kTight);
5588 std::string text;
5603 text += "Text ";
5604 builder.addText(text.c_str());
5620 const char* text = "Some text\nAnother line";
5636 builder.addText(text);
5675 const char* text = "One line of text\n";
5676 const size_t len = strlen(text);
5688 builder.addText(text, len);
5693 builder.addText(text, len);
5698 builder.addText(text, len);
5703 builder.addText(text, len - 1); // Skip the last \n
5798 builder.addText("Some text that takes more than 200 px");
5830 const char* text = " אאא בּבּבּבּ אאאא בּבּ אאא בּבּבּ אאאאא בּבּבּבּ אאאא בּבּבּבּבּ ";
5831 const size_t len = strlen(text);
5845 builder.addText(text, len);
5860 auto text = u"abc \u01A2 \u01A2 def";
5872 builder.addText(text);
5891 SkString text(std::string(3000, 'a'));
5902 builder.addText(text.c_str());
5917 // Long arabic text with english spaces
5918 const char* text =
5936 auto test = [&](const char* test, const char* text, bool editing) {
5940 builder.addText(text);
5956 str.append(text);
5957 test("Long arabic text", str.c_str(), false);
5962 str = SkString(text);
5968 test("-2 characters from the start", text, true);
5980 auto draw = [&](TextHeightBehavior hb, const char* text, SkScalar height) {
5992 builder.addText(text);
6019 SkPaint text;
6020 text.setColor(SK_ColorWHITE);
6037 text_style.setBackgroundColor(text);
6053 std::u16string text = u"\U0001f469\u200D\U0001f469\u200D\U0001f467\u200D\U0001f467\U0001f469\U0001f469\U0001f467\U0001f467";
6061 builder.addText(text);
6107 auto paint = [&](const char* text) {
6119 builder.addText(text);
6126 paint("Loooooooooooooooooooooooooooooooooooong text");
6136 auto paint = [&](const char* text) {
6147 builder.addText(text);
6154 paint("Loooooooooooooooooooooooooooooooooooong text");
6165 const char* text = "1 23 456 7890"; // 13 * 50 = 650
6177 builder.addText(text);
6185 builder.addText(text);
6318 auto test = [&](const char* text) {
6319 auto str = straight(text);
6362 auto test = [&](const char* text, int whitespaces) {
6363 auto str = mirror(text);
6499 { 0, 1, 5, 6 }, // { just spaces; the end of the text considered as a new line in libtxt?!? }
6772 const char* text = "Hello World Text Dialog";
6773 const size_t len = strlen(text);
6787 builder.addText(text, len);
6816 const char* text =
6817 "This is a very long sentence to test if the text will properly wrap "
6820 const size_t len = strlen(text);
6834 builder.addText(text, len);
6843 // Check that the ellipsizer limited the text to one line and did not wrap to a second line.
6860 const char* text = "";
6861 const size_t len = strlen(text);
6882 builder.addText(text, len);
6903 std::u16string text =
6926 builder.addText(text);
6956 const char* text = "ٱلْرَّحْمَـانُ";
6957 const size_t len = strlen(text);
6968 builder.addText(text, len);
6995 auto const text = std::u16string(42000, 'x');
7006 builder.addText(text);
7101 auto text = std::u16string(u"hello world");
7106 builder.addText(text);
7115 paragraph->updateFontSize(0, text.size(), 42);
7406 // Zalgo text should be painted into multi styles but queried as a single glyph
7417 //SkString text(">S͛ͭ̋͆̈̔̇͗̍͑̎ͪͮͧͣ̽ͫͣ́ͬ̀͌͑͂͗͒̍̔̄ͧ̏̉̌̊̊̿̀̌̃̄͐̓̓̚̚҉̵̡͜͟͝͠͏̸̵̡̧͜҉̷̡͇̜̘̻̺̘̟̝͙̬̘̩͇̭̼̥̖̤̦͎k͉̩̘͚̜̹̗̗͍̤̥̱͉̳͕͖̤̲̣͚̮̞̬̲͍͔̯̻̮̞̭͈̗̫͓̂ͨ̉ͪ̒͋͛̀̍͊ͧ̿̅͆̓̔̔ͬ̇̑̿ͩ͗ͮ̎͌̿̄ͅP̴̵̡̡̛̪͙̼̣̟̩̭̫̱͙̬͔͉͍̘̠͉̦̝̘̥̟̗͖̫̤͕̙̬̦͍̱̖̮̱͑͐̎̃̒͐͋̚͘͞a̶̶̵̵̵̶̶̡̧̢̢̺͔̣͖̭̺͍̤͚̱̜̰̥͕̬̥̲̞̥̘͇͚̺̰͚̪̺͔̤͍̓̿͆̎͋̓ͦ̈́ͦ̌́̄͗̌̓͌̕͜͜͟͢͝͡ŕ͎̝͕͉̻͎̤̭͚̗̳̖̙̘͚̫͖͓͚͉͔͈̟̰̟̬̗͓̟͚̱̕͡ͅͅͅa̸̶̢̛̛̽ͮͩ̅͒ͫ͗͂̎ͦ̈́̓̚͘͜͢͡҉̷̵̶̢̡̜̮̦̜̥̜̯̙͓͔̼̗̻͜͜ͅḡ̢̛͕̗͖̖̤̦̘͔ͨͨ̊͒ͩͭͤ̍̅̃ͪ̋̏̓̍̋͗̋ͨ̏̽̈́̔̀̋̉ͫ̅̂ͭͫ̏͒͋ͥ̚͜r̶̢̧̧̥̤̼̀̂̒ͪ͌̿͌̅͛ͨͪ͒̍ͥ̉ͤ̌̿̆́ͭ͆̃̒ͤ͛̊ͧ̽͘͝͠a̧̢̧̢͑͑̓͑ͮ̃͂̄͛́̈́͋̂͌̽̄͒̔́̇ͨͧͭ͐ͦ̋ͨ̍ͦ̍̋͆̔ͧ͑͋͌̈̓͛͛̚͢͜͜͏̴̢̧̛̳͍̹͚̰̹̻͔p̨̡͆ͦͣ͊̽̔͂̉ͣ̔ͣ̌̌̉̃̋̂͒ͫ̄̎̐͗̉̌̃̽̽́̀̚͘͜͟҉̱͉h̭̮̘̗͔̜̯͔͈̯̺͔̗̣̭͚̱̰̙̼̹͚̣̻̥̲̮͍̤͜͝<");
7419 SkString text = SkUnicode::convertUtf16ToUtf8(text16);
7420 auto K = text.find("k");
7421 auto P = text.find("P");
7422 auto h = text.find("h");
7430 builder.addText(text.data(), K + 3);
7434 builder.addText(text.data() + K + 3, P - K - 3 + 6);
7437 builder.addText(text.data() + P + 6, h - P - 6);
7441 builder.addText(text.data() + h, text.size() - h);
7549 const char* text =
7550 "This is a very long sentence to test if the text will properly wrap "
7553 "This is a very long sentence to test if the text will properly wrap "
7557 const size_t len = strlen(text);
7568 builder.addText(text, len);
7638 const char* text = "Single dummy placeholder";
7639 const size_t len = strlen(text);
7649 builder.addText(text, len);