I'm having problems trying to add a downloaded font type to resource in Outsystems ODC , since it doesn't create a path like in react to add to the theme .
I need help.
Hi Felipe,
Libraries in ODC don't have runtime path, so your src it's not right.
Try:
@font-face {
font-family: 'Poppins', sans-serif;
src: url('/MTS_Theme/Poppins-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
The scr must be: "/{name_of_the_library}/{name_of_the_file}" it doesn't matter the folders you create.
Cheers!
Hello!! Try not including the 'resources' and the folder 'FontsMTS', for example:
src: url('/MTS_Theme/Poppins-Regular.woff2') format('woff2')
I believe the 'resources' and the folders inside don't need to be mentioned in the url, just the module name and the font file name.
See if that way works.
Hi,
I explain how to override that problem with JS in the follow article:
https://itnext.io/how-to-import-a-text-font-into-a-library-in-outsystems-odc-b6aff4f9b450
I believe that the problem is not to be in ODC, but because you are trying that in a Library.
Hope this can help.
Best regards,
Ricardo
Eso es lo que se supone que debe hacer la biblioteca: definir un tema, sus fuentes, paleta de colores, etc. Previously, sources could be defined as resources in Reactive, but now I don't know what to call them. I saw your article but I didn't really understand it.
You don't need JS to do this.
You can keep it simple, with the URL in the theme, even in the ODC library.
src: url('"/{name_of_the_library}/{name_of_the_file}".woff2') format('woff2');
@Felipe Guerra : Here is what I have done to make it work
So in your theme replace the existing path with ../ i.e url('../Poppins-Regular,woff2') and see it works for you.