summaryrefslogtreecommitdiff
path: root/Build/source/texk/ps2pkm/pkout.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-17 21:41:51 +0000
committerKarl Berry <karl@freefriends.org>2006-01-17 21:41:51 +0000
commit487ca4806cc046076293cf6cc5fbba0db282bac7 (patch)
tree847b412ab5158dd7bdd7ed7e5a4cc3fbca94be32 /Build/source/texk/ps2pkm/pkout.h
parenta3d3111bfe26b8e5f5bc6049dfb2a4ca2edc7881 (diff)
texk 1
git-svn-id: svn://tug.org/texlive/trunk@1485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ps2pkm/pkout.h')
-rw-r--r--Build/source/texk/ps2pkm/pkout.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/Build/source/texk/ps2pkm/pkout.h b/Build/source/texk/ps2pkm/pkout.h
new file mode 100644
index 00000000000..cd14c8e38ae
--- /dev/null
+++ b/Build/source/texk/ps2pkm/pkout.h
@@ -0,0 +1,58 @@
+/*
+ * FILE: pkout.h
+ *
+ * PURPOSE: interface to te PK output functions (pkfile.c)
+ *
+ * COMMENT: See the pktest.c example program how to use the PK functions.
+ *
+ * VERSION: Febr. 1992
+ * Dec. 1993
+ *
+ * AUTHOR: Piet Tutelaers (rcpt@urc.tue.nl)
+ */
+
+#ifdef WORD16
+typedef long INT32;
+#else
+typedef int INT32;
+#endif
+
+/* A function for opening a pk file */
+void pk_open(char *name);
+
+/* A function for closing a pk file */
+void pk_close();
+
+/* A function for writing the preamble */
+void pk_preamble(char *comment, /* comment string: source of font */
+ float pointsize, /* design size in points */
+ INT32 checksum, /* checksum */
+ unsigned int h_res, /* horizontal resolution (dpi) */
+ unsigned int v_res); /* vertical resolution (dpi) */
+
+/* For packing a character */
+void pk_char(int char_code, /* character code 0..255 */
+ INT32 tfm_width, /* TFM width of character */
+ int h_escapement, /* horizontal escapement in pixels */
+ unsigned int width, /* width of bounding box */
+ unsigned int height, /* height of bounding box */
+ int h_offset, /* horizontal offset to reference point */
+ int v_offset, /* vertical offset to reference point */
+ int (*next_pixel)()); /* user's pixel generator */
+
+/* Barebone postample */
+void pk_postamble();
+
+/* PS2PK postamble */
+void ps2pk_postamble(char *fontname, /* The real FontName from the afm */
+ char *encname, /* The actual name, not the filename */
+ int base_res, /* basic resolution */
+ int h_res, /* Match against base_res for mag */
+ int v_res, /* Match against h_res for aspect_ratio */
+ float pointsize, /* Used for fontfacebyte calculation */
+ char *args); /* Essential ps2pk args */
+
+/* Here are some definitions to play with pixels */
+#define BLACK 1
+#define WHITE 0
+#define OTHER(pixel) (pixel==BLACK? WHITE: BLACK)