문제

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