mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
Fix bug #4606 (\varPhi and similar characters not known by the LyX GUI)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37073 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
679dfb5793
commit
7c588c5b2d
14
lib/symbols
14
lib/symbols
@ -679,6 +679,20 @@ RIGHTCIRCLE wasy 72 0 x x
|
|||||||
#LEFTcircle {\hbox to 0pt{\wasyfamily\char71\hss}\hbox{\wasyfamily\char35}}
|
#LEFTcircle {\hbox to 0pt{\wasyfamily\char71\hss}\hbox{\wasyfamily\char35}}
|
||||||
#RIGHTcircle{\hbox to 0pt{\wasyfamily\char72\hss}\hbox{\wasyfamily\char35}}
|
#RIGHTcircle{\hbox to 0pt{\wasyfamily\char72\hss}\hbox{\wasyfamily\char35}}
|
||||||
|
|
||||||
|
# Defined by amsmath.sty
|
||||||
|
|
||||||
|
varGamma cmm 161 0 mathord x amsmath
|
||||||
|
varDelta cmm 162 0 mathord x amsmath
|
||||||
|
varTheta cmm 163 0 mathord x amsmath
|
||||||
|
varLambda cmm 164 0 mathord x amsmath
|
||||||
|
varXi cmm 165 0 mathord x amsmath
|
||||||
|
varPi cmm 166 0 mathord x amsmath
|
||||||
|
varSigma cmm 167 0 mathord x amsmath
|
||||||
|
varUpsilon cmm 168 0 mathord x amsmath
|
||||||
|
varPhi cmm 169 0 mathord x amsmath
|
||||||
|
varPsi cmm 170 0 mathord x amsmath
|
||||||
|
varOmega cmm 173 0 mathord x amsmath
|
||||||
|
|
||||||
#
|
#
|
||||||
# wasy astronomy
|
# wasy astronomy
|
||||||
#
|
#
|
||||||
|
@ -60,8 +60,12 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
// << "' drawn as: '" << sym_->draw
|
// << "' drawn as: '" << sym_->draw
|
||||||
// << "'" << endl;
|
// << "'" << endl;
|
||||||
|
|
||||||
|
bool const italic_upcase_greek = sym_->inset == "cmr" &&
|
||||||
|
sym_->extra == "mathalpha" &&
|
||||||
|
mi.base.fontname == "mathit";
|
||||||
|
docstring const font = italic_upcase_greek ? from_ascii("cmm") : sym_->inset;
|
||||||
int const em = mathed_char_width(mi.base.font, 'M');
|
int const em = mathed_char_width(mi.base.font, 'M');
|
||||||
FontSetChanger dummy(mi.base, sym_->inset);
|
FontSetChanger dummy(mi.base, font);
|
||||||
mathed_string_dim(mi.base.font, sym_->draw, dim);
|
mathed_string_dim(mi.base.font, sym_->draw, dim);
|
||||||
docstring::const_reverse_iterator rit = sym_->draw.rbegin();
|
docstring::const_reverse_iterator rit = sym_->draw.rbegin();
|
||||||
kerning_ = mathed_char_kerning(mi.base.font, *rit);
|
kerning_ = mathed_char_kerning(mi.base.font, *rit);
|
||||||
@ -91,13 +95,18 @@ void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const
|
|||||||
// << "' in font: '" << sym_->inset
|
// << "' in font: '" << sym_->inset
|
||||||
// << "' drawn as: '" << sym_->draw
|
// << "' drawn as: '" << sym_->draw
|
||||||
// << "'" << endl;
|
// << "'" << endl;
|
||||||
|
|
||||||
|
bool const italic_upcase_greek = sym_->inset == "cmr" &&
|
||||||
|
sym_->extra == "mathalpha" &&
|
||||||
|
pi.base.fontname == "mathit";
|
||||||
|
docstring const font = italic_upcase_greek ? from_ascii("cmm") : sym_->inset;
|
||||||
int const em = mathed_char_width(pi.base.font, 'M');
|
int const em = mathed_char_width(pi.base.font, 'M');
|
||||||
if (isRelOp())
|
if (isRelOp())
|
||||||
x += static_cast<int>(0.25*em+0.5);
|
x += static_cast<int>(0.25*em+0.5);
|
||||||
else
|
else
|
||||||
x += static_cast<int>(0.0833*em+0.5);
|
x += static_cast<int>(0.0833*em+0.5);
|
||||||
|
|
||||||
FontSetChanger dummy(pi.base, sym_->inset.c_str());
|
FontSetChanger dummy(pi.base, font);
|
||||||
pi.draw(x, y - h_, sym_->draw);
|
pi.draw(x, y - h_, sym_->draw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ What's new
|
|||||||
|
|
||||||
- Allow Ctrl+Arrow to move between table cells (bug 1839).
|
- Allow Ctrl+Arrow to move between table cells (bug 1839).
|
||||||
|
|
||||||
|
- Add support for showing on screen italic uppercase Greek letters,
|
||||||
|
either inserted in a \mathit inset or through AMS macros (bug 4606).
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION AND LOCALIZATION
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user