Conversation
| * If added in public folder, mention the asset host and path in the url like this "https://fea.assettype.com/malibu/assets/ | ||
| MalibuHeadlineSemiBold.woff2". | ||
| * | ||
| * The following origins are allowlisted and allowed for font serving via link tags as per official AMP documentation: |
There was a problem hiding this comment.
Reframe the sentence The following origins are allowlisted and allowed ...
There was a problem hiding this comment.
That line is from the original docs.
| <link rel="preload" as="style" crossorigin="anonymous" href={customFonts?.primary1} /> | ||
| <link rel="preload" as="style" crossorigin="anonymous" href={customFonts?.secondary1} /> | ||
| <link rel="preload" as="style" crossorigin="anonymous" href={customFonts?.primary2} /> | ||
| <link rel="preload" as="style" crossorigin="anonymous" href={customFonts?.secondary2} /> |
There was a problem hiding this comment.
add condition to not add these links if there is no custom font
| customFonts?: { | ||
| primary1?: string | null; | ||
| secondary1?: string | null; | ||
| primary2?: string | null; | ||
| secondary2?: string | null; | ||
| }; |
There was a problem hiding this comment.
doesn't make sense to add custom fonts inside render
render is for render props (custom UI elements) that the app sends
There was a problem hiding this comment.
This is temp fix.
Actually plan is to add in ampConfig of BOLD. Platform team might take sometime to do the change so decided to do this change.
We can add outside render as in opts itself.
There was a problem hiding this comment.
yes.. let's add it outside render under an object called customFonts
Description
At present, we support only google fonts by doing this we can support all the origin urls which AMP supports.
We will Pick up custom font url from amp config that is added in Bold. Settings > configure > amp under Fonts
Ref ticket: https://github.com/quintype/ace-planning/issues/837
Dependencies # (dependency-issue-reference)
Documentation # (link to the corresponding documentation changes)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Add custom font url in the custom font field in Bold and check whether its reflecting in the frontend or not
Checklist: