eclipsesource / eclipsesource/tabris-js
Custom fonts cannot not be used with varying font weights
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
Currently it is not possible to use custom fonts with `markupEnabled` and tags like `` and ``, since a TTF/OTF file defining only one combination of font weight and style, has to be bound to a single font family alias:
```
app.registerFont('Raleway-Bold', 'resources/Raleway-Bold.ttf'); // font family must not be bound to font weight and style!
```
### Expected behavior
An API similar to the CSS' [`@font-face`](https://developer.mozilla.org/en/docs/Web/CSS/@font-face) can be introduced, which would allow using a single font family with different weights and styles (see [@font-face tip: define font-weight and font-style to keep your CSS simple](https://www.456bereastreet.com/archive/201012/font-face_tip_define_font-weight_and_font-style_to_keep_your_css_simple/)).
Contributor guide
Assessment
This issue has not been assessed yet.