TrueType 글꼴이 "Semibold"입니다. 나는 다음과 같은 방법으로 그것을 사용하려고 :글꼴은 'Regular'스타일을 지원하지 않습니다. C#에서 Semibold 글꼴 사용
내 글꼴의 이름을 제공하고,이Sentinel-SemiboldItalic.ttf
글꼴을 찾아
private FontFamily GetFontFamily(string name)
{
PrivateFontCollection pfc = new PrivateFontCollection();
var path = Server.MapPath("~/Static/webfont/" + name + ".ttf");
pfc.AddFontFile(path);
return pfc.Families[0];
}
private Font GetFont(string name, int size,FontStyle style)
{
return new Font(GetFontFamily(name), size, style);
}
. FontStyle
으로 .NET Framework (regulary, bold, italic, underline 및 strikeout)의 옵션 중 하나를 제공하려고 시도했습니다.
상관없이, 나는 다음과 같은 오류가 무엇을 얻을 :
Font 'Sentinel Semibold' does not support style 'Regular'.
어떻게해야합니까를? C#에서 글꼴로 세미 볼드 글꼴을 사용하는 방법? 또한, 어떻게 든 내 트루 타입 글꼴을 일반 글꼴로 변환 할 수 있습니까 (문제를 해결할 수 있다면)?