Building a Purple Experience
Experience Styling

Deposit a font in the HTML Experience with Experience Builder

13min

Experience Builder



Summary

Your HTML Experience can be styled with your desired font.

In this article, you learn how to deposit a new font to the Storefront folder in the Experience builder, by deleting the existing font in the fonts folder and uploading the files of your new font. Besides, you will assign the Name of the font files, the font style, the font weight and the file source in the fonts.css. Afterwards, you will create a preview version and merge the changes to make them available in your app. 



Preconditions

Have the licence for your font family downloaded to your computer as txt file

Have downloaded to your computer the TTF files of the following font types from the font family:

  • Black
  • Black-italic
  • Bold
  • Bold-italic
  • Italic
  • Light
  • Light-italic
  • Regular

Have the information in place for each of the font types: 

  • style
  • weight


How-to guide

1. Go to Experience Builder, choose your app in the list and click on it

Document image


2. Click on 'Pull from Preview'

Document image


3. Click on 'default'

Document image


4. Click on 'storefront'

Document image


5. Click on 'assets'

Document image


6. Click on 'fonts'

Document image


7. Mark all files in the folder

Document image


8. Click on 'Actions'

Document image


9. Click on 'Delete files'

Document image


10. Wait until all files are deleted

Document image


11. Click on 'Actions'

Document image


12. Click on 'Upload files' and upload all font files including the licence of your desired font

Document image


13. Wait until the upload is finished

Document image


14. Click on 'assets'

Document image


15. Click on 'fonts.css'

Document image


16. Keep fonts.css open (DO NOT close it by clicking on the X) and click on 'fonts'

Document image


17. Go to the end of the second paragraph, mark and delete the from this point on following data in the file

Document image


18. In the second paragraph, next to 'font-family' mark the name of the font in quotation marks, e.g. 'OpenSans-Light' and overwrite it with the name of your font in Light, e.g. 'Roboto-Light'

Document image


19. Go to 'font-style' and overwrite the orange text with the specification for this font, coming from your font description. E.g. 'light' in the example for 'Roboto-Light'

Document image


20. Go to 'font-weight' and overwrite the green number with the font weight specified for this font in your font description. E.g. '300' in the example for 'Roboto-Light'

Document image


21. Go to 'src' and overwrite the file name in the URL in brackets, with the name of your font. E.g. 'fonts/Roboto-Light.ttf' in the example for 'Roboto-Light'

Document image


22. Mark the whole paragraph

Document image


23. Copy and paste it below the last one in your file

Document image


24. Repeat the steps 18 to 23 until you have it done for all uploaded font files, e.g. for font-black.ttf; font-blackitalic.ttf; font-bold.ttf; font-bolditalic.ttf; font-italic.ttf; font-light.ttf; font-lightitalic.ttf; font-regular.ttf

Document image


25. Click on the burger menu

Document image


26. Click on 'Update Dynamic Resources'

Document image


27. Name your changes, e.g. 'new-fonts'

Document image


28. Click on 'Merge all files to preview'

Document image


You have successfully uploaded and assigned a new font to the Experience HTML in your app, merged the changes and updated the dynamic resources. You can test the result in the preview and push them live if they look fine, to make them visible in your live app.