Custom font for NG Client forms

Forum to discuss the new web client version of Servoy.

Custom font for NG Client forms

Postby roddy » Mon Jul 12, 2021 4:03 am

I've been looking through docs and posts on this topic and it seems to indicate that to use a custom font in Servoy, it needs to be installed on the client's machine. Is this the expected case? It seems very unrealistic.

Can we used web-based fonts or use a font stored in the server's module Media location?
roddy
 
Posts: 65
Joined: Mon Oct 26, 2020 12:32 am

Re: Custom font for NG Client forms

Postby roddy » Mon Jul 12, 2021 6:34 am

For anyone else looking at this, a font (we are using .otf) can be copied to the Media section of the project. If you have multiple modules, it has to be in the first module that is loaded (from our testing).

If you are using NG Client and you drag and drop the file from Media to your .less file, then it will include the media:/// in the url() which must be removed for it to work.

Add this to the CSS over-ride file; for the example we are using Proxima Nova:
Code: Select all
@font-face {
    font-family: ProximaNova;
    src: url(ProximaNova-Regular.otf);
}

@font-family: "ProximaNova";
roddy
 
Posts: 65
Joined: Mon Oct 26, 2020 12:32 am


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 2 guests