summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik/font-open.h
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-04-08 06:34:46 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-04-08 06:34:46 +0000
commit7e0f3484d8cd6eca4abe80d057391d14face5606 (patch)
tree92570fc98a476ecbf696c2ef16d046412d405995 /Build/source/texk/xdvik/font-open.h
parent824f7b0903de8ad7f6ee3d7656005e4c59155e06 (diff)
xdvik 22.86
git-svn-id: svn://tug.org/texlive/trunk@29732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik/font-open.h')
-rw-r--r--Build/source/texk/xdvik/font-open.h65
1 files changed, 59 insertions, 6 deletions
diff --git a/Build/source/texk/xdvik/font-open.h b/Build/source/texk/xdvik/font-open.h
index 3979a4bfdbc..236ee6d7192 100644
--- a/Build/source/texk/xdvik/font-open.h
+++ b/Build/source/texk/xdvik/font-open.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002-2004 the xdvik development team
+ * Copyright (c) 2002-2013 the xdvik development team
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -23,17 +23,70 @@
#ifndef FONT_OPEN_H_
#define FONT_OPEN_H_
+
+#if FREETYPE || PS
+
+#include "util.h" /* get AVL basics */
+
+#if FREETYPE
+# include <ft2build.h>
+# include FT_FREETYPE_H
+#endif
+
+
+/*
+ * AVL tree structures.
+ */
+
+ /* Data structure for Type 1 fonts -- contents of psfonts.map */
+struct avl_t1 {
+ AVL_COMMON;
+ const char *psname; /* PS name of font */
+ const char *fontfile; /* (short) name of pfa/pfb file */
+ const char *encname; /* (short) name of encoding file */
+ const char *addinfo; /* additional PS instructions */
+# if FREETYPE
+ Boolean bad; /* if later found to be unloadable */
+ struct ftfont *ft; /* pointer to FreeType record */
+# endif
+};
+
+
+# if FREETYPE
+
+struct ftfont { /* info for FreeType font (Type 1 or TrueType) */
+ FT_Face face; /* NULL means not loaded yet */
+ struct font *first_size;
+ struct avl_t1 *t1;
+ /* struct avl_tt *tt; */
+ struct FT_StreamRec_ stream;
+ struct avl_enc *enc; /* pointer to encoding record */
+ double expn; /* expansion factor */
+};
+
+struct avl_enc {
+ AVL_COMMON;
+ Boolean valid;
+ const char *vec[256];
+};
+
+# endif /* FREETYPE */
+
+extern Boolean init_t1_lookup(void);
+extern Boolean lookup_t1_font(struct font *fontp, const char *fontname);
+extern FILE *open_t1_font (struct avl_t1 *t1p, const char **path_ret);
+extern void read_encoding(struct avl_enc *encp);
+
+#endif /* FREETYPE || PS */
+
+
extern FILE *font_open(
#if DELAYED_MKTEXPK
Boolean load_font_now,
#endif
struct font *fontp,
const char **font_ret,
- int *dpi_ret,
-#ifdef T1LIB
- int *t1id,
-#endif
- Boolean use_t1lib);
+ int *dpi_ret);
#if DELAYED_MKTEXPK
void reset_missing_font_count(void);