Web ページの CSS で Google フォント「Open Sans,sans-serif」を使用しています。evo pdf を使用して PDF を生成しています。この動的に作成するヘッダーとフッターでは、TextElement を使用します。
私の問題は、c# fontfamily にそのような Google フォントがないことです。c# fontfamily で「Open Sans、sans-serif」を取得するにはどうすればよいですか?
TextElement footerText = new TextElement(0, 15, "Page &p; of &P; ",
new System.Drawing.Font(this.OpenSans,12, FontStyle.Regular, GraphicsUnit.Pixel));
footerText.TextAlign = HorizontalTextAlign.Right;
footerText.ForeColor = Color.Black;
footerText.EmbedSysFont = true;
htmlToPdfConverter.PdfFooterOptions.AddElement(footerText);