Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence, add custom font file to use in space stylesheet ?

Xarkam October 3, 2014

Hello, i look for adding a custom ttf file in confluence installation folder to using in custom space stylesheet.

How to make this ?

Thanks.

 

Edit: in addition, look the error in my firefox console:

downloadable font: download not allowed (font-family: "adventPro-light" style:normal weight:normal stretch:normal src index:0): bad URI or cross-site access not allowed
source: file:///var/www/font/AdventPro-Light.ttf

3 answers

1 accepted

2 votes
Answer accepted
Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2014

Hello Benjamin,

I created a subfolder in /opt/atlassian/confluence/confluence on our Confluence server and put all font files into it.
I can access the fonts from the space stylesheet using e.g.:

@font-face { font-family: 'DINMittelEF-Regular';  
             src: url('/e2e/webfonts/15C78A_0.eot');  
             src: url('/e2e/webfonts/15C78A_0.eot?#iefix') format('embedded-opentype'),  
                  url('/e2e/webfonts/15C78A_0.woff') format('woff'),  
                  url('/e2e/webfonts/15C78A_0.ttf') format('truetype'),  
                  url('/e2e/webfonts/15C78A_0.svg#wf')format('svg'); }

(where e2e/webfonts is the folder I created).

Note, that these files will be gone after a Confluence update. So you'll have to keep a copy of the folder.

Cheers,
Kirstin

Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2014

After I'd posted this, I thought, that you probably could put the fonts outside the Confluence folder, so that they won't be deleted on every update.

0 votes
Xarkam October 5, 2014

Hello,

I make font folder in /sites/atlassian/confluence/confluence/font and I put my font in the folder.

After I edited the css for changing my definition to :

@font-face {
  font-family   : "adventPro-light";
  src: url('./font/AdventPro-Light.ttf') format('truetype');
  font-style    : normal;

}

But, y recive a 404 error

GET http://confluence.osames.org/s/en_GB/5636/f6090886cde2ced165289cd3fade6c9622e18372.4/44/_/styles/font/AdventPro-Light.ttf 404

Content of my fonts folder:

/sites/atlassian/confluence/confluence/font# ll
total 360K
drwxrwx---  2 root root 4.0K Oct  6 11:20 ./
drwxr-xr-x 26 root root 4.0K Oct  6 11:20 ../
-rw-rw-r--  1 root root  56K May 20 23:35 AdventPro-Bold.ttf
-rw-rw-r--  1 root root  46K May 20 23:35 AdventPro-ExtraLight.ttf
-rw-rw-r--  1 root root  46K May 20 23:35 AdventPro-Light.ttf
-rw-rw-r--  1 root root  51K May 20 23:35 AdventPro-Medium.ttf
-rw-rw-r--  1 root root  47K May 20 23:35 AdventPro-Regular.ttf
-rw-rw-r--  1 root root  50K May 20 23:35 AdventPro-SemiBold.ttf
-rw-rw-r--  1 root root  46K May 20 23:35 AdventPro-Thin.ttf
 

 

Kirstin Seidel-Gebert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2014

404 means "not found". Try /font/AdventPro-Light.ttf as src path (leaving out the dot).

Xarkam October 5, 2014

Ok, not using ./ just /

0 votes
Accounting Go2Group October 4, 2014

You can't just call a file using the file protocol from a browser. You actually need to host the file.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, knowledge sharing, intentional knowledge sharing playbook, loom, confluence, team collaboration, knowledge management, workplace productivity, information silos, documentation best practices, internal communication, knowledge sharing strategies

Conquer collaboration chaos with Loom + Confluence

You don't need more tools. You need tools that actually work together – the way humans do. See how Loom + Confluence help teams collaborate with more context, more connection, and fewer calendar invites. 💪

See inside
AUG Leaders

Atlassian Community Events