summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-18 23:59:08 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-18 23:59:08 +0000
commite685d00aebe92d15022994ddc4ae0fc90fe64bee (patch)
tree34860742f1e364c03505ae25ebb3c64ba686bf19
parent38cdc984f9af7ed09d36692dd15dbfa08eaff534 (diff)
downloadmandoc-e685d00aebe92d15022994ddc4ae0fc90fe64bee.tar.gz
Make any un-recognised font be considered a call for the Roman font.
This makes sequences of \f[unknown] \fP not completely puke. From a TODO by schwarze@.
-rw-r--r--TODO5
-rw-r--r--html.c4
-rw-r--r--term.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/TODO b/TODO
index 8ad5f779..608ff5c2 100644
--- a/TODO
+++ b/TODO
@@ -56,11 +56,6 @@
- \c (interrupted text) occurs in chat(8)
-- \f(CW (constant width font) occurs in rsyncd.conf(5).
- I think we should treat unknown/unavailable fonts as \fR
- such that switching back with \fP works correctly -
- and doesn't revert the _previous_ \fP.
-
--- missing mdoc features ----------------------------------------------
- fix bad block nesting involving multiple identical explicit blocks
diff --git a/html.c b/html.c
index 543caea3..9a8ec3e3 100644
--- a/html.c
+++ b/html.c
@@ -272,6 +272,8 @@ print_metaf(struct html *h, enum mandoc_esc deco)
case (ESCAPE_FONTBOLD):
font = HTMLFONT_BOLD;
break;
+ case (ESCAPE_FONT):
+ /* FALLTHROUGH */
case (ESCAPE_FONTROMAN):
font = HTMLFONT_NONE;
break;
@@ -392,6 +394,8 @@ print_encode(struct html *h, const char *p, int norecurse)
case (ESCAPE_SPECIAL):
print_spec(h, seq, len);
break;
+ case (ESCAPE_FONT):
+ /* FALLTHROUGH */
case (ESCAPE_FONTPREV):
/* FALLTHROUGH */
case (ESCAPE_FONTBOLD):
diff --git a/term.c b/term.c
index b90f9b7d..3f1bbe44 100644
--- a/term.c
+++ b/term.c
@@ -471,6 +471,8 @@ term_word(struct termp *p, const char *word)
case (ESCAPE_FONTITALIC):
term_fontrepl(p, TERMFONT_UNDER);
break;
+ case (ESCAPE_FONT):
+ /* FALLTHROUGH */
case (ESCAPE_FONTROMAN):
term_fontrepl(p, TERMFONT_NONE);
break;