JKQTMathText: improved font-handling system + new fraktur and caligraphic, as well as special math sans/serif fonts-classes

This commit is contained in:
jkriege2 2019-06-30 17:34:41 +02:00
parent a44d570bfa
commit 01b6d7cee6
6 changed files with 2270 additions and 1866 deletions

View File

@ -17,23 +17,23 @@ environment:
CMAKE_GENERATOR: "MinGW Makefiles"
USE_CMAKE: true
MSBUILD_FLAGS:
# - QTABI: mingw53_32
# ARCH: x86
# QMAKESPEC: win32-g++
# MAKETOOL: mingw32-make
# USE_CMAKE: false
- QTABI: mingw53_32
ARCH: x86
QMAKESPEC: win32-g++
MAKETOOL: mingw32-make
USE_CMAKE: false
- QTABI: msvc2017_64
ARCH: x64
VSVER: 2017
CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
USE_CMAKE: true
MSBUILD_FLAGS: /verbosity:minimal /maxcpucount
# - QTABI: msvc2017_64
# ARCH: x64
# VSVER: 2017
# QMAKESPEC: win32-msvc
# MAKETOOL: jom
# USE_CMAKE: false
- QTABI: msvc2017_64
ARCH: x64
VSVER: 2017
QMAKESPEC: win32-msvc
MAKETOOL: jom
USE_CMAKE: false
- QTABI: msvc2015
ARCH: x86
VSVER: 14

View File

