Hello!
I am looking for some help on adding a new font to my PDF export. I have found a very helpful page on this so I know it can be done!
Advanced PDF Export Customisations
In the Incorporating Other Fonts section it seems to describe exactly what I want to do. However I have to supply a font path that is on the Confluence server. Because I am using Confluence OnDemand, how can I find out what that path might be? And what fonts are available?
Many thanks in advance for any help you can provide,
Helen
Hi Helen,
can you upload an attachement with OnDemand ?
If so, this is what I do:
@font
-face {
src: url(URL_of_the_font_file/
name_of_the_file.ttf);
-fs-pdf-font-embed: embed;
}
font-family: Name of the font*;
* The last part, finding the right name of this new font, is tricky. I think that very often my fonts didn't show because the name of the font is not exactly the same as the name of the file. I think the best guess is to double click the file and search for "Font name: abcxyz" and copy this "abcxyz".
Thanks Steffen! I seem to have it working... I am using Cambria and have attached the bold version of the font to the page. I'm not sure how I'd go about using the italic or normal versions though. I tried attaching the Cambria.ttc (font collection) file to the page, but it didn't seem to work. Might try again though... Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is something I haven't understood either. When I search for Cambria I find four different files for bold, bold italic, italic and regular but the "Font name" for all of them is the same, just "Cambria". So I don't know how you can attach the different versions.
Perhaps upload all of them and still try with a name that includes the version:
src: url(URL_of_the_font_file/
Cambria regular.ttf);
src: url(URL_of_the_font_file/Cambria italic.ttf);
Or try to use them with
p {
font-family: Cambria;
font-weight: bold;
font-style: italic;
}
I can also only try.
Perhaps you find a solution when you search for "@font-face bold italic regular"...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have it working like this:
@font-face
{
font-family: Cambria;
src: url(//wiki/download/attachments/40698001/cambriab.ttf);
font-weight:bold;
}
@font-face
{
font-family: Cambria;
src: url(//wiki/download/attachments/40698001/cambriai.ttf);
font-style:italic;
}
@font-face
{
font-family: Cambria;
src: url(//wiki/download/attachments/40698001/cambriaz.ttf);
font-weight:bold;
font-style:italic;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Brilliant - I have been messing around with this for ages - finally this post helped!
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Indeed it works. Just keep in mind that the comment of @Steffen Heller is real.
The last part, finding the right name of this new font, is tricky.
I think that very often my fonts didn't show
because the name of the font is not exactly the same as the name of the file.
I think the best guess is to double click the file and search for "Font name: abcxyz" and copy this "abcxyz".
I ran into the same issue for Open Sans font.
@font-face { font-family: OpenSans; font-weight: 800; src: url(//wiki/download/attachments/1000223/OpenSans-ExtraBold.ttf); -fs-pdf-font-embed: embed; }
Wasnt working as the use case of @Helen Griffith.
I had to apply the technic listed by @Steffen Heller. Open the font file and copy paste the original name of the font.
@font-face { font-family: 'Open Sans Extrabold'; font-weight: 800; src: url(//wiki/download/attachments/1000223/OpenSans-ExtraBold.ttf); -fs-pdf-font-embed: embed; }
And it now works perfectly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Helen Griffith , @matt chick , @Thomas Henrion ,
Howdy, is this still working for all of you?
It suddenly stopped working for me on Tuesday 5/19 in the afternoon (Eastern). I was working on a document and making multiple exports of it that day. They looked perfect on Tuesday morning, but by the evening several of my customizations (including the font) had stopped working. There were no changes to the PDF Stylsheet and it affects all docs, even those that had not been edited for months.
More details here with the couple of other issues I noticed: https://community.atlassian.com/t5/Confluence-Cloud-discussions/PDF-export-looks-different-no-changes-to-PDF-Stylesheet/td-p/1385072
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jawann I've just checked on an old space I know we exported several times, and the styling still occurs. It might look like the font is not as neat/sharp as we would have accept before, but I cannot confirm.
Good luck !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jawann
Gosh, this is going back a long long way in time! I cannot confirm either way if it works. I'd say it's possible that it's broken along with so much else in Confluence Cloud lately! Maybe the PDF stylesheet is not compatible with the new editor even if the pages use the legacy editor?... I am not sure I can help at the moment but I can have a look if my work calms down soon.
Helen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the replies @Thomas Henrion and @Helen Griffith. My admin heard back from support today and apparently there was an issue on their side. They will be deploying a fix "to our instance," so it sounds like probably not a universal issue.
Thanks again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How to change the font family toverdana in exported datatable pdf ?? Please anyone can help me out ???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How to change the font family to verdana in exported datatable pdf ?? Please anyone can help me out ???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Confluence OnDemand can only store one font file/collection (*.ttf and *.ttc). You must ask the support to install the desired font for you. Be carefull about the desired font supporting bold, italics and all the required symbols used in confluence.
In my case I wanted DejaVu Font to be my default font. We had a lot of troubles to have all versions packaged in a collection (to show italic, bold and all symbols) but some engineers at Atlassian managed to do it (with FontForge).
So, no workaround. ask the support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks boogaloob—as per my comment to Steffen's response, I kind of have it working. It will probably do for now as the PDF export isn't a regular requirement—I hope!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.