Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence font weight

Jesús Jorge Muñoz April 2, 2018

Hello there,

I am facing a problem trying to use custom fonts while exporting Confluence pages to PDF.

In my documents, I use Facit font family. This font family, as many other, has multiple levels of weight (Regular, Semibold, Bold, Extrabold, Light and Extralight), as well as these levels in italic style. I attached them to an auxiliary file, and referenced them in PDF export stylesheet when using @font-face at rule.

But for some reason, when exporting to PDF, only 4 levels seem to be working:

- Regular

- Regular Italic

- Bold

- Bold Italic

I tried to change the font-weight property of the document body to all possible CSS values and nothing seems to change.


I am asking this question to know if Confluence does not accept other levels of weight than those I've mentioned, or if there is some mistake in my stylesheet CSS code.

Kind regards,

Jesús

1 answer

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2018

Hi Jesús,

Have you uploaded the custom font to Confluence as described in: Create a PDF in Another Language?  Please note: 

To make use of an installed font in your PDF Export style sheet (CSS) refer to it by the font-family ConfluenceInstalledFont.

I look forward to hearing more about how you installed the font and applied it to your PDF stylesheet.

Thanks,

Ann

Jesús Jorge Muñoz April 3, 2018

Hi Ann,

Thanks for your quick reply!

I have not installed the fonts with the method described in the link you provided. Instead, I've done the following steps:

1. Go to Space Settings > Look and Feel > PDF Stylesheet

2. Edit PDF Export Stylesheet

3. Paste this CSS code in it, one time per each font file that I have in the instance:


@font-face { 
font-family: Facit;
src: url(https://my-instance.atlassian.net/wiki/download/attachments/resource-page-ID/font-file.otf);
-fs-pdf-font-embed: embed;

 Where font-file.otf is substituted by the following font files:

Facit-Bold.otf

Facit-BoldItalic.otf

Facit-Extrabold.otf

Facit-ExtraboldItalic.otf

Facit-Extralight.otf

Facit-ExtralightItalic.otf

Facit-Light.otf

Facit-LightItalic.otf

Facit-Regular.otf

Facit-RegularItalic.otf

Facit-Semibold.otf

Facit-SemiboldItalic.otf

4. Specify by CSS code that the body will use this font-family:


body{
font-family: Facit;
}

 

I've also tried to specify the font weight when defining the font-face rules, like this:

 

@font-face { 
font-family: Facit;
src: url(https://my-instance.atlassian.net/wiki/download/attachments/resource-page-ID/Facit-Extrabold.otf);
font-weight: bolder;
-fs-pdf-font-embed: embed;

 But it doesn't seem to have any impact while exporting to PDF. I keep getting only the four fonts that I've mentioned in the previous post, but nothing with all the others.

Regards,

Jesús

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events