Tokamak
Tokamak copied to clipboard
Font size is not working properly
Describe the bug
Texts are not reflecting custom sizes. That is because Font's font-size
attribute is getting ignored for not using a proper length unit.
To Reproduce Steps to reproduce the behavior:
- Use The TokamakStaticHTML renderer
- Use the Font.system() or Font.custom() method for any text
Text("Example").font(.system(size: 64, weight: .bold))
- See error, visually and in the inspection console
Expected behavior The text should be displayed using the specified text size.
Desktop (please complete the following information):
- OS: macOS 11.6.2
- Browser: Safari
- Version of the browser: 15.2
- Version of Tokamak: 0.9.0
Additional context The problem seems to happen here, line 87, where a length unit is never set
Experiencing same issue. Is it simply about adding px
, e.g. "font-size": "\(proxy._size)px"
? Or am I too optimistic?
@carson-katri could we expect any improvements in this as a result of your work in #472?
No, it doesn’t handle any text styling yet.