posted April 10, 2005 05:08 PM
Hi all,I know that some of you also use Shalom Help Maker (SHM), the freeware help authoring program to create WinHelp help files.
It is a great program, lacking only one feature: the ability to use different fonts in one project (help file).
There is a way to get around this limitation by directly using RTF control codes in the SHM source text.
SHM has a macro-like feature called 'snippets'. They allow you to insert multiple characters in the text by a single mouse click. Using these snippets to insert the RTF control codes makes using different fonts pretty painless.
(1) Preparation of SHM
- The snippets file below defines some snippets to use different fonts in SHM.
Store the file in the SHM 'snippets' directory under the name "snippets.4".
If there is already a file with that name, you can merge the 2 files. Modify the snippet indexes! - (Re)start SHM.
- You will notice that the 4th snippets button is now called "4: Fonts". Clicking this button shows a popup menu where you now see menu items for 4 fonts, 2 font sizes and font table
This is the file "snippets.4":
##v##00.5.20
Fonts
6
##snippet0####################
&Verdana
##0start##
{\f2
##0end##
}
##snippet1####################
&Times New Roman
##1start##
{\f3
##1end##
}
##snippet2####################
&Arial
##2start##
{\f4
##2end##
}
##snippet3####################
&Courier New
##3start##
{\f5
##3end##
}
##snippet4####################
Font size 16
##4start##
{\fs16
##4end##
}
##snippet5####################
Font size 20
##5start##
{\fs20
##5end##
}
##snippet6####################
&Font table
##6start##
{\fonttbl
{\f2\fdecor Verdana;}
{\f3\froman Times New Roman;}
{\f4\fswiss Arial;}
{\f5\froman Courier New;}
}
##6end##
(2) Using different fonts in your project
- Go to the top of page 1 in your project and insert the font table: "4: Fonts / Font table".
- Select some text and set a font. Click for example "4: Fonts / Courier New". Only the selected text will have this font. The font will only show when you compile the entire project. When you only view the current page, the font will not show because the font table is located on page 1.
- The default project font is now set to the first font in the font table. The project font set in "Project options" will be overruled, except for the Projects Front Page. The font size, set in "Project options" will be used.
- Change font size by selecting some text and choosing "4: Fonts / Font size .."
Kind regards
------------------
Eddy
email: raimundo4u at yahoo dot com
www.devotechs.com -- HIME Huge Integer Math and Encryption library--