11
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
14
/* $Id: gdevpdtf.c 8474 2008-01-02 13:10:59Z ken $ */
14
/* $Id: gdevpdtf.c 8603 2008-03-20 10:20:17Z ken $ */
15
15
/* Font and CMap resource implementation for pdfwrite text */
16
16
#include "memory_.h"
17
17
#include "string_.h"
662
662
int index = pdf_find_standard_font_name(chars, size);
663
663
bool embed_as_standard_called = false;
664
664
bool do_embed_as_standard = false; /* Quiet compiler. */
668
memset(&info, 0x00, sizeof(gs_font_info_t));
669
code = font->procs.font_info(font, NULL, FONT_INFO_EMBEDDING_RIGHTS, &info);
670
if (code == 0 && (info.members & FONT_INFO_EMBEDDING_RIGHTS)) {
671
if ((info.EmbeddingRights == 0x0002) || (info.EmbeddingRights & 0x0200)) {
672
/* See the OpenType specification, "The 'OS/2' and Windows Metrics Table" for details
673
of the fstype parameter. This is a bitfield, currently we forbid embedding of fonts
675
bit 1 0x0002 Fonts that have only this bit set must not be modified, embedded or
676
exchanged in any manner.
677
bit 9 0x0200 Bitmap embedding only.
679
Note for Restricted License embedding (bit 1), this must be the only level of embedding
680
selected (see the OpenType spec).
682
char name[gs_font_name_max + 1];
685
len = min(gs_font_name_max, font->font_name.size);
686
memcpy(name, font->font_name.chars, len);
688
eprintf1("\nWarning: %s cannot be embedded because of licensing restrictions\n", name);
689
return FONT_EMBED_NO;
667
693
* The behavior of Acrobat Distiller changed between 3.0 (PDF 1.2),
668
694
* which will never embed the base 14 fonts, and 4.0 (PDF 1.3), which