eclipsesource / eclipsesource/tabris-js

Font attributes do not persist when fallback font is used

Open
#2,028 0 comments 0 reactions 0 assignees View on GitHub
bug ios
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

### Problem description
If I define a font with the following string:
```
bold 16px InvalidFontName, Helvetica, Arial, sans-serif;
```
as a result, **non-bold** Helvetica will be used.

### Expected behavior

Font attributes should be preserved when the fallback font is used.

### Environment

- Tabris.js version: 3.2.1
- OS: iOS (12 & 13)

### Code snippet

```javascript
import {TextView, contentView, Stack, Font} from 'tabris';

const boldHelvetica = Font.from("bold 16px Helvetica, Arial, sans-serif;");
const invalidFont = Font.from("bold 16px InvalidFontName, Helvetica, Arial, sans-serif;");
const helvetica = Font.from("16px Helvetica, Arial, sans-serif;");

contentView.append(





);
```
Screenshot 2020-04-15 at 12 00 18

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.