()
| 87 | } |
| 88 | |
| 89 | func (style FontStyle) String() string { |
| 90 | var s string |
| 91 | switch style.Weight() { |
| 92 | case FontThin: |
| 93 | s = "Thin" |
| 94 | case FontExtraLight: |
| 95 | s = "ExtraLight" |
| 96 | case FontLight: |
| 97 | s = "Light" |
| 98 | case FontRegular: |
| 99 | s = "Regular" |
| 100 | case FontMedium: |
| 101 | s = "Medium" |
| 102 | case FontSemiBold: |
| 103 | s = "SemiBold" |
| 104 | case FontBold: |
| 105 | s = "Bold" |
| 106 | case FontExtraBold: |
| 107 | s = "ExtraBold" |
| 108 | case FontBlack: |
| 109 | s = "Black" |
| 110 | default: |
| 111 | return "Unknown" |
| 112 | } |
| 113 | if style.Italic() { |
| 114 | s += " Italic" |
| 115 | } |
| 116 | return s |
| 117 | } |
| 118 | |
| 119 | // FontVariant defines the font variant to be used for the font, such as subscript or smallcaps. |
| 120 | type FontVariant int |