diff options
| author | Simon Tatham <anakin@pobox.com> | 2001-12-04 22:21:06 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2001-12-04 22:21:06 +0000 |
| commit | 5f69ebcb18554873c58d8532bcc38c603cd135ee (patch) | |
| tree | 6939a6994556e08236da21498f3bf4e62f9ffbcc /winhelp.h | |
| parent | 51f101e722f3f1610579bfe9ac2a6ffb2542fab6 (diff) | |
| download | halibut-5f69ebcb18554873c58d8532bcc38c603cd135ee.zip halibut-5f69ebcb18554873c58d8532bcc38c603cd135ee.tar.gz halibut-5f69ebcb18554873c58d8532bcc38c603cd135ee.tar.bz2 halibut-5f69ebcb18554873c58d8532bcc38c603cd135ee.tar.xz | |
In winhelp.c: allowed user to configure the Font section to their
liking, as planned. In bk_whlp.c, this has now allowed me to stop
emphasis and code from looking silly in section titles, and also
allowed me to implement an ersatz horizontal rule in the form of
eighty centred nonbreaking spaces in a strike-through font. I know
it's vile, but better suggestions are welcome.
I think the Windows Help backend is now pretty much Go: I was
getting intermittent screwups earlier but I think those were Samba
cache persistence problems rather than evil segfaults. All that's
really missing now is external context references.
[originally from svn r1453]
Diffstat (limited to 'winhelp.h')
| -rw-r--r-- | winhelp.h | 36 |
1 files changed, 33 insertions, 3 deletions
@@ -104,6 +104,39 @@ void whlp_primary_topic(WHLP h, WHLP_TOPIC topic); void whlp_begin_topic(WHLP h, WHLP_TOPIC topic, char *title, ...); /* + * Call this to set up a font descriptor. You supply the font name, + * the font size (in half-points), the graphic rendition flags + * (bold, italic etc), and the general font family (for Windows to + * select a fallback font if yours is unavailable). You can also + * specify a foreground colour for the text (but unfortunately not + * a background). + * + * Font descriptors are identified in whlp_set_font() by small + * integers, which are allocated from 0 upwards in the order you + * call whlp_create_font(). For your convenience, + * whlp_create_font() returns the integer allocated to each font + * descriptor you create, but you could work this out just as + * easily yourself by counting. + */ +enum { + WHLP_FONT_BOLD = 1, + WHLP_FONT_ITALIC = 2, + WHLP_FONT_UNDERLINE = 4, + WHLP_FONT_STRIKEOUT = 8, + WHLP_FONT_DOUBLEUND = 16, + WHLP_FONT_SMALLCAPS = 32 +}; +enum { + WHLP_FONTFAM_FIXED = 1, + WHLP_FONTFAM_SERIF = 2, + WHLP_FONTFAM_SANS = 3, + WHLP_FONTFAM_SCRIPT = 4, + WHLP_FONTFAM_DECOR = 5 +}; +int whlp_create_font(WHLP h, char *font, int family, int halfpoints, + int rendition, int r, int g, int b); + +/* * Routines to output paragraphs and actual text (at last). * * You should start by calling whlp_para_attr() to set any @@ -122,9 +155,6 @@ enum { WHLP_ALIGN_LEFT, WHLP_ALIGN_RIGHT, WHLP_ALIGN_CENTRE }; enum { - WHLP_FONT_TITLE, WHLP_FONT_NORMAL, WHLP_FONT_ITALIC, WHLP_FONT_FIXED -}; -enum { WHLP_PARA_SCROLL, WHLP_PARA_NONSCROLL }; void whlp_para_attr(WHLP h, int attr_id, int attr_param); |