@@ -251,25 +251,25 @@ CoreTextParagraphLayout::CoreTextVisualR
this->total_advance = (int)CTRunGetTypographicBounds(run, CFRangeMake(0, 0), nullptr, nullptr, nullptr);
this->positions[this->glyphs.size() * 2] = this->positions[0] + this->total_advance;
}
/**
* Get the height of the line.
* @return The maximum height of the line.
*/
int CoreTextParagraphLayout::CoreTextLine::GetLeading() const
{
int leading = 0;
for (const auto &run : *this) {
leading = max(leading, run.GetLeading());
leading = std::max(leading, run.GetLeading());
return leading;
* Get the width of this line.
* @return The width of the line.
int CoreTextParagraphLayout::CoreTextLine::GetWidth() const
if (this->size() == 0) return 0;