Skip to content

refactor(theme): collapse Avenir into one family with a real Medium face - #1947

Merged
bmc08gt merged 1 commit into
code/cashfrom
refactor/avenir-single-family
Nov 3, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
refactor/avenir-single-family

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Android text set to FontWeight.Medium in Avenir drew Avenir Next Demi, because PlatformFonts.avenir mapped Medium to the Demi file. A second family, AvenirMedium, existed for the few styles that needed the real Medium face. On iOS, FontBook maps .medium to AvenirNextLTPro-Medium, so every Android site that asked for Medium looked heavier than its iOS counterpart.

This collapses the two into one Avenir family with the iOS (UIKit FontBook) table: Thin through Normal → regular, Medium → avenir_next_medium, SemiBold and up → demi. avenirMedium / AvenirMedium are gone, on Android and on the desktop actual.

Per-site decisions

Each site that set or inherited Medium on Avenir was checked against the matching iOS text.

Kept Medium, now the real Medium face (visible change, matches iOS)

Android site iOS counterpart
ChatInput.kt:370 composer text and placeholder ConversationBottomBar.swift:1239, .appTextMessage (16 medium)
E2eeLearnMoreSheet.kt:128 subtitle, :183 bullets E2eeLearnMoreSheet.swift:52, :83, 15 medium
ReactionBoostSheet.kt:101 "Tap to change" PaidReactionSheet.swift:74, 12 medium
E2eeFooter.kt:70 E2eeLearnMoreSheet.swift:192, 13 medium
MentionSuggestionList.kt:155 @handle MentionSuggestionList.swift:120, 14 medium
RequestDeck.kt:607 strip second line PaymentRequestDeck.swift:682, .appTextCaption (12 medium; Android stays at 14)
MarketCapExplainerRow.kt:71 MarketCapExplainerRow.swift:27, 14 medium
MarketCapExplainerSlider.kt:176 tick labels MarketCapSlider.swift:129, caption medium
ComposerReplyStrip.kt:209 quote ComposerReplyStrip.swift:164, 14 medium
MessageLinkCard.kt:445 meta, :449 body LinkMessageCardView.swift:304, :337, 13 / 15 medium
UndecryptableBubble.kt:228 ChatBubbleView.swift:325, UIKit 15 medium
ChatPhotoBubble.kt:169 "can't be displayed" ChatMediaCell.swift:128, UIKit 14 medium

Moved to SemiBold (same Demi pixels as before)

Android site Why
Type.kt displayMedium (40) iOS appDisplayMedium is 40 bold → Demi. Its users (group send, request pay sheet, market cap value, cash bubble amount) all map to bold on iOS.
FlipcashDesignSystem.kt:143 screenTitle (W500) iOS nav titles use UIFont.appTitle, 20 bold → Demi (AppDelegate.swift:335).
ReactionBoostCurrencySheet.kt:99, TokenSelectScreen.kt:61 picker balance iOS CurrencyPickerSheet.swift:85 uses .appTextMedium, 16 bold → Demi.
Type.kt linkSmall No callers and no iOS counterpart; kept Demi.
MessageNodeDefaults.ContentStyle (W500) No callers; kept Demi.

No visual change

  • textMessage and caption move from AvenirMedium to Avenir; both already set Medium.
  • FloatingToast drops its private Medium-only FontFamily and uses textSmall.copy(fontWeight = Medium).
  • The cash bubble " each" span from feat(chat): one cash bubble layout for DMs and group sends #1944 no longer borrows caption.fontFamily. It inherits the amount's Avenir with plain FontWeight.Medium. CashBubbleLinesTest now asserts the span has no family of its own and that the amount family's Medium resolves to avenir_next_medium.

Not affected: bare Material3 Text calls with only fontSize/fontWeight (ReactorsSheet, ReactionPickerSheet, ReactionPillRow) draw in the system font, not Avenir. SwitchPreview sets FontFamily.Default and PaymentReceipt is monospace.

Uncertain

  • linkSmall and MessageNodeDefaults.ContentStyle have no callers, so there was nothing to compare. They stay on Demi.

Tests

AvenirFamilyTest in ui/theme pins the weight → file table, as an Android host test on resource IDs and a JVM test on the desktop font files. The host test also checks every codeTypography style uses the one family. No module applies the compose screenshot plugin, so there were no screenshot references to re-record.

Left alone

These iOS mismatches sit next to the sites above but are out of scope here:

  • MessageLinkCard nameStyle is SemiBold (Demi); iOS SwiftUI .semibold resolves to Medium.
  • SwiftUI Font.default maps .semibold to Medium while UIKit maps it to Demi, so iOS isn't consistent with itself on SemiBold.
  • The cash bubble caption (MessageBubble.kt:1069) is Medium; iOS ChatCashCardCell uses 12 bold.

@bmc08gt bmc08gt self-assigned this Nov 3, 2026
@github-actions github-actions Bot added type: refactor Code restructuring, no behavior change area: ui Compose UI, theme, components, resources area: tokens Token accounts, balances, token info labels Nov 3, 2026
@bmc08gt
bmc08gt merged commit 70d3c93 into code/cash Nov 3, 2026
5 checks passed
bmc08gt added a commit that referenced this pull request Nov 3, 2026
…ee-pane

* origin/code/cash: (44 commits)
  refactor(chat-list): move the chat list into a KMP module and wire it into the desktop graph (#1950)
  build(deps): bump dev.zacsweers.metro from 1.4.5 to 1.5.1 (#1901)
  feat(flipcash): add return-payment contract scaffolding (#1949)
  refactor(chat-ui): make shared/chat-ui a KMP module (#1934)
  build(deps): bump com.google.firebase:firebase-bom from 34.19.0 to 35.1.0 (#1900)
  build(deps): bump io.ktor:ktor-network from 3.4.1 to 3.6.0 (#1909)
  build(deps): bump rinku from 1.6.0 to 1.9.0 (#1907)
  build(deps): bump androidx.webkit:webkit from 1.17.0 to 1.18.0 (#1906)
  build(deps): bump agp from 9.4.1 to 9.5.0 (#1905)
  build(deps): bump androidx-datastore from 1.2.1 to 1.3.0 (#1904)
  build(deps): bump compose-multiplatform from 1.12.1 to 1.12.2 (#1903)
  build(deps): bump com.google.android.gms:play-services-base (#1902)
  build(deps): bump okhttp from 5.5.0 to 5.5.1 (#1899)
  refactor(messenger): split ChatViewModel's reducer into per-area files (#1933)
  refactor(amount-entry): make shared/amount-entry a KMP module (#1932)
  fix(build): stop KMP host tests building release variants and debug manifests changing per commit (#1948)
  refactor(theme): collapse Avenir into one family with a real Medium face (#1947)
  perf: run independent hot-path calls concurrently (#1945)
  docs(claude): test gestures with device input and keep mode state at screen level (#1943)
  build: bump Flipcash to 2026.11.2
  ...

# Conflicts:
#	CLAUDE.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tokens Token accounts, balances, token info area: ui Compose UI, theme, components, resources type: refactor Code restructuring, no behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant