~ubuntu-branches/ubuntu/raring/cups-filters/raring-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-07-22 18:57:32 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20120722185732-26kkte5p1lth3rt5
Tags: 1.0.20-0bzr1
* New upstream release
   - pdftops: Added another workaround for Kyocera printers: Some
     models get very slow on images which request interpolation,
     so now we remove the image interpolation requests by additional
     PostScript code only inserted for Kyocera printers (LP: #1026974).
   - Made the Poppler-based filters pdftopdf and pdftoopvp build with
     both Poppler 0.18.x and 0.20.x (Upstream bug #1055).
   - Fixes according to Coverity scan results (Upstream bug #1054).
   - Switched build system to autotools. This especially fixes several
     build problems in Gentoo. Also build-tested with CUPS 1.6.0b1.
   - Fixes for compatibility with clang/gcc-4.7.
   - textonly: Filter did not work as a pipe with copies=1 (Upstream bug
     #1032).
   - texttopdf: Avoid trimming the results of FcFontSort(), as this may
     miss some reasonable candidates under certain circumstances. BTW,
     fix passing a non-pointer as a pointer to "result" (Closes: #670055).
   - Corrected documentation. The option for the maximum image rendering
     resolution in pdftops is "pdftops-max-image-resolution", not
     "pdftops-max-image-resolution-default".
* debian/patches/fcfontsort-no-trim.patch: Removed, fixed upstream.
* debian/rules: Updated options for ./configure and make for the new autotools
  build system.
* debian/watch: Switched to bz2 upstream packages.
* debian/rules, debian/copyright, debian/cups-filters.docs: Updated for
  renamed documentation files.
* debian/control, debian/libfontembed1.install,
  debian/libfontembed-dev.install: Added new binary packages for libfontembed.
* debian/copyright: Updated for recent file additions, and rearrangement of
  directories.

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