Skip to content

fix(theme): render Avenir Medium weight with the Medium face - #1775

Closed
bmc08gt wants to merge 1 commit into
code/cashfrom
fix/avenir-medium-weight
Closed

bmc08gt wants to merge 1 commit into
code/cashfrom
fix/avenir-medium-weight

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

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's AvenirNextLTPro-Medium.otf) was already bundled in ui/theme but the theme did not use it: the Avenir family mapped FontWeight.Medium to avenir_next_demi under a TODO: find a better medium OTF.

This points the Medium entry at R.font.avenir_next_medium and removes the TODO. No other weight in the family changes.

Affected

CodeTheme.typography styles with fontWeight = FontWeight.Medium in Type.kt:

  • displayMedium
  • caption
  • linkSmall

Direct FontWeight.Medium uses outside Type.kt under apps/ and ui/: 22 occurrences. Of those, 19 render through the Avenir family, e.g. .copy(fontWeight = FontWeight.Medium) on textSmall / textMedium in MentionSuggestionList.kt, MessageBubble.kt, ChatInput.kt, ChatPhotoBubble.kt, TokenSelectScreen.kt, E2eeLearnMoreSheet.kt. Two (ReactionPillRow.kt count text) set no family and inherit the ambient text style. The other three are excluded: SwitchPreview.kt uses FontFamily.Default, and the two FloatingToast.kt lines use their own family.

FloatingToast.kt:132 builds a private AvenirMedium family from the same OTF. It is untouched here; it could now use the theme family, as a follow-up.

Not covered: BaseAccessKeyViewModel.kt loads avenir_next_demi directly for the access key image, which is unaffected.

@bmc08gt bmc08gt self-assigned this Oct 14, 2026
@github-actions github-actions Bot added area: ui Compose UI, theme, components, resources type: fix Bug fix labels Oct 14, 2026
@bmc08gt

bmc08gt commented Oct 14, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Compose UI, theme, components, resources type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant