Commit 9a0904d6 authored by Dan Lipsa's avatar Dan Lipsa

BUG: n lines of text include (n-1) interline spaces.

Originally, the full height was computed using n text heights + n interline spaces.
parent a1a94d0c
......@@ -1452,7 +1452,8 @@ bool vtkFreeTypeTools::CalculateBoundingBox(const T& str,
int numLines = metaData.lineMetrics.size();
double lineSpacing = numLines > 1 ? metaData.textProperty->GetLineSpacing()
: 1.;
int fullHeight = numLines * metaData.height * lineSpacing +
int fullHeight = numLines * metaData.height +
(numLines - 1) * metaData.height * (lineSpacing - 1.) +
metaData.textProperty->GetLineOffset();
// Will we be rendering a background?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment