~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/gdevpdtb.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: gdevpdtb.c 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* $Id: gdevpdtb.c 8271 2007-10-07 18:09:11Z leonardo $ */
15
15
/* BaseFont implementation for pdfwrite */
16
16
#include "memory_.h"
17
17
#include "ctype_.h"
62
62
    return true;
63
63
}
64
64
 
65
 
private inline ulong
 
65
static inline ulong
66
66
hash(ulong v, int index, ushort w)
67
67
{
68
68
    return v * 3141592653u + w;
102
102
}
103
103
 
104
104
/* Finish writing FontFile* data. */
105
 
private int
 
105
static int
106
106
pdf_end_fontfile(gx_device_pdf *pdev, pdf_data_writer_t *pdw)
107
107
{
108
108
    /* We would like to call pdf_end_data,
198
198
                goto fail;
199
199
        }
200
200
        code = gs_copy_font_complete((gs_font *)font, complete);
201
 
        if (code < 0)
 
201
        if (code < 0 && pbfont->do_subset == DO_SUBSET_NO) {
 
202
            char buf[gs_font_name_max + 1];
 
203
            int l = min(copied->font_name.size, sizeof(buf) - 1);
 
204
 
 
205
            memcpy(buf, copied->font_name.chars, l);
 
206
            buf[l] = 0;
 
207
            eprintf1("Can't embed the complete font %s due to font error.\n", buf);
202
208
            goto fail;
203
 
        if (pbfont->num_glyphs < 0) { /* Type 1 */
 
209
        }
 
210
        if (code < 0) {
 
211
            /* A font error happened, but it may be caused by a glyph, 
 
212
               which is not used in the document. Continue with subsetting the font.
 
213
               If the failed glyph will be used in the document, 
 
214
               another error will hgappen when the glyph is used.
 
215
             */
 
216
            complete = copied;
 
217
        } else if (pbfont->num_glyphs < 0) { /* Type 1 */
204
218
            int index, count;
205
219
            gs_glyph glyph;
206
220
 
378
392
/*
379
393
 * Adjust font name for Acrobat Reader 3.
380
394
 */
381
 
private int
 
395
static int
382
396
pdf_adjust_font_name(gx_device_pdf *pdev, long id, pdf_base_font_t *pbfont)
383
397
{
384
398
    /*