最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

React Native 0.76 renders bold text different from earlier versions on iOS - Stack Overflow

programmeradmin3浏览0评论

Previously I've been able to adjust the font weight without specifying the "-Bold" font family, but by just setting an appropriate font weight.

After upgrading, it's not choosing the font based on the width, even though that's the intended behavior according to the docs: /docs/text-style-props#fontweight

On Android it works as expected.

Here's my testing code:

          <Text
            style={[
              { fontFamily: 'Chivo-Bold', fontSize: 31 },
              { fontSize: 32, lineHeight: 35, fontWeight: '700', letterSpacing: -0.5 },
            ]}
          >
            Aasd sadasdƒ Sg
          </Text>
          <Text
            style={[
              { fontFamily: 'Chivo-Regular', fontSize: 31 },
              { fontSize: 32, lineHeight: 35, fontWeight: '700', letterSpacing: -0.5 },
            ]}
          >
            Aasd sadasdƒ Sg
          </Text>

Here's how it looks in RN 0.75 and 0.71 without New Architecture

Here's how it looks in RN 0.76 with New Architecture

发布评论

评论列表(0)

  1. 暂无评论