@ -8,6 +8,8 @@ TestForm::TestForm(QWidget *parent) :
ui(new Ui::TestForm)
{
ui->setupUi(this);
ui->cmbTestset->addItem("fonts", "rm: \\textrm{ABCabc123}, sf: \\textsf{ABCabc123}, tt: \\texttt{ABCabc123}, cal: \\textcal{ABCabc123}, scr: \\textscr{ABCabc123}, bb: \\textbb{ABCabc123}, frak: \\textfrak{ABCabc123}, ");
ui->cmbTestset->addItem("math-fonts", "rm: $\\mathrm{ABCabc123}$, sf: $\\mathsf{ABCabc123}$, tt: $\\mathtt{ABCabc123}$, cal: $\\mathcal{ABCabc123}$, scr: $\\mathscr{ABCabc123}$, bb: $\\mathbb{ABCabc123}$, frak: $\\mathfrak{ABCabc123}$, ");
ui->cmbTestset->addItem("simple relations", "$a{\\leq}b$, $a{\\geq}b$, $a{\\equiv}b$, $a=b$, $a{\\neq}b$, $a<b$, $a>b$");
ui->cmbTestset->addItem("simple relations in different modes", "math: $a{\\leq}b$, math/no braces: $a\\leq b$, no math: a{\\leq}b, no math/no braces: a\\leq b");
ui->cmbTestset->addItem("named symbols 1", "ll: $\\ll$\\ gg: $\\gg$\\ leq: $\\leq$\\ geq: $\\geq$\\ pm: $\\pm$\\ mp: $\\mp$\\ ");
@ -40,15 +42,19 @@ TestForm::TestForm(QWidget *parent) :
ui->cmbTestset->addItem("math: blackboard", "$\\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: bf", "$\\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: it", "$\\mathit{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: frak", "$\\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: sf", "$\\mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: rm", "$\\mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: cal", "$\\mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: script", "$\\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("math: tt", "$\\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
ui->cmbTestset->addItem("bf", "\\textbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("it", "\\textit{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("frak", "\\textfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("sf", "\\textsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("rm", "\\textrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("cal", "\\textcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("script", "\\textscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("tt", "\\texttt{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}");
ui->cmbTestset->addItem("subscript test", "$r_{123}\\ \\ r_{\\frac{1}{2}}$");
ui->cmbTestset->addItem("subscript0 test", "$r_{123}$");
@ -143,10 +149,74 @@ TestForm::TestForm(QWidget *parent) :
//ui->cmbTestset->addItem("", "$$");
//ui->cmbTestset->addItem("", "$$");
//ui->cmbTestset->addItem("", "");
JKQTMathText mt(this);
ui->cmbUnicodeSerif->setCurrentFont(QFont(mt.getFontRoman()));
ui->cmbEncodingSerif->setCurrentIndex(static_cast<int>(mt.getFontEncodingRoman()));
ui->cmbUnicodeSans->setCurrentFont(QFont(mt.getFontSans()));
ui->cmbEncodingSans->setCurrentIndex(static_cast<int>(mt.getFontEncodingSans()));
ui->cmbUnicodeSerifMath->setCurrentFont(QFont(mt.getFontMathRoman()));
ui->cmbEncodingSerifMath->setCurrentIndex(static_cast<int>(mt.getFontEncodingMathRoman()));
ui->cmbUnicodeSansMath->setCurrentFont(QFont(mt.getFontMathSans()));
ui->cmbEncodingSansMath->setCurrentIndex(static_cast<int>(mt.getFontEncodingMathSans()));
ui->cmbUnicodeFixed->setCurrentFont(QFont(mt.getFontTypewriter()));
ui->cmbEncodingTypewriter->setCurrentIndex(static_cast<int>(mt.getFontEncodingTypewriter()));
ui->cmbCaligraphic->setCurrentFont(QFont(mt.getFontCaligraphic()));
ui->cmbEncodingCaligraphic->setCurrentIndex(static_cast<int>(mt.getFontEncodingCaligraphic()));
ui->cmbScript->setCurrentFont(QFont(mt.getFontScript()));
ui->cmbEncodingScript->setCurrentIndex(static_cast<int>(mt.getFontEncodingScript()));
ui->cmbUnicodeFraktur->setCurrentFont(QFont(mt.getFontFraktur()));
ui->cmbEncodingFraktur->setCurrentIndex(static_cast<int>(mt.getFontEncodingFraktur()));
ui->cmbUnicodeBlackboard->setCurrentFont(QFont(mt.getFontBlackboard()));
ui->cmbEncodingBlackboard->setCurrentIndex(static_cast<int>(mt.getFontEncodingBlackboard()));
ui->cmbUnicodeSymbol->setCurrentFont(QFont(mt.getSymbolfontSymbol(JKQTMathText::MTenvironmentFont::MTEroman)));
ui->cmbEncodingSymbol->setCurrentIndex(static_cast<int>(mt.getSymbolfontEncodingSymbol(JKQTMathText::MTenvironmentFont::MTEroman)));
ui->cmbUnicodeGreek->setCurrentFont(QFont(mt.getSymbolfontGreek(JKQTMathText::MTenvironmentFont::MTEroman)));
ui->cmbEncodingGreek->setCurrentIndex(static_cast<int>(mt.getSymbolfontEncodingGreek(JKQTMathText::MTenvironmentFont::MTEroman)));
ui->chkSimulateBlackboard->setChecked(mt.isFontBlackboardSimulated());
ui->cmbTestset->setCurrentIndex(0);
ui->labMath->setMath("\\left(\\left[\\sqrt{2\\pi\\cdot\\int_{-\\infty}^\\infty f(x)\\;\\mathrm{d}x}\\right]\\right)");
ui->cmbFont->setCurrentIndex(1);
connect(ui->chkBoxes, SIGNAL(toggled(bool)), this, SLOT(updateMath()));
connect(ui->chkAntiAlias, SIGNAL(toggled(bool)), this, SLOT(updateMath()));
connect(ui->chkAntiAliasHQ, SIGNAL(toggled(bool)), this, SLOT(updateMath()));
connect(ui->chkAntiAliasText, SIGNAL(toggled(bool)), this, SLOT(updateMath()));
connect(ui->chkSmoothTransform, SIGNAL(toggled(bool)), this, SLOT(updateMath()));
connect(ui->chkSimulateBlackboard, SIGNAL(toggled(bool)), this, SLOT(updateMath()));
connect(ui->cmbFont, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbScript, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbTestset, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbCaligraphic, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeSans, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeSansMath, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingSans, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingSansMath, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeFixed, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeGreek, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeSerif, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeSerifMath, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingGreek, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingSerif, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingSerifMath, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeSymbol, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingScript, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingSymbol, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeFraktur, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingFraktur, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbUnicodeBlackboard, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingBlackboard, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingTypewriter, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->cmbEncodingCaligraphic, SIGNAL(currentIndexChanged(int)), this, SLOT(updateMath()));
connect(ui->edtSizes, SIGNAL(textChanged(QString)), this, SLOT(updateMath()));
updateMath();
}
TestForm::~TestForm()
@ -266,7 +336,7 @@ QTreeWidgetItem *TestForm::createTree(JKQTMathText::MTnode *node, QTreeWidgetIte
ti->addChild(createTree(list[i], ti));
}
} else if (symN) {
name=QString("MTsymbolNode: \'%1\' (%2)").arg(symN->getSymbolName()).arg(symN->getSymbolFontName());
name=QString("MTsymbolNode: \'%1\' (addWhite: %2)").arg(symN->getSymbolName()).arg(symN->getAddWhitespace());
} else if (spN) {
name=QString("MTwhitespaceNode :\'%1\'").arg(txtN->getText());
} else if (txtN) {
@ -335,21 +405,22 @@ void TestForm::updateMath()
mt.setFontRoman(ui->cmbUnicodeSerif->currentFont().family());
mt.setFontSans(ui->cmbUnicodeSans->currentFont().family());
mt.setFontTypewriter(ui->cmbUnicodeFixed->currentFont().family());
mt.setFontSymbol(ui->cmbUnicodeSymbol->currentFont().family());
mt.setFontCaligraphic(ui->cmbCaligraphic->currentFont().family());
mt.setFontRoman(ui->cmbUnicodeSerif->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingSerif->currentIndex()));
mt.setFontSans(ui->cmbUnicodeSans->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingSans->currentIndex()));
mt.setFontMathRoman(ui->cmbUnicodeSerifMath->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingSerifMath->currentIndex()));
mt.setFontMathSans(ui->cmbUnicodeSansMath->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingSansMath->currentIndex()));
mt.setFontTypewriter(ui->cmbUnicodeFixed->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingTypewriter->currentIndex()));
mt.setFontCaligraphic(ui->cmbCaligraphic->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingCaligraphic->currentIndex()));
mt.setFontScript(ui->cmbScript->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingScript->currentIndex()));
mt.setFontFraktur(ui->cmbUnicodeFraktur->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingFraktur->currentIndex()));
mt.setFontBlackboard(ui->cmbUnicodeBlackboard->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingBlackboard->currentIndex()));
mt.setSymbolfontSymbol(ui->cmbUnicodeSymbol->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingSymbol->currentIndex()));
mt.setSymbolfontGreek(ui->cmbUnicodeGreek->currentFont().family(), static_cast<JKQTMathText::MTfontEncoding>(ui->cmbEncodingGreek->currentIndex()));
mt.setFontBlackboardSimulated(ui->chkSimulateBlackboard->isChecked());
switch (ui->cmbFont->currentIndex()) {
case 1: mt.useXITS(); break;
case 2: mt.useSTIX(); break;
case 3: mt.useAnyUnicode(ui->cmbUnicodeSerif->currentFont().family(),ui->cmbUnicodeSans->currentFont().family(), false); break;
case 4: mt.useAnyUnicode(ui->cmbUnicodeSerif->currentFont().family(),ui->cmbUnicodeSans->currentFont().family(), true); break;
case 5: mt.useLatexFonts(ui->edtLatexPrefix->text(), ui->edtLatexPostfix->text()); break;
case 6: mt.useASANA(); break;
}
if (ui->cmbFont->currentIndex()==1) qDebug()<<"useXITS: "<<mt.useXITS();
else if (ui->cmbFont->currentIndex()==2) qDebug()<<"useSTIX: "<<mt.useSTIX();
else if (ui->cmbFont->currentIndex()==3) qDebug()<<"useASANA: "<<mt.useASANA();
ui->tree->clear();
ht.start();

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>1518</width>
<width>1523</width>
<height>742</height>
</rect>
</property>
@ -24,8 +24,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>745</width>
<height>616</height>
<width>748</width>
<height>538</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
@ -89,37 +89,22 @@
</property>
<item>
<property name="text">
<string>Symbol</string>
<string>Below</string>
</property>
</item>
<item>
<property name="text">
<string>XITS</string>
<string>Below+Math: XITS</string>
</property>
</item>
<item>
<property name="text">
<string>STIX</string>
<string>Below+Math: STIX</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode, limited</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode, full</string>
</property>
</item>
<item>
<property name="text">
<string>LaTeX</string>
</property>
</item>
<item>
<property name="text">
<string>ASANA</string>
<string>Below+Math: ASANA</string>
</property>
</item>
</widget>
@ -278,101 +263,15 @@
</widget>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>latex prefix/postfix:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="edtLatexPrefix"/>
</item>
<item>
<widget class="QLineEdit" name="edtLatexPostfix"/>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Symbol/Unicode fonts: rm:</string>
<string>Symbol/Unicode fonts:</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="cmbUnicodeSerif">
<property name="currentFont">
<font>
<family>Times New Roman</family>
</font>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>sf:</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="cmbUnicodeSans">
<property name="currentFont">
<font>
<family>Arial</family>
</font>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_15">
<property name="text">
<string>tt:</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="cmbUnicodeFixed">
<property name="currentFont">
<font>
<family>Courier New</family>
</font>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string>cal:</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="cmbCaligraphic">
<property name="currentFont">
<font>
<family>Script</family>
</font>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>symbol font:</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="cmbUnicodeSymbol">
<property name="currentFont">
<font>
<family>Symbol</family>
</font>
</property>
</widget>
</item>
<item>
<item row="0" column="12">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -385,6 +284,480 @@
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QLabel" name="label_18">
<property name="text">
<string>blackboard:</string>
</property>
</widget>
</item>
<item row="2" column="7">
<widget class="QLabel" name="label_7">
<property name="text">
<string>symbol:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QFontComboBox" name="cmbUnicodeSerif">
<property name="currentFont">
<font>
<family>Times New Roman</family>
</font>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QFontComboBox" name="cmbUnicodeBlackboard">
<property name="currentFont">
<font>
<family>Times New Roman</family>
</font>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_17">
<property name="text">
<string> roman:</string>
</property>
</widget>
</item>
<item row="2" column="8">
<widget class="QFontComboBox" name="cmbUnicodeSymbol">
<property name="currentFont">
<font>
<family>Symbol</family>
</font>
</property>
</widget>
</item>
<item row="2" column="9">
<widget class="QComboBox" name="cmbEncodingSymbol">
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_14">
<property name="text">
<string>sans:</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QComboBox" name="cmbEncodingBlackboard">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="0" column="3">
<widget class="QComboBox" name="cmbEncodingSerif">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="0" column="6">
<widget class="QComboBox" name="cmbEncodingSans">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="0" column="8">
<widget class="QFontComboBox" name="cmbUnicodeGreek">
<property name="currentFont">
<font>
<family>Symbol</family>
</font>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QFontComboBox" name="cmbUnicodeSans">
<property name="currentFont">
<font>
<family>Arial</family>
</font>
</property>
</widget>
</item>
<item row="0" column="9">
<widget class="QComboBox" name="cmbEncodingGreek">
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="0" column="7">
<widget class="QLabel" name="label_19">
<property name="text">
<string>greek:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="chkSimulateBlackboard">
<property name="text">
<string>simulate blackboard</string>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="label_21">
<property name="text">
<string>fraktur:</string>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QFontComboBox" name="cmbUnicodeFraktur">
<property name="currentFont">
<font>
<family>Times New Roman</family>
</font>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QComboBox" name="cmbEncodingFraktur">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="3" column="4">
<widget class="QLabel" name="label_16">
<property name="text">
<string>caligraphic:</string>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QFontComboBox" name="cmbCaligraphic">
<property name="currentFont">
<font>
<family>Script</family>
</font>
</property>
</widget>
</item>
<item row="3" column="6">
<widget class="QComboBox" name="cmbEncodingCaligraphic">
<property name="currentIndex">
<number>3</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="3" column="7">
<widget class="QLabel" name="label_20">
<property name="text">
<string>script:</string>
</property>
</widget>
</item>
<item row="3" column="8">
<widget class="QFontComboBox" name="cmbScript">
<property name="currentFont">
<font>
<family>Script</family>
</font>
</property>
</widget>
</item>
<item row="3" column="9">
<widget class="QComboBox" name="cmbEncodingScript">
<property name="currentIndex">
<number>3</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="1" column="7">
<widget class="QLabel" name="label_15">
<property name="text">
<string>typewriter:</string>
</property>
</widget>
</item>
<item row="1" column="8">
<widget class="QFontComboBox" name="cmbUnicodeFixed">
<property name="currentFont">
<font>
<family>Courier New</family>
</font>
</property>
</widget>
</item>
<item row="1" column="9">
<widget class="QComboBox" name="cmbEncodingTypewriter">
<property name="currentIndex">
<number>3</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_22">
<property name="text">
<string>math- roman:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QFontComboBox" name="cmbUnicodeSerifMath">
<property name="currentFont">
<font>
<family>Times New Roman</family>
</font>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QComboBox" name="cmbEncodingSerifMath">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_23">
<property name="text">
<string>math-sans:</string>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QFontComboBox" name="cmbUnicodeSansMath">
<property name="currentFont">
<font>
<family>Arial</family>
</font>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QComboBox" name="cmbEncodingSansMath">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>WinSymbol</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode</string>
</property>
</item>
<item>
<property name="text">
<string>Unicode Limited</string>
</property>
</item>
<item>
<property name="text">
<string>Standard</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="12" column="1">
@ -460,230 +833,6 @@
</customwidgets>
<resources/>
<connections>
<connection>
<sender>cmbTestset</sender>
<signal>currentIndexChanged(int)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>130</x>
<y>20</y>
</hint>
<hint type="destinationlabel">
<x>421</x>
<y>36</y>
</hint>
</hints>
</connection>
<connection>
<sender>cmbFont</sender>
<signal>currentIndexChanged(int)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>328</x>
<y>29</y>
</hint>
<hint type="destinationlabel">
<x>423</x>
<y>89</y>
</hint>
</hints>
</connection>
<connection>
<sender>chkBoxes</sender>
<signal>clicked()</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>790</x>
<y>27</y>
</hint>
<hint type="destinationlabel">
<x>424</x>
<y>187</y>
</hint>
</hints>
</connection>
<connection>
<sender>chkAntiAlias</sender>
<signal>clicked()</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>868</x>
<y>27</y>
</hint>
<hint type="destinationlabel">
<x>422</x>
<y>220</y>
</hint>
</hints>
</connection>
<connection>
<sender>chkAntiAliasHQ</sender>
<signal>clicked()</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>964</x>
<y>27</y>
</hint>
<hint type="destinationlabel">
<x>423</x>
<y>259</y>
</hint>
</hints>
</connection>
<connection>
<sender>chkAntiAliasText</sender>
<signal>clicked()</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>1067</x>
<y>27</y>
</hint>
<hint type="destinationlabel">
<x>424</x>
<y>302</y>
</hint>
</hints>
</connection>
<connection>
<sender>edtSizes</sender>
<signal>textChanged(QString)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>679</x>
<y>29</y>
</hint>
<hint type="destinationlabel">
<x>422</x>
<y>160</y>
</hint>
</hints>
</connection>
<connection>
<sender>edtLatexPrefix</sender>
<signal>textChanged(QString)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>141</x>
<y>48</y>
</hint>
<hint type="destinationlabel">
<x>520</x>
<y>140</y>
</hint>
</hints>
</connection>
<connection>
<sender>edtLatexPostfix</sender>
<signal>textChanged(QString)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>200</x>
<y>49</y>
</hint>
<hint type="destinationlabel">
<x>519</x>
<y>118</y>
</hint>
</hints>
</connection>
<connection>
<sender>cmbUnicodeSerif</sender>
<signal>currentFontChanged(QFont)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>416</x>
<y>54</y>
</hint>
<hint type="destinationlabel">
<x>519</x>
<y>201</y>
</hint>
</hints>
</connection>
<connection>
<sender>cmbUnicodeSans</sender>
<signal>currentFontChanged(QFont)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>553</x>
<y>45</y>
</hint>
<hint type="destinationlabel">
<x>518</x>
<y>175</y>
</hint>
</hints>
</connection>
<connection>
<sender>cmbUnicodeFixed</sender>
<signal>currentFontChanged(QFont)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>949</x>
<y>57</y>
</hint>
<hint type="destinationlabel">
<x>518</x>
<y>236</y>
</hint>
</hints>
</connection>
<connection>
<sender>cmbUnicodeSymbol</sender>
<signal>currentFontChanged(QFont)</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>1221</x>
<y>57</y>
</hint>
<hint type="destinationlabel">
<x>520</x>
<y>288</y>
</hint>
</hints>
</connection>
<connection>
<sender>chkSmoothTransform</sender>
<signal>clicked()</signal>
<receiver>TestForm</receiver>
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>1181</x>
<y>27</y>
</hint>
<hint type="destinationlabel">
<x>519</x>
<y>317</y>
</hint>
</hints>
</connection>
<connection>
<sender>btnRender</sender>
<signal>clicked()</signal>
@ -691,8 +840,8 @@
<slot>updateMath()</slot>
<hints>
<hint type="sourcelabel">
<x>1187</x>
<y>83</y>
<x>1512</x>
<y>163</y>
</hint>
<hint type="destinationlabel">
<x>617</x>

