Fonts are sans-serif when I've specified serif

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
robync
Jr. Propeller Head
Posts: 9
Joined: Fri Apr 22, 2016 2:50 pm

Fonts are sans-serif when I've specified serif

Post by robync »

Hello,

I'm working in Flare 12, creating styles for the print medium (PDF output).

Some fonts are appearing in sans-serif even though the style sheet specifies serif. Specifically, the mini TOCs at the beginning of each "chapter" and the Glossary definitions are sans-serif instead of serif.

For the MiniTOC, I've set the following styles to serif:
- MadCap | miniTocProxy
- p.MiniTOC1

For the Glossary, I've set the following styles to serif:
- div.GlossaryPageDefinition
- div.GlossaryPageEntry

I'm sure I'm in the print medium CSS mode.

Thanks for any help you can provide.

~Robyn
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Fonts are sans-serif when I've specified serif

Post by SteveS »

The print media is primarily for pages printed from a web output.

You need to set-up styles in your default spreadsheet and use conditional tag to assign styles to different output or create a different stylesheet for your pdf and apply it to that output.

HTH
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
robync
Jr. Propeller Head
Posts: 9
Joined: Fri Apr 22, 2016 2:50 pm

Re: Fonts are sans-serif when I've specified serif

Post by robync »

Glossary terms aren't on any page in the web media. There's nothing to conditionalize.
Likewise, the MiniTOC proxy entries can't be conditionalized either.

The whole point of the stylesheet is to format the same content differently in different outputs. It makes no sense that I would have to conditionalize output at all.
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Fonts are sans-serif when I've specified serif

Post by SteveS »

Yes, you are correct, but the print media part of a stylesheet relates to printing from the resource using the stylesheet. For example, if someone is viewing webhelp and uses the browser's print command.

Your stylesheet is a transition description used in single sourcing. By changing the stylesheet you can change the output without altering your source. If you are creating a different form of output and want to use different styling elements you either have to use another stylesheet, or include all the styles in a single sheet and tell the translation engine (via conditions) which style you want to use.

A third alternative is to use two stylesheets, with the second overriding (via the cascade) the styles that are different.

I'm just pointing out the print media can be a trap for young players...

...including us greybeards who have been caught before and get caught again :wink:
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
MattyQ
Sr. Propeller Head
Posts: 136
Joined: Tue Sep 30, 2014 7:10 am
Location: Roanoke, VA

Re: Fonts are sans-serif when I've specified serif

Post by MattyQ »

robync wrote:The whole point of the stylesheet is to format the same content differently in different outputs. It makes no sense that I would have to conditionalize output at all.
I can't really speak to the "conditionalizing" bit, Robyn, I've never had to do that and we manage pretty complex print and general styles from a single stylesheet.

Out of curiosity, in your PDF target, on the Advanced tab, do you have the medium set to print? I believe that's what it defaults to, but it may be a good starting place.

Also, if it's possible, it may help to share some of the actual CSS. It could be that the expected syntax is incorrect, or that possibly the font you want is being overridden by another selector, among myriad possibilities.
SteveS wrote:...include all the styles in a single sheet and tell the translation engine (via conditions) which style you want to use.
Steve, sorry, for my own edification, can you clarify what you mean by "conditions"? Do you mean actual Flare condition tags, or do you mean various @media query definitions?
SteveS
Senior Propellus Maximus
Posts: 2090
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Fonts are sans-serif when I've specified serif

Post by SteveS »

Yeah, talking about Flare conditions.

In the last job our print and online versions were much the same, only headings were different.

So I'd put each heading in twice, one conditioned for print, the other for online. In that case it was the best alternative, but one good thing about single sourcing is there are a variety of options depending on what you are doing...
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
MattyQ
Sr. Propeller Head
Posts: 136
Joined: Tue Sep 30, 2014 7:10 am
Location: Roanoke, VA

Re: Fonts are sans-serif when I've specified serif

Post by MattyQ »

SteveS wrote:So I'd put each heading in twice, one conditioned for print, the other for online. In that case it was the best alternative, but one good thing about single sourcing is there are a variety of options depending on what you are doing...
I see now! Thanks very much, Steve, I misunderstood. That makes a lot of sense.
Post Reply