From 6a7f55cf47c291790cf08aaba36a947d7f6d5ab3 Mon Sep 17 00:00:00 2001 From: wl Date: Sat, 11 Feb 2006 17:54:28 +0000 Subject: New accessor method glyph_t::glyph_name(). * src/include/ptable.h (declare_ptable): Add a return value to the 'define' method, and declare a 'lookupassoc' method. (implement_ptable): Return the stored key in 'define'. Implement lookupassoc. * src/include/font.h (glyph_t): Add 'name' field. Add an argument to the constructor. (glyph_t::glyph_name): New method. * src/libs/libgroff/nametoindex.cpp (character_indexer): Change return type of methods and field member type to glyph_t. (character_indexer::character_indexer): Update. (character_indexer::ascii_char_index): Allocate a name for the glyph. Return a glyph_t with name. (character_indexer::numbered_char_index): Return a glyph_t without a name. (character_indexer::named_char_index): Return a glyph_t with a name. (font::number_to_index, font::name_to_index): Update. * src/roff/troff/input.cpp (charinfo::charinfo): Use the symbol as the glyph's name. --- src/roff/troff/input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/roff/troff/input.cpp') diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp index dd733397..4afccebb 100644 --- a/src/roff/troff/input.cpp +++ b/src/roff/troff/input.cpp @@ -8094,7 +8094,7 @@ charinfo::charinfo(symbol s) not_found(0), transparent_translate(1), translate_input(0), mode(CHAR_NORMAL), nm(s) { - index = glyph_t(next_index++); + index = glyph_t(next_index++, s.contents()); } void charinfo::set_hyphenation_code(unsigned char c) -- cgit v1.2.1