Recent

Author Topic: How to change the offline help (LHelp) font family and font size ?  (Read 3149 times)

jack6th

  • Newbie
  • Posts: 1
On Windows LHelp use the roman font and the font size looks small. 
I tried to increase the font size with Ctrl+Wheel.  But it not work.
I cannot find any css file in the lazarus/components/chmhelp/lhelp.
How to customize the font family and font size ?

wp

  • Hero Member
  • *****
  • Posts: 9171
Re: How to change the offline help (LHelp) font family and font size ?
« Reply #1 on: December 08, 2021, 11:54:34 am »
The IpHtmlPanel has properties DefaultTypeFace and DefaultFontSize for the standard font. However, these are only used when no other font information is available in the html document or css file.

You could edit the css file of the Lazarus/fpc help system and you could rebuild to help files... Not good, I know...

Simpler, since you seem to be on Windows: Just use the built-in chm viewer of Windows to display the help files. Follow the instructions on https://wiki.freepascal.org/Installing_Help_in_the_IDE#Installing_CHM_help_.28Lazarus_1.0_and_later.29:

Quote
If you are on Windows you can also use the Windows-internal help viewer:
  *  "HelpExe" should be hh.exe
  *  "HelpExeParams" must be "%s::%s" (WITH QUOTES, note the double colon).

On Linux you could install one of the chm viewers available and try to set up Lazarus help for it similarly. I did not try it myself, but I am rather sure that it should work, too. (If you find a solution for this idea report it so that the wiki can be updated).
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

dsiders

  • Hero Member
  • *****
  • Posts: 563
Re: How to change the offline help (LHelp) font family and font size ?
« Reply #2 on: December 08, 2021, 03:33:31 pm »
On Windows LHelp use the roman font and the font size looks small. 
I tried to increase the font size with Ctrl+Wheel.  But it not work.
I cannot find any css file in the lazarus/components/chmhelp/lhelp.
How to customize the font family and font size ?

In addition to what @wp posted:

The font family can only be changed when the CHM file is built. It is compiled into the CHM file. The CSS file is located at docs/html/fpdoc.css.
Lazarus 2.0.12, 2.2.0, 2.3.0 (Git) / FPC 3.2.0, 3.2.2 / x86 64-bit / Windows 8.1

 

TinyPortal © 2005-2018