diff options
author | wl <wl> | 2006-02-11 17:48:09 +0000 |
---|---|---|
committer | wl <wl> | 2006-02-11 17:48:09 +0000 |
commit | 05c54bfdc6b809f5b21b791c92232150e9f4b4db (patch) | |
tree | 38a0bbd9548324bf4b71a73077321b2a8bbe4ae9 /src/devices/grodvi | |
parent | 8e01e118b1796617d4186d24990bca22def6d080 (diff) | |
download | groff-05c54bfdc6b809f5b21b791c92232150e9f4b4db.tar.gz |
Make the glyph data type abstract.
* src/include/font.h (glyph_t): New class.
(name_to_index, number_to_index): Change return type to glyph_t.
(font::contains, font::get_width, font::get_height, font::get_depth,
font::get_character_type, font::get_kern, font::get_skew,
font::get_italic_correction, font::get_left_italic_correction,
font::get_subscript_correction, font::get_code,
font::get_special_device_encoding, font::add_entry, font::copy_entry,
font::add_kern, font::hash_kern): Change argument type to glyph_t.
* src/libs/libgroff/font.cpp (struct font_kern_list): Change members
type and constructor argument types to glyph_t.
(font::contains, font::get_width, font::get_height, font::get_depth,
font::get_character_type, font::get_kern, font::get_skew,
font::get_italic_correction, font::get_left_italic_correction,
font::get_subscript_correction, font::get_code,
font::get_special_device_encoding, font::add_entry, font::copy_entry,
font::add_kern, font::hash_kern): Change argument type to glyph_t.
(font::load): Use glyph_t variables.
* src/libs/libgroff/nametoindex.cpp (name_to_index, number_to_index):
Change return type to glyph_t.
* src/roff/troff/charinfo.h (charinfo::index): Change type to glyph_t.
(charinfo::get_index): Change return type to glyph_t.
* src/roff/troff/env.cpp: Include font.h.
* src/roff/troff/node.cpp: Include font.h before charinfo.h.
* src/roff/troff/input.cpp: Include font.h before charinfo.h.
(charinfo::charinfo): Update.
(name_to_index, number_to_index): Change return type to glyph_t.
* src/include/printer.h (printer::set_char_and_width): Change return
type to glyph_t.
* src/libs/libdriver/printer.cpp (printer::set_char_and_width): Change
return type to glyph_t.
* src/devices/grodvi/dvi.cpp (dvi_printer::set_char): Change argument
type to glyph_t.
* src/devices/grohtml/post-html.cpp (page::add_and_encode): Update.
(html_printer::space_glyph): Renamed from space_char_index.
(html_printer::add_to_sbuf, html_printer::sbuf_continuation,
html_printer::overstrike, html_printer::set_char): Change argument type
to glyph_t.
(html_printer::set_char_and_width): Change return type to glyph_t.
* src/devices/grolbp/lbp.cpp (lbp_printer::set_char): Change argument
type to glyph_t.
* src/devices/grolj4/lj4.cpp (lj4_printer::set_char): Change argument
type to glyph_t.
* src/devices/grops/ps.cpp (ps_printer::space_glyph): Renamed from
space_char_index.
(ps_printer::set_subencoding, ps_printer::set_char): Change argument
type to glyph_t.
* src/devices/grotty/tty.cpp (tty_printer::set_char): Change argument
type to glyph_t.
Diffstat (limited to 'src/devices/grodvi')
-rw-r--r-- | src/devices/grodvi/dvi.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/grodvi/dvi.cpp b/src/devices/grodvi/dvi.cpp index 201eb1c4..c7c0dee2 100644 --- a/src/devices/grodvi/dvi.cpp +++ b/src/devices/grodvi/dvi.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004 +/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) @@ -175,7 +175,7 @@ public: font *make_font(const char *); void begin_page(int); void end_page(int); - void set_char(int, font *, const environment *, int w, const char *name); + void set_char(glyph_t, font *, const environment *, int w, const char *name); void special(char *arg, const environment *env, char type); void end_of_line(); void draw(int code, int *p, int np, const environment *env); @@ -340,12 +340,12 @@ void dvi_printer::set_color(color *col) do_special(buf); } -void dvi_printer::set_char(int idx, font *f, const environment *env, +void dvi_printer::set_char(glyph_t glyph, font *f, const environment *env, int w, const char *) { if (*env->col != cur_color) set_color(env->col); - int code = f->get_code(idx); + int code = f->get_code(glyph); if (env->size != cur_point_size || f != cur_font) { cur_font = f; cur_point_size = env->size; @@ -384,7 +384,7 @@ void dvi_printer::set_char(int idx, font *f, const environment *env, } possibly_begin_line(); end_h = env->hpos + w; - cur_h += scale(f->get_width(idx, UNITWIDTH)/MULTIPLIER, + cur_h += scale(f->get_width(glyph, UNITWIDTH)/MULTIPLIER, cur_point_size*RES_7227); if (cur_h > max_h) max_h = cur_h; |