ROES Web - Fonts: Hosting a Font on Your Website





 **If you already own a font, use Font Squirel to Generate css and convert that font to a webfont: **

1. Add the font file to your website or server (England Signature.ttf).  Font format may be either True Type (ttf) or Web Open Font Format (woff/woff2).  

2. Record the url to the font ( Signature.ttf).

3. Create a .css file that contains the source url to the font and the format type (England Signature.css); format values ('truetype', 'embedded-opentype', 'woff', 'woff2').

*Add a @font-face section to the css file for each font-weight and font-style you want to support*


@font-face {
  font-family: 'England Signature';
  src: url(' Signature.ttf') format('truetype'),
   url(' Signature.woff') format('woff');
   url(' Signature.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;


4. Upload the modified CSS file to your website or server.

5. Add an @import statement to the ROES Web Client overriding CSS file (@import url(' Signature.css?family=England Signature');), save and upload.

6. Open Chrome, go to your ROES Web Client, right click on the page and choose 'Inspect'.

7. Clear the web cache and select 'Sources' from the top task bar then find the cloud icon that has your website URL.

8. Expand that section and drill down to the website you stored the font and the CSS files

9. Verify the 'font' folder exists.


*Any font you add to the ROES Web Client must be installed on the computer(s) running the ROES Server.  Render a template that uses the font in text to verify the added font supports BOLD or ITALICS.  Verify the font displays in ROES Web exactly as it is rendered in ROES Server.  If there is a mismatch, you may not be able to use the font*


Be sure your web server is set to allow access to fonts being served and satifies CORS (Cross Origin Resource Sharing).  This may require a change  in the .htaccess file and/or the MIMETypes.


<CORSConfiguration xmlns="">

.htaccess FILE


Modify your htaccess file.  Usually found in your website root directory (i.e. Your public_html ".htaccess" file)

# Apache config limits to font file type extensions

<FilesMatch ".(eot|ttf|otf|woff)">
Header set Access-Control-Allow-Origin "*"


# Adds more file type extensions (css and js)

<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"


# Limits sharing to one website

<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"


# Sharing for multiple websites (Also checks to see if mod_headers module is enabled on Apache)

<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
SetEnvIf Origin "http(s)?://(www\.)?(||$" AccessControlAllowOrigin=$0
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin




To ensure the header is set properly, you can check using the curl utility:

$ curl -I

$ curl -I


$ curl -I Signature.ttf

$ curl -I Signature.css


$ curl -I

# Result

HTTP/1.1 200 OK
Date: Wed, 08 Jul 2020 16:34:04 GMT
Server: Apache
Last-Modified: Wed, 08 Jul 2020 11:06:44 GMT
Accept-Ranges: bytes
Content-Length: 78656
Vary: Accept-Encoding,User-Agent
Access-Control-Allow-Origin: *
Content-Type: font/ttf




A more specific result that only shows what we are interested in

$ curl -s -I | grep -i "access-control-allow-origin"

# Result

Access-Control-Allow-Origin: *

In either check, if you see Access-Control-Allow-Origin: * in the response, you're golden!



To set mime-types for font files, add one or more of these lines to config:

AddType application/    .eot
AddType application/x-font-opentype      .otf
AddType image/svg+xml                    .svg
AddType application/x-font-ttf           .ttf
AddType application/font-woff            .woff
AddType application/font-woff2           .woff2


Article Details

Article ID: