+docstring fontToHtmlTag(xml::FontTypes type)
+{
+ switch(type) {
+ case xml::FontTypes::FT_EMPH:
+ return from_utf8("em");
+ case xml::FontTypes::FT_BOLD:
+ return from_utf8("b");
+ case xml::FontTypes::FT_NOUN:
+ return from_utf8("dfn");
+ case xml::FontTypes::FT_UBAR:
+ case xml::FontTypes::FT_WAVE:
+ case xml::FontTypes::FT_DBAR:
+ return from_utf8("u");
+ case xml::FontTypes::FT_SOUT:
+ case xml::FontTypes::FT_XOUT:
+ return from_utf8("del");
+ case xml::FontTypes::FT_ITALIC:
+ return from_utf8("i");
+ case xml::FontTypes::FT_UPRIGHT:
+ case xml::FontTypes::FT_SLANTED:
+ case xml::FontTypes::FT_SMALLCAPS:
+ case xml::FontTypes::FT_ROMAN:
+ case xml::FontTypes::FT_SANS:
+ case xml::FontTypes::FT_TYPE:
+ case xml::FontTypes::FT_SIZE_TINY:
+ case xml::FontTypes::FT_SIZE_SCRIPT:
+ case xml::FontTypes::FT_SIZE_FOOTNOTE:
+ case xml::FontTypes::FT_SIZE_SMALL:
+ case xml::FontTypes::FT_SIZE_NORMAL:
+ case xml::FontTypes::FT_SIZE_LARGE:
+ case xml::FontTypes::FT_SIZE_LARGER:
+ case xml::FontTypes::FT_SIZE_LARGEST:
+ case xml::FontTypes::FT_SIZE_HUGE:
+ case xml::FontTypes::FT_SIZE_HUGER:
+ case xml::FontTypes::FT_SIZE_INCREASE:
+ case xml::FontTypes::FT_SIZE_DECREASE:
+ return from_utf8("span");
+ }
+ // kill warning
+ return docstring();
+}
+
+
+docstring fontToHtmlAttribute(xml::FontTypes type)
+{
+ switch(type) {
+ case xml::FontTypes::FT_EMPH:
+ case xml::FontTypes::FT_BOLD:
+ return from_ascii("");
+ case xml::FontTypes::FT_NOUN:
+ return from_ascii("class='lyxnoun'");
+ case xml::FontTypes::FT_UBAR:
+ return from_ascii("");
+ case xml::FontTypes::FT_DBAR:
+ return from_ascii("class='dline'");
+ case xml::FontTypes::FT_XOUT:
+ case xml::FontTypes::FT_SOUT:
+ return from_ascii("class='strikeout'");
+ case xml::FontTypes::FT_WAVE:
+ return from_ascii("class='wline'");
+ case xml::FontTypes::FT_ITALIC:
+ return from_ascii("");
+ case xml::FontTypes::FT_UPRIGHT:
+ return from_ascii("style='font-style:normal;'");
+ case xml::FontTypes::FT_SLANTED:
+ return from_ascii("style='font-style:oblique;'");
+ case xml::FontTypes::FT_SMALLCAPS:
+ return from_ascii("style='font-variant:small-caps;'");
+ case xml::FontTypes::FT_ROMAN:
+ return from_ascii("style='font-family:serif;'");
+ case xml::FontTypes::FT_SANS:
+ return from_ascii("style='font-family:sans-serif;'");
+ case xml::FontTypes::FT_TYPE:
+ return from_ascii("style='font-family:monospace;'");
+ case xml::FontTypes::FT_SIZE_TINY:
+ case xml::FontTypes::FT_SIZE_SCRIPT:
+ case xml::FontTypes::FT_SIZE_FOOTNOTE:
+ return from_ascii("style='font-size:x-small;'");
+ case xml::FontTypes::FT_SIZE_SMALL:
+ return from_ascii("style='font-size:small;'");
+ case xml::FontTypes::FT_SIZE_NORMAL:
+ return from_ascii("style='font-size:normal;'");
+ case xml::FontTypes::FT_SIZE_LARGE:
+ return from_ascii("style='font-size:large;'");
+ case xml::FontTypes::FT_SIZE_LARGER:
+ case xml::FontTypes::FT_SIZE_LARGEST:
+ return from_ascii("style='font-size:x-large;'");
+ case xml::FontTypes::FT_SIZE_HUGE:
+ case xml::FontTypes::FT_SIZE_HUGER:
+ return from_ascii("style='font-size:xx-large;'");
+ case xml::FontTypes::FT_SIZE_INCREASE:
+ return from_ascii("style='font-size:larger;'");
+ case xml::FontTypes::FT_SIZE_DECREASE:
+ return from_ascii("style='font-size:smaller;'");