2 * Copyright (c) 2023 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.
19 #include <dali-toolkit/internal/text/rendering/view-model.h>
22 #include <dali/devel-api/text-abstraction/font-client.h>
26 #include <dali-toolkit/internal/text/glyph-metrics-helper.h>
27 #include <dali-toolkit/internal/text/line-run.h>
35 ViewModel::ViewModel(const ModelInterface* const model)
40 mStartIndexOfElidedGlyphs(0u),
41 mEndIndexOfElidedGlyphs(0u),
42 mFirstMiddleIndexOfElidedGlyphs(0u),
43 mSecondMiddleIndexOfElidedGlyphs(0u)
47 ViewModel::~ViewModel()
51 const Size& ViewModel::GetControlSize() const
53 return mModel->GetControlSize();
56 const Size& ViewModel::GetLayoutSize() const
58 return mModel->GetLayoutSize();
61 const Vector2& ViewModel::GetScrollPosition() const
63 return mModel->GetScrollPosition();
66 HorizontalAlignment::Type ViewModel::GetHorizontalAlignment() const
68 return mModel->GetHorizontalAlignment();
71 VerticalAlignment::Type ViewModel::GetVerticalAlignment() const
73 return mModel->GetVerticalAlignment();
76 DevelText::VerticalLineAlignment::Type ViewModel::GetVerticalLineAlignment() const
78 return mModel->GetVerticalLineAlignment();
81 DevelText::EllipsisPosition::Type ViewModel::GetEllipsisPosition() const
83 return mModel->GetEllipsisPosition();
86 bool ViewModel::IsTextElideEnabled() const
88 return mModel->IsTextElideEnabled();
91 Length ViewModel::GetNumberOfLines() const
93 return mModel->GetNumberOfLines();
96 const LineRun* ViewModel::GetLines() const
98 return mModel->GetLines();
101 Length ViewModel::GetNumberOfScripts() const
103 return mModel->GetNumberOfScripts();
106 const ScriptRun* ViewModel::GetScriptRuns() const
108 return mModel->GetScriptRuns();
111 Length ViewModel::GetNumberOfCharacters() const
113 return mModel->GetNumberOfCharacters();
116 Length ViewModel::GetNumberOfGlyphs() const
118 if(mIsTextElided && mModel->IsTextElideEnabled())
120 return mElidedGlyphs.Count();
124 return mModel->GetNumberOfGlyphs();
130 GlyphIndex ViewModel::GetStartIndexOfElidedGlyphs() const
132 if(mIsTextElided && mModel->IsTextElideEnabled())
134 return mStartIndexOfElidedGlyphs;
137 return mModel->GetStartIndexOfElidedGlyphs();
140 GlyphIndex ViewModel::GetEndIndexOfElidedGlyphs() const
142 if(mIsTextElided && mModel->IsTextElideEnabled())
144 return mEndIndexOfElidedGlyphs;
147 return mModel->GetEndIndexOfElidedGlyphs();
150 GlyphIndex ViewModel::GetFirstMiddleIndexOfElidedGlyphs() const
152 if(mIsTextElided && mModel->IsTextElideEnabled())
154 return mFirstMiddleIndexOfElidedGlyphs;
157 return mModel->GetFirstMiddleIndexOfElidedGlyphs();
160 GlyphIndex ViewModel::GetSecondMiddleIndexOfElidedGlyphs() const
162 if(mIsTextElided && mModel->IsTextElideEnabled())
164 return mSecondMiddleIndexOfElidedGlyphs;
167 return mModel->GetSecondMiddleIndexOfElidedGlyphs();
170 const GlyphInfo* ViewModel::GetGlyphs() const
172 if(mIsTextElided && mModel->IsTextElideEnabled())
174 return mElidedGlyphs.Begin();
178 return mModel->GetGlyphs();
184 const Vector2* ViewModel::GetLayout() const
186 if(mIsTextElided && mModel->IsTextElideEnabled())
188 return mElidedLayout.Begin();
192 return mModel->GetLayout();
198 const Vector4* ViewModel::GetColors() const
200 return mModel->GetColors();
203 const ColorIndex* ViewModel::GetColorIndices() const
205 return mModel->GetColorIndices();
208 const Vector4* ViewModel::GetBackgroundColors() const
210 return mModel->GetBackgroundColors();
213 const ColorIndex* ViewModel::GetBackgroundColorIndices() const
215 return mModel->GetBackgroundColorIndices();
218 bool ViewModel::IsMarkupBackgroundColorSet() const
220 return mModel->IsMarkupBackgroundColorSet();
223 const Vector4& ViewModel::GetDefaultColor() const
225 return mModel->GetDefaultColor();
228 const Vector2& ViewModel::GetShadowOffset() const
230 return mModel->GetShadowOffset();
233 const Vector4& ViewModel::GetShadowColor() const
235 return mModel->GetShadowColor();
238 const float& ViewModel::GetShadowBlurRadius() const
240 return mModel->GetShadowBlurRadius();
243 const Vector4& ViewModel::GetUnderlineColor() const
245 return mModel->GetUnderlineColor();
248 bool ViewModel::IsUnderlineEnabled() const
250 return mModel->IsUnderlineEnabled();
253 bool ViewModel::IsMarkupUnderlineSet() const
255 return mModel->IsMarkupUnderlineSet();
258 float ViewModel::GetUnderlineHeight() const
260 return mModel->GetUnderlineHeight();
263 Text::Underline::Type ViewModel::GetUnderlineType() const
265 return mModel->GetUnderlineType();
268 float ViewModel::GetDashedUnderlineWidth() const
270 return mModel->GetDashedUnderlineWidth();
273 float ViewModel::GetDashedUnderlineGap() const
275 return mModel->GetDashedUnderlineGap();
278 Length ViewModel::GetNumberOfUnderlineRuns() const
280 return mModel->GetNumberOfUnderlineRuns();
283 void ViewModel::GetUnderlineRuns(UnderlinedGlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns) const
285 mModel->GetUnderlineRuns(underlineRuns, index, numberOfRuns);
288 const Vector4& ViewModel::GetOutlineColor() const
290 return mModel->GetOutlineColor();
293 uint16_t ViewModel::GetOutlineWidth() const
295 return mModel->GetOutlineWidth();
298 const Vector4& ViewModel::GetBackgroundColor() const
300 return mModel->GetBackgroundColor();
303 bool ViewModel::IsBackgroundEnabled() const
305 return mModel->IsBackgroundEnabled();
308 bool ViewModel::IsMarkupProcessorEnabled() const
310 return mModel->IsMarkupProcessorEnabled();
313 bool ViewModel::IsSpannedTextPlaced() const
315 return mModel->IsSpannedTextPlaced();
318 const GlyphInfo* ViewModel::GetHyphens() const
320 return mModel->GetHyphens();
323 const Length* ViewModel::GetHyphenIndices() const
325 return mModel->GetHyphenIndices();
328 Length ViewModel::GetHyphensCount() const
330 return mModel->GetHyphensCount();
333 float ViewModel::GetCharacterSpacing() const
335 return mModel->GetCharacterSpacing();
338 const Character* ViewModel::GetTextBuffer() const
340 return mModel->GetTextBuffer();
343 const Vector<CharacterIndex>& ViewModel::GetGlyphsToCharacters() const
345 return mModel->GetGlyphsToCharacters();
348 void ViewModel::ElideGlyphs()
350 mIsTextElided = false;
351 mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = 0;
352 mEndIndexOfElidedGlyphs = mModel->GetNumberOfGlyphs() - 1u;
354 auto ellipsisPosition = GetEllipsisPosition();
355 auto characterSpacing = GetCharacterSpacing();
356 const Character* textBuffer = GetTextBuffer();
357 const Vector<CharacterIndex>& glyphToCharacterMap = GetGlyphsToCharacters();
358 const CharacterIndex* glyphToCharacterMapBuffer = glyphToCharacterMap.Begin();
359 float calculatedAdvance = 0.f;
361 if(IsTextElideEnabled())
363 const Length numberOfLines = mModel->GetNumberOfLines();
364 if(0u != numberOfLines)
366 const LineRun* const lines = mModel->GetLines();
368 //Get line of ellipsis
369 const LineRun* ellipsisLine = nullptr;
370 const LineRun* ellipsisNextLine = nullptr;
372 for(Length lineIndex = 0; lineIndex < numberOfLines; lineIndex++)
374 const LineRun* line = (lines + lineIndex);
378 if(lineIndex < numberOfLines - 1u)
380 ellipsisNextLine = (lines + lineIndex + 1u);
386 // Check if there is a line contains Ellipsis.
387 // Then find total number of glyphs and total number of laid out glyphs.
388 // Check where to set Ellipsis glyph in line.
389 // Determine index of Ellipsis glyph and how many glyphs should be replaced by Ellipsis glyph, according to width of Ellipsis glyph.
390 if(ellipsisLine != nullptr)
392 // Total number of glyphs.
393 const Length numberOfGlyphs = mModel->GetNumberOfGlyphs();
394 // Total number of laid out glyphs.
395 Length numberOfActualLaidOutGlyphs = 0u;
397 // Accumulate laid out glyphs for each line to find total number of laid out glyphs.
398 for(Length lineIndex = 0u; lineIndex < numberOfLines; lineIndex++)
400 numberOfActualLaidOutGlyphs += lines[lineIndex].glyphRun.numberOfGlyphs + lines[lineIndex].glyphRunSecondHalf.numberOfGlyphs;
403 // Make sure there are laid out glyphs.
404 if(0u != numberOfActualLaidOutGlyphs)
406 // There are elided glyphs.
407 mIsTextElided = true;
408 TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
410 // Retrieve the whole glyphs and their positions.
411 const GlyphInfo* const glyphs = mModel->GetGlyphs();
412 const Vector2* const positions = mModel->GetLayout();
414 // Copy the glyphs to be elided.
415 mElidedGlyphs.Resize(numberOfGlyphs);
416 mElidedLayout.Resize(numberOfGlyphs);
417 GlyphInfo* elidedGlyphsBuffer = mElidedGlyphs.Begin();
418 Vector2* elidedPositionsBuffer = mElidedLayout.Begin();
420 memcpy(elidedGlyphsBuffer, glyphs, numberOfGlyphs * sizeof(GlyphInfo));
421 memcpy(elidedPositionsBuffer, positions, numberOfGlyphs * sizeof(Vector2));
423 const Size& controlSize = mModel->GetControlSize();
425 // Set index where to set Ellipsis according to the selected position of Ellipsis.
426 // Start with this index to replace its glyph by Ellipsis, if the width is not enough, then remove more glyphs.
427 GlyphIndex startIndexOfEllipsis = 0u;
428 if(ellipsisPosition == DevelText::EllipsisPosition::START)
430 // It's the fisrt glyph in line.
431 startIndexOfEllipsis = ellipsisLine->glyphRun.glyphIndex;
433 else if(ellipsisPosition == DevelText::EllipsisPosition::MIDDLE)
435 // It's the second middle of the line in case the line split to two halves.
436 // Otherwise it's It's the last glyph in line (line before all removed lines).
437 startIndexOfEllipsis = ellipsisLine->isSplitToTwoHalves ? (ellipsisLine->glyphRunSecondHalf.glyphIndex) : (ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u);
439 else // DevelText::EllipsisPosition::END
441 // It's the last glyph in line.
442 startIndexOfEllipsis = ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u;
445 // When the hight is not enough then show one glyph and that should be the first laid out glyph.
446 if((1u == numberOfLines) &&
447 (ellipsisLine->ascender - ellipsisLine->descender > controlSize.height))
449 // Replace the first glyph with ellipsis glyph
450 auto indexOfFirstGlyph = (ellipsisPosition == DevelText::EllipsisPosition::START) ? startIndexOfEllipsis : 0u;
452 // Regardless where the location of ellipsis,in-case the hight of line is greater than control's height
453 // then replace the first glyph with ellipsis glyph.
455 // Get the first glyph which is going to be replaced and the ellipsis glyph.
456 GlyphInfo& glyphToRemove = *(elidedGlyphsBuffer + indexOfFirstGlyph);
457 const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph(fontClient.GetPointSize(glyphToRemove.fontId));
459 // Change the 'x' and 'y' position of the ellipsis glyph.
460 Vector2& position = *(elidedPositionsBuffer + indexOfFirstGlyph);
462 position.x = ellipsisGlyph.xBearing;
463 position.y = -ellipsisLine->ascender + controlSize.height - ellipsisGlyph.yBearing;
465 // Replace the glyph by the ellipsis glyph and resize the buffers.
466 glyphToRemove = ellipsisGlyph;
468 mElidedGlyphs.Resize(1u);
469 mElidedLayout.Resize(1u);
471 mEndIndexOfElidedGlyphs = mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = indexOfFirstGlyph;
476 // firstPenX, penY and firstPenSet are used to position the ellipsis glyph if needed.
477 float firstPenX = 0.f; // Used if rtl text is elided.
479 bool firstPenSet = false;
481 // Add the ellipsis glyph.
482 bool inserted = false;
483 float removedGlypsWidth = 0.f;
484 Length numberOfRemovedGlyphs = 0u;
485 GlyphIndex indexOfEllipsis = startIndexOfEllipsis;
487 // Tail Mode: start by the end of line.
488 bool isTailMode = (ellipsisPosition == DevelText::EllipsisPosition::END) ||
489 (ellipsisPosition == DevelText::EllipsisPosition::MIDDLE && numberOfLines != 1u);
491 // The ellipsis glyph has to fit in the place where the last glyph(s) is(are) removed.
494 const GlyphInfo& glyphToRemove = *(elidedGlyphsBuffer + indexOfEllipsis);
496 if(0u != glyphToRemove.fontId)
498 // i.e. The font id of the glyph shaped from the '\n' character is zero.
500 // Need to reshape the glyph as the font may be different in size.
501 const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph(fontClient.GetPointSize(glyphToRemove.fontId));
503 if(!firstPenSet || EqualsZero(glyphToRemove.advance))
505 const Vector2& position = *(elidedPositionsBuffer + indexOfEllipsis);
507 // Calculates the penY of the current line. It will be used to position the ellipsis glyph.
508 penY = position.y + glyphToRemove.yBearing;
510 // Calculates the first penX which will be used if rtl text is elided.
511 firstPenX = position.x - glyphToRemove.xBearing;
512 if(firstPenX < -ellipsisGlyph.xBearing)
514 // Avoids to exceed the bounding box when rtl text is elided.
515 firstPenX = -ellipsisGlyph.xBearing;
518 removedGlypsWidth = -ellipsisGlyph.xBearing;
523 calculatedAdvance = GetCalculatedAdvance(*(textBuffer + (*(glyphToCharacterMapBuffer + indexOfEllipsis))), characterSpacing, glyphToRemove.advance);
524 removedGlypsWidth += std::min(calculatedAdvance, (glyphToRemove.xBearing + glyphToRemove.width));
526 // Calculate the width of the ellipsis glyph and check if it fits.
527 const float ellipsisGlyphWidth = ellipsisGlyph.width + ellipsisGlyph.xBearing;
529 // If it is the last glyph to remove, add the ellipsis glyph without checking its width.
530 if((ellipsisGlyphWidth < removedGlypsWidth) || (isTailMode ? (indexOfEllipsis == 0u) : (indexOfEllipsis == numberOfGlyphs - 1u)))
532 GlyphInfo& glyphInfo = *(elidedGlyphsBuffer + indexOfEllipsis);
533 Vector2& position = *(elidedPositionsBuffer + indexOfEllipsis);
534 position.x -= (0.f > glyphInfo.xBearing) ? glyphInfo.xBearing : 0.f;
536 // Replace the glyph by the ellipsis glyph.
537 glyphInfo = ellipsisGlyph;
539 // Change the 'x' and 'y' position of the ellipsis glyph.
540 if(position.x > firstPenX)
544 // To handle case of the mixed languages (LTR then RTL) with
545 // EllipsisPosition::END and the LayoutDirection::RIGHT_TO_LEFT
546 float nextXPositions = ellipsisLine->width;
547 if(indexOfEllipsis + 1u < numberOfGlyphs)
549 Vector2& positionOfNextGlyph = *(elidedPositionsBuffer + indexOfEllipsis + 1u);
550 nextXPositions = positionOfNextGlyph.x;
553 if(position.x > nextXPositions) // RTL language
555 if((indexOfEllipsis > 0u) && ((position.x - nextXPositions) > removedGlypsWidth))
557 // To handle mixed directions
558 // Re-calculates the first penX which will be used if rtl text is elided.
559 firstPenX = position.x - glyphToRemove.xBearing;
560 if(firstPenX < -ellipsisGlyph.xBearing)
562 // Avoids to exceed the bounding box when rtl text is elided.
563 firstPenX = -ellipsisGlyph.xBearing;
565 //Reset the width of removed glyphs
566 removedGlypsWidth = std::min(calculatedAdvance, (glyphToRemove.xBearing + glyphToRemove.width)) - ellipsisGlyph.xBearing;
573 // To handle the case of RTL language with EllipsisPosition::END
574 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
580 // To handle the case of LTR language with EllipsisPosition::START
581 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
588 // To handle case of the mixed languages (RTL then LTR) with
589 // EllipsisPosition::START and the LayoutDirection::RIGHT_TO_LEFT
590 float nextXPositions = ellipsisLine->width;
591 if(indexOfEllipsis + 1u < numberOfGlyphs)
593 Vector2& positionOfNextGlyph = *(elidedPositionsBuffer + indexOfEllipsis + 1u);
594 nextXPositions = positionOfNextGlyph.x;
597 if(position.x < nextXPositions) // LTR language
599 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
601 if((position.x + ellipsisGlyphWidth + ellipsisGlyph.xBearing) > nextXPositions)
603 position.x -= (position.x + ellipsisGlyphWidth + ellipsisGlyph.xBearing) - nextXPositions;
609 position.x += ellipsisGlyph.xBearing;
610 position.y = penY - ellipsisGlyph.yBearing;
618 if(!isTailMode && indexOfEllipsis < numberOfGlyphs - 1u)
620 // Tail Mode: remove glyphs from startIndexOfEllipsis then decrement indexOfEllipsis, until arrive to index zero.
623 else if(isTailMode && indexOfEllipsis > 0u)
625 // Not Tail Mode: remove glyphs from startIndexOfEllipsis then increase indexOfEllipsis, until arrive to last index (numberOfGlyphs - 1u).
630 // No space for the ellipsis.
633 ++numberOfRemovedGlyphs;
635 } // while( !inserted )
637 //Reduce size, shift glyphs and start from ellipsis glyph
638 Length numberOfElidedGlyphs = numberOfActualLaidOutGlyphs - numberOfRemovedGlyphs;
639 mElidedGlyphs.Resize(numberOfElidedGlyphs);
640 mElidedLayout.Resize(numberOfElidedGlyphs);
642 if(ellipsisPosition == DevelText::EllipsisPosition::START)
644 // 'Shifts' glyphs after ellipsis glyph and 'Removes' before ellipsis glyph
645 memcpy(elidedGlyphsBuffer, elidedGlyphsBuffer + indexOfEllipsis, numberOfElidedGlyphs * sizeof(GlyphInfo));
646 memcpy(elidedPositionsBuffer, elidedPositionsBuffer + indexOfEllipsis, numberOfElidedGlyphs * sizeof(Vector2));
648 mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = indexOfEllipsis;
650 else if(ellipsisPosition == DevelText::EllipsisPosition::MIDDLE)
652 // 'Shifts and connects' glyphs before and after ellipsis glyph and 'Removes' in-between.
653 bool isOnlySecondHalf = false;
657 mFirstMiddleIndexOfElidedGlyphs = indexOfEllipsis;
658 if(ellipsisNextLine != nullptr)
660 mSecondMiddleIndexOfElidedGlyphs = ellipsisNextLine->glyphRun.glyphIndex;
664 mEndIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs;
669 mFirstMiddleIndexOfElidedGlyphs = (ellipsisLine->glyphRun.numberOfGlyphs > 0u) ? (ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u) : (ellipsisLine->glyphRun.glyphIndex);
670 mSecondMiddleIndexOfElidedGlyphs = indexOfEllipsis;
671 isOnlySecondHalf = ellipsisLine->glyphRun.numberOfGlyphs == 0u && ellipsisLine->glyphRunSecondHalf.numberOfGlyphs > 0u;
676 Length numberOfSecondHalfGlyphs = numberOfElidedGlyphs - mFirstMiddleIndexOfElidedGlyphs;
678 //Copy elided glyphs after the ellipsis glyph.
679 memcpy(elidedGlyphsBuffer + mFirstMiddleIndexOfElidedGlyphs, elidedGlyphsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(GlyphInfo));
680 memcpy(elidedPositionsBuffer + mFirstMiddleIndexOfElidedGlyphs, elidedPositionsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(Vector2));
684 Length numberOfSecondHalfGlyphs = numberOfElidedGlyphs - mFirstMiddleIndexOfElidedGlyphs + 1u;
686 //Copy elided glyphs after the ellipsis glyph.
687 memcpy(elidedGlyphsBuffer + mFirstMiddleIndexOfElidedGlyphs + 1u, elidedGlyphsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(GlyphInfo));
688 memcpy(elidedPositionsBuffer + mFirstMiddleIndexOfElidedGlyphs + 1u, elidedPositionsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(Vector2));
691 else // DevelText::EllipsisPosition::END
693 // 'Removes' all the glyphs after the ellipsis glyph.
694 mEndIndexOfElidedGlyphs = indexOfEllipsis;
702 float ViewModel::GetStrikethroughHeight() const
704 return mModel->GetStrikethroughHeight();
707 const Vector4& ViewModel::GetStrikethroughColor() const
709 return mModel->GetStrikethroughColor();
712 bool ViewModel::IsStrikethroughEnabled() const
714 return mModel->IsStrikethroughEnabled();
717 bool ViewModel::IsMarkupStrikethroughSet() const
719 return mModel->IsMarkupStrikethroughSet();
722 Length ViewModel::GetNumberOfStrikethroughRuns() const
724 return mModel->GetNumberOfStrikethroughRuns();
727 void ViewModel::GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns, StrikethroughRunIndex index, Length numberOfRuns) const
729 mModel->GetStrikethroughRuns(strikethroughRuns, index, numberOfRuns);
732 Length ViewModel::GetNumberOfBoundedParagraphRuns() const
734 return mModel->GetNumberOfBoundedParagraphRuns();
737 const Vector<BoundedParagraphRun>& ViewModel::GetBoundedParagraphRuns() const
739 return mModel->GetBoundedParagraphRuns();
742 Length ViewModel::GetNumberOfCharacterSpacingGlyphRuns() const
744 return mModel->GetNumberOfCharacterSpacingGlyphRuns();
747 const Vector<CharacterSpacingGlyphRun>& ViewModel::GetCharacterSpacingGlyphRuns() const
749 return mModel->GetCharacterSpacingGlyphRuns();
752 const Vector<FontRun>& ViewModel::GetFontRuns() const
754 return mModel->GetFontRuns();
757 const Vector<FontDescriptionRun>& ViewModel::GetFontDescriptionRuns() const
759 return mModel->GetFontDescriptionRuns();
764 } // namespace Toolkit