summaryrefslogtreecommitdiff
path: root/src/pdflib/font/ft_type1.c
diff options
context:
space:
mode:
authorscuri <scuri>2008-10-17 06:10:33 +0000
committerscuri <scuri>2008-10-17 06:10:33 +0000
commit7b52cc13af4e85f1ca2deb6b6c77de9c95ea0dcf (patch)
treed0857278bde2eff784227c57dcaf930346ceb7ac /src/pdflib/font/ft_type1.c
First commit - moving from LuaForge to SourceForge
Diffstat (limited to 'src/pdflib/font/ft_type1.c')
-rw-r--r--src/pdflib/font/ft_type1.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/pdflib/font/ft_type1.c b/src/pdflib/font/ft_type1.c
new file mode 100644
index 0000000..2644284
--- /dev/null
+++ b/src/pdflib/font/ft_type1.c
@@ -0,0 +1,39 @@
+/*---------------------------------------------------------------------------*
+ | PDFlib - A library for generating PDF on the fly |
+ +---------------------------------------------------------------------------+
+ | Copyright (c) 1997-2006 Thomas Merz and PDFlib GmbH. All rights reserved. |
+ +---------------------------------------------------------------------------+
+ | |
+ | This software is subject to the PDFlib license. It is NOT in the |
+ | public domain. Extended versions and commercial licenses are |
+ | available, please check http://www.pdflib.com. |
+ | |
+ *---------------------------------------------------------------------------*/
+
+/* $Id: ft_type1.c,v 1.1 2008/10/17 06:10:43 scuri Exp $
+ *
+ * FONT Type1 font handling routines
+ *
+ */
+
+#include "ft_font.h"
+
+pdc_bool
+fnt_test_type1_font(pdc_core *pdc, const pdc_byte *img)
+{
+ char startsequ[5];
+
+ strcpy(startsequ, FNT_PFA_STARTSEQU);
+
+ /* ASCII block sign and begin of text at byte 7 */
+ if (img[0] == 0x80 && img[1] == 0x01 &&
+ strncmp((const char *)&img[6], startsequ, 4) == 0)
+ {
+ pdc_logg_cond(pdc, 1, trc_font,
+ "\tPostScript Type1 font detected\n");
+ return pdc_true;
+ }
+ return pdc_false;
+}
+
+