最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin7PV0评论

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

Post a comment

comment list (0)

  1. No comments so far