~ubuntu-branches/debian/experimental/cups-filters/experimental

« back to all changes in this revision

Viewing changes to filter/fontembed/sfnt.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
 
#ifndef _SFNT_H
2
 
#define _SFNT_H
3
 
 
4
 
#include <stdio.h>
5
 
 
6
 
typedef struct {
7
 
  unsigned int tag;
8
 
  unsigned int checkSum;
9
 
  unsigned int offset;
10
 
  unsigned int length;
11
 
} OTF_DIRENT;
12
 
 
13
 
typedef struct {
14
 
  FILE *f;
15
 
  unsigned int numTTC,useTTC;
16
 
  unsigned int version;
17
 
 
18
 
  unsigned short numTables;
19
 
  OTF_DIRENT *tables;
20
 
 
21
 
  int flags;
22
 
  unsigned short unitsPerEm;
23
 
  unsigned short indexToLocFormat; // 0=short, 1=long
24
 
  unsigned short numGlyphs;
25
 
 
26
 
  // optionally loaded data
27
 
  unsigned int *glyphOffsets;
28
 
  unsigned short numberOfHMetrics;
29
 
  char *hmtx,*name,*cmap;
30
 
  const char *unimap; // ptr to (3,1) or (3,0) cmap start
31
 
  
32
 
  // single glyf buffer, allocated large enough by otf_load_more() 
33
 
  char *gly;
34
 
  OTF_DIRENT *glyfTable;
35
 
 
36
 
} OTF_FILE;
37
 
#define OTF_F_FMT_CFF      0x10000
38
 
#define OTF_F_DO_CHECKSUM  0x40000
39
 
 
40
 
// to load TTC collections: append e.g. "/3" for the third font in the file.
41
 
OTF_FILE *otf_load(const char *file);
42
 
void otf_close(OTF_FILE *otf);
43
 
 
44
 
#define OTF_TAG(a,b,c,d)  (unsigned int)( ((a)<<24)|((b)<<16)|((c)<<8)|(d) )
45
 
#define OTF_UNTAG(a)  (((unsigned int)(a)>>24)&0xff),(((unsigned int)(a)>>16)&0xff),\
46
 
                      (((unsigned int)(a)>>8)&0xff),(((unsigned int)(a))&0xff)
47
 
 
48
 
char *otf_get_table(OTF_FILE *otf,unsigned int tag,int *ret_len);
49
 
 
50
 
int otf_get_width(OTF_FILE *otf,unsigned short gid);
51
 
const char *otf_get_name(OTF_FILE *otf,int platformID,int encodingID,int languageID,int nameID,int *ret_len);
52
 
int otf_get_glyph(OTF_FILE *otf,unsigned short gid);
53
 
unsigned short otf_from_unicode(OTF_FILE *otf,int unicode);
54
 
 
55
 
#include "bitset.h"
56
 
#include "iofn.h"
57
 
 
58
 
// TODO?! allow glyphs==NULL for non-subsetting table reduction?
59
 
int otf_subset(OTF_FILE *otf,BITSET glyphs,OUTPUT_FN output,void *context);
60
 
int otf_ttc_extract(OTF_FILE *otf,OUTPUT_FN output,void *context);
61
 
int otf_subset_cff(OTF_FILE *otf,BITSET glyphs,OUTPUT_FN output,void *context);
62
 
int otf_cff_extract(OTF_FILE *otf,OUTPUT_FN output,void *context);
63
 
 
64
 
#endif