Change super/subscript syntax to ^{foo} and _{foo}.

This commit is contained in:
Jeff Young
2020-04-18 21:04:41 +01:00
parent 42cd604c3c
commit 2b6089240a
64 changed files with 200 additions and 568 deletions
+2 -9
View File
@@ -870,7 +870,6 @@ void DXF_PLOTTER::Text( const wxPoint& aPos,
int aWidth,
bool aItalic,
bool aBold,
int aTextMarkupFlags,
bool aMultilineAllowed,
void* aData )
{
@@ -878,13 +877,7 @@ void DXF_PLOTTER::Text( const wxPoint& aPos,
if( aMultilineAllowed && !aText.Contains( wxT( "\n" ) ) )
aMultilineAllowed = false; // the text has only one line.
bool processSuperSub = false;
if( ( aTextMarkupFlags & ENABLE_SUBSCRIPT_MARKUP ) && aText.Contains( wxT( "#" ) ) )
processSuperSub = true;
if( ( aTextMarkupFlags & ENABLE_SUPERSCRIPT_MARKUP ) && aText.Contains( wxT( "^" ) ) )
processSuperSub = true;
bool processSuperSub = aText.Contains( wxT( "^{" ) ) || aText.Contains( wxT( "_{" ) );
if( m_textAsLines || containsNonAsciiChars( aText ) || aMultilineAllowed || processSuperSub )
{
@@ -892,7 +885,7 @@ void DXF_PLOTTER::Text( const wxPoint& aPos,
// Perhaps multiline texts could be handled as DXF text entity
// but I do not want spend time about this (JPC)
PLOTTER::Text( aPos, aColor, aText, aOrient, aSize, aH_justify, aV_justify,
aWidth, aItalic, aBold, aTextMarkupFlags, aMultilineAllowed );
aWidth, aItalic, aBold, aMultilineAllowed );
}
else
{