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

« back to all changes in this revision

Viewing changes to fontembed/test_pdf.c

  • Committer: Package Import Robot
  • Author(s): Didier Raboud
  • Date: 2015-01-15 18:06:05 UTC
  • mfrom: (1.2.25)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: package-import@ubuntu.com-20150115180605-fnfbqv85k3y5zggk
Tags: upstream-1.0.62
ImportĀ upstreamĀ versionĀ 1.0.62

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#include <assert.h>
5
5
#include <stdio.h>
6
6
#include <stdlib.h>
7
 
 
 
7
 
8
8
static void example_outfn(const char *buf,int len,void *context) // {{{
9
9
{
10
10
  FILE *f=(FILE *)context;
52
52
  int iA;
53
53
 
54
54
  if (emb->plan&EMB_A_MULTIBYTE) {
55
 
    putc('<',f); 
 
55
    putc('<',f);
56
56
    for (iA=0;str[iA];iA++) {
57
57
      const unsigned short gid=emb_get(emb,(unsigned char)str[iA]);
58
58
      fprintf(f,"%04x",gid);
59
59
    }
60
 
    putc('>',f); 
 
60
    putc('>',f);
61
61
  } else {
62
 
    putc('(',f); 
 
62
    putc('(',f);
63
63
    for (iA=0;str[iA];iA++) {
64
64
      emb_get(emb,(unsigned char)str[iA]);
65
65
    }
66
66
    fprintf(f,"%s",str); // TODO
67
 
    putc(')',f); 
 
67
    putc(')',f);
68
68
  }
69
69
}
70
70
// }}}
188
188
            "  /Pages 2 0 R\n"
189
189
            ">>\n"
190
190
            "endobj\n");
191
 
  // {{{ pdf trailer 
 
191
  // {{{ pdf trailer
192
192
  int xref_start=ftell(f);
193
193
  fprintf(f,"xref\n"
194
194
            "0 %d\n"