Make stroke font bbox calculation consistent with rendering
When rendering tabs we count them as 4 + 1 space but when calculating bbox it is 4 spaces + '?' width, which is a bit wider.
This commit is contained in:
parent
ed77f522dd
commit
695caa7dfa
|
@ -577,7 +577,10 @@ VECTOR2D STROKE_FONT::ComputeStringBoundaryLimits( const UTF8& aText, const VECT
|
|||
int dd = (signed) *it - ' ';
|
||||
|
||||
if( dd >= (int) m_glyphBoundingBoxes.size() || dd < 0 )
|
||||
dd = '?' - ' ';
|
||||
{
|
||||
int substitute = *it == '\t' ? ' ' : '?';
|
||||
dd = substitute - ' ';
|
||||
}
|
||||
|
||||
const BOX2D& box = m_glyphBoundingBoxes[dd];
|
||||
curX += box.GetEnd().x * curScale;
|
||||
|
|
Loading…
Reference in New Issue