Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top