Fallback fonts

This forum is for discussions on the Help & Manual Premium Pack and the Premium Pack Toolbox configuration utility introduced with Premium Pack 3

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

Fallback fonts

Unread post by Olivier Beltrami »

Hi Tim,

A couple of months ago you showed me how to modify my very old (ca. 2002) skin so that my code samples would display using Consolas, if it was installed, but, if not, would use more default fonts.

Code: Select all

         <style type="text/css">
                span.f_CodeExample /* Code Example */
                {
                font-family: Consolas, "Courier New", Courier;
                }
                span.f_CourierNew /* Courier New */
                {
                font-family: Consolas, "Courier New", Courier;
                }
         </style>
But now that I have moved to the Flat_Blue_Diamond_WebHelp.hmskin I cannot see where to make the same modification.

I see that the definition of my f_CodeExample style is now present in the file hmprojectstyles.css but that file seems to be generated on-the-fly. I guess I could patch that file at the last minute before uploading it, but there is probably an easier solution ?

Very best regards,

Olivier
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Fallback fonts

Unread post by Tim Green »

Hi Olivier,

This is really a Help+Manual issue rather than a skin issue, because the hmprojectstyles.css CSS file for the content is generated from the style list in your project by Help+Manual and only loaded by the skin, and defining the styles in Help+Manual doesn't yet provide for font families with fallbacks. They are generated automatically for some known fonts, but the list is quite limited.

For the user interface in the skin you can edit the font families used directly in the Main Layout Fonts variables group, but if you want to create fallbacks for the individual styles in your project you need to dig a little deeper and add your style modifications to the main page stylesheet of the skin. There are three versions, one each for desktop, tablet and phone mode:

hmwebhelp_main_desktop.css
hmwebhelp_main_tablet.css
hmwebhelp_main_phone.css


I would recommend adding your styles either at the very end of each file, after the very last } character, or before the /* Hyperlink colors and behaviors */ section, taking great care not to touch or go inside any } characters. Doing that, or deleting one of those characters, would cause major errors... :?
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Olivier Beltrami
Posts: 393
Joined: Mon Jul 15, 2002 3:30 pm
Location: Nantes, France
Contact:

Re: Fallback fonts

Unread post by Olivier Beltrami »

Thank you, Tim.

I think that I will just patch the hmprojectstyles.css file at the last minute, just before uploading it.

I'll just need to replace occurrences of:

font-family: Consolas;

with

font-family: Consolas, "Courier New", Courier;

Very best regards,

Olivier
Olivier Beltrami
https://www.qppstudio.net
Worldwide Public Holidays and Calendar Data
Post Reply