When a fontFamily is specified inside a style class (className) definition in theme.yaml, it is not applied to Text widgets at runtime. Other properties in the same class (like fontSize, fontWeight) also appear unaffected when fontFamily is present.
Steps to reproduce:
Define a style class in theme.yaml:
Common:
Styles:
.myHeaderStyle:
textStyle:
fontSize: 24
fontWeight: w900
fontFamily: Metric_Black
Apply it to a Text widget:
- Text:
text: Hello
className: myHeaderStyle
The text renders with the default font — fontFamily, fontSize, and fontWeight from the className are not applied.
Expected behavior: The Text widget should render with Metric_Black font at size 24 with weight w900.
Workaround: Apply textStyle properties inline on the widget's styles instead of via className:
- Text:
text: Hello
styles:
textStyle:
fontSize: 24
fontWeight: w900
fontFamily: Metric_Black
When a
fontFamilyis specified inside a style class (className) definition intheme.yaml, it is not applied to Text widgets at runtime. Other properties in the same class (likefontSize,fontWeight) also appear unaffected when fontFamily is present.Steps to reproduce:
Define a style class in
theme.yaml:Apply it to a Text widget:
The text renders with the default font — fontFamily, fontSize, and fontWeight from the className are not applied.
Expected behavior: The Text widget should render with Metric_Black font at size 24 with weight w900.
Workaround: Apply textStyle properties inline on the widget's styles instead of via className: