Fonts imported into Confluence server (linux) does not work properly
Asked by Sridevi:

Hello,

I have imported two new fonts into confluence. Used the @font-face to call them:

@font-face {  
src: url(file:///data/confluence/fonts/verdana.TTF);  
-fs-pdf-font-embed: embed;  
}

@font-face {  
src: url(file:///data/confluence/fonts/arial.TTF);  
-fs-pdf-font-embed: embed;  
}

but i ended up with error.

Does anyone have idea on this issue.


Answers:
author: Sridevi
body: Hi Jing,

I tried another one and found to be working well.

Attached the font to space and applied:

@font-face {  
src: url([](https://halodev.secude.local:8493/download/attachments/5572785/verdana.ttf)<https://halodev.secude.local:8493/download/attachments/5572785/verdana.ttf>);  
-fs-pdf-font-embed: embed;  
}

@font-face {  
src: url([](https://halodev.secude.local:8493/download/attachments/5572785/arial.ttf)<https://halodev.secude.local:8493/download/attachments/5572785/arial.ttf>);  
-fs-pdf-font-embed: embed;  
}

Thanks,

Sridevi


author: Sridevi
body: Hi Jing,

I tried another method. This one, works well. Thanks for your support till now.

Attached the font files to space and applied the following CSS

@font-face {

src: url(https://halodev.secude.local:8493/download/attachments/5572785/verdana.ttf);

-fs-pdf-font-embed: embed;

}

@font-face {

src: url(https://halodev.secude.local:8493/download/attachments/5572785/arial.ttf);

-fs-pdf-font-embed: embed;

}

Thanks Sridevi


author: jing_hwa_cheok
body: Hi Sridevi,

Is the location specify in **src: url(file:///data/confluence/fonts/arial.TTF);** is the correct absolute path to your font?

If you specify a incorrect font location in PDF export sytlesheet, you will encounter the following error.  
![](../../upfiles/sample_4.png)

As I can see the path that you specify in the **src: url(file:///data/confluence/fonts/arial.TTF);** is not the absolute path to the file. You can identify your file absolute path from Right Click \>\> Properties \>\>Location.

<br />

Kind Regards,

Jing Hwa

comments: author: Sridevi
body: Hi Jing,![](../../upfiles/My_Conf_1.jpg)

Please see the attachement of my location.

Do correct me if my pat is still wrong. Its is LINUX machine.

thanks

sridevi


author: jing_hwa_cheok
body: Does the user that runs the Confluence have sufficient permission to the fonts folder? Do you mind to move the fonts to another location for example the \<confluence-home\>/directory?


author: Sridevi
body: yes, My rights are...

![](../../upfiles/My_permission.jpg)

ok, i will move those to \<confluence-home\>/directory and verify.


author: jing_hwa_cheok
body: The font folder/directory that I mentioned is "**data/confluence/fonts" .**Run the following in the folder to check the permission.

```
ls -al
```

Make sure the user which are running the confluence have sufficient permission in the font folder/directory.

<br />

Run the following to see the user which are currently running the Confluence.

```
ps -aux| grep confluence
```


author: Sridevi
body: To your Previous question:

I must place the two font files into confluence-Home directory?

Example, this is the home dirrectory in Windows,

"C:\\Program Files\\Atlassian\\Confluence"


author: Sridevi
body: Here is the results:

root@uxlu0312:/data/confluence/fonts# **ls -al**

total 940

drwxr-xr-x 2 confluence confluence 4096 Dec 10 10:10 .

drwxr-xr-x 3 confluence confluence 4096 Dec 10 10:00 ..

-rw-r--r-- 1 confluence confluence 778552 Dec 10 10:01 arial.ttf

-rw-r--r-- 1 confluence confluence 171792 Dec 10 10:01 verdana.ttf

root@uxlu0312:/data/confluence/fonts# **ps -aux\| grep confluence**

warning: bad ps syntax, perhaps a bogus '-'?

See [](http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ)<http://gitorious.org/procps/procps/blobs/master/Documentation/FAQ>

postgres 22165 0.0 0.1 102616 6488 ? Ss 08:46 0:00 postgres: confluence confluence 127.0.0.1(37396) idle

postgres 22246 0.0 0.1 102084 6140 ? Ss 08:50 0:00 postgres: confluence confluence 127.0.0.1(37411) idle

postgres 22260 0.0 0.0 102032 5844 ? Ss 08:51 0:00 postgres: confluence confluence 127.0.0.1(37412) idle

postgres 22268 0.0 0.0 102032 5844 ? Ss 08:52 0:00 postgres: confluence confluence 127.0.0.1(37428) idle

postgres 22274 0.0 0.0 101716 3820 ? Ss 08:54 0:00 postgres: confluence confluence 127.0.0.1(37429) idle

postgres 22275 0.0 0.0 101716 3572 ? Ss 08:54 0:00 postgres: confluence confluence 127.0.0.1(37430) idle

postgres 22276 0.0 0.0 101720 3568 ? Ss 08:54 0:00 postgres: confluence confluence 127.0.0.1(37431) idle

postgres 22277 0.0 0.0 101720 3812 ? Ss 08:54 0:00 postgres: confluence confluence 127.0.0.1(37432) idle

root 22290 0.0 0.0 7828 848 pts/0 S+ 08:54 0:00 grep confluence

1001 30819 1.4 17.5 1459428 1078716 ? Sl 2013 2128:07 /opt/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Xms256m -Xmx512m -XX:MaxPermSize=256m -Djava.awt.headless=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/atlassian/confluence/endorsed -classpath /opt/atlassian/confluence/bin/bootstrap.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start


author: jing_hwa_cheok
body: Hi Sridevi,

Since Confluence should have permission to its home directory therefore moving the font to the home directory will rule out the possibility that this is related to permission.


Tags: font