diff options
Diffstat (limited to 'Build/source/texk/lcdf-typetools/include/efont/encoding.hh')
-rw-r--r-- | Build/source/texk/lcdf-typetools/include/efont/encoding.hh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Build/source/texk/lcdf-typetools/include/efont/encoding.hh b/Build/source/texk/lcdf-typetools/include/efont/encoding.hh new file mode 100644 index 00000000000..59758b06607 --- /dev/null +++ b/Build/source/texk/lcdf-typetools/include/efont/encoding.hh @@ -0,0 +1,27 @@ +// -*- related-file-name: "../../libefont/encoding.cc" -*- +#ifndef EFONT_ENCODING_HH +#define EFONT_ENCODING_HH +#include <lcdf/vector.hh> +namespace Efont { +typedef int GlyphIndex; + +class Encoding8 { + + Vector<GlyphIndex> _codes; + Vector<int> _code_map; + + public: + + Encoding8() : _code_map(256, -1) { } + + void reserve_glyphs(int); + + int code(GlyphIndex gi) const { return _codes[gi]; } + GlyphIndex find_code(int c) const { return _code_map[c]; } + + void set_code(GlyphIndex gi, int c) { _codes[gi] = c; _code_map[c] = gi; } + +}; + +} +#endif |