-void parse_lyxrc_xforms()
-{
- XformsColor::read(lyx::support::AddName(package().user_support(),
- "preferences.xform"));
-
- if (lyxrc.popup_font_encoding.empty())
- lyxrc.popup_font_encoding = lyxrc.font_norm;
- // Set the font name for popups and menus
- string boldfontname = lyxrc.popup_bold_font
- + "-*-*-*-?-*-*-*-*-"
- + lyxrc.popup_font_encoding;
- // "?" means "scale that font"
- string fontname = lyxrc.popup_normal_font
- + "-*-*-*-?-*-*-*-*-"
- + lyxrc.popup_font_encoding;
-
- int bold = fl_set_font_name(FL_BOLD_STYLE, boldfontname.c_str());
- int normal = fl_set_font_name(FL_NORMAL_STYLE, fontname.c_str());
- if (bold < 0)
- lyxerr << "Could not set menu font to "
- << boldfontname << std::endl;
-
- if (normal < 0)
- lyxerr << "Could not set popup font to "
- << fontname << std::endl;
-
- if (bold < 0 && normal < 0) {
- lyxerr << "Using 'helvetica' font for menus" << std::endl;
- boldfontname = "-*-helvetica-bold-r-*-*-*-?-*-*-*-*-iso8859-1";
- fontname = "-*-helvetica-medium-r-*-*-*-?-*-*-*-*-iso8859-1";
- bold = fl_set_font_name(FL_BOLD_STYLE, boldfontname.c_str());
- normal = fl_set_font_name(FL_NORMAL_STYLE, fontname.c_str());
-
- if (bold < 0 && normal < 0) {
- lyxerr << "Could not find helvetica font. Using 'fixed'."
- << std::endl;
- fl_set_font_name(FL_NORMAL_STYLE, "fixed");
- normal = bold = 0;
- }
- }
- if (bold < 0)
- fl_set_font_name(FL_BOLD_STYLE, fontname.c_str());
- else if (normal < 0)
- fl_set_font_name(FL_NORMAL_STYLE, boldfontname.c_str());
-
- fl_setpup_fontstyle(FL_NORMAL_STYLE);
- fl_setpup_fontsize(FL_NORMAL_SIZE);
- fl_setpup_color(FL_MCOL, FL_BLACK);
- fl_set_goodies_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
- fl_set_tooltip_font(FL_NORMAL_STYLE, FL_NORMAL_SIZE);
-}
-
-