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

admin2025-04-26  8

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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745666988a313085.html

最新回复(0)