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

« back to all changes in this revision

Viewing changes to filter/fontembed/sfnt_int.h

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2012-07-28 11:54:32 UTC
  • mfrom: (1.1.17) (22 sid)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: package-import@ubuntu.com-20120728115432-p5fgn9hv6du22cqa
* 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.
* debian/control: Added missing build dependency on libpoppler-cpp-dev.
* debian/copyright: Corrections (Closes: #682752).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _SFNT_INT_H
2
 
#define _SFNT_INT_H
3
 
 
4
 
static inline unsigned short get_USHORT(const char *buf) // {{{
5
 
{
6
 
  return ((unsigned char)buf[0]<<8)|((unsigned char)buf[1]);
7
 
}
8
 
// }}}
9
 
static inline short get_SHORT(const char *buf) // {{{
10
 
{
11
 
  return (buf[0]<<8)|((unsigned char)buf[1]);
12
 
}
13
 
// }}}
14
 
static inline unsigned int get_UINT24(const char *buf) // {{{
15
 
{
16
 
  return ((unsigned char)buf[0]<<16)|
17
 
         ((unsigned char)buf[1]<<8)|
18
 
         ((unsigned char)buf[2]);
19
 
}
20
 
// }}}
21
 
static inline unsigned int get_ULONG(const char *buf) // {{{
22
 
{
23
 
  return ((unsigned char)buf[0]<<24)|
24
 
         ((unsigned char)buf[1]<<16)|
25
 
         ((unsigned char)buf[2]<<8)|
26
 
         ((unsigned char)buf[3]);
27
 
}
28
 
// }}}
29
 
static inline int get_LONG(const char *buf) // {{{
30
 
{
31
 
  return (buf[0]<<24)|
32
 
         ((unsigned char)buf[1]<<16)|
33
 
         ((unsigned char)buf[2]<<8)|
34
 
         ((unsigned char)buf[3]);
35
 
}
36
 
// }}}
37
 
 
38
 
static inline void set_USHORT(char *buf,unsigned short val) // {{{
39
 
{
40
 
  buf[0]=val>>8;
41
 
  buf[1]=val&0xff;
42
 
}
43
 
// }}}
44
 
static inline void set_ULONG(char *buf,unsigned int val) // {{{
45
 
{
46
 
  buf[0]=val>>24;
47
 
  buf[1]=(val>>16)&0xff;
48
 
  buf[2]=(val>>8)&0xff;
49
 
  buf[3]=val&0xff;
50
 
}
51
 
// }}}
52
 
 
53
 
static inline int get_width_fast(OTF_FILE *otf,int gid) // {{{
54
 
{
55
 
  if (gid>=otf->numberOfHMetrics) {
56
 
    return get_USHORT(otf->hmtx+(otf->numberOfHMetrics-1)*4);
57
 
  } else {
58
 
    return get_USHORT(otf->hmtx+gid*4);
59
 
  }
60
 
}
61
 
// }}}
62
 
 
63
 
int otf_load_glyf(OTF_FILE *otf); //  - 0 on success
64
 
int otf_load_more(OTF_FILE *otf); //  - 0 on success
65
 
 
66
 
int otf_action_copy(void *param,int csum,OUTPUT_FN output,void *context);
67
 
int otf_action_copy_head(void *param,int csum,OUTPUT_FN output,void *context);
68
 
int otf_action_replace(void *param,int csum,OUTPUT_FN output,void *context);
69
 
 
70
 
struct _OTF_WRITE {
71
 
  unsigned long tag;
72
 
  int (*action)(void *param,int length,OUTPUT_FN output,void *context); // -1 on error, num_bytes_written on success; if >output==NULL return checksum in (unsigned int *)context  instead.
73
 
  void *param;
74
 
  int length;
75
 
};
76
 
 
77
 
int otf_write_sfnt(struct _OTF_WRITE *otw,unsigned int version,int numTables,OUTPUT_FN output,void *context);
78
 
 
79
 
#endif