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

Custom Font Family being implement is not working correctly in Android but is working fine in IOS #488

Closed
ThomasTeoSY opened this issue May 31, 2021 · 8 comments
Labels
bug Crush'em all. is:missing reproduction We require a minimal reproduction to help you out! is:missing template This issue does not comply with our contribution guidelines. is:waiting for feedback Waiting for OP input.

Comments

@ThomasTeoSY
Copy link

const DEFAULT_PROPS = {
classesStyles: {
"category-type": {
fontSize: 15,
color: appGlobal.COLOR_42,
letterSpacing: 2,
lineHeight: 30,
fontFamily: "ProximaNova-Semibold"
},
"discount-percentage": {
fontSize: 18,
color: appGlobal.COLOR_42,
fontFamily: "Trirong-Italic",
},
},
};

var htmlRichText = <span class="category-type">Testing 1<br /></span><span class="discount-percentage">Testing 2</span>;

image
1s Image

Issue: As shown in the 1st image, the text "Testing 2" did go in italic, and font family implementation seems to be working fine. However, the correct custom font family should look like as below 2nd image. (Kindly please refer to 2nd image in below).
Please advise if whether I had missed out on any setting and anything more require from my side. Thanks in advance.

image
2nd Image

@ThomasTeoSY ThomasTeoSY added the bug Crush'em all. label May 31, 2021
@jsamr jsamr added is:missing reproduction We require a minimal reproduction to help you out! is:missing template This issue does not comply with our contribution guidelines. labels May 31, 2021
@jsamr

This comment was marked as outdated.

@ThomasTeoSY

This comment was marked as outdated.

@jsamr

This comment was marked as outdated.

@ThomasTeoSY

This comment was marked as outdated.

@jsamr

This comment was marked as off-topic.

@jsamr jsamr added the is:waiting for feedback Waiting for OP input. label Jun 3, 2021
@jsamr

This comment has been minimized.

@jsamr jsamr closed this as completed Jun 8, 2021
@jsamr
Copy link
Collaborator

jsamr commented Dec 6, 2021

You should never use postscript font names, that is a name which includes the style and weight such as Trirong-Italic, because those font names will not be matched when the fontStyle or fontWeight is set on Android. Instead, you should stick to the font family name (Tirong) with a modifier (fontStyle: "italic"), and configure your project to include those font declarations in Android and iOS. See this tutorial: https://stackoverflow.com/a/70247374/2779871

@Navipro70

This comment was marked as off-topic.

@meliorence meliorence locked as resolved and limited conversation to collaborators Feb 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Crush'em all. is:missing reproduction We require a minimal reproduction to help you out! is:missing template This issue does not comply with our contribution guidelines. is:waiting for feedback Waiting for OP input.
Projects
None yet
Development

No branches or pull requests

3 participants