summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik/font-open.h
diff options
context:
space:
mode:
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);