]> git.lyx.org Git - features.git/commitdiff
Fix bug #6851: Wrong screen fonts with old style macros such as \bf and \rm.
authorEnrico Forestieri <forenr@lyx.org>
Sat, 14 Aug 2010 00:22:04 +0000 (00:22 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 14 Aug 2010 00:22:04 +0000 (00:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35136 a592a061-630c-0410-9148-cb99ea01b6c8

lib/symbols
src/mathed/InsetMathFontOld.cpp

index cee45b93144a3c17fb7d9ed34a672982ade200e0..07830c6b356d89565d236d6355db317c099dcab3 100644 (file)
@@ -111,11 +111,12 @@ ce                font        forcetext
 cf                font        forcetext
 
 # old-style font commands
-bf                oldfont     none
-cal               oldfont     none
-it                oldfont     none
-rm                oldfont     none
-tt                oldfont     none
+# name           "oldfont"    alias
+bf                oldfont     textbf
+cal               oldfont     mathcal
+it                oldfont     textit
+rm                oldfont     textrm
+tt                oldfont     texttt
 
 # matrix environments
 Bmatrix           matrix      none
index f4b87ba4c6229dad09254b55423ad550b318892a..88a3cdfca9f9bc1b7a4a8384231ce204f0f9420b 100644 (file)
@@ -37,7 +37,7 @@ Inset * InsetMathFontOld::clone() const
 
 void InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       FontSetChanger dummy(mi.base, key_->name.c_str());
+       FontSetChanger dummy(mi.base, key_->extra);
        cell(0).metrics(mi, dim);
        metricsMarkers(dim);
 }
@@ -45,7 +45,7 @@ void InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathFontOld::draw(PainterInfo & pi, int x, int y) const
 {
-       FontSetChanger dummy(pi.base, key_->name.c_str());
+       FontSetChanger dummy(pi.base, key_->extra);
        cell(0).draw(pi, x + 1, y);
        drawMarkers(pi, x, y);
 }