Repository navigation
Conversation
Collaborator
Author
|
Closing: about 25 call sites and the Flipcash screenTitle override ask for Medium expecting Demi, so remapping the weight made them lighter. Styles that need true Medium will get an explicit Avenir Medium family instead. |
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.
Medium-weight styles (for example
caption) rendered in Avenir Next Demi on Android, while iOS renders them in Avenir Next Medium. The Medium OTF (avenir_next_medium.otf, byte-identical to iOS'sAvenirNextLTPro-Medium.otf) was already bundled inui/themebut the theme did not use it: theAvenirfamily mappedFontWeight.Mediumtoavenir_next_demiunder aTODO: find a better medium OTF.This points the Medium entry at
R.font.avenir_next_mediumand removes the TODO. No other weight in the family changes.Affected
CodeTheme.typographystyles withfontWeight = FontWeight.MediuminType.kt:displayMediumcaptionlinkSmallDirect
FontWeight.Mediumuses outsideType.ktunderapps/andui/: 22 occurrences. Of those, 19 render through the Avenir family, e.g..copy(fontWeight = FontWeight.Medium)ontextSmall/textMediuminMentionSuggestionList.kt,MessageBubble.kt,ChatInput.kt,ChatPhotoBubble.kt,TokenSelectScreen.kt,E2eeLearnMoreSheet.kt. Two (ReactionPillRow.ktcount text) set no family and inherit the ambient text style. The other three are excluded:SwitchPreview.ktusesFontFamily.Default, and the twoFloatingToast.ktlines use their own family.FloatingToast.kt:132builds a privateAvenirMediumfamily from the same OTF. It is untouched here; it could now use the theme family, as a follow-up.Not covered:
BaseAccessKeyViewModel.ktloadsavenir_next_demidirectly for the access key image, which is unaffected.