File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,33 @@ func (s Style) String() string {
115
115
}
116
116
}
117
117
118
+ func (w Weight ) String () string {
119
+ switch w {
120
+ case Thin :
121
+ return "Thin"
122
+ case ExtraLight :
123
+ return "ExtraLight"
124
+ case Light :
125
+ return "Light"
126
+ case Normal :
127
+ return "Normal"
128
+ case Medium :
129
+ return "Medium"
130
+ case SemiBold :
131
+ return "SemiBold"
132
+ case Bold :
133
+ return "Bold"
134
+ case ExtraBold :
135
+ return "ExtraBold"
136
+ case Black :
137
+ return "Black"
138
+ case ExtraBlack :
139
+ return "ExtraBlack"
140
+ default :
141
+ panic ("invalid Weight" )
142
+ }
143
+ }
144
+
118
145
// weightDistance returns the distance value between two font weights.
119
146
func weightDistance (wa Weight , wb Weight ) int {
120
147
// Avoid dealing with negative Weight values.
You can’t perform that action at this time.
0 commit comments