- if (style == _("italic")) istyle = wxITALIC;
- else if (style == _("slant")) istyle = wxSLANT;
- if (weight == _("bold")) iweight = wxBOLD;
- else if (weight == _("light")) iweight = wxLIGHT;
-
- bool underlined = GetBool(_("underlined"), FALSE);
-
- wxString encoding = GetParamValue(_("encoding"));
- // FIXME - handle encoding
-
- wxString faces = GetParamValue(_("face"));
+ if (style == wxT("italic")) istyle = wxITALIC;
+ else if (style == wxT("slant")) istyle = wxSLANT;
+ if (weight == wxT("bold")) iweight = wxBOLD;
+ else if (weight == wxT("light")) iweight = wxLIGHT;
+
+ wxString family = GetParamValue(wxT("family"));
+ int ifamily = wxDEFAULT;
+ if (family == wxT("decorative")) ifamily = wxDECORATIVE;
+ else if (family == wxT("roman")) ifamily = wxROMAN;
+ else if (family == wxT("script")) ifamily = wxSCRIPT;
+ else if (family == wxT("swiss")) ifamily = wxSWISS;
+ else if (family == wxT("modern")) ifamily = wxMODERN;
+
+ bool underlined = GetBool(wxT("underlined"), FALSE);
+
+ wxString encoding = GetParamValue(wxT("encoding"));
+ wxFontMapper mapper;
+ wxFontEncoding enc = wxFONTENCODING_DEFAULT;
+ if (!encoding.IsEmpty()) enc = mapper.CharsetToEncoding(encoding);
+ if (enc == wxFONTENCODING_SYSTEM) enc = wxFONTENCODING_SYSTEM;
+
+ wxString faces = GetParamValue(wxT("face"));