Header Fonts and String Function

jmorales
Posts: 40
Joined: Tue Oct 30, 2018 9:47 pm

Header Fonts and String Function

Post by jmorales » Wed Oct 16, 2019 3:23 am

Hi,
I'm trying to set up the headers for PDF output. I'm using <oXygen/> XML Author 21.1, build 2019090904. When I try to specify font-family or font-size for the header, these properties are ignored. Only the font-weight is honored.

@page :left {
@top-left {
content: "Some Sample Text";
font-family: roman, 'times new roman', times, serif;
font-size: 6pt;
font-weight: normal;
}
}

@page :right {
@top-right {
content: "Some Sample Text";
font-family: arial, helvetica, sans-serif;
font-size: 26pt;
font-weight: bold;
}
}

Am I doing something wrong? If this is a bug, is there a workaround?

Thanks!

Dan
Posts: 428
Joined: Mon Feb 03, 2003 10:56 am

Re: Header Fonts and String Function

Post by Dan » Wed Oct 16, 2019 3:53 pm

Are you using a publishing template (selected in the first page of the DITA transformation scenrio dialog)? Probably the CSS rules from it are more specific.

You can use more specific selectors like:

Code: Select all

@page :left, chapter:left, chapter:first:left { .. }
Or you can use the !important specifier:

Code: Select all

font-family: roman, 'times new roman', times, serif !important;
Regards,
Dan

jmorales
Posts: 40
Joined: Tue Oct 30, 2018 9:47 pm

Re: Header Fonts and String Function

Post by jmorales » Thu Oct 17, 2019 2:32 am

Thanks, Dan! I used @page chapter-left as the selector, and this time the font properties were honored.

Post Reply