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 Vector2& ViewModel::GetOutlineOffset() const
290 return mModel->GetOutlineOffset();
293 const Vector4& ViewModel::GetOutlineColor() const
295 return mModel->GetOutlineColor();
298 uint16_t ViewModel::GetOutlineWidth() const
300 return mModel->GetOutlineWidth();
303 const float& ViewModel::GetOutlineBlurRadius() const
305 return mModel->GetOutlineBlurRadius();
308 const Vector4& ViewModel::GetBackgroundColor() const
310 return mModel->GetBackgroundColor();
313 bool ViewModel::IsBackgroundEnabled() const
315 return mModel->IsBackgroundEnabled();
318 bool ViewModel::IsMarkupProcessorEnabled() const
320 return mModel->IsMarkupProcessorEnabled();
323 bool ViewModel::IsSpannedTextPlaced() const
325 return mModel->IsSpannedTextPlaced();
328 const GlyphInfo* ViewModel::GetHyphens() const
330 return mModel->GetHyphens();
333 const Length* ViewModel::GetHyphenIndices() const
335 return mModel->GetHyphenIndices();
338 Length ViewModel::GetHyphensCount() const
340 return mModel->GetHyphensCount();
343 float ViewModel::GetCharacterSpacing() const
345 return mModel->GetCharacterSpacing();
348 const Character* ViewModel::GetTextBuffer() const
350 return mModel->GetTextBuffer();
353 const Vector<CharacterIndex>& ViewModel::GetGlyphsToCharacters() const
355 return mModel->GetGlyphsToCharacters();
358 void ViewModel::ElideGlyphs()
360 mIsTextElided = false;
361 mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = 0;
362 mEndIndexOfElidedGlyphs = mModel->GetNumberOfGlyphs() - 1u;
364 auto ellipsisPosition = GetEllipsisPosition();
365 auto characterSpacing = GetCharacterSpacing();
366 const Character* textBuffer = GetTextBuffer();
367 const Vector<CharacterIndex>& glyphToCharacterMap = GetGlyphsToCharacters();
368 const CharacterIndex* glyphToCharacterMapBuffer = glyphToCharacterMap.Begin();
369 float calculatedAdvance = 0.f;
371 if(IsTextElideEnabled())
373 const Length numberOfLines = mModel->GetNumberOfLines();
374 if(0u != numberOfLines)
376 const LineRun* const lines = mModel->GetLines();
378 //Get line of ellipsis
379 const LineRun* ellipsisLine = nullptr;
380 const LineRun* ellipsisNextLine = nullptr;
382 for(Length lineIndex = 0; lineIndex < numberOfLines; lineIndex++)
384 const LineRun* line = (lines + lineIndex);
388 if(lineIndex < numberOfLines - 1u)
390 ellipsisNextLine = (lines + lineIndex + 1u);
396 // Check if there is a line contains Ellipsis.
397 // Then find total number of glyphs and total number of laid out glyphs.
398 // Check where to set Ellipsis glyph in line.
399 // Determine index of Ellipsis glyph and how many glyphs should be replaced by Ellipsis glyph, according to width of Ellipsis glyph.
400 if(ellipsisLine != nullptr)
402 // Total number of glyphs.
403 const Length numberOfGlyphs = mModel->GetNumberOfGlyphs();
404 // Total number of laid out glyphs.
405 Length numberOfActualLaidOutGlyphs = 0u;
407 // Accumulate laid out glyphs for each line to find total number of laid out glyphs.
408 for(Length lineIndex = 0u; lineIndex < numberOfLines; lineIndex++)
410 numberOfActualLaidOutGlyphs += lines[lineIndex].glyphRun.numberOfGlyphs + lines[lineIndex].glyphRunSecondHalf.numberOfGlyphs;
413 // Make sure there are laid out glyphs.
414 if(0u != numberOfActualLaidOutGlyphs)
416 // There are elided glyphs.
417 mIsTextElided = true;
418 TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
420 // Retrieve the whole glyphs and their positions.
421 const GlyphInfo* const glyphs = mModel->GetGlyphs();
422 const Vector2* const positions = mModel->GetLayout();
424 // Copy the glyphs to be elided.
425 mElidedGlyphs.Resize(numberOfGlyphs);
426 mElidedLayout.Resize(numberOfGlyphs);
427 GlyphInfo* elidedGlyphsBuffer = mElidedGlyphs.Begin();
428 Vector2* elidedPositionsBuffer = mElidedLayout.Begin();
430 memcpy(elidedGlyphsBuffer, glyphs, numberOfGlyphs * sizeof(GlyphInfo));
431 memcpy(elidedPositionsBuffer, positions, numberOfGlyphs * sizeof(Vector2));
433 const Size& controlSize = mModel->GetControlSize();
435 // Set index where to set Ellipsis according to the selected position of Ellipsis.
436 // Start with this index to replace its glyph by Ellipsis, if the width is not enough, then remove more glyphs.
437 GlyphIndex startIndexOfEllipsis = 0u;
438 if(ellipsisPosition == DevelText::EllipsisPosition::START)
440 // It's the fisrt glyph in line.
441 startIndexOfEllipsis = ellipsisLine->glyphRun.glyphIndex;
443 else if(ellipsisPosition == DevelText::EllipsisPosition::MIDDLE)
445 // It's the second middle of the line in case the line split to two halves.
446 // Otherwise it's It's the last glyph in line (line before all removed lines).
447 startIndexOfEllipsis = ellipsisLine->isSplitToTwoHalves ? (ellipsisLine->glyphRunSecondHalf.glyphIndex) : (ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u);
449 else // DevelText::EllipsisPosition::END
451 // It's the last glyph in line.
452 startIndexOfEllipsis = ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u;
455 // When the hight is not enough then show one glyph and that should be the first laid out glyph.
456 if((1u == numberOfLines) &&
457 (ellipsisLine->ascender - ellipsisLine->descender > controlSize.height))
459 // Replace the first glyph with ellipsis glyph
460 auto indexOfFirstGlyph = (ellipsisPosition == DevelText::EllipsisPosition::START) ? startIndexOfEllipsis : 0u;
462 // Regardless where the location of ellipsis,in-case the hight of line is greater than control's height
463 // then replace the first glyph with ellipsis glyph.
465 // Get the first glyph which is going to be replaced and the ellipsis glyph.
466 GlyphInfo& glyphToRemove = *(elidedGlyphsBuffer + indexOfFirstGlyph);
467 const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph(fontClient.GetPointSize(glyphToRemove.fontId));
469 // Change the 'x' and 'y' position of the ellipsis glyph.
470 Vector2& position = *(elidedPositionsBuffer + indexOfFirstGlyph);
472 position.x = ellipsisGlyph.xBearing;
473 position.y = -ellipsisLine->ascender + controlSize.height - ellipsisGlyph.yBearing;
475 // Replace the glyph by the ellipsis glyph and resize the buffers.
476 glyphToRemove = ellipsisGlyph;
478 mElidedGlyphs.Resize(1u);
479 mElidedLayout.Resize(1u);
481 mEndIndexOfElidedGlyphs = mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = indexOfFirstGlyph;
486 // firstPenX, penY and firstPenSet are used to position the ellipsis glyph if needed.
487 float firstPenX = 0.f; // Used if rtl text is elided.
489 bool firstPenSet = false;
491 // Add the ellipsis glyph.
492 bool inserted = false;
493 float removedGlypsWidth = 0.f;
494 Length numberOfRemovedGlyphs = 0u;
495 GlyphIndex indexOfEllipsis = startIndexOfEllipsis;
497 // Tail Mode: start by the end of line.
498 bool isTailMode = (ellipsisPosition == DevelText::EllipsisPosition::END) ||
499 (ellipsisPosition == DevelText::EllipsisPosition::MIDDLE && numberOfLines != 1u);
501 // The ellipsis glyph has to fit in the place where the last glyph(s) is(are) removed.
504 const GlyphInfo& glyphToRemove = *(elidedGlyphsBuffer + indexOfEllipsis);
506 if(0u != glyphToRemove.fontId)
508 // i.e. The font id of the glyph shaped from the '\n' character is zero.
510 // Need to reshape the glyph as the font may be different in size.
511 const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph(fontClient.GetPointSize(glyphToRemove.fontId));
513 if(!firstPenSet || EqualsZero(glyphToRemove.advance))
515 const Vector2& position = *(elidedPositionsBuffer + indexOfEllipsis);
517 // Calculates the penY of the current line. It will be used to position the ellipsis glyph.
518 penY = position.y + glyphToRemove.yBearing;
520 // Calculates the first penX which will be used if rtl text is elided.
521 firstPenX = position.x - glyphToRemove.xBearing;
522 if(firstPenX < -ellipsisGlyph.xBearing)
524 // Avoids to exceed the bounding box when rtl text is elided.
525 firstPenX = -ellipsisGlyph.xBearing;
528 removedGlypsWidth = -ellipsisGlyph.xBearing;
533 calculatedAdvance = GetCalculatedAdvance(*(textBuffer + (*(glyphToCharacterMapBuffer + indexOfEllipsis))), characterSpacing, glyphToRemove.advance);
534 removedGlypsWidth += std::min(calculatedAdvance, (glyphToRemove.xBearing + glyphToRemove.width));
536 // Calculate the width of the ellipsis glyph and check if it fits.
537 const float ellipsisGlyphWidth = ellipsisGlyph.width + ellipsisGlyph.xBearing;
539 // If it is the last glyph to remove, add the ellipsis glyph without checking its width.
540 if((ellipsisGlyphWidth < removedGlypsWidth) || (isTailMode ? (indexOfEllipsis == 0u) : (indexOfEllipsis == numberOfGlyphs - 1u)))
542 GlyphInfo& glyphInfo = *(elidedGlyphsBuffer + indexOfEllipsis);
543 Vector2& position = *(elidedPositionsBuffer + indexOfEllipsis);
544 position.x -= (0.f > glyphInfo.xBearing) ? glyphInfo.xBearing : 0.f;
546 // Replace the glyph by the ellipsis glyph.
547 glyphInfo = ellipsisGlyph;
549 // Change the 'x' and 'y' position of the ellipsis glyph.
550 if(position.x > firstPenX)
554 // To handle case of the mixed languages (LTR then RTL) with
555 // EllipsisPosition::END and the LayoutDirection::RIGHT_TO_LEFT
556 float nextXPositions = ellipsisLine->width;
557 if(indexOfEllipsis + 1u < numberOfGlyphs)
559 Vector2& positionOfNextGlyph = *(elidedPositionsBuffer + indexOfEllipsis + 1u);
560 nextXPositions = positionOfNextGlyph.x;
563 if(position.x > nextXPositions) // RTL language
565 if((indexOfEllipsis > 0u) && ((position.x - nextXPositions) > removedGlypsWidth))
567 // To handle mixed directions
568 // Re-calculates the first penX which will be used if rtl text is elided.
569 firstPenX = position.x - glyphToRemove.xBearing;
570 if(firstPenX < -ellipsisGlyph.xBearing)
572 // Avoids to exceed the bounding box when rtl text is elided.
573 firstPenX = -ellipsisGlyph.xBearing;
575 //Reset the width of removed glyphs
576 removedGlypsWidth = std::min(calculatedAdvance, (glyphToRemove.xBearing + glyphToRemove.width)) - ellipsisGlyph.xBearing;
583 // To handle the case of RTL language with EllipsisPosition::END
584 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
590 // To handle the case of LTR language with EllipsisPosition::START
591 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
598 // To handle case of the mixed languages (RTL then LTR) with
599 // EllipsisPosition::START and the LayoutDirection::RIGHT_TO_LEFT
600 float nextXPositions = ellipsisLine->width;
601 if(indexOfEllipsis + 1u < numberOfGlyphs)
603 Vector2& positionOfNextGlyph = *(elidedPositionsBuffer + indexOfEllipsis + 1u);
604 nextXPositions = positionOfNextGlyph.x;
607 if(position.x < nextXPositions) // LTR language
609 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
611 if((position.x + ellipsisGlyphWidth + ellipsisGlyph.xBearing) > nextXPositions)
613 position.x -= (position.x + ellipsisGlyphWidth + ellipsisGlyph.xBearing) - nextXPositions;
619 position.x += ellipsisGlyph.xBearing;
620 position.y = penY - ellipsisGlyph.yBearing;
628 if(!isTailMode && indexOfEllipsis < numberOfGlyphs - 1u)
630 // Tail Mode: remove glyphs from startIndexOfEllipsis then decrement indexOfEllipsis, until arrive to index zero.
633 else if(isTailMode && indexOfEllipsis > 0u)
635 // Not Tail Mode: remove glyphs from startIndexOfEllipsis then increase indexOfEllipsis, until arrive to last index (numberOfGlyphs - 1u).
640 // No space for the ellipsis.
643 ++numberOfRemovedGlyphs;
645 } // while( !inserted )
647 //Reduce size, shift glyphs and start from ellipsis glyph
648 Length numberOfElidedGlyphs = numberOfActualLaidOutGlyphs - numberOfRemovedGlyphs;
649 mElidedGlyphs.Resize(numberOfElidedGlyphs);
650 mElidedLayout.Resize(numberOfElidedGlyphs);
652 if(ellipsisPosition == DevelText::EllipsisPosition::START)
654 // 'Shifts' glyphs after ellipsis glyph and 'Removes' before ellipsis glyph
655 memcpy(elidedGlyphsBuffer, elidedGlyphsBuffer + indexOfEllipsis, numberOfElidedGlyphs * sizeof(GlyphInfo));
656 memcpy(elidedPositionsBuffer, elidedPositionsBuffer + indexOfEllipsis, numberOfElidedGlyphs * sizeof(Vector2));
658 mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = indexOfEllipsis;
660 else if(ellipsisPosition == DevelText::EllipsisPosition::MIDDLE)
662 // 'Shifts and connects' glyphs before and after ellipsis glyph and 'Removes' in-between.
663 bool isOnlySecondHalf = false;
667 mFirstMiddleIndexOfElidedGlyphs = indexOfEllipsis;
668 if(ellipsisNextLine != nullptr)
670 mSecondMiddleIndexOfElidedGlyphs = ellipsisNextLine->glyphRun.glyphIndex;
674 mEndIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs;
679 mFirstMiddleIndexOfElidedGlyphs = (ellipsisLine->glyphRun.numberOfGlyphs > 0u) ? (ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u) : (ellipsisLine->glyphRun.glyphIndex);
680 mSecondMiddleIndexOfElidedGlyphs = indexOfEllipsis;
681 isOnlySecondHalf = ellipsisLine->glyphRun.numberOfGlyphs == 0u && ellipsisLine->glyphRunSecondHalf.numberOfGlyphs > 0u;
686 Length numberOfSecondHalfGlyphs = numberOfElidedGlyphs - mFirstMiddleIndexOfElidedGlyphs;
688 //Copy elided glyphs after the ellipsis glyph.
689 memcpy(elidedGlyphsBuffer + mFirstMiddleIndexOfElidedGlyphs, elidedGlyphsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(GlyphInfo));
690 memcpy(elidedPositionsBuffer + mFirstMiddleIndexOfElidedGlyphs, elidedPositionsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(Vector2));
694 Length numberOfSecondHalfGlyphs = numberOfElidedGlyphs - mFirstMiddleIndexOfElidedGlyphs + 1u;
696 //Copy elided glyphs after the ellipsis glyph.
697 memcpy(elidedGlyphsBuffer + mFirstMiddleIndexOfElidedGlyphs + 1u, elidedGlyphsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(GlyphInfo));
698 memcpy(elidedPositionsBuffer + mFirstMiddleIndexOfElidedGlyphs + 1u, elidedPositionsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(Vector2));
701 else // DevelText::EllipsisPosition::END
703 // 'Removes' all the glyphs after the ellipsis glyph.
704 mEndIndexOfElidedGlyphs = indexOfEllipsis;
712 float ViewModel::GetStrikethroughHeight() const
714 return mModel->GetStrikethroughHeight();
717 const Vector4& ViewModel::GetStrikethroughColor() const
719 return mModel->GetStrikethroughColor();
722 bool ViewModel::IsStrikethroughEnabled() const
724 return mModel->IsStrikethroughEnabled();
727 bool ViewModel::IsMarkupStrikethroughSet() const
729 return mModel->IsMarkupStrikethroughSet();
732 Length ViewModel::GetNumberOfStrikethroughRuns() const
734 return mModel->GetNumberOfStrikethroughRuns();
737 void ViewModel::GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns, StrikethroughRunIndex index, Length numberOfRuns) const
739 mModel->GetStrikethroughRuns(strikethroughRuns, index, numberOfRuns);
742 Length ViewModel::GetNumberOfBoundedParagraphRuns() const
744 return mModel->GetNumberOfBoundedParagraphRuns();
747 const Vector<BoundedParagraphRun>& ViewModel::GetBoundedParagraphRuns() const
749 return mModel->GetBoundedParagraphRuns();
752 Length ViewModel::GetNumberOfCharacterSpacingGlyphRuns() const
754 return mModel->GetNumberOfCharacterSpacingGlyphRuns();
757 const Vector<CharacterSpacingGlyphRun>& ViewModel::GetCharacterSpacingGlyphRuns() const
759 return mModel->GetCharacterSpacingGlyphRuns();
762 const Vector<FontRun>& ViewModel::GetFontRuns() const
764 return mModel->GetFontRuns();
767 const Vector<FontDescriptionRun>& ViewModel::GetFontDescriptionRuns() const
769 return mModel->GetFontDescriptionRuns();
774 } // namespace Toolkit