Repository navigation
feat(android): an app can pass its own typeface to DdsTheme (0.9.2) - #155
Merged
Merged
Conversation
Owner-approved: Qooroo owns its font (Pretendard Std Variable), DDS keeps Pretendard as the default. DdsTheme(fontFamily = DdsSans) passes the family into the type scale, the only place DDS sets one, so DDS components and Material text are all set in it. Sizes, line heights and weights stay the tokens'. The default is the same DdsSans object, so an app that passes nothing changes not one glyph. No per-locale mapper: an app swaps the family it passes when the language changes, which keeps the API to one parameter. Tests: JVM — every style is DdsSans by default, a passed family reaches all sixteen styles and Material's type, and nothing but the family changes. Device — a DdsButton and a DdsSegmentedControl lay their labels out in the passed family, and in DdsSans without one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The owner approved this ("그래 진행해 글꼴관련된거"). Qooroo owns its typeface (it will bundle Pretendard Std Variable), and DDS keeps Pretendard as the default.
DdsTheme(fontFamily: FontFamily = DdsSans). The family goes into the DDS type scale, which is the only place DDS sets a family, so DDS components (they readDdsTheme.typography) and Material's type (built from the same scale) are all set in it.DdsSansobject as before, so an app that passes nothing changes not one glyph.Docs: guide §4 (
docs/mobile-native.md+.ko.md), both changelogs (0.9.2),VERSION_NAME0.9.2, both READMEs.Tests
TypographyFamilyTest(JVM): by default every style, normal and large text, isDdsSans; a passed family reaches all sixteen styles and Material's type; nothing else differs between the two (sizes, line heights, weights, line-height style).ThemeFontOnDeviceTest: aDdsButtonand aDdsSegmentedControllay their labels out in the passed family, and inDdsSanswithout one.Verified locally
TypographyFamilyTest4/4 and every other unit suite 0 failures / 0 errors;check-android-sourcesandcheck-docs-syncclean.ThemeFontOnDeviceTest,SegmentedOnDeviceTestandButtonOnDeviceTesttogether, 36/36 (failures="0" errors="0" skipped="0"). The phone was restored afterwards.The release tag needs the owner's OK.