mirror of
				https://github.com/johnwhitington/cpdf-source.git
				synced 2025-06-05 22:09:39 +02:00 
			
		
		
		
	Beginning simple typesetter
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @@ -1,7 +1,7 @@ | |||||||
| # Build the cpdf command line tools and top level | # Build the cpdf command line tools and top level | ||||||
| MODS = cpdfyojson cpdfxmlm \ | MODS = cpdfyojson cpdfxmlm \ | ||||||
|        cpdfunicodedata cpdferror cpdfjson cpdfstrftime cpdfcoord cpdfattach \ |        cpdfunicodedata cpdferror cpdfjson cpdfstrftime cpdfcoord cpdfattach \ | ||||||
|        cpdfpagespec cpdfposition cpdf cpdffont cpdfcommand |        cpdfpagespec cpdfposition cpdf cpdffont cpdftype cpdfcommand | ||||||
|  |  | ||||||
| SOURCES = $(foreach x,$(MODS),$(x).ml $(x).mli) cpdfcommandrun.ml | SOURCES = $(foreach x,$(MODS),$(x).ml $(x).mli) cpdfcommandrun.ml | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								cpdftype.ml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								cpdftype.ml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  | (* cpdftype.ml *) | ||||||
|  | type box = | ||||||
|  |   Text of string | ||||||
|  | | Glue of float | ||||||
|  | | Newline | ||||||
|  | | Font of string | ||||||
|  | | BoldOn | ||||||
|  | | BoldOff | ||||||
|  | | ItalicOn | ||||||
|  | | ItalicOff | ||||||
|  |  | ||||||
|  | type t = box list | ||||||
|  |  | ||||||
|  | let typeset papersize boxes = | ||||||
|  |   [Pdfpage.blankpage papersize] | ||||||
							
								
								
									
										14
									
								
								cpdftype.mli
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								cpdftype.mli
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | |||||||
|  | (* Simple typesetter *) | ||||||
|  | type box = | ||||||
|  |   Text of string | ||||||
|  | | Glue of float | ||||||
|  | | Newline | ||||||
|  | | Font of string | ||||||
|  | | BoldOn | ||||||
|  | | BoldOff | ||||||
|  | | ItalicOn | ||||||
|  | | ItalicOff | ||||||
|  |  | ||||||
|  | type t = box list | ||||||
|  |  | ||||||
|  | val typeset : Pdfpaper.t -> t -> Pdfpage.t list | ||||||
		Reference in New Issue
	
	Block a user