Add derived TextStyle APIs under Typography #287
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #279 by adding a
Typography
API that exposes equivalent functionality to whatJBFont
offers.These are available both in standalone and on the IJP:
label
(the default text style accessible also fromJewelTheme.textStyle
)h0
(label + size increased by 12 + bold)h1
(label + size increased by 9 + bold)h2
(label + size increased by 5)h3
(label + size increased by 3)h4
(label + size increased by 1 + bold)There are also these size-only variants, that are only available on the IJP:
regular
(same aslabel()
)medium
(regular + size decreased by 1)small
(regular + size decreased by 2)The reason these latter are only available on the IJP is that
medium
andsmall
return the same asregular
on Windows when using the old UI — following whatJBFont
does. This wouldn't make sense on standalone.