summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2006-08-14 17:53:12 +0200
committerTor Andersson <tor@ghostscript.com>2006-08-14 17:53:12 +0200
commitb3824af8c7d9dd9e173e98c5da513e0e6c3634af (patch)
tree9cbeabd3be98563a2dd3a22cfc598a695a4291a7
parent3d58249f61401dc2a2957531fe278a575384fd3c (diff)
downloadmupdf-b3824af8c7d9dd9e173e98c5da513e0e6c3634af.tar.xz
finish update to freetype 2.2
-rw-r--r--mupdf/pdf_font.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c
index e6683e34..06ec08b2 100644
--- a/mupdf/pdf_font.c
+++ b/mupdf/pdf_font.c
@@ -44,24 +44,17 @@ enum { UNKNOWN, TYPE1, TRUETYPE, CID };
static int ftkind(FT_Face face)
{
- /* how to test for CID fonts? */
- if (FT_IS_SFNT(face))
- return TRUETYPE; /* or OpenType */
- return TYPE1;
-
-#if 0
- const char *kind = face->driver->clazz->root.module_name;
- pdf_logfont("ft driver %s\n", kind);
- if (!strcmp(kind, "type1"))
- return TYPE1;
- if (!strcmp(kind, "cff"))
- return TYPE1;
- if (!strcmp(kind, "truetype"))
- return TRUETYPE;
- if (!strcmp(kind, "t1cid"))
- return CID;
- return UNKNOWN;
-#endif
+ const char *kind = FT_Get_X11_Font_Format(face);
+ pdf_logfont("ft font format %s\n", kind);
+ if (!strcmp(kind, "TrueType"))
+ return TRUETYPE;
+ if (!strcmp(kind, "Type 1"))
+ return TYPE1;
+ if (!strcmp(kind, "CFF"))
+ return TYPE1;
+ if (!strcmp(kind, "CID Type 1"))
+ return TYPE1;
+ return UNKNOWN;
}
static inline int ftcidtogid(pdf_font *font, int cid)