How do I properly embed custom font in a web app developed in App Designer?
Hi all,
I have been building a web app through App Designer on MATLAB R2023b and tried to use the custom fonts "Kanit" and "Montgomery" for my UI.
Although the custom fonts show in the app on my developer desktop after copying them to "<matlabroot>sysjavajrewin64jrelibfonts", the app shows a fallback font on a different computer through my LAN.
My question is how do I ensure that the web app also use these custom fonts on computers that do not have them installed?
I have attempted to embed an HTML block in the app UI to access the Google Font API with the following code,
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=kanit"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=montgomery">
but my Chrome browser’s console returned the following error message "Refused to load the stylesheet ‘https://fonts.googleapis.com/css?family=kanit’ because it violates the following Content Security Policy directive: "style-src ‘self’ ‘unsafe-inline’". Note that ‘style-src-elem’ was not explicitly set, so ‘style-src’ is used as a fallback."
All help would be greatly appreciated – thank you!Hi all,
I have been building a web app through App Designer on MATLAB R2023b and tried to use the custom fonts "Kanit" and "Montgomery" for my UI.
Although the custom fonts show in the app on my developer desktop after copying them to "<matlabroot>sysjavajrewin64jrelibfonts", the app shows a fallback font on a different computer through my LAN.
My question is how do I ensure that the web app also use these custom fonts on computers that do not have them installed?
I have attempted to embed an HTML block in the app UI to access the Google Font API with the following code,
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=kanit"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=montgomery">
but my Chrome browser’s console returned the following error message "Refused to load the stylesheet ‘https://fonts.googleapis.com/css?family=kanit’ because it violates the following Content Security Policy directive: "style-src ‘self’ ‘unsafe-inline’". Note that ‘style-src-elem’ was not explicitly set, so ‘style-src’ is used as a fallback."
All help would be greatly appreciated – thank you! Hi all,
I have been building a web app through App Designer on MATLAB R2023b and tried to use the custom fonts "Kanit" and "Montgomery" for my UI.
Although the custom fonts show in the app on my developer desktop after copying them to "<matlabroot>sysjavajrewin64jrelibfonts", the app shows a fallback font on a different computer through my LAN.
My question is how do I ensure that the web app also use these custom fonts on computers that do not have them installed?
I have attempted to embed an HTML block in the app UI to access the Google Font API with the following code,
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=kanit"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=montgomery">
but my Chrome browser’s console returned the following error message "Refused to load the stylesheet ‘https://fonts.googleapis.com/css?family=kanit’ because it violates the following Content Security Policy directive: "style-src ‘self’ ‘unsafe-inline’". Note that ‘style-src-elem’ was not explicitly set, so ‘style-src’ is used as a fallback."
All help would be greatly appreciated – thank you! web app, appdesigner, app designer, font MATLAB Answers — New Questions