pdf_doc_set_creator("TeX");\r
pdf_files_init();\r
pdf_init_device(0.000015202, 2, 0);\r
+ // TODO: pdfTeX's page width and height.\r
+ // page_width = pdf_page_width != 0 ? <- : width(p) + 2 * (pdf_h_origin + h_offset);\r
+ // page_height = pdf_page_height != 0 ? <- : height(p) + depth(p) + 2 * (pdf_v_origin + v_offset);\r
pdf_open_document(pdf_file_name, 0, 595.0, 842.0, 0, 0, (1 << 4));\r
spc_exec_at_begin_document();\r
}\r
return id;\r
}\r
\r
+void pdf_out_char (internal_font_number f, ASCII_code c)\r
+{\r
+ pdf_rect rect;\r
+ char cbuf[2];\r
+ cbuf[0] = c;\r
+ cbuf[1] = 0;\r
+ pdf_dev_set_string(cur_h, -cur_v, cbuf, 1, char_width(f, char_info(f, c)), font_id[f], 1);\r
+ pdf_dev_set_rect(&rect, cur_h, -cur_v, char_width(f, char_info(f, c)),\r
+ char_height(f, height_depth(char_info(f, c))),\r
+ char_depth(f, height_depth(char_info(f, c))));\r
+ pdf_doc_expand_box(&rect);\r
+}\r
+\r
void pdf_hlist_out (void)\r
{\r
scaled base_line;\r
dvi_f = f;\r
}\r
\r
- char cbuf[2] = {c, 0};\r
- pdf_dev_set_string(cur_h, -cur_v, cbuf, 1, char_width(f, char_info(f, c)), font_id[dvi_f], 1);\r
- {\r
- pdf_rect rect;\r
- pdf_dev_set_rect(&rect, cur_h, -cur_v,\r
- char_width (f, char_info(f, c)),\r
- char_height(f, height_depth(char_info(f, c))),\r
- char_depth (f, height_depth(char_info(f, c))));\r
- pdf_doc_expand_box(&rect);\r
- }\r
+ pdf_out_char(dvi_f, c);\r
cur_h = cur_h + char_width(f, char_info(f, c));\r
p = link(p);\r
} while (!(!is_char_node(p)));\r