Hey! These docs are for version 3.2, which is no longer officially supported. Click here for the latest version, 1.0!

Merchant Fonts

To deliver the best user experience, the Juspay SDK is bundled with the merchant app fonts. However this may lead to an increase in the size of the SDK. To avoid the size increase, Juspay SDK has the capability to utilize the fonts directly from the merchant app.

Below are some points to consider while using the merchantFonts feature:

  • It is not mandatory to pass all three weights, If any font-weight is not passed then either the bundled font will be loaded (if-present) or the system default will be loaded.
  • It is mandatory to pass “name” -> name of the font file. Please check the sample initiate request payload.
  • All the values are case sensitive.
  • If the passed value is incorrect then the default system font will be loaded.

Android Specific guidelines :

  • It is mandatory to pass ${source} for Android. ${source} has to be replaced by either “resId” or “path”. Explanation for both parameters as below
    • “resId” -> Integer :: It is the resource id if the fonts are used as a resource in android.
    • “path” -> String :: It is the path to fonts inside the assets dir or inside “res” dir. (refer to below payload)
  • In case your app is using downloaded fonts, either pass the resource ID or path of xml inside res dir. For example: “res/font/font.xml”

iOS Specific guidelines :

  • This feature is currently not supported for iOS.