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

Add derived TextStyle APIs under Typography #287

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Conversation

rock3r
Copy link
Collaborator

@rock3r rock3r commented Jan 14, 2024

Closes #279 by adding a Typography API that exposes equivalent functionality to what JBFont offers.

These are available both in standalone and on the IJP:

  • label (the default text style accessible also from JewelTheme.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 as label())
  • 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 and small return the same as regular on Windows when using the old UI — following what JBFont does. This wouldn't make sense on standalone.

@rock3r rock3r added feature New feature or request api Changes related to the public API labels Jan 14, 2024
@rock3r rock3r requested review from devkanro and fscarponi January 14, 2024 16:09
@rock3r rock3r self-assigned this Jan 14, 2024
@rock3r rock3r merged commit 36df5e5 into main Jan 15, 2024
12 checks passed
@rock3r rock3r deleted the 279-derived-text-styles branch January 15, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Changes related to the public API feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add APIs to get derived text styles
2 participants