diff options
author | Kristian Høgsberg <krh@redhat.com> | 2005-03-01 22:24:10 (GMT) |
---|---|---|
committer | Kristian Høgsberg <krh@src.gnome.org> | 2005-03-01 22:24:10 (GMT) |
commit | 02eb16fef45712a91e24f6471b9e2f31249c888e (patch) | |
tree | d5579258f1d7fbd5a280fb2f1b97b74004b1dea9 /pdf/xpdf/CharCodeToUnicode.h | |
parent | 332afee84ff4eb7df326d96f07efd6f82a87c0a2 (diff) |
Use poppler instead of including xpdf source code. Poppler is a fork of
2005-03-01 Kristian Høgsberg <krh@redhat.com>
Use poppler instead of including xpdf source code. Poppler is a
fork of xpdf to build it as a shared library. See
http://freedesktop.org/wiki/Software/poppler.
* pdf/xpdf/*, pdf/goo/*, pdf/splash/*, pdf/fofi/*: Remove included
xpdf fork.
* pdf/Makefile.am: Build libpdfdocument.a here.
* pdf/GDKSplashOutputDev.cc:
* pdf/GDKSplashOutputDev.h:
* pdf/GnomeVFSStream.cc:
* pdf/GnomeVFSStream.h:
* pdf-document.cc:
* pdf-document.h:
* test-gdk-output-dev.cc
* Thumb.cc:
* Thumb.h: Pull these files out of pdf/xpdf and adjust to compile
against poppler.
Diffstat (limited to 'pdf/xpdf/CharCodeToUnicode.h')
-rw-r--r-- | pdf/xpdf/CharCodeToUnicode.h | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/pdf/xpdf/CharCodeToUnicode.h b/pdf/xpdf/CharCodeToUnicode.h deleted file mode 100644 index 605e2bd..0000000 --- a/pdf/xpdf/CharCodeToUnicode.h +++ /dev/null @@ -1,113 +0,0 @@ -//======================================================================== -// -// CharCodeToUnicode.h -// -// Mapping from character codes to Unicode. -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef CHARCODETOUNICODE_H -#define CHARCODETOUNICODE_H - -#include <aconf.h> - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "CharTypes.h" - -#if MULTITHREADED -#include "GMutex.h" -#endif - -struct CharCodeToUnicodeString; - -//------------------------------------------------------------------------ - -class CharCodeToUnicode { -public: - - // Read the CID-to-Unicode mapping for <collection> from the file - // specified by <fileName>. Sets the initial reference count to 1. - // Returns NULL on failure. - static CharCodeToUnicode *parseCIDToUnicode(GString *fileName, - GString *collection); - - // Create a Unicode-to-Unicode mapping from the file specified by - // <fileName>. Sets the initial reference count to 1. Returns NULL - // on failure. - static CharCodeToUnicode *parseUnicodeToUnicode(GString *fileName); - - // Create the CharCode-to-Unicode mapping for an 8-bit font. - // <toUnicode> is an array of 256 Unicode indexes. Sets the initial - // reference count to 1. - static CharCodeToUnicode *make8BitToUnicode(Unicode *toUnicode); - - // Parse a ToUnicode CMap for an 8- or 16-bit font. - static CharCodeToUnicode *parseCMap(GString *buf, int nBits); - - // Parse a ToUnicode CMap for an 8- or 16-bit font, merging it into - // <this>. - void mergeCMap(GString *buf, int nBits); - - ~CharCodeToUnicode(); - - void incRefCnt(); - void decRefCnt(); - - // Return true if this mapping matches the specified <tagA>. - GBool match(GString *tagA); - - // Set the mapping for <c>. - void setMapping(CharCode c, Unicode *u, int len); - - // Map a CharCode to Unicode. - int mapToUnicode(CharCode c, Unicode *u, int size); - -private: - - void parseCMap1(int (*getCharFunc)(void *), void *data, int nBits); - void addMapping(CharCode code, char *uStr, int n, int offset); - CharCodeToUnicode(GString *tagA); - CharCodeToUnicode(GString *tagA, Unicode *mapA, - CharCode mapLenA, GBool copyMap, - CharCodeToUnicodeString *sMapA, - int sMapLenA, int sMapSizeA); - - GString *tag; - Unicode *map; - CharCode mapLen; - CharCodeToUnicodeString *sMap; - int sMapLen, sMapSize; - int refCnt; -#ifdef MULTITHREADED - GMutex mutex; -#endif -}; - -//------------------------------------------------------------------------ - -class CharCodeToUnicodeCache { -public: - - CharCodeToUnicodeCache(int sizeA); - ~CharCodeToUnicodeCache(); - - // Get the CharCodeToUnicode object for <tag>. Increments its - // reference count; there will be one reference for the cache plus - // one for the caller of this function. Returns NULL on failure. - CharCodeToUnicode *getCharCodeToUnicode(GString *tag); - - // Insert <ctu> into the cache, in the most-recently-used position. - void add(CharCodeToUnicode *ctu); - -private: - - CharCodeToUnicode **cache; - int size; -}; - -#endif |