microsoft / microsoft/react-native-windows

Handle incorrect fontFamily gracefully.

Open
#3,918 2 comments 0 reactions 1 assignee View on GitHub

@aschultz is already working on this.

Since Jan 23, 2020.

Area: Text bug Workstream: Component Parity
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Environment

If you are using latest version:

  1. react-native -v:

react-native-cli: 2.0.1
react-native: 0.60.6

  1. react-native run-windows --info:

System:
OS: Windows 10 10.0.18362
CPU: (32) x64 AMD Ryzen Threadripper 1950X 16-Core Processor
Memory: 10.17 GB / 15.90 GB
Binaries:
Node: 12.9.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD
npmPackages:
react: 16.8.6 => 16.8.6
react-native: ^0.60.0 => 0.60.6
react-native-windows: 0.60.0-vnext.115 => 0.60.0-vnext.115
rnpm-plugin-windows: ^0.4.0 => 0.4.0
Installed UWP SDKs:
10.0.14393.0
10.0.16299.0
10.0.17134.0
10.0.17763.0
10.0.18362.0

Then, specify:

I have no idea what React-Native vNext is doing there. Just going with the defaults of installing React

Windows

I have VS2019, but RNWVN installed the earlier toolchain.

Debug

Steps to Reproduce

Pretty sure it's this. A blank fontFamily on an inline Text causes a D3D shitshow and exceptions.

<Text style={{ fontFamily:'', marginTop:6, fontSize:30, color:'white'}}>Dynamic Course POC

Expected Behavior

It should complain either that I had a bad font. But not crash.

Complain I had a bad font.

Actual Behavior

Kaboom.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.