diff options
author | wlemb <wlemb> | 2002-08-07 15:01:32 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2002-08-07 15:01:32 +0000 |
commit | 3ff343630d116ad34b71ae08d91ab9689f4b433b (patch) | |
tree | 52a299e65dbebcd7015d334cc45161489ef95741 | |
parent | 6c11b7718f85c3c1f4417f0c176a971de2af8e4d (diff) | |
download | groff-3ff343630d116ad34b71ae08d91ab9689f4b433b.tar.gz |
Add fonts `CI', `CB', and `CBI' to grohtml which have been omitted
inadvertently.
* src/devices/grohtml/post-html.cc (html_printer::end_font,
html_printer::start_font): Handle them.
* src/devices/grohtml/html-text.cc (html_text::do_italic): Don't
reset bold and tt.
(html_text::do_bold): Don't reset italic and tt.
(html_text::do_tt, html_text::do_pre): Don't reset bold and italic.
* font/devhtml/DESC.proto: Add those fonts.
* font/devhtml/Makefile.sub (PROTOFONTS): Updated.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | font/devhtml/DESC.proto | 2 | ||||
-rw-r--r-- | font/devhtml/Makefile.sub | 2 | ||||
-rw-r--r-- | src/devices/grohtml/html-text.cc | 17 | ||||
-rw-r--r-- | src/devices/grohtml/post-html.cc | 29 |
5 files changed, 48 insertions, 16 deletions
@@ -1,3 +1,17 @@ +2002-08-07 Gaius Mulley <gaius@glam.ac.uk> + + Add fonts `CI', `CB', and `CBI' to grohtml which have been omitted + inadvertently. + + * src/devices/grohtml/post-html.cc (html_printer::end_font, + html_printer::start_font): Handle them. + * src/devices/grohtml/html-text.cc (html_text::do_italic): Don't + reset bold and tt. + (html_text::do_bold): Don't reset italic and tt. + (html_text::do_tt, html_text::do_pre): Don't reset bold and italic. + * font/devhtml/DESC.proto: Add those fonts. + * font/devhtml/Makefile.sub (PROTOFONTS): Updated. + 2002-08-07 Werner LEMBERG <wl@gnu.org> * MORE.STUFF: Added gpresent. diff --git a/font/devhtml/DESC.proto b/font/devhtml/DESC.proto index e245441c..c3a53a2a 100644 --- a/font/devhtml/DESC.proto +++ b/font/devhtml/DESC.proto @@ -3,7 +3,7 @@ hor 24 vert 40 unitwidth 10 sizes 6 8 10 12 14 16 18 0 -fonts 6 R I B BI C S +fonts 9 R I B BI CR CI CB CBI S tcommand html postpro post-grohtml diff --git a/font/devhtml/Makefile.sub b/font/devhtml/Makefile.sub index df56914e..8afe0376 100644 --- a/font/devhtml/Makefile.sub +++ b/font/devhtml/Makefile.sub @@ -1,5 +1,5 @@ DEV=html -PROTOFONTS=R I B BI CR +PROTOFONTS=R I B BI CR CI CB CBI FONTS=$(PROTOFONTS) S DEVFILES=$(FONTS) DESC CLEANADD=$(FONTS) DESC diff --git a/src/devices/grohtml/html-text.cc b/src/devices/grohtml/html-text.cc index 8ad3b0d4..505d1be3 100644 --- a/src/devices/grohtml/html-text.cc +++ b/src/devices/grohtml/html-text.cc @@ -374,11 +374,8 @@ void html_text::push_para (color *c) void html_text::do_italic (void) { - done_bold(); - done_tt(); - if (! is_present(I_TAG)) { + if (! is_present(I_TAG)) push_para(I_TAG); - } } /* @@ -387,11 +384,8 @@ void html_text::do_italic (void) void html_text::do_bold (void) { - done_italic(); - done_tt(); - if (! is_present(B_TAG)) { + if (! is_present(B_TAG)) push_para(B_TAG); - } } /* @@ -400,11 +394,8 @@ void html_text::do_bold (void) void html_text::do_tt (void) { - done_bold(); - done_italic(); - if ((! is_present(TT_TAG)) && (! is_present(PRE_TAG))) { + if ((! is_present(TT_TAG)) && (! is_present(PRE_TAG))) push_para(TT_TAG); - } } /* @@ -413,8 +404,6 @@ void html_text::do_tt (void) void html_text::do_pre (void) { - done_bold(); - done_italic(); done_tt(); if (is_present(P_TAG)) { html_indent *i = remove_indent(P_TAG); diff --git a/src/devices/grohtml/post-html.cc b/src/devices/grohtml/post-html.cc index 614ec530..6510e1a5 100644 --- a/src/devices/grohtml/post-html.cc +++ b/src/devices/grohtml/post-html.cc @@ -2908,6 +2908,16 @@ void html_printer::end_font (const char *fontname) current_paragraph->done_italic(); } else if (strcmp(fontname, "CR") == 0) { current_paragraph->done_tt(); + } else if (strcmp(fontname, "CI") == 0) { + current_paragraph->done_italic(); + current_paragraph->done_tt(); + } else if (strcmp(fontname, "CB") == 0) { + current_paragraph->done_bold(); + current_paragraph->done_tt(); + } else if (strcmp(fontname, "CBI") == 0) { + current_paragraph->done_bold(); + current_paragraph->done_italic(); + current_paragraph->done_tt(); } } @@ -2933,6 +2943,25 @@ void html_printer::start_font (const char *fontname) current_paragraph->do_pre(); } current_paragraph->do_tt(); + } else if (strcmp(fontname, "CI") == 0) { + if ((! fill_on) && (is_courier_until_eol())) { + current_paragraph->do_pre(); + } + current_paragraph->do_tt(); + current_paragraph->do_italic(); + } else if (strcmp(fontname, "CB") == 0) { + if ((! fill_on) && (is_courier_until_eol())) { + current_paragraph->do_pre(); + } + current_paragraph->do_tt(); + current_paragraph->do_bold(); + } else if (strcmp(fontname, "CBI") == 0) { + if ((! fill_on) && (is_courier_until_eol())) { + current_paragraph->do_pre(); + } + current_paragraph->do_tt(); + current_paragraph->do_italic(); + current_paragraph->do_bold(); } } |