outline_decomposer.cpp: fix a typo from commit 0a5ddb8

stroke_font.cpp better fix for commit 6a9607b
This commit is contained in:
jean-pierre charras 2022-02-06 18:09:09 +01:00
parent d211ef1ea3
commit b042e8cc41
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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 = '?';
}