LoginSignup
1
0

More than 3 years have passed since last update.

半角英数字とカンマの組み合わせでline-heightがおかしくなる

Last updated at Posted at 2019-04-08

2020.3.11追記

iOS13以降はこの不具合が解消されました。
かつ、system fontを指定すると明朝体になって全体的にline-heightがおかしくなります。

前提

  • iOSの言語設定は日本語を選択する
  • ReactNativeのバージョン 0.59.3

現象

半角英数字とカンマを組み合わせた文章だと、カンマ入りの行だけline-heightがおかしくなる。
スクリーンショット_2019-04-08_15_23_34.png

解決方法

font-familyのプロパティに system font を指定する。

const styles = StyleSheet.create({
  text: {
    fontFamily: 'system font', // fontFamilyを指定する
    fontSize: 24,
    color: '#000',
  },
});

結果

スクリーンショット 2019-04-08 15.32.56.png

注意点

副作用でfont-weightが指定しても効かなくなる。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0