Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line-height in iOS (otf or ttf) is being applied from the bottom, rather than from the center #19

Open
gilluminate opened this issue Aug 16, 2022 · 0 comments

Comments

@gilluminate
Copy link

gilluminate commented Aug 16, 2022

The default line-height is 150%, and we can’t change that line-height without it getting messed up. FWIW I had the same problem on web until I found a newer version of the web font (woff2). Unfortunately, it doesn’t look like there’s a newer otf or ttf with the fix. I have attempted using fonts downloaded from both productiontype.com as well as from Google.

To illustrate what is happening, here is a screenshot, with the following React Native styles applied to it:

  font-size: 32px;
  line-height: 32px;
  border-width: 1px;

image

You can see that the line-height doesn’t get applied from the center, but rather from the bottom for some weird reason.

Here’s that same exact styling, but with a different serif font from Google (Merriweather):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant