I am using the Open Sans font in a Pdf. I need to use the Open Sans Extrabold Italic style. In pdf sharp there is a BoldItalic XFontStyle, but no Extrabold, how do I set the font to be Extrabold in pdf sharp. This is the code that I am using:

XFont extrabold = new XFont("Open Sans", 80, XFontStyle.BoldItalic);

I am looking for something like XFont extrabold = new XFont("Open Sans", 80, XFontStyle.ExtraboldItalic); but this does not exist.

I have found that there is an XFontWeights.ExtraBold setting, but I am not sure how to use this in an XFont.

有帮助吗?

解决方案

Use the font name "Open Sans Extrabold" (not "Open Sans") and the normal font style italic.

There is also "Open Sans Light" and "Open Sans Semibold" for other font weights.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top