Skip to content

Add text size modifier - #1061

Merged
nbradbury merged 7 commits into
trunkfrom
feature/text-size-modifier
Sep 28, 2023
Merged

Add text size modifier#1061
nbradbury merged 7 commits into
trunkfrom
feature/text-size-modifier

Conversation

@khaykov

@khaykovkhaykov commented Sep 27, 2023

Copy link
Copy Markdown
Contributor

This PR adds a text size modifier, that is applied to base font size, and scales all the text accordingly. This is mainly aimed at use cases where you have specific heading sizes defined, instead of relying on default scaling behavior.

If you don't have a manually set heading sizes, all the text will scale with base font size.

Modifier can be negative, for downscaling.

To test:

  • Try setting the modifier using setTextSizeModifier (eg visualEditor.setTextSizeModifier(25)) and confirm that the text scales as expected.

  • Try settings custom heading font sized using headingOneFontSize, headingTwoFontSize, etc. Confirm that heading size is scaling properly.

  • If there are new strings that have to be translated, I have added them to the client's strings.xml as a part of the integration PR.

@khaykov
khaykov marked this pull request as ready for review September 27, 2023 23:41
@nbradburynbradbury self-assigned this Sep 28, 2023

@nbradburynbradbury left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All good, thanks for this change! :shipit:

@nbradbury
nbradbury merged commit caf8f43 into trunkSep 28, 2023
@nbradbury
nbradbury deleted the feature/text-size-modifier branch September 28, 2023 12:40
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@khaykov@nbradbury