mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 18:15:52 +08:00
Wingdings symbols
This commit is contained in:
parent
3839a5506d
commit
fc83ebea4c
@ -46,6 +46,7 @@ TestForm::TestForm(QWidget *parent) :
|
||||
ui->cmbTestset->addItem("math: named symbols 7", "oslash: $\\oslash$\\ cap: $\\cap$\\ land: $\\land$\\ cup: $\\cup$\\ lor: $\\lor$\\ supset: $\\supset$\\ supseteq: $\\supseteq$\\ supsetnot: $\\supsetnot$\\ subset: $\\subset$");
|
||||
ui->cmbTestset->addItem("math: named symbols 8", "subseteq: $\\subseteq$\\ in: $\\in$\\ notin: $\\notin$\\ cdot: $\\cdot$\\ wedge: $\\wedge$\\ vee: $\\vee$\\ cong: $\\cong$\\ bot: $\\bot$");
|
||||
ui->cmbTestset->addItem("math: named symbols with special fallback-drawing", "\\infty\\ \\prod\\ \\coprod\\ \\nexists\\ \\sum\\ \\varnothing\\ \\exists\\ \\forall\\ \\neq\\ \\ni\\ \\alpha\\beta\\Omega");
|
||||
ui->cmbTestset->addItem("text: named symbols from custom fonts", "\\HandRight\\HandLeft");
|
||||
ui->cmbTestset->addItem("math: symbols", "$\\ll\\gg\\leq\\geq\\leftrightarrow\\leftarrow\\rightarrow\\to\\uparrow\\downarrow\\updownarrow\\Leftrightarrow\\iff\\Leftarrow\\Rightarrow\\Uparrow\\Downarrow\\Updownarrow\\pm\\mp\\nexists\\ni\\notni\\circ\\sim\\emptyset\\odot\\ominus\\subsetnot\\bot\\leftharpoonup\\rightharpoonup\\upharpoonleft\\downharpoonleft\\leftrightharpoon\\rightleftharpoon\\coprod\\leftharpoondown\\rightharpoondown\\upharpoonright\\downharpoonright\\nwarrow\\nearrow\\searrow\\swarrow\\mapsto\\div\\multimap\\maporiginal\\mapimage\\times\\propto\\bullet\\neq\\ne\\equiv\\approx\\otimes\\oplus\\oslash\\cap\\land\\cup\\lor\\supset\\supseteq\\supsetnot\\subset\\subseteq\\in\\notin\\cdot\\wedge\\vee\\cong\\bot$");
|
||||
ui->cmbTestset->addItem("math: std dev", "$\\sigma_x=\\sqrt{\\langle (x-\\langle x\\rangle)^2\\rangle}=\\sqrt{\\frac{1}{N-1}\\cdot\\left( \\sum_{i=1}^N{x_i}^2-\\frac{1}{N}\\cdot\\left(\\sum_{i=1}^Nx_i\\right)^2\\right)}$");
|
||||
ui->cmbTestset->addItem("math: std dev 2", "$\\sigma_x=\\sqrt{\\langle (x-\\langle x\\rangle)^2\\rangle}=\\sqrt{\\frac{1}{N-1}\\cdot\\left( \\sum_{i=1}^Nx_i^2-\\frac{1}{N}\\cdot\\left(\\sum_{i=1}^Nx_i\\right)^2\\right)}$");
|
||||
@ -69,6 +70,8 @@ TestForm::TestForm(QWidget *parent) :
|
||||
ui->cmbTestset->addItem("math: arrowtest 2", "$\\nwarrow \\nearrow \\searrow \\swarrow \\mapsto \\leftharpoonup \\rightharpoonup \\upharpoonleft \\downharpoonleft \\leftrightharpoon \\rightleftharpoon \\leftharpoondown \\rightharpoondown \\upharpoonright \\downharpoonright $");
|
||||
ui->cmbTestset->addItem("math-font: greek letters", "$\\alpha\\beta\\gamma\\delta\\epsilon\\varepsilon\\zeta\\eta\\theta\\vartheta\\iota\\kappa\\lambda\\mu\\nu\\xi\\pi\\varpi\\rho\\varrho\\sigma\\varsigma\\tau\\upsilon\\phi\\varphi\\chi\\psi\\omega\\Omega\\Gamma\\Delta\\Theta\\Lambda\\Xi\\Pi\\Sigma\\Upsilon\\Phi\\Psi$");
|
||||
ui->cmbTestset->addItem("text-font: greek letters", "\\alpha\\beta\\gamma\\delta\\epsilon\\varepsilon\\zeta\\eta\\theta\\vartheta\\iota\\kappa\\lambda\\mu\\nu\\xi\\pi\\varpi\\rho\\varrho\\sigma\\varsigma\\tau\\upsilon\\phi\\varphi\\chi\\psi\\omega\\Omega\\Gamma\\Delta\\Theta\\Lambda\\Xi\\Pi\\Sigma\\Upsilon\\Phi\\Psi");
|
||||
ui->cmbTestset->addItem("math-font: upgreek letters", "$\\upalpha\\upbeta\\upgamma\\updelta\\upepsilon\\upvarepsilon\\upzeta\\upeta\\uptheta\\upvartheta\\upiota\\upkappa\\uplambda\\upmu\\upnu\\upxi\\uppi\\upvarpi\\uprho\\upvarrho\\upsigma\\upvarsigma\\uptau\\upupsilon\\upphi\\upvarphi\\upchi\\uppsi\\upomega\\upOmega\\upGamma\\upDelta\\upTheta\\upLambda\\upXi\\upPi\\upSigma\\upUpsilon\\upPhi\\upPsi$");
|
||||
ui->cmbTestset->addItem("text-font: upgreek letters", "\\upalpha\\upbeta\\upgamma\\updelta\\upepsilon\\upvarepsilon\\upzeta\\upeta\\uptheta\\upvartheta\\upiota\\upkappa\\uplambda\\upmu\\upnu\\upxi\\uppi\\upvarpi\\uprho\\upvarrho\\upsigma\\upvarsigma\\uptau\\upupsilon\\upphi\\upvarphi\\upchi\\uppsi\\upomega\\upOmega\\upGamma\\upDelta\\upTheta\\upLambda\\upXi\\upPi\\upSigma\\upUpsilon\\upPhi\\upPsi");
|
||||
ui->cmbTestset->addItem("math-font: blackboard", "$\\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
|
||||
ui->cmbTestset->addItem("math-font: bf", "$\\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
|
||||
ui->cmbTestset->addItem("math-font: it", "$\\mathit{ABCDEFGHIJKLMNOPQRSTUVWXYZ120}$");
|
||||
@ -290,7 +293,7 @@ TestForm::~TestForm()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
#define W 3000
|
||||
#define W 4000
|
||||
#define H 2000
|
||||
#define X1 15
|
||||
#define Y1 50
|
||||
|
@ -436,6 +436,13 @@ void JKQTMathTextSymbolNode::fillSymbolTables()
|
||||
symbols["|"]=SimpleUprightTextSymbol("||", "‖").addUprightUnicode(QChar(0x2016));
|
||||
symbols["}"]=SimpleUprightTextSymbol("}");
|
||||
symbols["AC"]=UprightSymbolUnicode(QChar(0x223F)).addUprightHtml("∿").addUprightStd("~");
|
||||
symbols["aa"]=SimpleTextSymbol(QChar(0xE5));
|
||||
symbols["ae"]=SimpleTextSymbol(QChar(0xE6));
|
||||
symbols["AE"]=SimpleTextSymbol(QChar(0xC6));
|
||||
symbols["AA"]=SimpleTextSymbol(QChar(0xC5));
|
||||
symbols["oe"]=SymbolUnicode(QChar(0x153)).addStd("oe").addHtml("œ");
|
||||
symbols["OE"]=SymbolUnicode(QChar(0x152)).addStd("OE").addHtml("Œ");
|
||||
symbols["ss"]=SimpleTextSymbol(QChar(0xDF)).addHtml("ß");
|
||||
{ auto s=UprightSymbolUnicode(QChar(0x212B)).addUprightStd(QChar(0xC5));
|
||||
symbols["Angstrom"]=s; symbols["Angstroem"]=s; }
|
||||
{ auto s=SymbolUnicode(QChar(0x2136)).addHtml("ℶ");
|
||||
@ -468,12 +475,15 @@ void JKQTMathTextSymbolNode::fillSymbolTables()
|
||||
{ auto s=SymbolUnicode(QChar(0x2103)).addUprightStd("°C").addUprightHtml("°C");
|
||||
symbols["celsius"]=s; symbols["degC"]=s; }
|
||||
symbols["cent"]=SimpleTextSymbol(QChar(0xA2), "¢");
|
||||
symbols["checkmark"]=UprightSymbolStd(QChar(0x2713)).addUprightHtml("✓");
|
||||
symbols["circ"]=UprightSymbolStd(QChar(0x2218)).addUprightHtml("∘").addStd("o", ItalicOff,0.7, -0.25);
|
||||
symbols["co"]=UprightSymbolUnicode(QChar(0x2105));
|
||||
{ auto s=SimpleTextSymbol(QChar(0xA5), "©");
|
||||
symbols["copyright"]=s; symbols["textcopyright"]=s; }
|
||||
symbols["dagger"]=UprightSymbolUnicode(QChar(0x2020)).addUprightHtml("†");
|
||||
symbols["ddagger"]=UprightSymbolUnicode(QChar(0x2021)).addUprightHtml("‡");
|
||||
{ auto s=UprightSymbolUnicode(QChar(0x2020)).addUprightHtml("†");
|
||||
symbols["dagger"]=s; symbols["dag"]=s; symbols["textdagger"]=s; }
|
||||
{ auto s=UprightSymbolUnicode(QChar(0x2021)).addUprightHtml("‡");
|
||||
symbols["ddagger"]=s; symbols["ddag"]=s; symbols["textdaggerdbl"]=s; }
|
||||
{ auto s=SymbolUnicode(QChar(0x2138)).addHtml("ℸ");
|
||||
symbols["dalet"]=s; symbols["Dalet"]=s; symbols["daleth"]=s; symbols["Daleth"]=s; }
|
||||
symbols["dd"] = SymbolFullProps(SymbolProps("d", Upright|BoldOff), "d", Upright|BoldOff);
|
||||
@ -777,6 +787,21 @@ void JKQTMathTextSymbolNode::fillSymbolTables()
|
||||
addGreekLetterVariants_WinSymbol_Unicode_Html("Psi", "Y", QChar(0x3A8),"Ψ");
|
||||
|
||||
|
||||
/**************************************************************************************
|
||||
* SYMBOLS from special fonts
|
||||
**************************************************************************************/
|
||||
#if (QT_VERSION<QT_VERSION_CHECK(6, 0, 0))
|
||||
QFontDatabase fdb;
|
||||
const auto fonts=fdb.families();
|
||||
#else
|
||||
const auto fonts=QFontDatabase::families();
|
||||
#endif
|
||||
if (fonts.contains("Wingdings")) {
|
||||
{ auto s=SymbolFullProps("Wingdings", QChar(0x46));
|
||||
symbols["lefthand"]=s; symbols["HandRight"]=s;}
|
||||
{ auto s=SymbolFullProps("Wingdings", QChar(0x45));
|
||||
symbols["righthand"]=s; symbols["HandLeft"]=s;}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1034,15 +1059,28 @@ QPair<QFont, JKQTMathTextSymbolNode::SymbolProps> JKQTMathTextSymbolNode::Symbol
|
||||
//qDebug()<<" ==>2 fontType==MTECurrentFont";
|
||||
JKQTMathTextFontEncoding localEnc=currentEnc;
|
||||
outProps=getProps(currentEnc, outProps, &localEnc);
|
||||
const QChar ch=outProps.getSymbolSingleChar();
|
||||
if (!ch.isNull() && !currentFM.inFont(ch)) {
|
||||
//qDebug()<<" ==>2.1 ch="<<ch<<" !ch.isNull() && !currentFM.inFont(ch)";
|
||||
if (!chFallbackSym.isNull() && fallbackSymbolsFM.inFont(chFallbackSym)) {
|
||||
//qDebug()<<" ==>2.1.1 !chFallbackSym.isNull() && fallbackSymbolsFM.inFont(chFallbackSym)";
|
||||
outProps=props[fallbackSymbolsFontEnc];
|
||||
currentEv.font=MTEFallbackSymbols;
|
||||
|
||||
const QChar chLocal=outProps.getSymbolSingleChar();
|
||||
bool foundConfig=false;
|
||||
if (outProps.symbol.size()>1 ||(!chLocal.isNull() && currentFM.inFont(chLocal))) {
|
||||
foundConfig=true;
|
||||
} else if (localEnc!=MTFEStandard && props.contains(MTFEStandard)) {
|
||||
outProps=props[MTFEStandard];
|
||||
const QChar chStd=outProps.getSymbolSingleChar();
|
||||
if (outProps.symbol.size()>1 || (!chStd.isNull() && currentFM.inFont(chStd))) {
|
||||
foundConfig=true;
|
||||
}
|
||||
}
|
||||
if (!foundConfig && !chFallbackSym.isNull() && fallbackSymbolsFM.inFont(chFallbackSym)) {
|
||||
//qDebug()<<" ==>2.1.1 !chFallbackSym.isNull() && fallbackSymbolsFM.inFont(chFallbackSym)";
|
||||
outProps=props[fallbackSymbolsFontEnc];
|
||||
currentEv.font=MTEFallbackSymbols;
|
||||
foundConfig=true;
|
||||
}
|
||||
if (!foundConfig) {
|
||||
currentEv.font=MTECurrentFont;
|
||||
outProps=getProps(currentEnc, outProps, &localEnc);
|
||||
}
|
||||
} else {
|
||||
//qDebug()<<" ==>3 else";
|
||||
currentEv.font=fontType;
|
||||
|
Loading…
Reference in New Issue
Block a user