eclipsesource / eclipsesource/tabris-js
Custom fonts referenceable by family instead of alias
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
According to the [documentation](https://docs.tabris.com/latest/api/app.html#registerfontalias-file), the font alias should be used to reference a custom font on all platforms except on Windows. Currently, however, it can only be referenced by its original font family instead. Other than deviating from the documented API, this can be an issue when a font has variants using the same family. In this case, those variants currently cannot be differentiated by the framework without modifying the font variant files themselves to use different families.
### Expected behavior
Custom fonts should be referenceable by their given aliases on iOS.
### Environment
- Tabris.js version: nightly
- Platform: iOS
- OS: 12.1.1
### Code snippet
Font used: https://fonts.google.com/specimen/Raleway; `Raleway-Bold.ttf` from the download.
```jsx
import { app, WidgetCollection, TextView, contentView } from 'tabris';
app.registerFont('my-raleway-font-alias', 'fonts/Raleway-Bold.ttf');
contentView.append(
);
```
|iOS|Android (expected)|
|---|---|
|||
Contributor guide
Assessment
This issue has not been assessed yet.