+ current_mode_ = isTextFont(from_ascii(mi.base.fontname))
+ ? TEXT_MODE : MATH_MODE;
+
+ docstring const font = current_mode_ == MATH_MODE
+ ? "math" + key_->name : "text" + key_->name;
+
+ // When \cal is used in text mode, the font is not changed
+ bool really_change_font = font != "textcal";
+
+ FontSetChanger dummy(mi.base, font, really_change_font);