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.
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* const ViewModel::GetLines() const
98 return mModel->GetLines();
101 Length ViewModel::GetNumberOfScripts() const
103 return mModel->GetNumberOfScripts();
106 const ScriptRun* const ViewModel::GetScriptRuns() const
108 return mModel->GetScriptRuns();
111 Length ViewModel::GetNumberOfGlyphs() const
113 if(mIsTextElided && mModel->IsTextElideEnabled())
115 return mElidedGlyphs.Count();
119 return mModel->GetNumberOfGlyphs();
125 GlyphIndex ViewModel::GetStartIndexOfElidedGlyphs() const
127 if(mIsTextElided && mModel->IsTextElideEnabled())
129 return mStartIndexOfElidedGlyphs;
132 return mModel->GetStartIndexOfElidedGlyphs();
135 GlyphIndex ViewModel::GetEndIndexOfElidedGlyphs() const
137 if(mIsTextElided && mModel->IsTextElideEnabled())
139 return mEndIndexOfElidedGlyphs;
142 return mModel->GetEndIndexOfElidedGlyphs();
145 GlyphIndex ViewModel::GetFirstMiddleIndexOfElidedGlyphs() const
147 if(mIsTextElided && mModel->IsTextElideEnabled())
149 return mFirstMiddleIndexOfElidedGlyphs;
152 return mModel->GetFirstMiddleIndexOfElidedGlyphs();
155 GlyphIndex ViewModel::GetSecondMiddleIndexOfElidedGlyphs() const
157 if(mIsTextElided && mModel->IsTextElideEnabled())
159 return mSecondMiddleIndexOfElidedGlyphs;
162 return mModel->GetSecondMiddleIndexOfElidedGlyphs();
165 const GlyphInfo* const ViewModel::GetGlyphs() const
167 if(mIsTextElided && mModel->IsTextElideEnabled())
169 return mElidedGlyphs.Begin();
173 return mModel->GetGlyphs();
179 const Vector2* const ViewModel::GetLayout() const
181 if(mIsTextElided && mModel->IsTextElideEnabled())
183 return mElidedLayout.Begin();
187 return mModel->GetLayout();
193 const Vector4* const ViewModel::GetColors() const
195 return mModel->GetColors();
198 const ColorIndex* const ViewModel::GetColorIndices() const
200 return mModel->GetColorIndices();
203 const Vector4* const ViewModel::GetBackgroundColors() const
205 return mModel->GetBackgroundColors();
208 const ColorIndex* const ViewModel::GetBackgroundColorIndices() const
210 return mModel->GetBackgroundColorIndices();
213 bool const ViewModel::IsMarkupBackgroundColorSet() const
215 return mModel->IsMarkupBackgroundColorSet();
218 const Vector4& ViewModel::GetDefaultColor() const
220 return mModel->GetDefaultColor();
223 const Vector2& ViewModel::GetShadowOffset() const
225 return mModel->GetShadowOffset();
228 const Vector4& ViewModel::GetShadowColor() const
230 return mModel->GetShadowColor();
233 const float& ViewModel::GetShadowBlurRadius() const
235 return mModel->GetShadowBlurRadius();
238 const Vector4& ViewModel::GetUnderlineColor() const
240 return mModel->GetUnderlineColor();
243 bool ViewModel::IsUnderlineEnabled() const
245 return mModel->IsUnderlineEnabled();
248 bool const ViewModel::IsMarkupUnderlineSet() const
250 return mModel->IsMarkupUnderlineSet();
253 float ViewModel::GetUnderlineHeight() const
255 return mModel->GetUnderlineHeight();
258 Text::Underline::Type ViewModel::GetUnderlineType() const
260 return mModel->GetUnderlineType();
263 float ViewModel::GetDashedUnderlineWidth() const
265 return mModel->GetDashedUnderlineWidth();
268 float ViewModel::GetDashedUnderlineGap() const
270 return mModel->GetDashedUnderlineGap();
273 Length ViewModel::GetNumberOfUnderlineRuns() const
275 return mModel->GetNumberOfUnderlineRuns();
278 void ViewModel::GetUnderlineRuns(UnderlinedGlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns) const
280 mModel->GetUnderlineRuns(underlineRuns, index, numberOfRuns);
283 const Vector4& ViewModel::GetOutlineColor() const
285 return mModel->GetOutlineColor();
288 uint16_t ViewModel::GetOutlineWidth() const
290 return mModel->GetOutlineWidth();
293 const Vector4& ViewModel::GetBackgroundColor() const
295 return mModel->GetBackgroundColor();
298 bool ViewModel::IsBackgroundEnabled() const
300 return mModel->IsBackgroundEnabled();
303 bool ViewModel::IsMarkupProcessorEnabled() const
305 return mModel->IsMarkupProcessorEnabled();
308 bool ViewModel::IsSpannedTextPlaced() const
310 return mModel->IsSpannedTextPlaced();
313 const GlyphInfo* ViewModel::GetHyphens() const
315 return mModel->GetHyphens();
318 const Length* ViewModel::GetHyphenIndices() const
320 return mModel->GetHyphenIndices();
323 Length ViewModel::GetHyphensCount() const
325 return mModel->GetHyphensCount();
328 const float ViewModel::GetCharacterSpacing() const
330 return mModel->GetCharacterSpacing();
333 const Character* ViewModel::GetTextBuffer() const
335 return mModel->GetTextBuffer();
338 const Vector<CharacterIndex>& ViewModel::GetGlyphsToCharacters() const
340 return mModel->GetGlyphsToCharacters();
343 void ViewModel::ElideGlyphs()
345 mIsTextElided = false;
346 mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = 0;
347 mEndIndexOfElidedGlyphs = mModel->GetNumberOfGlyphs() - 1u;
349 auto ellipsisPosition = GetEllipsisPosition();
350 auto characterSpacing = GetCharacterSpacing();
351 const Character* textBuffer = GetTextBuffer();
352 const Vector<CharacterIndex>& glyphToCharacterMap = GetGlyphsToCharacters();
353 const CharacterIndex* glyphToCharacterMapBuffer = glyphToCharacterMap.Begin();
354 float calculatedAdvance = 0.f;
356 if(IsTextElideEnabled())
358 const Length numberOfLines = mModel->GetNumberOfLines();
359 if(0u != numberOfLines)
361 const LineRun* const lines = mModel->GetLines();
363 //Get line of ellipsis
364 const LineRun* ellipsisLine = nullptr;
365 const LineRun* ellipsisNextLine = nullptr;
367 for(Length lineIndex = 0; lineIndex < numberOfLines; lineIndex++)
369 const LineRun* line = (lines + lineIndex);
373 if(lineIndex < numberOfLines - 1u)
375 ellipsisNextLine = (lines + lineIndex + 1u);
381 // Check if there is a line contains Ellipsis.
382 // Then find total number of glyphs and total number of laid out glyphs.
383 // Check where to set Ellipsis glyph in line.
384 // Determine index of Ellipsis glyph and how many glyphs should be replaced by Ellipsis glyph, according to width of Ellipsis glyph.
385 if(ellipsisLine != nullptr)
387 // Total number of glyphs.
388 const Length numberOfGlyphs = mModel->GetNumberOfGlyphs();
389 // Total number of laid out glyphs.
390 Length numberOfActualLaidOutGlyphs = 0u;
392 // Accumulate laid out glyphs for each line to find total number of laid out glyphs.
393 for(Length lineIndex = 0u; lineIndex < numberOfLines; lineIndex++)
395 numberOfActualLaidOutGlyphs += lines[lineIndex].glyphRun.numberOfGlyphs + lines[lineIndex].glyphRunSecondHalf.numberOfGlyphs;
398 // Make sure there are laid out glyphs.
399 if(0u != numberOfActualLaidOutGlyphs)
401 // There are elided glyphs.
402 mIsTextElided = true;
403 TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
405 // Retrieve the whole glyphs and their positions.
406 const GlyphInfo* const glyphs = mModel->GetGlyphs();
407 const Vector2* const positions = mModel->GetLayout();
409 // Copy the glyphs to be elided.
410 mElidedGlyphs.Resize(numberOfGlyphs);
411 mElidedLayout.Resize(numberOfGlyphs);
412 GlyphInfo* elidedGlyphsBuffer = mElidedGlyphs.Begin();
413 Vector2* elidedPositionsBuffer = mElidedLayout.Begin();
415 memcpy(elidedGlyphsBuffer, glyphs, numberOfGlyphs * sizeof(GlyphInfo));
416 memcpy(elidedPositionsBuffer, positions, numberOfGlyphs * sizeof(Vector2));
418 const Size& controlSize = mModel->GetControlSize();
420 // Set index where to set Ellipsis according to the selected position of Ellipsis.
421 // Start with this index to replace its glyph by Ellipsis, if the width is not enough, then remove more glyphs.
422 GlyphIndex startIndexOfEllipsis = 0u;
423 if(ellipsisPosition == DevelText::EllipsisPosition::START)
425 // It's the fisrt glyph in line.
426 startIndexOfEllipsis = ellipsisLine->glyphRun.glyphIndex;
428 else if(ellipsisPosition == DevelText::EllipsisPosition::MIDDLE)
430 // It's the second middle of the line in case the line split to two halves.
431 // Otherwise it's It's the last glyph in line (line before all removed lines).
432 startIndexOfEllipsis = ellipsisLine->isSplitToTwoHalves ? (ellipsisLine->glyphRunSecondHalf.glyphIndex) : (ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u);
434 else // DevelText::EllipsisPosition::END
436 // It's the last glyph in line.
437 startIndexOfEllipsis = ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u;
440 // When the hight is not enough then show one glyph and that should be the first laid out glyph.
441 if((1u == numberOfLines) &&
442 (ellipsisLine->ascender - ellipsisLine->descender > controlSize.height))
444 // Replace the first glyph with ellipsis glyph
445 auto indexOfFirstGlyph = (ellipsisPosition == DevelText::EllipsisPosition::START) ? startIndexOfEllipsis : 0u;
447 // Regardless where the location of ellipsis,in-case the hight of line is greater than control's height
448 // then replace the first glyph with ellipsis glyph.
450 // Get the first glyph which is going to be replaced and the ellipsis glyph.
451 GlyphInfo& glyphToRemove = *(elidedGlyphsBuffer + indexOfFirstGlyph);
452 const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph(fontClient.GetPointSize(glyphToRemove.fontId));
454 // Change the 'x' and 'y' position of the ellipsis glyph.
455 Vector2& position = *(elidedPositionsBuffer + indexOfFirstGlyph);
457 position.x = ellipsisGlyph.xBearing;
458 position.y = -ellipsisLine->ascender + controlSize.height - ellipsisGlyph.yBearing;
460 // Replace the glyph by the ellipsis glyph and resize the buffers.
461 glyphToRemove = ellipsisGlyph;
463 mElidedGlyphs.Resize(1u);
464 mElidedLayout.Resize(1u);
466 mEndIndexOfElidedGlyphs = mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = indexOfFirstGlyph;
471 // firstPenX, penY and firstPenSet are used to position the ellipsis glyph if needed.
472 float firstPenX = 0.f; // Used if rtl text is elided.
474 bool firstPenSet = false;
476 // Add the ellipsis glyph.
477 bool inserted = false;
478 float removedGlypsWidth = 0.f;
479 Length numberOfRemovedGlyphs = 0u;
480 GlyphIndex indexOfEllipsis = startIndexOfEllipsis;
482 // Tail Mode: start by the end of line.
483 bool isTailMode = (ellipsisPosition == DevelText::EllipsisPosition::END) ||
484 (ellipsisPosition == DevelText::EllipsisPosition::MIDDLE && numberOfLines != 1u);
486 // The ellipsis glyph has to fit in the place where the last glyph(s) is(are) removed.
489 const GlyphInfo& glyphToRemove = *(elidedGlyphsBuffer + indexOfEllipsis);
491 if(0u != glyphToRemove.fontId)
493 // i.e. The font id of the glyph shaped from the '\n' character is zero.
495 // Need to reshape the glyph as the font may be different in size.
496 const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph(fontClient.GetPointSize(glyphToRemove.fontId));
498 if(!firstPenSet || EqualsZero(glyphToRemove.advance))
500 const Vector2& position = *(elidedPositionsBuffer + indexOfEllipsis);
502 // Calculates the penY of the current line. It will be used to position the ellipsis glyph.
503 penY = position.y + glyphToRemove.yBearing;
505 // Calculates the first penX which will be used if rtl text is elided.
506 firstPenX = position.x - glyphToRemove.xBearing;
507 if(firstPenX < -ellipsisGlyph.xBearing)
509 // Avoids to exceed the bounding box when rtl text is elided.
510 firstPenX = -ellipsisGlyph.xBearing;
513 removedGlypsWidth = -ellipsisGlyph.xBearing;
518 calculatedAdvance = GetCalculatedAdvance(*(textBuffer + (*(glyphToCharacterMapBuffer + indexOfEllipsis))), characterSpacing, glyphToRemove.advance);
519 removedGlypsWidth += std::min(calculatedAdvance, (glyphToRemove.xBearing + glyphToRemove.width));
521 // Calculate the width of the ellipsis glyph and check if it fits.
522 const float ellipsisGlyphWidth = ellipsisGlyph.width + ellipsisGlyph.xBearing;
524 // If it is the last glyph to remove, add the ellipsis glyph without checking its width.
525 if((ellipsisGlyphWidth < removedGlypsWidth) || (isTailMode ? (indexOfEllipsis == 0u) : (indexOfEllipsis == numberOfGlyphs - 1u)))
527 GlyphInfo& glyphInfo = *(elidedGlyphsBuffer + indexOfEllipsis);
528 Vector2& position = *(elidedPositionsBuffer + indexOfEllipsis);
529 position.x -= (0.f > glyphInfo.xBearing) ? glyphInfo.xBearing : 0.f;
531 // Replace the glyph by the ellipsis glyph.
532 glyphInfo = ellipsisGlyph;
534 // Change the 'x' and 'y' position of the ellipsis glyph.
535 if(position.x > firstPenX)
539 // To handle case of the mixed languages (LTR then RTL) with
540 // EllipsisPosition::END and the LayoutDirection::RIGHT_TO_LEFT
541 float nextXPositions = ellipsisLine->width;
542 if(indexOfEllipsis + 1u < numberOfGlyphs)
544 Vector2& positionOfNextGlyph = *(elidedPositionsBuffer + indexOfEllipsis + 1u);
545 nextXPositions = positionOfNextGlyph.x;
548 if(position.x > nextXPositions) // RTL language
550 if((indexOfEllipsis > 0u) && ((position.x - nextXPositions) > removedGlypsWidth))
552 // To handle mixed directions
553 // Re-calculates the first penX which will be used if rtl text is elided.
554 firstPenX = position.x - glyphToRemove.xBearing;
555 if(firstPenX < -ellipsisGlyph.xBearing)
557 // Avoids to exceed the bounding box when rtl text is elided.
558 firstPenX = -ellipsisGlyph.xBearing;
560 //Reset the width of removed glyphs
561 removedGlypsWidth = std::min(calculatedAdvance, (glyphToRemove.xBearing + glyphToRemove.width)) - ellipsisGlyph.xBearing;
568 // To handle the case of RTL language with EllipsisPosition::END
569 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
575 // To handle the case of LTR language with EllipsisPosition::START
576 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
583 // To handle case of the mixed languages (RTL then LTR) with
584 // EllipsisPosition::START and the LayoutDirection::RIGHT_TO_LEFT
585 float nextXPositions = ellipsisLine->width;
586 if(indexOfEllipsis + 1u < numberOfGlyphs)
588 Vector2& positionOfNextGlyph = *(elidedPositionsBuffer + indexOfEllipsis + 1u);
589 nextXPositions = positionOfNextGlyph.x;
592 if(position.x < nextXPositions) // LTR language
594 position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;
596 if((position.x + ellipsisGlyphWidth + ellipsisGlyph.xBearing) > nextXPositions)
598 position.x -= (position.x + ellipsisGlyphWidth + ellipsisGlyph.xBearing) - nextXPositions;
604 position.x += ellipsisGlyph.xBearing;
605 position.y = penY - ellipsisGlyph.yBearing;
613 if(!isTailMode && indexOfEllipsis < numberOfGlyphs - 1u)
615 // Tail Mode: remove glyphs from startIndexOfEllipsis then decrement indexOfEllipsis, until arrive to index zero.
618 else if(isTailMode && indexOfEllipsis > 0u)
620 // Not Tail Mode: remove glyphs from startIndexOfEllipsis then increase indexOfEllipsis, until arrive to last index (numberOfGlyphs - 1u).
625 // No space for the ellipsis.
628 ++numberOfRemovedGlyphs;
630 } // while( !inserted )
632 //Reduce size, shift glyphs and start from ellipsis glyph
633 Length numberOfElidedGlyphs = numberOfActualLaidOutGlyphs - numberOfRemovedGlyphs;
634 mElidedGlyphs.Resize(numberOfElidedGlyphs);
635 mElidedLayout.Resize(numberOfElidedGlyphs);
637 if(ellipsisPosition == DevelText::EllipsisPosition::START)
639 // 'Shifts' glyphs after ellipsis glyph and 'Removes' before ellipsis glyph
640 memcpy(elidedGlyphsBuffer, elidedGlyphsBuffer + indexOfEllipsis, numberOfElidedGlyphs * sizeof(GlyphInfo));
641 memcpy(elidedPositionsBuffer, elidedPositionsBuffer + indexOfEllipsis, numberOfElidedGlyphs * sizeof(Vector2));
643 mStartIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = indexOfEllipsis;
645 else if(ellipsisPosition == DevelText::EllipsisPosition::MIDDLE)
647 // 'Shifts and connects' glyphs before and after ellipsis glyph and 'Removes' in-between.
648 bool isOnlySecondHalf = false;
652 mFirstMiddleIndexOfElidedGlyphs = indexOfEllipsis;
653 if(ellipsisNextLine != nullptr)
655 mSecondMiddleIndexOfElidedGlyphs = ellipsisNextLine->glyphRun.glyphIndex;
659 mEndIndexOfElidedGlyphs = mSecondMiddleIndexOfElidedGlyphs = mFirstMiddleIndexOfElidedGlyphs;
664 mFirstMiddleIndexOfElidedGlyphs = (ellipsisLine->glyphRun.numberOfGlyphs > 0u) ? (ellipsisLine->glyphRun.glyphIndex + ellipsisLine->glyphRun.numberOfGlyphs - 1u) : (ellipsisLine->glyphRun.glyphIndex);
665 mSecondMiddleIndexOfElidedGlyphs = indexOfEllipsis;
666 isOnlySecondHalf = ellipsisLine->glyphRun.numberOfGlyphs == 0u && ellipsisLine->glyphRunSecondHalf.numberOfGlyphs > 0u;
671 Length numberOfSecondHalfGlyphs = numberOfElidedGlyphs - mFirstMiddleIndexOfElidedGlyphs;
673 //Copy elided glyphs after the ellipsis glyph.
674 memcpy(elidedGlyphsBuffer + mFirstMiddleIndexOfElidedGlyphs, elidedGlyphsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(GlyphInfo));
675 memcpy(elidedPositionsBuffer + mFirstMiddleIndexOfElidedGlyphs, elidedPositionsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(Vector2));
679 Length numberOfSecondHalfGlyphs = numberOfElidedGlyphs - mFirstMiddleIndexOfElidedGlyphs + 1u;
681 //Copy elided glyphs after the ellipsis glyph.
682 memcpy(elidedGlyphsBuffer + mFirstMiddleIndexOfElidedGlyphs + 1u, elidedGlyphsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(GlyphInfo));
683 memcpy(elidedPositionsBuffer + mFirstMiddleIndexOfElidedGlyphs + 1u, elidedPositionsBuffer + mSecondMiddleIndexOfElidedGlyphs, numberOfSecondHalfGlyphs * sizeof(Vector2));
686 else // DevelText::EllipsisPosition::END
688 // 'Removes' all the glyphs after the ellipsis glyph.
689 mEndIndexOfElidedGlyphs = indexOfEllipsis;
697 float ViewModel::GetStrikethroughHeight() const
699 return mModel->GetStrikethroughHeight();
702 const Vector4& ViewModel::GetStrikethroughColor() const
704 return mModel->GetStrikethroughColor();
707 bool ViewModel::IsStrikethroughEnabled() const
709 return mModel->IsStrikethroughEnabled();
712 bool const ViewModel::IsMarkupStrikethroughSet() const
714 return mModel->IsMarkupStrikethroughSet();
717 Length ViewModel::GetNumberOfStrikethroughRuns() const
719 return mModel->GetNumberOfStrikethroughRuns();
722 void ViewModel::GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns, StrikethroughRunIndex index, Length numberOfRuns) const
724 mModel->GetStrikethroughRuns(strikethroughRuns, index, numberOfRuns);
727 Length ViewModel::GetNumberOfBoundedParagraphRuns() const
729 return mModel->GetNumberOfBoundedParagraphRuns();
732 const Vector<BoundedParagraphRun>& ViewModel::GetBoundedParagraphRuns() const
734 return mModel->GetBoundedParagraphRuns();
737 Length ViewModel::GetNumberOfCharacterSpacingGlyphRuns() const
739 return mModel->GetNumberOfCharacterSpacingGlyphRuns();
742 const Vector<CharacterSpacingGlyphRun>& ViewModel::GetCharacterSpacingGlyphRuns() const
744 return mModel->GetCharacterSpacingGlyphRuns();
747 const Vector<FontRun>& ViewModel::GetFontRuns() const
749 return mModel->GetFontRuns();
752 const Vector<FontDescriptionRun>& ViewModel::GetFontDescriptionRuns() const
754 return mModel->GetFontDescriptionRuns();
759 } // namespace Toolkit