Deploying Resources on a Library Module

Hello!

I've been having some trouble while using this library module. I've uploaded some fonts to it, and managed the dependencies on the other module so I could use them properly. After doing so, I've created their usage on the CSS Style Sheet, and doing so I get these errors:


Unknown Object
Object 'lato-regular.woff' used in 'ANTT_CAC_App' Style Sheet is not being deployed.


I've tried to set a deploy action for them, but it is not possible through any of the modules I've created. Can anyone help me on this?


assif_tiger wrote:

Hi Caio Polito,
Refer the solution by Eduardo :

https://www.outsystems.com/forums/discussion/26831/adding-custom-fonts/

Hi assif_tiger,

As I said, i did almost everything equally as him, but in my Library module, I can't set a deploy action as he does. Do you have any idea of what is my problem? I think it's something specific about Library modules, but I can't seem to understand what it is.

Thank you by your time, anyway :)


I would explore the "Themes"  folder. 

In the library module set the theme as "public"  and use it in the consumer module. 

that's an idea, hope this helps

Graça


P.S. If it works tell us please. Thanks in advance Graça

Maria da Graça Peixoto wrote:

I would explore the "Themes"  folder. 

In the library module set the theme as "public"  and use it in the consumer module. 

that's an idea, hope this helps

Graça


P.S. If it works tell us please. Thanks in advance Graça


Hi Graça,

Unfortunately, even when specifying the fonts on the Library Module itself, it shows this error about deploying, even though it's not possible to deploy a resource on the Library module type.

How am I supposed to use this resource if I can't deploy it? Are fonts not supposed to be on a Library module?




Can you put the font files in a place that can be accessed by the @import statement?


As referred by Eduardo as an alternative


Maria da Graça Peixoto wrote:

Can you put the font files in a place that can be accessed by the @import statement?



They're all inside the resources folder inside the module. Can the @import statement can access that place? 

Do share your sample OML.

Processing Upload...

assif_tiger wrote:

Do share your sample OML.

Here it is a sample of what i've been trying to do.


It's still showing uploading,

Meanwhile you can share a snapshot of @font-face u return

And the resource folder & file name snapshot.

assif_tiger wrote:

It's still showing uploading,

Meanwhile you can share a snapshot of @font-face u return

And the resource folder & file name snapshot.


Here it is... 

I believe this shows everything! This style sheet is a theme I created inside the library module as public, such as Graça said before! It shows this 4 errors even though its not a deployable resource.

And in your case as you are using .woff file, it wil be something like:

Considering there's a font folder under Resources.

@font-face {
font-family: 'Myriad-Pro-Semibold-Condensed';
src:url('fonts/Myriad-Pro-Semibold-Condensed.woff') format('woff');
     
font-weight: normal;
font-style: normal;
}

Make sure to setup correctly.

Polito wrote:

assif_tiger wrote:

It's still showing uploading,

Meanwhile you can share a snapshot of @font-face u return

And the resource folder & file name snapshot.


Here it is... 

I believe this shows everything! This style sheet is a theme I created inside the library module as public, such as Graça said before! It shows this 4 errors even though its not a deployable resource.

Set it to Public & 

Set Deploy action  as :

Deploy to Target Directory 

assif_tiger wrote:

Polito wrote:

assif_tiger wrote:

It's still showing uploading,

Meanwhile you can share a snapshot of @font-face u return

And the resource folder & file name snapshot.


Here it is... 

I believe this shows everything! This style sheet is a theme I created inside the library module as public, such as Graça said before! It shows this 4 errors even though its not a deployable resource.

Set Deploy action  as :


Deploy to Target Directory 


It is not possible, this is a library module, where resources cannot be deployed (this all makes zero sense in my head, since its a library module and library should comport all resources i need lol). Anyhow, I've created a temporary solution for me since I'm in a hurry, but I'm still having this problem heheheh

Solution

Ohh, Agree with you.

you cannot reference the following elements from a Library in a Traditional Web App: Blocks, Client Actions, Images, Themes, Scripts and Resources.


Good Sharing Polito.

Thanks

Solution