diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-25 18:53:14 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-25 18:53:14 +0000 |
commit | e38e92fb342e1fd7972ac583e284ef136e875f84 (patch) | |
tree | c5a249ab316aec4cc0440968a92bd0ebf5dcaa52 /term.h | |
parent | c085e34da24e96f30415b3bb39ccf1d20b32fd83 (diff) | |
download | mandoc-e38e92fb342e1fd7972ac583e284ef136e875f84.tar.gz |
Initial chunks for variable-width fonts. Pushes all width calculations
in mdoc_term.c and man_term.c down into term.c. This is still not
implemented in term.c, although stubs for width calculations are in
place. From now on, offset, rmargin, and other layout variables are
abstract screen widths. They will resolve to the the familiar values
for -Tascii but -Tps will eventually use points instead of chars.
Diffstat (limited to 'term.h')
-rw-r--r-- | term.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -91,6 +91,7 @@ struct termp { void (*end)(struct termp *); void (*endline)(struct termp *); void (*advance)(struct termp *, size_t); + size_t (*width)(const struct termp *, char); const void *argf; /* arg for headf/footf */ union { struct termp_ps ps; @@ -107,8 +108,12 @@ void term_begin(struct termp *, term_margin, term_margin, const void *); void term_end(struct termp *); -size_t term_hspan(const struct roffsu *); -size_t term_vspan(const struct roffsu *); +size_t term_hspan(const struct termp *, + const struct roffsu *); +size_t term_vspan(const struct termp *, + const struct roffsu *); +size_t term_strlen(const struct termp *, const char *); +size_t term_len(const struct termp *, size_t); enum termfont term_fonttop(struct termp *); const void *term_fontq(struct termp *); |