Escape font names with spaces

pull/194/merge
M66B 3 years ago
parent a6dc44f734
commit 54e69d7b59

@ -381,7 +381,7 @@ public class HtmlEx {
// out.append("<tt>"); // out.append("<tt>");
//} //}
out.append("<span style=\"font-family:" + s + ";\">"); out.append("<span style='font-family:" + s + ";'>");
} }
if (style[j] instanceof SuperscriptSpan) { if (style[j] instanceof SuperscriptSpan) {
out.append("<sup>"); out.append("<sup>");

@ -933,15 +933,15 @@ public class StyleHelper {
if (faces.contains("arimo")) if (faces.contains("arimo"))
return "Arimo, Arial, Verdana, sans-serif"; return "Arimo, Arial, Verdana, sans-serif";
if (faces.contains("tinos")) if (faces.contains("tinos"))
return "Tinos, Times New Roman, serif"; return "Tinos, \"Times New Roman\", serif";
if (faces.contains("cousine")) if (faces.contains("cousine"))
return "Cousine, Courier New, monospace"; return "Cousine, \"Courier New\", monospace";
if (faces.contains("lato")) if (faces.contains("lato"))
return "Lato, Carlito, Calibri, sans-serif"; return "Lato, Carlito, Calibri, sans-serif";
if (faces.contains("caladea")) if (faces.contains("caladea"))
return "Caladea, Cambo, Cambria, serif"; return "Caladea, Cambo, Cambria, serif";
if (faces.contains("comic sans")) if (faces.contains("comic sans"))
return "OpenDyslexic, Comic Sans, Comic Sans MS, sans-serif"; return "OpenDyslexic, \"Comic Sans\", \"Comic Sans MS\", sans-serif";
return family; return family;
} }
@ -959,6 +959,7 @@ public class StyleHelper {
faces.add(face faces.add(face
.trim() .trim()
.toLowerCase(Locale.ROOT) .toLowerCase(Locale.ROOT)
.replace("'", "")
.replace("\"", "")); .replace("\"", ""));
if (faces.contains("fairemail")) if (faces.contains("fairemail"))

Loading…
Cancel
Save