diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-02-25 03:01:12 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-02-25 03:01:12 +0000 |
commit | 3112e1aed533fe7ee58dd8cba2e4cd768372dfd6 (patch) | |
tree | 02077f80cf4a13a6c571bace448a53a38a9b6768 /Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h | |
parent | 73052dd2c8e70e61b653151192fe1f000fcf626d (diff) |
xpdf-4.01
git-svn-id: svn://tug.org/texlive/trunk@50122 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h b/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h new file mode 100644 index 00000000000..950c93afc8e --- /dev/null +++ b/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h @@ -0,0 +1,51 @@ +//======================================================================== +// +// UnicodeRemapping.h +// +// Sparse remapping of Unicode characters. +// +// Copyright 2018 Glyph & Cog, LLC +// +//======================================================================== + +#ifndef UNICODEREMAPPING_H +#define UNICODEREMAPPING_H + +#include <aconf.h> + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include "CharTypes.h" + +struct UnicodeRemappingString; + +//------------------------------------------------------------------------ + +class UnicodeRemapping { +public: + + // Create an empty (i.e., identity) remapping. + UnicodeRemapping(); + + ~UnicodeRemapping(); + + // Add a remapping for <in>. + void addRemapping(Unicode in, Unicode *out, int len); + + // Add entries from the specified file to this UnicodeRemapping. + void parseFile(GString *fileName); + + // Map <in> to zero or more (up to <size>) output characters in + // <out>. Returns the number of output characters. + int map(Unicode in, Unicode *out, int size); + +private: + + Unicode page0[256]; + UnicodeRemappingString *sMap; + int sMapLen, sMapSize; +}; + +#endif |