summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfdev.c
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2014-07-25 13:56:32 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2014-07-25 13:56:32 +0000
commit31053cc388d6f0b348b297a3a0b950e8d707916a (patch)
treeae93721619df1a0a9c1b422e7d702d46c5aa7f1d /Build/source/texk/dvipdfm-x/pdfdev.c
parentc953c51fc011990ac2c82ef8b88f7acf33781d2d (diff)
Revert "Support CID-keyed OpenType fonts in xdvipdfmx (from Jiang Jiang)"
This reverts commit bf7b0213f14c179b2df004cf6ee134a4b8ae4f99. git-svn-id: svn://tug.org/texlive/trunk@34717 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfdev.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfdev.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfdev.c b/Build/source/texk/dvipdfm-x/pdfdev.c
index 593a9890cf5..54f1a9aa457 100644
--- a/Build/source/texk/dvipdfm-x/pdfdev.c
+++ b/Build/source/texk/dvipdfm-x/pdfdev.c
@@ -52,10 +52,6 @@
#include "pdfdev.h"
-#ifdef XETEX
-#include FT_CID_H
-#endif
-
static int verbose = 0;
void
@@ -461,7 +457,6 @@ struct dev_font {
int enc_id;
#ifdef XETEX
unsigned short *ft_to_gid;
- FT_Bool is_cid_keyed;
#endif
/* if >= 0, index of a dev_font that really has the resource and used_chars */
@@ -469,7 +464,6 @@ struct dev_font {
pdf_obj *resource;
char *used_chars;
- char *used_glyphs;
/* Font format:
* simple, composite or bitmap.
@@ -881,10 +875,6 @@ dev_set_font (int font_id)
if (!real_font->resource) {
real_font->resource = pdf_get_font_reference(real_font->font_id);
real_font->used_chars = pdf_get_font_usedchars(real_font->font_id);
-#ifdef XETEX
- if (real_font->is_cid_keyed)
- real_font->used_glyphs = pdf_get_font_usedglyphs(real_font->font_id);
-#endif
}
if (!real_font->used_on_this_page) {
@@ -969,22 +959,15 @@ handle_multibyte_string (struct dev_font *font,
#ifdef XETEX
if (ctype == -1) { /* freetype glyph indexes */
- if (font->ft_to_gid || font->is_cid_keyed) {
+ if (font->ft_to_gid) {
/* convert freetype glyph indexes to physical GID */
const unsigned char *inbuf = p;
unsigned char *outbuf = sbuf0;
- FT_Face face = pdf_font_get_ft_face(pdf_get_font(font->font_id));
for (i = 0; i < length; i += 2) {
unsigned int gid;
gid = *inbuf++ << 8;
gid += *inbuf++;
- if (font->is_cid_keyed) {
- FT_UInt cid = 0;
- FT_Get_CID_From_Glyph_Index(face, gid, &cid);
- gid = cid;
- } else {
- gid = font->ft_to_gid[gid];
- }
+ gid = font->ft_to_gid[gid];
*outbuf++ = gid >> 8;
*outbuf++ = gid & 0xff;
}
@@ -1173,11 +1156,6 @@ pdf_dev_set_string (spt_t xpos, spt_t ypos,
length = instr_len;
if (font->format == PDF_FONTTYPE_COMPOSITE) {
- if (real_font->used_glyphs != NULL) {
- for (i = 0; i < length; i += 2)
- add_to_used_chars2(real_font->used_glyphs,
- (unsigned short) (str_ptr[i] << 8)|str_ptr[i+1]);
- }
if (handle_multibyte_string(font, &str_ptr, &length, ctype) < 0) {
ERROR("Error in converting input string...");
return;
@@ -1553,17 +1531,10 @@ pdf_dev_locate_font (const char *font_name, spt_t ptsize)
font->enc_id = pdf_get_font_encoding(font->font_id);
#ifdef XETEX
font->ft_to_gid = pdf_get_font_ft_to_gid(font->font_id);
-
- font->is_cid_keyed = 0;
- {
- FT_Face face = pdf_font_get_ft_face(pdf_get_font(font->font_id));
- FT_Get_CID_Is_Internally_CID_Keyed(face, &font->is_cid_keyed);
- }
#endif
font->resource = NULL; /* Don't ref obj until font is actually used. */
font->used_chars = NULL;
- font->used_glyphs = NULL;
font->extend = 1.0;
font->slant = 0.0;