+ if (face.Contains(' ') || face.Contains(';') || face.Contains(','))
+ {
+ face.Replace("'", "");
+ // eventually remove quote characters: most systems do not
+ // allow them in a facename anyway so this usually does nothing
+
+ // make it possible for FromUserString() function to understand
+ // that the different words which compose this facename are
+ // not different adjectives or other data but rather all parts
+ // of the facename
+ desc << wxT(" '") << face << _("'");
+ }
+ else
+ desc << wxT(' ') << face;
+ }
+ else // no face name specified
+ {
+ // use the family
+ wxString familyStr;
+ switch ( GetFamily() )
+ {
+ case wxFONTFAMILY_DECORATIVE:
+ familyStr = "decorative";
+ break;
+
+ case wxFONTFAMILY_ROMAN:
+ familyStr = "roman";
+ break;
+
+ case wxFONTFAMILY_SCRIPT:
+ familyStr = "script";
+ break;
+
+ case wxFONTFAMILY_SWISS:
+ familyStr = "swiss";
+ break;
+
+ case wxFONTFAMILY_MODERN:
+ familyStr = "modern";
+ break;
+
+ case wxFONTFAMILY_TELETYPE:
+ familyStr = "teletype";
+ break;
+
+ case wxFONTFAMILY_DEFAULT:
+ case wxFONTFAMILY_UNKNOWN:
+ break;
+
+ default:
+ wxFAIL_MSG( "unknown font family" );
+ }
+
+ if ( !familyStr.empty() )
+ desc << " '" << familyStr << " family'";