Example #1
0
void
ParagraphLayout::_IncludeStyleInLine(LineInfo& line,
	const CharacterStyle& style)
{
	float ascent = style.Ascent();
	if (ascent > line.maxAscent)
		line.maxAscent = ascent;

	float descent = style.Descent();
	if (descent > line.maxDescent)
		line.maxDescent = descent;

	float height = ascent + descent;
	if (style.Font().Size() > height)
		height = style.Font().Size();

	if (height > line.height)
		line.height = height;
}