Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

[Android] Add the ability to set font family, weight, size, and style from RN#114

Merged
daniloercoli merged 1 commit intomasterfrom
add/ability-to-change-font-family-weight-style-from-RN
Jan 23, 2019
Merged

[Android] Add the ability to set font family, weight, size, and style from RN#114
daniloercoli merged 1 commit intomasterfrom
add/ability-to-change-font-family-weight-style-from-RN

Conversation

@daniloercoli
Copy link
Copy Markdown
Contributor

@daniloercoli daniloercoli commented Jan 22, 2019

This PR adds the ability to set font family, weight, size, and style from RN.

Setting the proper font Family is required by our parent app, and there is no reliable way to set them in CSS/Style. We've then decided to follow the approach suggest by RN docs, and checked the default React Native TextInput component.

All of the code in this PR is taken from ReactTextInputManager class.

Before start using it in wordpress-mobile/gutenberg-mobile#450 we need the same properties added to iOS.

To test it, just apply this GIST https://gist.github.com/daniloercoli/11f917e4cf1ee046875edbc843d9e85a to your local copy of GB and run the app as usual.

Copy link
Copy Markdown
Contributor

@mzorz mzorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested by copying all the changes on WPAndroid's develop. Works well, but this will need to be moved to the main gutenberg-mobile repo as discussed.

LGTM!

@daniloercoli daniloercoli merged commit 4a84c82 into master Jan 23, 2019
@daniloercoli daniloercoli deleted the add/ability-to-change-font-family-weight-style-from-RN branch January 23, 2019 18:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants