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

Weird Reversal of Font Styles / Font Styles being overridden #23026

Closed
barnesheaton opened this issue Jan 16, 2019 · 2 comments
Closed

Weird Reversal of Font Styles / Font Styles being overridden #23026

barnesheaton opened this issue Jan 16, 2019 · 2 comments
Labels
Bug Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Resolution: Locked This issue was locked by the bot.

Comments

@barnesheaton
Copy link

Environment

System:
      OS: macOS 10.14.2
      CPU: x64 Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
      Memory: 78.00 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 9.11.2 - /usr/local/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 5.6.0 - /usr/local/bin/npm
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      @storybook/react-native: ^4.2.0-alpha.4 => 4.2.0-alpha.4 
      react: 16.5.2 => 16.5.2 
      react-native: 0.57.1 => 0.57.1 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

  1. Applying fontStyle: 'italic' overrides any use fontWeight
  2. Using a particular fontFamily doesn't result in that font being displayed correctly
  3. Just applying fontWeight: '${number}' sometimes results in an italic style being applied

Here I am using the react-native Text component with the specific fontFamily listed below (called subFonts maybe?):

<Text
   style={{
       fontFamily: 'CentraNo2-${number}',
       fontSize: 40 
    }}
>
  CentraNo2-${number}
</Text>

simulator screen shot - iphone 6 - 2019-01-16 at 12 49 28

The issue is that all the fonts that end in 6 should be Italic whereas the fonts that end in 5 should be regular. And this is indeed the case when looking at these fonts in the the xCode project or an Application like FontBook on MacOS. But here, it seems arbitrary weather BOTH bold and and italic versions of one weight will end up being one or the other.

And here I am using the (Base / Master / Parent not sure what its called)? fontFamily name like so:

<Text
   style={{
       fontFamily: 'Centra No.2',
       fontSize: 40 
       fontWeight: '${some_font_weight}',
       fontStyle: {'italic' || void},
    }}
>
  CentraNo2-${number}
</Text>

simulator screen shot - iphone 6 - 2019-01-16 at 13 00 13

And in this case:

  1. Applying fontStyle: 'italic' overrides any use fontWeight
    ... and ...
  2. Just applying fontWeight: '${number}' sometimes results in an italic style being applied

xCode

screen shot 2019-01-16 at 1 01 43 pm

screen shot 2019-01-16 at 1 02 10 pm

All linked properly

screen shot 2019-01-16 at 1 04 08 pm

@react-native-bot

This comment has been minimized.

@hramos hramos added Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. and removed 📋No Environment Info labels Jan 16, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@dulmandakh
Copy link
Contributor

Hello there 👋 this issue doesn't have a repro (which means, a react-native init-ed project with the minimal changes that leads to creating the same issue you are reporting). Unfortunately, I have no way of helping you in a meaningful way – there is no easy way for me to recreate the situation and check that the issue reported is still there when changing the code.

Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants