Reverse interpretation of triple-tilde.

Fixes https://gitlab.com/kicad/code/kicad/issues/4396
This commit is contained in:
Jeff Young 2020-05-11 16:33:00 +01:00
parent 03c47e210c
commit 1fb51d29ab
3 changed files with 6 additions and 37 deletions

View File

@ -1204,15 +1204,7 @@ void OPENGL_GAL::BitmapText( const wxString& aText, const VECTOR2D& aPosition,
// so what's a triple ~? It could be a real ~ followed by an overbar, or
// it could be an overbar followed by a real ~. The old algorithm did the
// later so we will too....
auto tempIt = chIt;
if( ++tempIt < end && *tempIt == '~' )
{
// eat the first two, toggle overbar, and then process the third
++chIt;
overbar = !overbar;
}
// former so we will too....
}
else
{

View File

@ -364,15 +364,7 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
// so what's a triple ~? It could be a real ~ followed by an overbar, or
// it could be an overbar followed by a real ~. The old algorithm did the
// later so we will too....
auto tempIt = chIt;
if( ++tempIt < end && *tempIt == '~' )
{
// eat the first two, toggle overbar, and then process the third
++chIt;
in_overbar = !in_overbar;
}
// former so we will too....
}
else
{
@ -553,15 +545,7 @@ VECTOR2D STROKE_FONT::ComputeStringBoundaryLimits( const UTF8& aText, const VECT
// so what's a triple ~? It could be a real ~ followed by an overbar, or
// it could be an overbar followed by a real ~. The old algorithm did the
// later so we will too....
auto tempIt = it;
if( ++tempIt < end && *tempIt == '~' )
{
// eat the first two, toggle overbar, and then process the third
++it;
in_overbar = !in_overbar;
}
// former so we will too....
}
else
{

View File

@ -1018,16 +1018,9 @@ void DXF_PLOTTER::Text( const wxPoint& aPos,
{
// double ~ is really a ~ so go ahead and process the second one
// so what about a triple ~? It could be a real ~ followed by an
// overbar, or it could be an overbar followed by a real ~. The old
// eeschema algorithm did the later so we will too....
if( i + i < aText.length() && aText[i + 1] == '~' )
{
// eat the first two and toggle overbar
++i;
fputs( overlining ? "%%o" : "%%O", outputFile );
overlining = !overlining;
}
// so what's a triple ~? It could be a real ~ followed by an overbar,
// or it could be an overbar followed by a real ~. The old algorithm
// did the former so we will too....
}
else
{