Hello PTC Community,
Please, advise how I can fix the CSS typography appearance in the View app.
My problem is that the CSS Typography style (either from "resources/... " or Google link) does not appear on the View app.
It's hard to see where things are going wrong for you without seeing your actual configuration. But here's what works for me:
1) Upload the font files to the project. I'm using OpenType fonts, and they seem to work fine.
2) Add @font-face specifications to the top of your Application CSS file. These can be a little tricky, make sure to get the parameters right, especially the src property and all its components:
@font-face {font-family: 'Montserrat'; font-style: normal; font-weight: 400; src: local('Montserrat Regular'), local('Montserrat-Regular'), url(#{$resources}/Uploaded/Montserrat-Regular.otf) format('opentype');}
@font-face {font-family: 'Montserrat'; font-style: normal; font-weight: 500; src: local('Montserrat Medium'), local('Montserrat-Medium'), url(#{$resources}/Uploaded/Montserrat-Medium.otf) format('opentype');}
@font-face {font-family: 'Montserrat'; font-style: normal; font-weight: 700; src: local('Montserrat Bold'), local('Montserrat-Bold'), url(#{$resources}/Uploaded/Montserrat-Bold.otf) format('opentype');}
3) Reference the font files in your style classes as needed
.eacfont { font-family: Montserrat, "Courier New", serif; }
The font shows up as expected in View: