2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 #include <dali-toolkit-test-suite-utils.h>
23 #include <dali-toolkit/dali-toolkit.h>
24 #include <dali-toolkit/internal/text/layouts/layout-engine.h>
25 #include <dali-toolkit/internal/text/layouts/layout-parameters.h>
26 #include <dali-toolkit/internal/text/text-run-container.h>
27 #include <toolkit-text-utils.h>
30 using namespace Toolkit;
33 // Tests the LayoutEngine methods.
35 //////////////////////////////////////////////////////////
39 const std::string DEFAULT_FONT_DIR("/resources/fonts");
43 std::string description;
46 unsigned int numberOfFonts;
47 FontDescriptionRun* fontDescriptions;
49 unsigned int totalNumberOfGlyphs;
51 unsigned int numberOfLines;
53 Layout::Engine::Type layout;
54 unsigned int startIndex;
55 unsigned int numberOfGlyphs;
58 float characterSpacing;
61 void Print(const LineRun& line)
63 std::cout << " glyph run, index : " << line.glyphRun.glyphIndex << ", num glyphs : " << line.glyphRun.numberOfGlyphs << std::endl;
64 std::cout << " character run, index : " << line.characterRun.characterIndex << ", num chars : " << line.characterRun.numberOfCharacters << std::endl;
65 std::cout << " width : " << floor(line.width) << std::endl;
66 std::cout << " ascender : " << line.ascender << std::endl;
67 std::cout << " descender : " << line.descender << std::endl;
68 std::cout << " extraLength : " << line.extraLength << std::endl;
69 std::cout << " alignmentOffset : " << line.alignmentOffset << std::endl;
70 std::cout << " direction : " << line.direction << std::endl;
71 std::cout << " ellipsis : " << line.ellipsis << std::endl;
74 bool LayoutTextTest(const LayoutTextData& data)
77 TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
78 fontClient.SetDpi(96u, 96u);
80 char* pathNamePtr = get_current_dir_name();
81 const std::string pathName(pathNamePtr);
84 fontClient.GetFontId(pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf");
85 fontClient.GetFontId(pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHebrewRegular.ttf");
86 fontClient.GetFontId(pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansArabicRegular.ttf");
87 fontClient.GetFontId(pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHindiRegular.ttf");
89 // 1) Create the model.
94 Vector<FontDescriptionRun> fontDescriptionRuns;
95 if(0u != data.numberOfFonts)
97 fontDescriptionRuns.Insert(fontDescriptionRuns.End(),
98 data.fontDescriptions,
99 data.fontDescriptions + data.numberOfFonts);
102 LayoutOptions options;
103 options.align = false;
104 CreateTextModel(data.text,
114 Toolkit::DevelText::EllipsisPosition::END,
116 data.characterSpacing);
118 LogicalModelPtr logicalModel = textModel->mLogicalModel;
119 VisualModelPtr visualModel = textModel->mVisualModel;
121 // 2) Clear the layout.
122 Vector<LineRun>& lines = visualModel->mLines;
124 const Length numberOfCharacters = logicalModel->mText.Count();
125 const bool isLastNewParagraph = (0u == numberOfCharacters) ? false : TextAbstraction::IsNewParagraph(*(logicalModel->mText.Begin() + (numberOfCharacters - 1u)));
126 const GlyphIndex lastGlyphIndex = data.startIndex + data.numberOfGlyphs - 1u;
127 const bool removeLastLine = isLastNewParagraph && (lastGlyphIndex + 1u == visualModel->mGlyphs.Count());
129 LineIndex startRemoveIndex = 0u;
131 if(0u != lines.Count())
133 startRemoveIndex = lines.Count();
134 LineIndex endRemoveIndex = startRemoveIndex;
135 ClearGlyphRuns(data.startIndex,
136 lastGlyphIndex + (removeLastLine ? 1u : 0u),
141 // Update the character runs of the lines.
142 const CharacterIndex* const glyphsToCharactersBuffer = visualModel->mGlyphsToCharacters.Begin();
143 const Length* const charactersPerGlyph = visualModel->mCharactersPerGlyph.Begin();
144 const CharacterIndex startCharacterIndex = *(glyphsToCharactersBuffer + data.startIndex);
145 const CharacterIndex lastCharacterIndex = *(glyphsToCharactersBuffer + lastGlyphIndex) + *(charactersPerGlyph + lastGlyphIndex) - 1u;
146 ClearCharacterRuns(startCharacterIndex,
147 lastCharacterIndex + (removeLastLine ? 1u : 0u),
152 lines.Erase(lines.Begin() + startRemoveIndex,
153 lines.Begin() + endRemoveIndex);
156 Vector<Vector2>& glyphPositions = visualModel->mGlyphPositions;
158 glyphPositions.Erase(glyphPositions.Begin() + data.startIndex,
159 glyphPositions.Begin() + data.startIndex + data.numberOfGlyphs);
162 Layout::Engine engine;
163 engine.SetMetrics(metrics);
164 engine.SetLayout(data.layout);
166 textModel->mHorizontalAlignment = Text::HorizontalAlignment::BEGIN;
167 textModel->mLineWrapMode = LineWrap::WORD;
168 textModel->mIgnoreSpacesAfterText = true;
169 //textModel->mMatchSystemLanguageDirection = false;
170 Layout::Parameters layoutParameters(data.textArea,
173 layoutParameters.isLastNewParagraph = isLastNewParagraph;
175 // The initial glyph and the number of glyphs to layout.
176 layoutParameters.startGlyphIndex = data.startIndex;
177 layoutParameters.numberOfGlyphs = data.numberOfGlyphs;
178 layoutParameters.startLineIndex = startRemoveIndex;
179 layoutParameters.estimatedNumberOfLines = logicalModel->mParagraphInfo.Count();
181 layoutSize = Vector2::ZERO;
183 bool isAutoScroll = false;
184 bool isAutoScrollMaxTextureExceeded = false;
185 bool isHiddenInputEnabled = false;
186 const bool updated = engine.LayoutText(layoutParameters,
190 isAutoScrollMaxTextureExceeded,
191 isHiddenInputEnabled,
192 DevelText::EllipsisPosition::END);
194 // 4) Compare the results.
196 if(updated != data.updated)
198 std::cout << " Different updated bool : " << updated << ", expected : " << data.updated << std::endl;
202 if(layoutSize != data.layoutSize)
204 std::cout << " Different layout size : " << layoutSize << ", expected : " << data.layoutSize << std::endl;
208 for(unsigned int index = 0u; index < data.totalNumberOfGlyphs; ++index)
210 const Vector2& position = *(glyphPositions.Begin() + index);
212 if(fabsf(std::round(position.x) - std::round(*(data.positions + 2u * index))) > Math::MACHINE_EPSILON_1000)
214 std::cout << " Different position for glyph " << index << " x : " << position.x << ", expected : " << *(data.positions + 2u * index) << std::endl;
217 if(fabsf(position.y - *(data.positions + 2u * index + 1u)) > Math::MACHINE_EPSILON_1000)
219 std::cout << " Different position for glyph " << index << " y : " << position.y << ", expected : " << *(data.positions + 2u * index + 1u) << std::endl;
224 if(lines.Count() != data.numberOfLines)
226 std::cout << " Different number of lines : " << lines.Count() << ", expected : " << data.numberOfLines << std::endl;
230 for(unsigned int index = 0u; index < data.numberOfLines; ++index)
232 const LineRun& line = *(lines.Begin() + index);
233 const LineRun& expectedLine = *(data.lines + index);
235 if(line.glyphRun.glyphIndex != expectedLine.glyphRun.glyphIndex)
237 std::cout << " Different line info for line : " << index << std::endl;
239 std::cout << " expected" << std::endl;
243 if(line.glyphRun.numberOfGlyphs != expectedLine.glyphRun.numberOfGlyphs)
245 std::cout << " Different line info for line : " << index << std::endl;
247 std::cout << " expected" << std::endl;
252 if(line.characterRun.characterIndex != expectedLine.characterRun.characterIndex)
254 std::cout << " Different line info for line : " << index << std::endl;
256 std::cout << " expected" << std::endl;
260 if(line.characterRun.numberOfCharacters != expectedLine.characterRun.numberOfCharacters)
262 std::cout << " Different line info for line : " << index << std::endl;
264 std::cout << " expected" << std::endl;
269 if(fabsf(floor(line.width) - expectedLine.width) > Math::MACHINE_EPSILON_1)
271 std::cout << " Different line info for line : " << index << std::endl;
273 std::cout << " expected" << std::endl;
278 if(fabsf(line.ascender - expectedLine.ascender) > Math::MACHINE_EPSILON_1)
280 std::cout << " Different line info for line : " << index << std::endl;
282 std::cout << " expected" << std::endl;
287 if(fabsf(line.descender - expectedLine.descender) > Math::MACHINE_EPSILON_1)
289 std::cout << " Different line info for line : " << index << std::endl;
291 std::cout << " expected" << std::endl;
296 if(fabsf(line.extraLength - expectedLine.extraLength) > Math::MACHINE_EPSILON_1)
298 std::cout << " Different line info for line : " << index << std::endl;
300 std::cout << " expected" << std::endl;
305 if(line.ellipsis != expectedLine.ellipsis)
307 std::cout << " Different line info for line : " << index << std::endl;
309 std::cout << " expected" << std::endl;
314 // Do not compare the alignment offset as it's not calculated in the layout.
315 // Do not compare the line direction as it's not set in the layout.
321 ////////////////////////////////////////////////////////
325 //////////////////////////////////////////////////////////
327 // UtcDaliTextCharacterSpacingSingleLineTextArea1
328 // UtcDaliTextCharacterSpacingSingleLineTextArea2
329 // UtcDaliTextCharacterSpacingSingleLineTextArea3
330 // UtcDaliTextCharacterSpacingMultilineText1
331 // UtcDaliTextCharacterSpacingMultilineText2
333 //////////////////////////////////////////////////////////
335 int UtcDaliTextCharacterSpacingSingleLineTextArea1(void)
337 ToolkitTestApplication application;
338 tet_infoline(" UtcDaliTextCharacterSpacingSingleLineTextArea1");
340 // Will layout the text in single line as it can be scrolled.
342 const std::string fontFamily("TizenSans");
344 // Set a known font description
345 FontDescriptionRun fontDescriptionRun;
346 fontDescriptionRun.characterRun.characterIndex = 0u;
347 fontDescriptionRun.characterRun.numberOfCharacters = 11u;
348 fontDescriptionRun.familyLength = fontFamily.size();
349 fontDescriptionRun.familyName = new char[fontDescriptionRun.familyLength];
350 memcpy(fontDescriptionRun.familyName, fontFamily.c_str(), fontDescriptionRun.familyLength);
351 fontDescriptionRun.familyDefined = true;
352 fontDescriptionRun.weightDefined = false;
353 fontDescriptionRun.widthDefined = false;
354 fontDescriptionRun.slantDefined = false;
355 fontDescriptionRun.sizeDefined = false;
357 Vector<FontDescriptionRun> fontDescriptionRuns;
358 fontDescriptionRuns.PushBack(fontDescriptionRun);
359 Size textArea(1.f, 1.f);
361 //******* characterSpacing = 0.0f *******//
362 float positions[] = {
363 0.f, -12.f, 10.f, -9.f, 19.875f, -13.f, 23.8906f, -13.f, 26.9062f, -9.f, 36.1875f, -0.f, 40.1875f, -9.f, 52.1562f, -9.f, 62.4375f, -9.f, 68.5f, -13.f, 71.5156f, -13.f};
364 Size layoutSize(81.f, 20.f);
365 //************************************//
367 struct LineRun line =
379 Vector<LineRun> lines;
380 lines.PushBack(line);
382 LayoutTextData data =
384 "Layout text in a small area",
388 fontDescriptionRuns.Begin(),
394 Layout::Engine::SINGLE_LINE_BOX,
401 if(!LayoutTextTest(data))
403 tet_result(TET_FAIL);
406 tet_result(TET_PASS);
410 int UtcDaliTextCharacterSpacingSingleLineTextArea2(void)
412 ToolkitTestApplication application;
413 tet_infoline(" UtcDaliTextCharacterSpacingSingleLineTextArea2");
415 // Will layout the text in single line as it can be scrolled.
417 const std::string fontFamily("TizenSans");
419 // Set a known font description
420 FontDescriptionRun fontDescriptionRun;
421 fontDescriptionRun.characterRun.characterIndex = 0u;
422 fontDescriptionRun.characterRun.numberOfCharacters = 11u;
423 fontDescriptionRun.familyLength = fontFamily.size();
424 fontDescriptionRun.familyName = new char[fontDescriptionRun.familyLength];
425 memcpy(fontDescriptionRun.familyName, fontFamily.c_str(), fontDescriptionRun.familyLength);
426 fontDescriptionRun.familyDefined = true;
427 fontDescriptionRun.weightDefined = false;
428 fontDescriptionRun.widthDefined = false;
429 fontDescriptionRun.slantDefined = false;
430 fontDescriptionRun.sizeDefined = false;
432 Vector<FontDescriptionRun> fontDescriptionRuns;
433 fontDescriptionRuns.PushBack(fontDescriptionRun);
434 Size textArea(1.f, 1.f);
436 //******* characterSpacing = 2.0f *******//
437 float positions[] = {
438 0.f, -12.f, 12.f, -9.f, 23.875f, -13.f, 29.8906f, -13.f, 34.9062f, -9.f, 46.1875f, -0.f, 52.1875f, -9.f, 66.1562f, -9.f, 78.4375f, -9.f, 86.5f, -13.f, 91.5156f, -13.f};
439 Size layoutSize(101.f, 20.f);
440 //************************************//
442 struct LineRun line =
454 Vector<LineRun> lines;
455 lines.PushBack(line);
457 LayoutTextData data =
459 "Layout text in a small area",
463 fontDescriptionRuns.Begin(),
469 Layout::Engine::SINGLE_LINE_BOX,
476 if(!LayoutTextTest(data))
478 tet_result(TET_FAIL);
481 tet_result(TET_PASS);
485 int UtcDaliTextCharacterSpacingSingleLineTextArea3(void)
487 ToolkitTestApplication application;
488 tet_infoline(" UtcDaliTextCharacterSpacingSingleLineTextArea3");
490 // Will layout the text in single line as it can be scrolled.
492 const std::string fontFamily("TizenSans");
494 // Set a known font description
495 FontDescriptionRun fontDescriptionRun;
496 fontDescriptionRun.characterRun.characterIndex = 0u;
497 fontDescriptionRun.characterRun.numberOfCharacters = 11u;
498 fontDescriptionRun.familyLength = fontFamily.size();
499 fontDescriptionRun.familyName = new char[fontDescriptionRun.familyLength];
500 memcpy(fontDescriptionRun.familyName, fontFamily.c_str(), fontDescriptionRun.familyLength);
501 fontDescriptionRun.familyDefined = true;
502 fontDescriptionRun.weightDefined = false;
503 fontDescriptionRun.widthDefined = false;
504 fontDescriptionRun.slantDefined = false;
505 fontDescriptionRun.sizeDefined = false;
507 Vector<FontDescriptionRun> fontDescriptionRuns;
508 fontDescriptionRuns.PushBack(fontDescriptionRun);
509 Size textArea(1.f, 1.f);
511 //******* characterSpacing = 4.0f *******//
512 float positions[] = {
513 0.f, -12.f, 14.f, -9.f, 27.875f, -13.f, 35.8906f, -13.f, 42.9062f, -9.f, 56.1875f, -0.f, 64.1875f, -9.f, 80.1562f, -9.f, 94.4375f, -9.f, 104.5f, -13.f, 111.5156f, -13.f};
514 Size layoutSize(121.f, 20.f);
515 //************************************//
517 struct LineRun line =
529 Vector<LineRun> lines;
530 lines.PushBack(line);
532 LayoutTextData data =
534 "Layout text in a small area",
538 fontDescriptionRuns.Begin(),
544 Layout::Engine::SINGLE_LINE_BOX,
551 if(!LayoutTextTest(data))
553 tet_result(TET_FAIL);
556 tet_result(TET_PASS);
560 int UtcDaliTextCharacterSpacingMultilineText1(void)
562 ToolkitTestApplication application;
563 tet_infoline(" UtcDaliTextCharacterSpacingMultilineText1");
565 // Layout some lines of left to right text.
567 const std::string fontFamily("TizenSans");
569 // Set a known font description
570 FontDescriptionRun fontDescriptionRun1;
571 fontDescriptionRun1.characterRun.characterIndex = 0u;
572 fontDescriptionRun1.characterRun.numberOfCharacters = 18u;
573 fontDescriptionRun1.familyLength = fontFamily.size();
574 fontDescriptionRun1.familyName = new char[fontDescriptionRun1.familyLength];
575 memcpy(fontDescriptionRun1.familyName, fontFamily.c_str(), fontDescriptionRun1.familyLength);
576 fontDescriptionRun1.familyDefined = true;
577 fontDescriptionRun1.weightDefined = false;
578 fontDescriptionRun1.widthDefined = false;
579 fontDescriptionRun1.slantDefined = false;
580 fontDescriptionRun1.sizeDefined = false;
582 FontDescriptionRun fontDescriptionRun2;
583 fontDescriptionRun2.characterRun.characterIndex = 18u;
584 fontDescriptionRun2.characterRun.numberOfCharacters = 31u;
585 fontDescriptionRun2.familyLength = fontFamily.size();
586 fontDescriptionRun2.familyName = new char[fontDescriptionRun2.familyLength];
587 memcpy(fontDescriptionRun2.familyName, fontFamily.c_str(), fontDescriptionRun2.familyLength);
588 fontDescriptionRun2.familyDefined = true;
589 fontDescriptionRun2.weightDefined = false;
590 fontDescriptionRun2.widthDefined = false;
591 fontDescriptionRun2.slantDefined = false;
592 fontDescriptionRun2.sizeDefined = false;
594 Vector<FontDescriptionRun> fontDescriptionRuns;
595 fontDescriptionRuns.PushBack(fontDescriptionRun1);
596 fontDescriptionRuns.PushBack(fontDescriptionRun2);
597 Size textArea(100.f, 300.f);
598 Size layoutSize(98.f, 97.f);
601 0.f, -12.f, 10.f, -9.f, 20.f, -13.f, 24.f, -13.f, 27.f, -9.f, 36.f, -0.f, 40.f, -9.f, 52.f, -9.f, 62.f, -9.f, 69.f, -13.f, 72.f, -13.f, 81.f, -0.f, 0.f, -13.f, 9.f, -9.f, 19.f, -9.f, 32.f, -9.f, 41.f, -2.f, 45.f, -12.f, 0.f, -12.f, 7.92188f, -9.f, 18.f, -9.f, 27.2031f, -9.f, 38.f, -9.f, 47.f, -11.f, 53.f, -0.f, 0.f, -12.f, 11.1562f, -12.f, 15.f, -12.f, 26.f, -9.f, 36.4844f, -9.f, 42.f, -9.f, 52.5469f, -9.f, 61.6875f, -11.f, 67.9688f, -0.f, 0.f, -12.f, 4.f, -12.f, 9.f, -9.f, 18.0469f, -9.f, 27.8906f, -9.f, 36.f, -0.f, 41.3281f, -9.f, 51.125f, -12.f, 57.f, -0.f, 62.f, -11.f, 68.1406f, -9.f, 77.7031f, -9.f, 87.f, -11.f, 94.4531f, -2.f};
602 struct LineRun line0 =
614 struct LineRun line1 =
626 struct LineRun line2 =
638 struct LineRun line3 =
650 struct LineRun line4 =
662 Vector<LineRun> lines;
663 lines.PushBack(line0);
664 lines.PushBack(line1);
665 lines.PushBack(line2);
666 lines.PushBack(line3);
667 lines.PushBack(line4);
669 LayoutTextData data =
671 "Layout simple multiline text",
672 "Hello world demo.\n"
673 "Layout different lines of text.",
676 fontDescriptionRuns.Begin(),
682 Layout::Engine::MULTI_LINE_BOX,
689 if(!LayoutTextTest(data))
691 tet_result(TET_FAIL);
694 tet_result(TET_PASS);
698 int UtcDaliTextCharacterSpacingMultilineText2(void)
700 ToolkitTestApplication application;
701 tet_infoline(" UtcDaliTextCharacterSpacingMultilineText2");
703 // Layout some lines of left to right text.
705 const std::string fontFamily("TizenSans");
707 // Set a known font description
708 FontDescriptionRun fontDescriptionRun1;
709 fontDescriptionRun1.characterRun.characterIndex = 0u;
710 fontDescriptionRun1.characterRun.numberOfCharacters = 18u;
711 fontDescriptionRun1.familyLength = fontFamily.size();
712 fontDescriptionRun1.familyName = new char[fontDescriptionRun1.familyLength];
713 memcpy(fontDescriptionRun1.familyName, fontFamily.c_str(), fontDescriptionRun1.familyLength);
714 fontDescriptionRun1.familyDefined = true;
715 fontDescriptionRun1.weightDefined = false;
716 fontDescriptionRun1.widthDefined = false;
717 fontDescriptionRun1.slantDefined = false;
718 fontDescriptionRun1.sizeDefined = false;
720 FontDescriptionRun fontDescriptionRun2;
721 fontDescriptionRun2.characterRun.characterIndex = 18u;
722 fontDescriptionRun2.characterRun.numberOfCharacters = 31u;
723 fontDescriptionRun2.familyLength = fontFamily.size();
724 fontDescriptionRun2.familyName = new char[fontDescriptionRun2.familyLength];
725 memcpy(fontDescriptionRun2.familyName, fontFamily.c_str(), fontDescriptionRun2.familyLength);
726 fontDescriptionRun2.familyDefined = true;
727 fontDescriptionRun2.weightDefined = false;
728 fontDescriptionRun2.widthDefined = false;
729 fontDescriptionRun2.slantDefined = false;
730 fontDescriptionRun2.sizeDefined = false;
732 Vector<FontDescriptionRun> fontDescriptionRuns;
733 fontDescriptionRuns.PushBack(fontDescriptionRun1);
734 fontDescriptionRuns.PushBack(fontDescriptionRun2);
735 Size textArea(100.f, 300.f);
736 Size layoutSize(82.f, 136.f);
739 0.f, -12.f, 12.f, -9.f, 24.f, -13.f, 30.f, -13.f, 35.f, -9.f, 46.f, -0.f, 0.f, -9.f, 13.9688f, -9.f, 26.25f, -9.f, 34.3125f, -13.f, 39.3281f, -13.f, 50.6406f, -0.f, 0.f, -13.f, 11.3125f, -9.f, 22.7031f, -9.f, 37.5625, -9.f, 48.8438f, -2.f, 54.8125, -12.f, 0.f, -12.f, 9.92188f, -9.f, 21.7344, -9.f, 33.2031f, -9.f, 46.f, -9.f, 57.1406f, -11.f, 65.4219f, -0.f, 0.f, -12.f, 13.1562f, -12.f, 18.6094f, -12.f, 31.6406f, -9.f, 44.4844f, -9.f, 51.7031f, -9.f, 64.5469f, -9.f, 75.6875f, -11.f, 83.9688, -0.f, 0.f, -12.f, 6.45312f, -12.f, 12.9062f, -9.f, 24.0469f, -9.f, 35.8906f, -9.f, 46.2344f, -0.f, 53.3281f, -9.f, 65.125f, -12.f, 72.7656f, -0.f, 0.f, -11.f, 8.28125f, -9.f, 19.8438f, -9.f, 31.3125f, -11.f, 40.5938f, -2.f};
740 struct LineRun line0 =
752 struct LineRun line1 =
764 struct LineRun line2 =
776 struct LineRun line3 =
788 struct LineRun line4 =
800 struct LineRun line5 =
812 struct LineRun line6 =
824 Vector<LineRun> lines;
825 lines.PushBack(line0);
826 lines.PushBack(line1);
827 lines.PushBack(line2);
828 lines.PushBack(line3);
829 lines.PushBack(line4);
830 lines.PushBack(line5);
831 lines.PushBack(line6);
833 LayoutTextData data =
835 "Layout simple multiline text",
836 "Hello world demo.\n"
837 "Layout different lines of text.",
840 fontDescriptionRuns.Begin(),
846 Layout::Engine::MULTI_LINE_BOX,
853 if(!LayoutTextTest(data))
855 tet_result(TET_FAIL);
858 tet_result(TET_PASS);