View File

@ -35,15 +35,11 @@
#define JKQTPPATHSEPARATOR_STRING "\\"
/** \brief a separator between two directories in a path between \c ' quotes */
#define JKQTPPATHSEPARATOR_CHAR '\\'
#include<windows.h>
#include <io.h>
#else
/** \brief a separator between two directories in a path between \c " quotes */
#define JKQTPPATHSEPARATOR_STRING "/"
/** \brief a separator between two directories in a path between \c ' quotes */
#define JKQTPPATHSEPARATOR_CHAR '/'
#include <unistd.h>
#include <dirent.h>
#endif
@ -1013,8 +1009,8 @@ JKQTPMathParser::jkmpEvaluateFunc JKQTPMathParser::getFunctionDef(const std::str
bool JKQTPMathParser::tempvariableExists(const std::string &name){
if (tempvariables.size()<=0) return false;
for (int i=tempvariables.size()-1; i>=0; i--) {
if (tempvariables[i].name==name) return true;
for (int i=static_cast<int>(tempvariables.size())-1; i>=0; i--) {
if (tempvariables[static_cast<size_t>(i)].name==name) return true;
}
return false;
}
@ -1807,14 +1803,20 @@ JKQTPMathParser::jkmpResult JKQTPMathParser::jkmpNodeList::evaluate(){
return res;
}
int JKQTPMathParser::jkmpNodeList::getCount() {return list.size();}
int JKQTPMathParser::jkmpNodeList::getCount() {
return static_cast<int>(list.size());
}
JKQTPMathParser::jkmpNodeList::jkmpNodeList(JKQTPMathParser *p) { setParser(p); setParent(nullptr); }
JKQTPMathParser::jkmpNodeList::jkmpNodeList(JKQTPMathParser *p) {
setParser(p); setParent(nullptr);
}
JKQTPMathParser::jkmpNodeList::~jkmpNodeList() = default;
JKQTPMathParser::jkmpVariableAssignNode::~jkmpVariableAssignNode() {delete child;}
JKQTPMathParser::jkmpVariableAssignNode::~jkmpVariableAssignNode() {
delete child;
}
JKQTPMathParser::jkmpVariableAssignNode::jkmpVariableAssignNode(const std::string& var, JKQTPMathParser::jkmpNode* c, JKQTPMathParser* p, JKQTPMathParser::jkmpNode* par){
child=c;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff