~ubuntu-branches/ubuntu/quantal/cups-filters/quantal-proposed

« back to all changes in this revision

Viewing changes to filter/pdftopdf/P2PCharCodeToUnicode.h

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2012-08-20 14:53:42 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20120820145342-bddzpwqv0klmt84d
Tags: 1.0.22-1
* New upstream release
   - pdftopdf filter replaced by new QPDF-based filter from Tobias
     Hoffmann's Google Summer of Code project. The former Poppler-based
     pdftopdf duplicated a lot of Poppler's code. The old filter is
     still in the package as pdftopdf.old with source code in
     filter/pdftopdf.old. It will be removed in a later release.
   - bannertopdf: Page duplication routine fixed.
   - bannertopdf: Fixed invalid output of a direct stream object.
   - Added most recent contributors to AUTHORS and COPYING files.
* debian/control: Added build dependency on libqpdf-dev.
* debian/copyright: Updated for the addition of the new pdftopdf filter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//========================================================================
2
 
//
3
 
// P2PCharCodeToUnicode.h
4
 
// Mapping from character codes to Unicode.
5
 
// BBR Inc.
6
 
//
7
 
// Based Poppler CharCodeToUnicode.h
8
 
// Copyright 2001-2003 Glyph & Cog, LLC
9
 
//
10
 
//========================================================================
11
 
 
12
 
#ifndef P2PCHARCODETOUNICODE_H
13
 
#define P2PCHARCODETOUNICODE_H
14
 
 
15
 
#ifdef USE_GCC_PRAGMAS
16
 
#pragma interface
17
 
#endif
18
 
 
19
 
#include "CharTypes.h"
20
 
 
21
 
struct P2PCharCodeToUnicodeString;
22
 
 
23
 
//------------------------------------------------------------------------
24
 
 
25
 
class P2PCharCodeToUnicode {
26
 
public:
27
 
 
28
 
  // Parse a ToUnicode CMap for an 8- or 16-bit font from File 
29
 
  static P2PCharCodeToUnicode *parseCMapFromFile(GooString *fileName,
30
 
    int nBits);
31
 
 
32
 
  ~P2PCharCodeToUnicode();
33
 
 
34
 
  // Map a CharCode to Unicode.
35
 
  int mapToUnicode(CharCode c, Unicode *u, int size);
36
 
 
37
 
  // Return the mapping's length, i.e., one more than the max char
38
 
  // code supported by the mapping.
39
 
  CharCode getLength() { return mapLen; }
40
 
 
41
 
private:
42
 
 
43
 
  void parseCMap1(int (*getCharFunc)(void *), void *data, int nBits);
44
 
  void addMapping(CharCode code, char *uStr, int n, int offset);
45
 
  P2PCharCodeToUnicode();
46
 
  Unicode *map;
47
 
  CharCode mapLen;
48
 
  P2PCharCodeToUnicodeString *sMap;
49
 
  int sMapLen, sMapSize;
50
 
};
51
 
 
52
 
#endif