outline_decomposer.cpp: fix a typo from commit 0a5ddb8
stroke_font.cpp better fix for commit 6a9607b
This commit is contained in:
parent
d211ef1ea3
commit
b042e8cc41
|
@ -160,7 +160,7 @@ bool OUTLINE_DECOMPOSER::approximateQuadraticBezierCurve( GLYPH_POINTS& aR
|
|||
// cp0 = qp0, cp1 = qp0 + 2/3 * (qp1 - qp0), cp2 = qp2 + 2/3 * (qp1 - qp2), cp3 = qp2
|
||||
|
||||
GLYPH_POINTS cubic;
|
||||
cubic.resize( 4 );
|
||||
cubic.reserve( 4 );
|
||||
|
||||
cubic.push_back( aBezier[0] ); // cp0
|
||||
cubic.push_back( aBezier[0] + ( ( aBezier[1] - aBezier[0] ) * 2 / 3 ) ); // cp1
|
||||
|
|
|
@ -236,13 +236,11 @@ VECTOR2I STROKE_FONT::GetTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_ptr
|
|||
|
||||
for( wxUniChar c : aText )
|
||||
{
|
||||
if( c >= (int) m_glyphBoundingBoxes->size() || c < 0 )
|
||||
if( c >= (int) m_glyphBoundingBoxes->size() || c < ' ' )
|
||||
{
|
||||
// Filtering non existing glyphes and non printable chars
|
||||
if( c == '\t' )
|
||||
c = ' ';
|
||||
else if( c < ' ' ) // Non printable char
|
||||
c = '?';
|
||||
else
|
||||
c = '?';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue