我希望在使用MigraDoc时能够使用其他字体,但我很难让它生效。目前,我正在使用以下代码:
我已经将其作为类范围内的变量:
String tPdfFont = "MonospaceTyperwriter";
接下来是MigraDoc代码本身:
Document tDoc = new Document();
MigraDoc.DocumentObjectModel.Style style = tDoc.Styles["Normal"];
style.Font.Name = tPdfFont;
这个特定的字体已经安装在机器上,但似乎无法工作。我感觉自己可能漏掉了一些非常明显的东西,或者完全误解了字体的使用。