summaryrefslogtreecommitdiff
path: root/TODO
blob: 78d579eb79f156738372de1d27feaaa9b90be310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
heh. bug in pdfselect on compressed object streams. gc takes forever, no objects remain...

lazy nametree
lazy pagetree

builtin standard cmap files (?)
put unicode strings in text object, not font (a la metro)

xml parser
unicode normaliser

path stroke/dash/flatten work on real path struct
turn into gel as second step after stroke/flatten
add intersector for metro union/xor/difference stuff

image rescale to exact size instead of by integer quantas

public / private api

fix the shading code:
	3 levels of detail patch mesh (quad, patch, tensor)
	subdivide to triangles on the fly
	draw tris as before
	reuse more code in the parsing
	error cleanup

--- WORLD ---

the fitz world is:
	the set of resources:
		trees, fonts, images, shades, colorspaces
	the list of pages:
		references to tree resources
	opaque / transparent / invisible ?

input device drivers create a fitz world from a document
	readps -- use ghostscript
	readpdf -- use mupdf
	readmetro -- use samus

	the mapping from file -> pages and resources
		internal to the driver, nothing fitz cares or knows about
		should be lazy -- loaded on an as-needed basis
		should be reference counted -- can free and reload resources

	minimal api (that works for *all* input drivers)
		open(file)
		close()
		nextpage()

	extended api (that may or may not work optimally)
		countpages()
		loadpage(number)

output drivers take a fitz world and produce whatever
	raster
	writeps
	writepdf
	writemetro

--- WORLD API ---

Fitz World APIs

Trees:
	fz_tree

	fz_node with subclasses

		leafs:
			fz_solidnode
			fz_imagenode
			fz_shadenode
			fz_pathnode
			fz_textnode

		branches:
			fz_transformnode
			fz_overnode
			fz_masknode
			fz_blendnode		# for pdf 1.4 and pcl rops
			fz_linknode
			fz_metanode

	construction api
	navigation api

Colorspaces:
	fz_colorspace
		fz_devicecolor	(gray, rgb, cmyk)
		fz_iccprofile	(icc profile colorspace)
		fz_separation	(how do we do alternate tint functions?)

Images:
	fz_image
		fz_jpegimage	# jpeg-compressed
		fz_tileimage	# 1,8,16 bit image chopped into tiles

		...or...
		fz_monoimage	# 1-bit image
		fz_byteimage	# 8-bit image
		fz_wordimage	# 16-bit image

Shades:
	fz_shade
		mesh of quads, patches, tensors

Fonts:
	fz_font
		fz_fakefont	# substitute fonts
		fz_t3font	# sub-trees define glyphs
		fz_psfont	# cff postscript font
		fz_ttfont	# truetype font


--- OLD ---

immediate plan:

	* clean up and 'freeze' public api

	* get font bbox from fontdescriptor if available
	* refactor image loading
	* refactor xref loading/repair
	* restructure build.c and interpret.c (ftb vs csi)
	* fix the colorspace/pattern/shading material mess
	* font loading:
		- configuration... where to find system files (asian font archive?)
		- system fontfile + cmap store
		- embedded fontfile store
		- split type3 and ftfont malloc (dont waste t3 charprocs on ft fonts)
		- make ftfontfile separate struct w/ refcounting
		- refactor font loading more. simple/cid/type3 have too much in common.

	* structure low/high level stuff
		- rewrite outline parser
		- implement comments

	* clean high-level api

	- go through spec and check all features!
	- altivec optimize

transparency (v2)
	- everything!

colorspace conversions (v2)
	- fast color cubes
	- proper colorspace conversions
	- gamut compression
	- extended render intents

image rendering (v2)
	- tiles
	- dct case
	- better filter than box
	- lazy decoding

rendering
	- fix glyphcache evictlast
	- bbox culling per glyph
	- render cache (link-nodes and scaled images and colorspaced shades)

fz_optimizetree()
	- error & memory
	- concatenate chained transforms
	- remove identity transforms

for filters:
	validate ahxd pushback
	go through eof responsibility
	be more defensive of api user errors
	jbig2 rewrite
	dctencode params
	dctdecode app marker
	jpxd rewrite (or do special trick to load into image directly)