Skip to content

[Paywalls V2] Support custom fonts with UIConfig#4631

Merged
joshdholtz merged 2 commits into
mainfrom
paywalls-v2/ui-config-fonts
Jan 7, 2025
Merged

[Paywalls V2] Support custom fonts with UIConfig#4631
joshdholtz merged 2 commits into
mainfrom
paywalls-v2/ui-config-fonts

Conversation

@joshdholtz

@joshdholtz joshdholtz commented Jan 5, 2025

Copy link
Copy Markdown
Member

Motivation

Support custom font mapping in UIConfig

Description

  • New UIConfigProvider that gets passed into all of the view models
  • PaywallComponent.FontSize has a makeFont() function that now attempts to find the font family name
    • A warning gets logged if the font is not found
    • A warning gets logged if a googleFont is configured (because its not supported here)
    • Falls back to system font if not found

BONUS: Deleted Spacer and LinkButton finally (it was breaking with this UIConfigProvider and I didn't want to fix it)

Screenshot 2025-01-05 at 9 09 27 AM

@emerge-tools

emerge-tools Bot commented Jan 5, 2025

Copy link
Copy Markdown

1 build decreased size

Name Version Download Change Install Change Approval
Paywalls
com.revenuecat.PaywallsTester
1.0 (1) 10.8 MB ⬇️ 50.8 kB (-0.47%) 40.2 MB ⬇️ 142.3 kB (-0.36%) N/A

Paywalls 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬇️ 142.3 kB (-0.36%)
Total download size change: ⬇️ 50.8 kB (-0.47%)

Largest size changes

Item Install Size Change
🗑 RevenueCatUI.LinkButtonComponentViewModel ⬇️ -18.1 kB
RevenueCatUI.TextComponentViewModel.TextComponentViewModel ⬆️ 9.5 kB
DYLD.String Table ⬇️ -3.7 kB
Code Signature ⬇️ -3.5 kB
DYLD.Exports ⬇️ -1.7 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@joshdholtz joshdholtz requested review from a team January 6, 2025 17:17
@joshdholtz joshdholtz marked this pull request as ready for review January 6, 2025 17:17
Base automatically changed from paywalls-v2/ui-config-api to main January 6, 2025 20:33
@joshdholtz joshdholtz force-pushed the paywalls-v2/ui-config-fonts branch from 6c590fb to 168ba6f Compare January 6, 2025 20:40

@JayShortway JayShortway left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📦 ➡️ 🚢

@MarkVillacampa MarkVillacampa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants