Other font for Code example

Nothing is perfect! This is where you can post your ideas and wishes for functions you'd like to see in Help & Manual. Current version only please (H&M7).

Moderators: Alexander Halser, Tim Green

Post Reply
RuudOverdijk
Posts: 4
Joined: Fri May 19, 2017 1:10 pm

Other font for Code example

Unread post by RuudOverdijk »

I tried to get fancier XML code examples in my PDF manual by changing the default Courier font to another non-proportional font (Consolas), but found out that this is impossible when I want to use the Syntax Highlighter (which is very useful). The Syntax Highlighter uses the default style "Code Example" and that cannot be changed. There is a button Edit style but nothing can be changed to this default style. So my wish is:
Either make default styles editable so I can choose another font for my code exapmples or make it possible to choose another style in the syntax highlighter.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Other font for Code example

Unread post by Tim Green »

Hi Ruud,
The Syntax Highlighter uses the default style "Code Example" and that cannot be changed. There is a button Edit style but nothing can be changed to this default style.
You can change the font of Code Example to anything you like. Just select it in Edit Styles, then select its font settings and choose the font. Note, however, whether the user actually sees the font often depends on whether they have it installed on their system. If you are publishing to WebHelp you can only use fonts that are supported by the browser the user is using. In PDF the font must either be installed on the user's system or embedded in the PDF (observer licensing restrictions for the fonts when you do this!). See here for details on font embedding in PDF:

http://www.helpandmanual.com/help/index ... dfonts.htm
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.
RuudOverdijk
Posts: 4
Joined: Fri May 19, 2017 1:10 pm

Re: Other font for Code example

Unread post by RuudOverdijk »

Hi Tim,
Thanks for your answer. Unfortunately I already tried that, but looking at it again I realized my styles were locked. So searching for locked styles brought me to another question in this forum which contained the solution: I used a style repository so I had to change the style in the repository project. So now everything is as I want it.
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Other font for Code example

Unread post by Tim Green »

Yes, when you use a style repository with linked styles you need to edit the styles in the repository. That is necessary, otherwise you wouldn't get the same style settings in all projects linked to the repository. The only exception to that is if you copy the styles from the repository instead of linking them. But then the repository styles are not dynamic -- it is just a one-off copy and after that they are basically normal project styles.
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.
Post Reply