markus / MarkupToPDF / Common / StringToFont.cs @ 53880c83
이력 | 보기 | 이력해설 | 다운로드 (877 Bytes)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using System.Windows; |
6 |
|
7 |
namespace MarkupToPDF.Common |
8 |
{ |
9 |
public static class StringToFont |
10 |
{ |
11 |
public static FontStyle ConFontStyle(string fontStyle) |
12 |
{ |
13 |
if (fontStyle == "Italic") |
14 |
{ |
15 |
return FontStyles.Italic; |
16 |
} |
17 |
else |
18 |
{ |
19 |
return FontStyles.Normal; |
20 |
} |
21 |
} |
22 |
|
23 |
public static FontWeight ConFontWeight(string fontWeight) |
24 |
{ |
25 |
if (fontWeight == "Bold") |
26 |
{ |
27 |
return FontWeights.Bold; |
28 |
} |
29 |
else if (fontWeight == "ExtraBold") |
30 |
{ |
31 |
return FontWeights.ExtraBold; |
32 |
} |
33 |
else |
34 |
{ |
35 |
return FontWeights.Normal; |
36 |
} |
37 |
} |
38 |
} |
39 |
} |