diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/ptexlib.h')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ptexlib.h | 129 |
1 files changed, 16 insertions, 113 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ptexlib.h b/Build/source/texk/web2c/luatexdir/ptexlib.h index 90b16589ed0..104e68b2c41 100644 --- a/Build/source/texk/web2c/luatexdir/ptexlib.h +++ b/Build/source/texk/web2c/luatexdir/ptexlib.h @@ -23,8 +23,6 @@ #ifndef LUATEXLIB # define LUATEXLIB -#define SVN_REV "unknown" /* temp hack */ - /* WEB2C macros and prototypes */ # if !defined(LUATEXCOERCE) # ifdef luatex @@ -49,53 +47,8 @@ extern double rint(double x); # include "openbsd-compat.h" -/***********************************************************************/ -/* from pdfpage.c */ - -typedef struct { - long m; /* mantissa (significand) */ - int e; /* exponent * -1 */ -} pdffloat; - -typedef struct { - pdffloat h; - pdffloat v; -} pdfpos; - -typedef enum { PMODE_NONE, PMODE_PAGE, PMODE_TEXT, PMODE_CHARARRAY, - PMODE_CHAR -} pos_mode; - -typedef enum { WMODE_H, WMODE_V } writing_mode; /* []TJ runs horizontal or vertical */ - -# define is_pagemode(p) ((p)->mode == PMODE_PAGE) -# define is_textmode(p) ((p)->mode == PMODE_TEXT) -# define is_chararraymode(p) ((p)->mode == PMODE_CHARARRAY) -# define is_charmode(p) ((p)->mode == PMODE_CHAR) - -# define setpdffloat(a,b,c) {(a).m = (b); (a).e = (c);} - -typedef struct { - pdfpos pdf; /* pos. on page (PDF page raster) */ - pdfpos pdf_bt_pos; /* pos. at begin of BT-ET group (PDF page raster) */ - pdfpos pdf_tj_pos; /* pos. at begin of TJ array (PDF page raster) */ - pdffloat cw; /* pos. within [(..)..]TJ array (glyph raster); - cw.e = fractional digits in /Widths array */ - pdffloat tj_delta; /* rel. movement in [(..)..]TJ array (glyph raster) */ - pdffloat fs; /* font size in PDF units */ - pdffloat hz; /* HZ expansion factor */ - pdffloat ext; /* ExtendFont factor */ - pdffloat cm[6]; /* cm array */ - pdffloat tm[6]; /* Tm array */ - double k1; /* conv. factor from TeX sp to PDF page raster */ - double k2; /* conv. factor from PDF page raster to TJ array raster */ - internal_font_number f_cur; /* TeX font number */ - internal_font_number f_pdf; /* /F* font number, of unexpanded base font! */ - writing_mode wmode; /* PDF writing mode WMode (horizontal/vertical) */ - pos_mode mode; /* current positioning mode */ -} pdfstructure; - -/***********************************************************************/ +# include "pdf/pagetree.h" +# include "pdf/pdfpage.h" /* pdftexlib type declarations */ typedef struct { @@ -104,20 +57,19 @@ typedef struct { boolean valid; } key_entry; -struct _subfont_entry; -typedef struct _subfont_entry subfont_entry; - -struct _subfont_entry { +typedef struct _subfont_entry { char *infix; /* infix for this subfont, eg "01" */ long charcodes[256]; /* the mapping for this subfont as read from sfd */ - subfont_entry *next; -}; + struct _subfont_entry *next; +} subfont_entry; typedef struct { char *name; /* sfd name, eg "Unicode" */ subfont_entry *subfont; /* linked list of subfonts */ } sfd_entry; +# include "font/mapfile.h" + typedef struct { integer fe_objnum; /* object number */ char *name; /* encoding file name */ @@ -137,25 +89,6 @@ typedef struct { # define FD_FLAGS_DEFAULT_NON_EMBED 0x22 /* a nonsymbolic serif font */ -typedef struct { - /* parameters scanned from the map file: */ - char *tfm_name; /* TFM file name (1st field in map line) */ - char *sfd_name; /* subfont directory name, like @sfd_name@ */ - char *ps_name; /* PostScript name (optional 2nd field in map line) */ - integer fd_flags; /* font descriptor /Flags (PDF Ref. section 5.7.1) */ - integer slant; /* SlantFont */ - integer extend; /* ExtendFont */ - char *encname; /* encoding file name */ - char *ff_name; /* font file name */ - unsigned short type; /* various flags */ - short pid; /* Pid for truetype fonts */ - short eid; /* Eid for truetype fonts */ - /* parameters NOT scanned from the map file: */ - subfont_entry *subfont; /* subfont mapping */ - unsigned short links; /* link flags from tfm_tree and ps_tree */ - boolean in_use; /* true if this structure has been referenced already */ -} fm_entry; - typedef struct glw_entry_ { /* subset glyphs for inclusion in CID-based fonts */ unsigned int id; /* glyph CID */ signed int wd; /* glyph width in 1/1000 em parts */ @@ -200,11 +133,6 @@ typedef struct fo_entry_ { /**********************************************************************/ -typedef struct { - char *ff_name; /* base name of font file */ - char *ff_path; /* full path to font file */ -} ff_entry; - typedef short shalfword; typedef struct { integer charcode, cwidth, cheight, xoff, yoff, xescape, rastersize; @@ -232,8 +160,8 @@ extern void prompt_file_name(char *s, char *e); extern str_number make_name_string(void); extern void print_file_name(str_number, str_number, str_number); -/* A hack to counter fixwrites */ -# define do_write_wterm(a) fprintf(stdout, "%s", a) +/* luainit.c */ +extern void write_svnversion(char *a); /* pdftexlib function prototypes */ @@ -242,20 +170,6 @@ extern integer get_fontfile_num(int); extern integer get_fontname_num(int); extern void epdf_free(void); -/* mapfile.c */ -extern fm_entry *lookup_fontmap(char *); -extern boolean hasfmentry(internalfontnumber); -extern void fm_free(void); -extern void fm_read_info(void); -extern ff_entry *check_ff_exist(char *, boolean); -extern void pdfmapfile(integer); -extern void pdfmapline(integer); -extern void pdf_init_map_file(string map_name); -extern fm_entry *new_fm_entry(void); -extern void delete_fm_entry(fm_entry *); -extern int avl_do_entry(fm_entry *, int); -extern int check_std_t1font(char *s); - /* papersiz.c */ extern integer myatodim(char **); extern integer myatol(char **); @@ -346,24 +260,6 @@ extern scaled getlly(); extern scaled geturx(); extern scaled getury(); -/* pdf/pdfpage.c */ -void pdf_place_rule(scaled h, scaled v, scaled wd, scaled ht); -void pdf_place_glyph(internal_font_number f, integer c); -void pdf_place_form(scaled h, scaled v, integer i); -void pdf_goto_pagemode(); -void pdf_page_init(); -void pdf_set_pos(scaled h, scaled v); -void pdf_end_string_nl(); -void pdf_print_charwidth(internal_font_number f, int i); -boolean calc_pdfpos(pdfstructure * p, scaledpos * pos); -void print_pdffloat(pdffloat * f); -void pdf_print_cm(pdffloat * cm); - -/* pdf/pagetree.c */ -extern integer pdf_do_page_divert(integer, integer); -extern void pdf_do_page_undivert(integer, integer); -extern integer output_pages_tree(); - /* writeenc.c */ extern fe_entry *get_fe_entry(char *); extern void enc_free(void); @@ -619,6 +515,11 @@ void lua_node_filter_s(int filterid, char *extrainfo); int lua_linebreak_callback(int is_broken, halfword head_node, halfword * new_head); +void lua_pdf_literal(int i); +void copy_pdf_literal(pointer r, pointer p); +void free_pdf_literal(pointer p); +void show_pdf_literal(pointer p); + void load_tex_patterns(int curlang, halfword head); void load_tex_hyphenation(int curlang, halfword head); @@ -744,6 +645,8 @@ void flush_loggable_info(void); void luacall(int s, int nameptr); void luatokencall(int p, int nameptr); +extern void check_texconfig_init(void); + void tex_error(char *msg, char **hlp); scaled divide_scaled(scaled s, scaled m, integer dd); |