2022-01-13 16:35:03 +00:00
|
|
|
(** Experimental typesetter for cpdf *)
|
|
|
|
|
2021-11-18 11:09:09 -08:00
|
|
|
type glue =
|
|
|
|
{glen : float;
|
2021-11-19 15:21:37 -08:00
|
|
|
gstretch : float}
|
2021-11-18 11:09:09 -08:00
|
|
|
|
2021-11-18 14:48:25 -08:00
|
|
|
type element =
|
2021-12-01 16:11:33 -08:00
|
|
|
Text of char list
|
2021-11-18 11:09:09 -08:00
|
|
|
| HGlue of glue
|
|
|
|
| VGlue of glue
|
|
|
|
| NewLine
|
|
|
|
| NewPage
|
2022-10-18 13:48:35 +01:00
|
|
|
| Font of (Pdftext.font * float)
|
2021-11-19 16:28:13 -08:00
|
|
|
| BeginDest of Pdfdest.t
|
|
|
|
| EndDest
|
2021-12-14 14:07:52 +00:00
|
|
|
| BeginDocument
|
2021-11-18 11:09:09 -08:00
|
|
|
|
2021-11-18 14:48:25 -08:00
|
|
|
type t = element list
|
2021-11-15 17:42:17 -08:00
|
|
|
|
2021-11-21 14:15:06 -08:00
|
|
|
val to_string : t -> string
|
|
|
|
|
2021-12-14 12:57:27 +00:00
|
|
|
val font_widths : Pdftext.font -> float -> float array
|
|
|
|
|
|
|
|
val width_of_string : float array -> char list -> float
|
|
|
|
|
2021-11-18 14:48:25 -08:00
|
|
|
val typeset : float -> float -> float -> float -> Pdfpaper.t -> Pdf.t -> t -> Pdfpage.t list
|