Skip to main content
Question

PaywallFontProvider doesn't work in iOS

  • March 2, 2025
  • 1 reply
  • 13 views

Forum|alt.badge.img+4
  • New Member
  • 3 replies

PaywallFontProvider does not have any affect on iOS v2 paywalls.

 

I’ve implemeted a custom PaywallFooterProvider as below:

 

class MyPaywallFontProvider: PaywallFontProvider {

    func font(for textStyle: Font.TextStyle) -> Font {

        switch textStyle {

        case .largeTitle:

                .custom("PlayfairDisplay-Regular", size: 34, relativeTo: .largeTitle)

        case .title:

                .custom("PlayfairDisplay-Regular", size: 28, relativeTo: .title)

        case .title2:

                .custom("PlayfairDisplay-Regular", size: 22, relativeTo: .title2)

        case .title3:

                .custom("PlayfairDisplay-Regular", size: 20, relativeTo: .title3)

        case .headline:

                .custom("Jost-Semibold", size: 17, relativeTo: .headline)

        case .subheadline:

                .custom("Jost-Regular", size: 15, relativeTo: .subheadline)

        case .body:

                .custom("Jost-Regular", size: 17, relativeTo: .body)

        case .callout:

                .custom("Jost-Regular", size: 16, relativeTo: .callout)

        case .footnote:

                .custom("Jost-Regular", size: 13, relativeTo: .footnote)

        case .caption:

                .custom("Jost-Regular", size: 12, relativeTo: .caption)

        case .caption2:

                .custom("Jost-Regular", size: 11, relativeTo: .caption2)

        @unknown default:

            fatalError()

        }

    }

}

This provider is passed to paywall like below:

 

            .sheet(isPresented: $showPaywall, content: {

                PaywallView(fonts: MyPaywallFontProvider())

            })

 

This code does not have any affect on the paywall. I’m still seeing Apple’s default font on the paywall screen.

I’m using one of the paywall templates and did not change anything in the web paywall editor.

I’m wondering if there is a hidden step in the editor to make this work?

Thanks

 

1 reply

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 313 replies
  • March 5, 2025

Hi ​@berk,

In Paywalls V2, the SDK’s PaywallFontProvider is not used. Instead, each text component in the paywall editor has a "Font Family" setting with a gear icon, where you can specify your preferred font. To add a custom font, follow the steps outlined in our documentation here.

 

Best,


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings