diff --git a/FastReport.Base/Export/Html/HTMLExportDraw.cs b/FastReport.Base/Export/Html/HTMLExportDraw.cs index 14118717..a2bb319d 100644 --- a/FastReport.Base/Export/Html/HTMLExportDraw.cs +++ b/FastReport.Base/Export/Html/HTMLExportDraw.cs @@ -19,7 +19,7 @@ private void HTMLFontStyle(FastString FFontDesc, Font font, float LineHeight) FFontDesc.Append("text-decoration:underline;"); else if ((font.Style & FontStyle.Strikeout) > 0) FFontDesc.Append("text-decoration:line-through;"); - FFontDesc.Append("font-family:").Append(font.Name).Append(";"); + FFontDesc.Append("font-family:").Append($"\'{font.Name}\'").Append(";"); FFontDesc.Append("font-size:").Append(Px(font.Size * 96 / 72)); if (LineHeight > 0) diff --git a/FastReport.Base/Export/Html/HTMLExportTemplates.cs b/FastReport.Base/Export/Html/HTMLExportTemplates.cs index 4451b702..8a639cfe 100644 --- a/FastReport.Base/Export/Html/HTMLExportTemplates.cs +++ b/FastReport.Base/Export/Html/HTMLExportTemplates.cs @@ -155,7 +155,7 @@ public HtmlTemplates() Part(""); Part(""); - Part(""); + Part(""); Part("{0}"); Part(""); Part(""); diff --git a/FastReport.Base/Utils/HtmlTextRenderer.cs b/FastReport.Base/Utils/HtmlTextRenderer.cs index 849d90d5..e2b4a0fc 100644 --- a/FastReport.Base/Utils/HtmlTextRenderer.cs +++ b/FastReport.Base/Utils/HtmlTextRenderer.cs @@ -3094,7 +3094,7 @@ public void ToHtml(FastString sb, bool close) sb.Append(" 0) sb.Append(String.Format(CultureInfo, "background-color:rgba({0},{1},{2},{3});", backgroundColor.R, backgroundColor.G, backgroundColor.B, ((float)backgroundColor.A) / 255f)); if (color.A > 0) sb.Append(String.Format(CultureInfo, "color:rgba({0},{1},{2},{3});", color.R, color.G, color.B, ((float)color.A) / 255f)); - if (font != null) { sb.Append("font-family:"); sb.Append(font.Name); sb.Append(";"); } + if (font != null) { sb.Append("font-family:"); sb.Append($"\'{font.Name}\'"); sb.Append(";"); } if (fontsize > 0) { sb.Append("font-size:"); sb.Append(fontsize.ToString(CultureInfo)); sb.Append("pt;"); } //if ((fontStyle & FontStyle.Italic) == FontStyle.Italic) { sb.Append("font-style:italic;"); }