We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10910de commit 28afd16Copy full SHA for 28afd16
1 file changed
src/styles/text/text_settings.js
@@ -98,7 +98,9 @@ const TextSettings = {
98
99
// clamp weight to 1-1000 (see https://drafts.csswg.org/css-fonts-4/#valdef-font-weight-number)
100
style.weight = StyleParser.evalCachedProperty(draw.font.weight, context) || this.defaults.weight;
101
- style.weight = Math.min(Math.max(style.weight, 1), 1000);
+ if (typeof style.weight === 'number') {
102
+ style.weight = Math.min(Math.max(style.weight, 1), 1000);
103
+ }
104
105
if (draw.font.family) {
106
style.family = draw.font.family;
0 commit comments