blob: b78c57b2726e6b8c8293bc7e0aa568a7de94cf8a [file] [log] [blame]
David Turnerf9b8dec2000-06-16 19:34:52 +00001LATEST CHANGES
2
David Turner9b3d1c72000-07-07 19:47:34 +00003 - found a memory leak in the "type1" driver
4
5 - incorporated Tom's patches to support flex operators correctly
6 in OpenType/CFF fonts.. Now all I need is to support pure CFF
7 and CEF fonts to be done with this driver.. :-)
8
9 - added the Windows FNT/FON driver in "src/winfonts". For now,
10 it always "simulates" a Unicode charmap, so it shouldn't be
11 considered completed right now..
12
13 It's there to be more a proof of concept than anything else
14 anyway. The driver is a single C source file, that compiles
15 to 3 Kb of code..
16
17 I'm still working on the PCF/BDF drivers.. but I'm too lazy
18 to finish them now..
19
20
David Turnerc06aba22000-06-30 23:38:23 +000021 - CHANGES TO THE HIGH-LEVEL API
22
23 o FT_Get_Kerning has a new parameter that allows you to select
24 the coordinates of the kerning vector ( font units, scaled,
25 scaled + grid-fitted ).
26
27 o the outline functions are now in <freetype/ftoutln.h> and not
28 part of <freetype/freetype.h> anymore
29
30 o <freetype/ftmodule.h> now contains declarations for
31 FT_New_Library, FT_Done_Library, FT_Add_Default_Modules
32
33 o the so-called convenience functions have moved from "ftoutln.c"
34 to "ftglyph.c", and are thus available with this optional component
35 of the library. They are declared in <freetype/ftglyph.h> now..
36
37 o anti-aliased rendering is now the default for FT_Render_Glyph
38 (i.e. corresponds to render_mode == 0 == ft_render_mode_normal).
39 To generate a monochrome bitmap, use ft_render_mode_mono, or the
40 FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char.
41
42 FT_LOAD_ANTI_ALIAS is still defined, but values to 0.
43
44 o <freetype/freetype.h> now include <freetype/config/ftconfig.h>,
45 solving a few headaches :-)
46
47 o the type FT_GlyphSlotRec has now a "library" field.
48
49
50
51 - CHANGES TO THE "ftglyph.h" API
52
53 This API has been severely modified in order to make it simpler,
54 clearer, and more efficient. It certainly now looks like a real
55 "glyph factory" object, and allows client applications to manage
56 (i.e. transform, bbox and render) glyph images without ever knowing
57 their original format.
58
David Turner98258612000-06-28 20:43:07 +000059 - added support for CID-keyed fonts to the CFF driver.
60 maybe support for pure CFF + CEF fonts should come in ??
David Turner9d636b62000-06-27 23:32:27 +000061
62
63 - cleaned up source code in order to avoid two functions with the
64 same name. Also changed the names of the files in "type1z" from
65 "t1XXXX" to "z1XXXX" in order to avoid any conflicts.
66
67 "make multi" now works well :-)
68
David Turner81bb4ad2000-06-28 04:19:49 +000069 Also removed the use of "cidafm" for now, even if the source files
70 are still there. This functionality will certainly go into a specific
71 module..
David Turnerc06aba22000-06-30 23:38:23 +000072
73
74
75 - ADDED SUPPORT FOR THE AUTO-HINTER
76
77 It works :-) I have a demo program which simply is a copy of "ftview"
78 that does a FT_Add_Module( library, &autohinter_module_class ) after
79 library initialisation, and Type 1 & OpenType/CFF fonts are now hinted.
80
81 CID fonts are not hinted, as they include no charmap and the auto-hinter
82 doesn't include "generic" global metrics computations yet..
83
84 Now, I need to release this thing to the FreeType 2 source..
85
86
87
David Turner9d636b62000-06-27 23:32:27 +000088
89
90 - CHANGES TO THE RENDERER MODULES
91
92 the monochrome and smooth renderers are now in two distinct directories,
93 namely "src/raster1" and "src/smooth". Note that the old "src/renderer"
94 is now gone..
95
96 I ditched the 5-gray-levels renderers. Basically, it involved a simple
97 #define toggle in 'src/raster1/ftraster.c'
98
99 FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now select
100 the best renderer available, depending on render mode. If the current
101 renderer for a given glyph image format isn't capable of supporting
102 the render mode, another one will be found in the library's list.
103
104 This means that client applications do not need to switch or set the
105 renderers themselves (as in the latest change), they'll get what they
106 want automatically... At last..
107
108 Changed the demo programs accordingly..
109
110
111
David Turnerf0df85b2000-06-22 00:17:42 +0000112 - MAJOR INTERNAL REDESIGN:
113
114 A lot of internal modifications have been performed lately on the
115 source in order to provide the following enhancements:
116
117 - more generic module support:
118
119 The FT_Module type is now defined to represent a handle to a given
120 module. The file <freetype/ftmodule.h> contains the FT_Module_Class
121 definition, as well as the module-loading public API
122
123 The FT_Driver type is still defined, and still represents a pointer
124 to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
125 FT_Get_Driver by FT_Get_Module, etc..
126
127
128 - support for generic glyph image types:
129
130 The FT_Renderer type is a pointer to a module used to perform various
131 operations on glyph image.
132
133 Each renderer is capable of handling images in a single format
134 (e.g. ft_glyph_format_outline). Its functions are used to:
135
136 - transform an glyph image
137 - render a glyph image into a bitmap
138 - return the control box (dimensions) of a given glyph image
139
140
141 The scan converters "ftraster.c" and "ftgrays.c" have been moved
142 to the new directory "src/renderer", and are used to provide two
143 default renderer modules.
144
145 One corresponds to the "standard" scan-converter, the other to the
146 "smooth" one.
147
148 The current renderer can be set through the new function
149 FT_Set_Renderer.
150
151 The old raster-related function FT_Set_Raster, FT_Get_Raster and
152 FT_Set_Raster_Mode have now disappeared, in favor of the new:
153
154 FT_Get_Renderer
155 FT_Set_Renderer
156
157 see the file <freetype/ftrender.h> for more details..
158
159 These changes were necessary to properly support different scalable
160 formats in the future, like bi-color glyphs, etc..
161
162
163 - glyph loader object:
164
165 A new internal object, called a 'glyph loader' has been introduced
166 in the base layer. It is used by all scalable format font drivers
167 to load glyphs and composites.
168
169 This object has been created to reduce the code size of each driver,
170 as each one of them basically re-implemented its functionality.
171
172 See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
173 more information..
174
175
176
177 - FT_GlyphSlot had new fields:
178
179 In order to support extended features (see below), the FT_GlyphSlot
180 structure has a few new fields:
181
182 linearHoriAdvance: this field gives the linearly scaled (i.e.
183 scaled but unhinted) advance width for the glyph,
184 expressed as a 16.16 fixed pixel value. This
185 is useful to perform WYSIWYG text.
186
187 linearVertAdvance: this field gives the linearly scaled advance
188 height for the glyph (relevant in vertical glyph
189 layouts only). This is useful to perform
190 WYSIWYG text.
191
192 Note that the two above field replace the removed "metrics2" field
193 in the glyph slot.
194
195 advance: this field is a vector that gives the transformed
196 advance for the glyph. By default, it corresponds
197 to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
198 was specified when calling FT_Load_Glyph or FT_Load_Char
199
200 bitmap_left: this field gives the distance in integer pixels from
201 the current pen position to the left-most pixel of
202 a glyph image WHEN IT IS A BITMAP. It is only valid
203 when the "format" field is set to
204 "ft_glyph_format_bitmap", for example, after calling
205 the new function FT_Render_Glyph.
206
207 bitmap_top: this field gives the distance in integer pixels from
208 the current pen position (located on the baseline) to
209 the top-most pixel of the glyph image WHEN IT IS A
210 BITMAP. Positive values correspond to upwards Y.
211
212 loader: this is a new private field for the glyph slot. Client
213 applications should not touch it..
214
215
216 - support for transforms and direct rendering in FT_Load_Glyph:
217
218 Most of the functionality found in <freetype/ftglyph.h> has been
219 moved to the core library. Hence, the following:
220
221 - a transform can be specified for a face through FT_Set_Transform.
222 this transform is applied by FT_Load_Glyph to scalable glyph images
223 (i.e. NOT TO BITMAPS) before the function returns, unless the
224 bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
225
226
227 - once a glyph image has been loaded, it can be directly converted to
228 a bitmap by using the new FT_Render_Glyph function. Note that this
229 function takes the glyph image from the glyph slot, and converts
230 it to a bitmap whose properties are returned in "face.glyph.bitmap",
231 "face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
232 native image might be lost after the conversion.
233
234
235 - when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
236 and FT_Load_Char functions will call FT_Render_Glyph automatically
237 when needed.
238
239
240
241
David Turnerf9b8dec2000-06-16 19:34:52 +0000242 - reformated all modules source code in order to get rid of the basic
243 data types redifinitions (i.e. "TT_Int" instead of "FT_Int", "T1_Fixed"
244 instead of "FT_Fixed"). Hence the format-specific prefixes like "TT_",
245 "T1_", "T2_" and "CID_" are only used for relevant structures..
246
247============================================================================
248OLD CHANGES FOR BETA 7
David Turner3475e7f2000-05-17 20:56:01 +0000249
David Turner2b9be992000-06-07 23:41:17 +0000250 - bug-fixed the OpenType/CFF parser. It now loads and displays my two
251 fonts nicely, but I'm pretty certain that more testing is needed :-)
252
253 - fixed the crummy Type 1 hinter, it now handles accented characters
254 correctly (well, the accent is not always well placed, but that's
255 another problem..)
256
David Turner04aa8002000-06-01 03:27:48 +0000257 - added the CID-keyed Type 1 driver in "src/cid". Works pretty well for
258 only 13 Kb of code ;-) Doesn't read AFM files though, nor the really
259 useful CMAP files..
260
261 - fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks to
262 Boris Letocha for spotting them and providing a fix..
263
David Turner4f99c3c2000-05-29 20:55:13 +0000264 - fixed potential "divide by zero" bugs in ftcalc.c.. my god..
265
266 - added source code for the OpenType/CFF driver (still incomplete though..)
267
268 - modified the SFNT driver slightly to perform more robust header
269 checks in TT_Load_SFNT_Header. This prevents certain font files
270 (e.g. some Type 1 Multiple Masters) from being incorrectly "recognized"
271 as TrueType font files..
272
David Turner2e421312000-05-26 22:13:17 +0000273 - moved a lot of stuff from the TrueType driver to the SFNT module,
274 this allows greater code re-use between font drivers (e.g. TrueType,
275 OpenType, Compact-TrueType, etc..)
276
277 - added a tiny segment cache to the SFNT Charmap 4 decoder, in order
278 to minimally speed it up..
279
David Turner11187202000-05-26 17:13:23 +0000280 - added support for Multiple Master fonts in "type1z". There is also
281 a new file named <freetype/ftmm.h> which defines functions to
282 manage them from client applications.
283
284 The new file "src/base/ftmm.c" is also optional to the engine..
285
286 - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) +
287 small bug fixes in FT_Load_Glyph, the "type1" driver, etc..
288
David Turnerf5dcdd52000-05-23 22:16:27 +0000289 - a minor fix to the Type 1 driver to let them apply the font matrix
290 correctly (used for many oblique fonts..)
291
David Turner51179f02000-05-18 16:18:05 +0000292 - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
293 to use %p instead of %lx).. Thanks to Karl Robillard
294
David Turner109fcf62000-05-17 23:35:37 +0000295 - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added
296 a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when
297 loaded from a file (maybe I should move the bitmap cropper to the
298 base layer ??).
299
David Turner3475e7f2000-05-17 20:56:01 +0000300 - changed the default number of gray levels of the smooth renderer to
301 256 (instead of the previous 128). Of course, the human eye can't
302 see any difference ;-)
303
304 - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of
305 subglyphs in a TrueType font now..
306
307=============================================================================
308OLD CHANGES 16 May 2000
David Turnerefce08d2000-05-11 18:23:52 +0000309
David Turner968f0c32000-05-16 23:26:01 +0000310 - tagged "BETA-6" in the CVS tree. This one is a serious release candidate
311 even though it doesn't incorporate the auto-hinter yet..
312
313 - various obsolete files were removed, and copyright header updated
314
315 - finally updated the standard raster to fix the monochrome rendering bug
316 + re-enable support for 5-gray levels anti-aliasing (suck, suck..)
317
318 - created new header files, and modified sources accordingly:
David Turnere49ab252000-05-16 23:44:38 +0000319
David Turner968f0c32000-05-16 23:26:01 +0000320 <freetype/fttypes.h> - simple FreeType types, without the API
321 <freetype/internal/ftmemory.h> - definition of memory-management macros
322
323 - added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h>
324
David Turnerc30aea92000-05-12 15:01:18 +0000325 - light update/cleaning of the build system + changes to the sources in
326 order to get rid of _all_ compiler warnings with three compilers, i.e:
327
328 gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX"
329 and LCC
330
331 IMPORTANT NOTE FOR WIN32-LCC USERS:
332 |
333 | It seems the C pre-processor that comes with LCC is broken, it
334 | doesn't recognize the ANSI standard directives # and ## correctly
335 | when one of the argument is a macro. Also, something like:
David Turnere49ab252000-05-16 23:44:38 +0000336 |
David Turnerc30aea92000-05-12 15:01:18 +0000337 | #define F(x) print##x
David Turnere49ab252000-05-16 23:44:38 +0000338 |
David Turnerc30aea92000-05-12 15:01:18 +0000339 | F(("hello"))
David Turnere49ab252000-05-16 23:44:38 +0000340 |
David Turnerc30aea92000-05-12 15:01:18 +0000341 | will get incorrectly translated to:
David Turnere49ab252000-05-16 23:44:38 +0000342 |
David Turnerc30aea92000-05-12 15:01:18 +0000343 | print "hello")
David Turnere49ab252000-05-16 23:44:38 +0000344 |
David Turnerc30aea92000-05-12 15:01:18 +0000345 | by its pre-processor. For this reason, you simply cannot build
346 | FreeType 2 in debug mode with this compiler..
347
348
David Turnerbfe2f982000-05-12 12:17:15 +0000349 - yet another massive grunt work. I've changed the definition of the
350 EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
351 an argument, which is the function's return value type.
David Turnere49ab252000-05-16 23:44:38 +0000352
David Turnerbfe2f982000-05-12 12:17:15 +0000353 This is necessary to compile FreeType as a DLL on Windows and OS/2.
354 Depending on the compiler used, a compiler-specific keyword like __export
355 or __system must be placed before (VisualC++) or after (BorlandC++)
356 the type..
David Turnere49ab252000-05-16 23:44:38 +0000357
David Turnerbfe2f982000-05-12 12:17:15 +0000358 Of course, this needed a lot of changes throughout the source code
359 to make it compile again... All cleaned up now, apparently..
360
361 Note also that there is a new EXPORT_VAR macro defined to allow the
362 _declaration_ of an exportable public (constant) variable. This is the
363 case of the raster interfaces (see ftraster.h and ftgrays.h), as well
364 as each module's interface (see sfdriver.h, psdriver.h, etc..)
365
366 - new feature: it is now possible to pass extra parameters to font
367 drivers when creating a new face object. For now, this
368 capability is unused. It could however prove to be useful
369 in a near future..
370
371 the FT_Open_Args structure was changes, as well as the internal
372 driver interface (the specific "init_face" module function has now
373 a different signature).
374
375 - updated the tutorial (not finished though).
David Turnerc30aea92000-05-12 15:01:18 +0000376 - updated the top-level BUILD document
David Turnerbfe2f982000-05-12 12:17:15 +0000377
David Turnerc60c61c2000-05-12 15:26:58 +0000378 - fixed a potential memory leak that could occur when loading embedded
379 bitmaps.
380
David Turnerbfe2f982000-05-12 12:17:15 +0000381 - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as
382 it was missing from the public header (the implementation was already
383 in "ftobjs.c").
384
385 - the file <freetype/fterrors.h> has been seriously updated in order to
386 allow the automatic generation of error message tables. See the comments
387 within it for more information.
388
David Turnera9c251c2000-05-11 18:36:19 +0000389 - major directory hierarchy re-organisation. This was done for two things:
David Turnere49ab252000-05-16 23:44:38 +0000390
David Turnera9c251c2000-05-11 18:36:19 +0000391 * first, to ease the "manual" compilation of the library by requiring
392 at lot less include paths :-)
David Turnerbfe2f982000-05-12 12:17:15 +0000393
David Turnera9c251c2000-05-11 18:36:19 +0000394 * second, to allow external programs to effectively access internal
395 data fields. For example, this can be extremely useful if someone
396 wants to write a font producer or a font manager on top of FreeType.
397
398 Basically, you should now use the 'freetype/' prefix for header inclusion,
399 as in:
David Turnere49ab252000-05-16 23:44:38 +0000400
David Turnera9c251c2000-05-11 18:36:19 +0000401 #include <freetype/freetype.h>
402 #include <freetype/ftglyph.h>
403
404 Some new include sub-directories are available:
David Turnere49ab252000-05-16 23:44:38 +0000405
David Turnera9c251c2000-05-11 18:36:19 +0000406 a. the "freetype/config" directory, contains two files used to
407 configure the build of the library. Client applications should
408 not need to look at these normally, but they can if they want.
David Turnere49ab252000-05-16 23:44:38 +0000409
David Turnera9c251c2000-05-11 18:36:19 +0000410 #include <freetype/config/ftoption.h>
411 #include <freetype/config/ftconfig.h>
David Turnere49ab252000-05-16 23:44:38 +0000412
David Turnera9c251c2000-05-11 18:36:19 +0000413 b. the "freetype/internal" directory, contains header files that
414 describes library internals. These are the header files that were
415 previously found in the "src/base" and "src/shared" directories.
416
417
418 As usual, the build system and the demos have been updated to reflect
419 the change..
David Turnere49ab252000-05-16 23:44:38 +0000420
David Turnera9c251c2000-05-11 18:36:19 +0000421 Here's a layout of the new directory hierarchy:
David Turnere49ab252000-05-16 23:44:38 +0000422
David Turnera9c251c2000-05-11 18:36:19 +0000423 TOP
424 include/
425 freetype/
426 freetype.h
427 ...
428 config/
429 ftoption.h
430 ftconfig.h
431 ftmodule.h
David Turnere49ab252000-05-16 23:44:38 +0000432
David Turnera9c251c2000-05-11 18:36:19 +0000433 internal/
434 ftobjs.h
435 ftstream.h
436 ftcalc.h
437 ...
David Turnere49ab252000-05-16 23:44:38 +0000438
David Turnera9c251c2000-05-11 18:36:19 +0000439 src/
440 base/
441 ...
David Turnere49ab252000-05-16 23:44:38 +0000442
David Turnera9c251c2000-05-11 18:36:19 +0000443 sfnt/
444 psnames/
445 truetype/
446 type1/
447 type1z/
448
449
450 Compiling a module is now much easier, for example, the following should
David Turner968f0c32000-05-16 23:26:01 +0000451 work when in the TOP directory on an ANSI build:
David Turnere49ab252000-05-16 23:44:38 +0000452
David Turnera9c251c2000-05-11 18:36:19 +0000453 gcc -c -I./include -I./src/base src/base/ftbase.c
454 gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
455 etc..
456
457 (of course, using -Iconfig/<system> if you provide system-specific
458 configuration files).
David Turnerefce08d2000-05-11 18:23:52 +0000459
460
461 - updated the structure of FT_Outline_Funcs in order to allow
462 direct coordinate scaling within the outline decomposition routine
463 (this is important for virtual "on" points with TrueType outlines)
464 + updates to the rasters to support this..
465
466 - updated the OS/2 table loading code in "src/sfnt/ttload.c" in order
467 to support version 2 of the table (see OpenType 1.2 spec)
468
469 - created "include/tttables.h" and "include/t1tables.h" to allow
470 client applications to access some of the SFNT and T1 tables of a
471 face with a procedural interface (see FT_Get_Sfnt_Table())
472 + updates to internal source files to reflect the change..
473
474 - some cleanups in the source code to get rid of warnings when compiling
475 with the "-Wall -W -ansi -pedantic" options in gcc.
476
477 - debugged and moved the smooth renderer to "src/base/ftgrays.c" and
478 its header to "include/ftgrays.h"
479
480 - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with
481 up to 80 sub-glyphs !! Thanks to Werner
482
483================================================================================
484OLD CHANGES - 14-apr-2000
David Turner77054f22000-04-14 20:49:52 +0000485
486 - fixed a bug in the TrueType glyph loader that prevented the correct
487 loading of some CJK glyphs in mingli.ttf
David Turnere49ab252000-05-16 23:44:38 +0000488
David Turner77054f22000-04-14 20:49:52 +0000489 - improved the standard Type 1 hinter in "src/type1"
David Turnere49ab252000-05-16 23:44:38 +0000490
David Turner77054f22000-04-14 20:49:52 +0000491 - fixed two bugs in the experimental Type 1 driver in "src/type1z"
492 to handle the new XFree86 4.0 fonts (and a few other ones..)
493
494 - the smooth renderer is now complete and supports sub-banding
495 to render large glyphs at high speed. However, it is still located
496 in "demos/src/ftgrays.c" and should move to the library itself
497 in the next beta.. NOTE: The smooth renderer doesn't compile in
498 stand-alone mode anymore, but this should be fixed RSN..
David Turnere49ab252000-05-16 23:44:38 +0000499
David Turner77054f22000-04-14 20:49:52 +0000500 - introduced convenience functions to more easily deal with glyph
501 images, see "include/ftglyph.h" for more details, as well as the
502 new demo program named "demos/src/ftstring.c" that demonstrates
503 its use
504
505 - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
506 drivers (this is required by the auto-hinter to improve its results).
507
508 - changed the raster interface, in order to allow client applications
509 to provide their own span-drawing callbacks. However, only the
510 smooth renderer supports this. See "FT_Raster_Params" in the
511 file "include/ftimage.h"
512
513 - fixed a small bug in FT_MulFix that caused incorrect transform
514 computation !!
515
516 - Note: The tutorial is out-of-date, grumpf.. :-(
517
518================================================================================
519OLD CHANGES - 12-mar-2000
David Turnerc3c7e7f2000-03-13 14:19:31 +0000520
521 - changed the layout of configuration files : now, all ANSI configuration
522 files are located in "freetype2/config". System-specific over-rides
523 can be placed in "freetype2/config/<system>".
David Turnere49ab252000-05-16 23:44:38 +0000524
David Turnerc3c7e7f2000-03-13 14:19:31 +0000525 - moved all configuration macros to "config/ftoption.h"
David Turnere49ab252000-05-16 23:44:38 +0000526
David Turnerc3c7e7f2000-03-13 14:19:31 +0000527 - improvements in the Type 1 driver with AFM support
David Turnere49ab252000-05-16 23:44:38 +0000528
David Turnerc3c7e7f2000-03-13 14:19:31 +0000529 - changed the fields in the FT_Outline structure : the old "flags"
530 array is re-named "tags", while all ancient flags are encoded into
531 a single unsigned int named "flags".
532
533 - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in
534 "ftimage.h").
535
536 - changed outline functions to "FT_Outline_<action>" syntax
537
538 - added a smooth anti-alias renderer to the demonstration programs
539 - added Mac graphics driver (thanks Just)
David Turnere49ab252000-05-16 23:44:38 +0000540
David Turnerc3c7e7f2000-03-13 14:19:31 +0000541 - FT_Open_Face changed in order to received a pointer to a FT_Open_Args
542 descriptor..
David Turnere49ab252000-05-16 23:44:38 +0000543
David Turnerc3c7e7f2000-03-13 14:19:31 +0000544 - various cleanups, a few more API functions implemented (see FT_Attach_File)
545
546 - updated some docs
547
548================================================================================
549OLD CHANGES - 22-feb-2000
David Turner58c10b52000-02-22 14:31:42 +0000550
551 - introduced the "psnames" module. It is used to:
552
553 o convert a Postscript glyph name into the equivalent Unicode
554 character code (used by the Type 1 driver(s) to synthetize
555 on the fly a Unicode charmap).
556
557 o provide an interface to retrieve the Postscript names of
558 the Macintosh, Adobe Standard & Adobe Expert character codes.
559 (the Macintosh names are used by the SFNT-module postscript
560 names support routines, while the other two tables are used
561 by the Type 1 driver(s)).
562
563 - introduced the "type1z" alternate Type 1 driver. This is a (still
564 experimental) driver for the Type 1 format that will ultimately
565 replace the one in "src/type1". It uses pattern matching to load
566 data from the font, instead of a finite state analyzer. It works
567 much better than the "old" driver with "broken" fonts. It is also
568 much smaller (under 15 Kb).
569
570 - the Type 1 drivers (both in "src/type1" and "src/type1z") are
571 nearly complete. They both provide automatic Unicode charmap
572 synthesis through the "psnames" module. No re-encoding vector
573 is needed. (note that they still leak memory due to some code
574 missing, and I'm getting lazy).
575
576 Trivial AFM support has been added to read kerning information
577 but wasn't exactly tested as it should ;-)
578
579 - The TrueType glyph loader has been seriously rewritten (see the
580 file "src/truetype/ttgload.c". It is now much, much simpler as
581 well as easier to read, maintain and understand :-) Preliminary
582 versions introduced a memory leak that has been reported by Jack
583 Davis, and is now fixed..
584
585 - introduced the new "ft_glyph_format_plotter", used to represent
586 stroked outlines like Windows "Vector" fonts, and certain Type 1
587 fonts like "Hershey". The corresponding raster will be written
588 soon.
589
590 - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
591 interface that uses a structure to describe the input stream,
592 the driver (if required), etc..
593
594TODO
595 - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
596
597 - Add a function like FT_Load_Character( face, char_code, load_flags )
598 that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph
599 to ease developer's work.
600
601 - Update the tutorial !!
602 - consider adding support for Multiple Master fonts in the Type 1
603 drivers.
604
605 - Test the AFM routines of the Type 1 drivers to check that kerning
606 information is returned correctly.
607
608 - write a decent auto-gridding component !! We need this to release
609 FreeType 2.0 gold !
610
611
612----- less urgent needs : ----------
613 - add a CFF/Type2 driver
614 - add a BDF driver
615 - add a FNT/PCF/HBF driver
616 - add a Speedo driver from the X11 sources
617
618
619==============================================================================
620OLDER CHANGES - 27-jan-2000
David Turner633da992000-01-27 14:07:33 +0000621
622 - updated the "sfnt" module interface to allow several SFNT-based
623 drivers to co-exist peacefully
David Turnere49ab252000-05-16 23:44:38 +0000624
David Turner633da992000-01-27 14:07:33 +0000625 - updated the "T1_Face" type to better separate Postscript font content
626 from the rest of the FT_Face structure. Might be used later by the
627 CFF/Type2 driver..
David Turnere49ab252000-05-16 23:44:38 +0000628
David Turner633da992000-01-27 14:07:33 +0000629 - added an experimental replacement Type 1 driver featuring advanced
630 (and speedy) pattern matching to retrieve the data from postscript
631 fonts.
632
633 - very minor changes in the implementation of FT_Set_Char_Size and
634 FT_Set_Pixel_Sizes (they now implement default to ligthen the
635 font driver's code).
636
637
638=============================================================================
639OLD MESSAGE
640
David Turnerd2b1f351999-12-16 23:11:37 +0000641This file summarizes the changes that occured since the last "beta" of FreeType 2.
642Because the list is important, it has been divided into separate sections:
643
David Turner5951ce91999-12-29 00:53:44 +0000644Table Of Contents:
645
646 I High-Level Interface (easier !)
647 II Directory Structure
648 III Glyph Image Formats
649 IV Build System
650 V Portability
651 VI Font Drivers
David Turnerd2b1f351999-12-16 23:11:37 +0000652
653-----------------------------------------------------------------------------------------
654High-Level Interface :
655
656 The high-level API has been considerably simplified. Here is how :
657
David Turner5951ce91999-12-29 00:53:44 +0000658 - resource objects have disappeared. this means that face objects can
659 now be created with a single function call (see FT_New_Face and
David Turnerd2b1f351999-12-16 23:11:37 +0000660 FT_Open_Face)
David Turnere49ab252000-05-16 23:44:38 +0000661
David Turnerd2b1f351999-12-16 23:11:37 +0000662 - when calling either FT_New_Face & FT_Open_Face, a size object and a
663 glyph slot object are automatically created for the face, and can be
664 accessed through "face->glyph" and "face->size" if one really needs to.
665 In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
David Turnere49ab252000-05-16 23:44:38 +0000666
David Turnerd2b1f351999-12-16 23:11:37 +0000667 - similarly, FT_Load_Glyph now only takes a "face" argument (instead of
668 a glyph slot and a size). Also, it's "result" parameter is gone, as
669 the glyph image type is returned in the field "face->glyph.format"
David Turnere49ab252000-05-16 23:44:38 +0000670
David Turnerd2b1f351999-12-16 23:11:37 +0000671 - the list of available charmaps is directly accessible through
672 "face->charmaps", counting "face->num_charmaps" elements. Each
673 charmap has an 'encoding' field which specifies which known encoding
674 it deals with. Valid values are, for example :
David Turnere49ab252000-05-16 23:44:38 +0000675
David Turnerd2b1f351999-12-16 23:11:37 +0000676 ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
677 ft_encoding_apple_roman
678 ft_encoding_sjis
679 ft_encoding_adobe_standard
David Turner5951ce91999-12-29 00:53:44 +0000680 ft_encoding_adobe_expert
David Turnere49ab252000-05-16 23:44:38 +0000681
David Turnerd2b1f351999-12-16 23:11:37 +0000682 other values may be added in the future. Each charmap still holds its
683 "platform_id" and "encoding_id" values in case the encoding is too
684 exotic for the current library
685
686
687-----------------------------------------------------------------------------------------
688Directory Structure:
689
690 Should seem obvious to most of you:
691
692 freetype/
693 config/ -- configuration sub-makefiles
694 ansi/
David Turner5951ce91999-12-29 00:53:44 +0000695 unix/ -- platform-specific configuration files
David Turnerd2b1f351999-12-16 23:11:37 +0000696 win32/
697 os2/
698 msdos/
699
700 include/ -- public header files, those to be included directly
701 by client apps
702
703 src/ -- sources of the library
704 base/ -- the base layer
705 sfnt/ -- the sfnt "driver" (see the drivers section below)
706 truetype/ -- the truetype driver
707 type1/ -- the type1 driver
708 shared/ -- some header files shared between drivers
709
710 demos/ -- demos/tools
711
712 docs/ -- documentation (a bit empty for now)
713
714-----------------------------------------------------------------------------------------
715Glyph Image Formats :
716
717 Drivers are now able to register new glyph image formats within the library.
718 For now, the base layer supports of course bitmaps and vector outlines, but
719 one could imagine something different like colored bitmaps, bi-color
720 vectors or wathever else (Metafonts anyone ??).
721
722 See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is
723 gone, and is now replaced by FT_Bitmap, which should encompass all known
724 bitmap types.
725
726 Each new image format must provide at least one "raster", i.e. a module
David Turner5951ce91999-12-29 00:53:44 +0000727 capable of transforming the glyph image into a bitmap. It's also possible
David Turnerd2b1f351999-12-16 23:11:37 +0000728 to change the default raster used for a given glyph image format.
729
730 The default outline scan-converter now uses 128 levels of grays by default,
731 which tends to smooth many things. Note that the demo programs have been
David Turner5951ce91999-12-29 00:53:44 +0000732 updated significantly in order to display these..
David Turnerd2b1f351999-12-16 23:11:37 +0000733
734
735-----------------------------------------------------------------------------------------
736Build system :
737
738 You still need GNU Make to build the library. The build system has been
739 very seriously re-vamped in order to provide things like :
740
741 - automatic host platform detection (reverting to 'config/ansi'
742 if it is not detected, with pseudo-standard compilation flags)
743
744 - the ability to compile from the Makefiles with very different and
745 exotic compilers. Note that linking the library can be difficult for
746 some platforms.
747
748 For example, the file `config/win32/lcclib.bat' is invoked by the
749 build system to create the ".lib" file with LCC-Win32 because its
750 librarian has too many flaws to be invoked directly from the Makefile.
751
752 Here's how it works :
753
754 - the first time you type `make', the build system runs a series of
755 sub-makefiles in order to detect your host platform. It then dumps
756 what it found, and creates a file called `config.mk' in the current
757 directory. This is a sub-Makefile used to define many important Make
758 variables used to build the library.
759
760 - the second time, the build system detects the `config.mk' then use it
761 to build the library. All object files go into 'obj' by default, as
762 well as the library file, but this can easily be changed.
763
764 Note that you can run "make setup" to force another host platform detection
765 even if a `config.mk' is present in the current directory. Another solution
766 is simply to delete the file, then re-run make.
767
768 Finally, the default compiler for all platforms is gcc (for now, this will
769 hopefully changed in the future). You can however specify a different
770 compiler by specifying it after the 'setup' target as in :
771
772 gnumake setup lcc on Win32 to use the LCC compiler
773 gnumake setup visualc on Win32 to use Visual C++
774
775 See the file `config/<system>/detect.mk' for a list of supported compilers
776 for your platforms.
777
778 It should be relatively easy to write new detection rules files and
779 config.mk..
780
781 Finally, to build the demo programs, go to `demos' and launch GNU Make,
782 it will use the `config.mk' in the top directory to build the test
783 programs..
784
785-----------------------------------------------------------------------------------------
786Portability :
787
788 In the previous beta, a single FT_System object was used to encompass
789 all low-level operations like thread synchronisation, memory management
790 and i/o access. This has been greatly simplified :
791
792 - thread synchronisation has been dropped, for the simple reason that
793 the library is already re-entrant, and that if you really need two
794 threads accessing the same FT_Library, you should really synchronize
795 access to it yourself with a simple mutex.
796
797 - memory management is performed through a very simple object called
798 "FT_Memory", which really is a table containing a table of pointers
799 to functions like malloc, realloc and free as well as some user data
800 (closure).
801
802 - resources have disappeared (they created more problems than they
803 solved), and i/o management have been simplified greatly as a
804 result. Streams are defined through FT_Stream objects, which can
805 be either memory-based or disk-based.
806
807 Note that each face has its own stream, which is closed only when
808 the face object is destroyed. Hence, a function like TT_Flush_Face
809 in 1.x cannot be directly supported. However, if you really need
810 something like this, you can easily tailor your own streams to achieve
811 the same feature at a lower level (and use FT_Open_Face instead of
812 FT_New_Face to create the face).
813
814 See the file "include/ftsystem.h" for more details, as well as the
815 implementations found in "config/unix" and "config/ansi".
816
817
818-----------------------------------------------------------------------------------------
David Turner5951ce91999-12-29 00:53:44 +0000819Font Drivers :
David Turnere49ab252000-05-16 23:44:38 +0000820
David Turner5951ce91999-12-29 00:53:44 +0000821
822 The Font Driver interface has been modified in order to support
823 extensions & versioning.
824
825
826 The list of the font drivers that are statically linked to the
827 library at compile time is managed through a new configuration file
828 called `config/<platform>/ftmodule.h'.
829
830 This file is autogenerated when invoking `make modules'. This target
831 will parse all sub-directories of 'src', looking for a "module.mk"
832 rules file, used to describe the driver to the build system.
833
834 Hence, one should call `make modules' each time a font driver is added
835 or removed from the `src' directory.
836
837
838 Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
839 driver doesn't support font files directly, but provides services used
840 by all TrueType-like font drivers. Hence, its code is shared between
841 the TrueType & OpenType font formats, and possibly more formats to
842 come if we're lucky..
David Turnerd2b1f351999-12-16 23:11:37 +0000843
844-----------------------------------------------------------------------------------------
845Extensions support :
David Turner5951ce91999-12-29 00:53:44 +0000846
847 The extensions support is inspired by the one found in 1.x.
848
849 Now, each font driver has its own "extension registry", which lists
850 which extensions are available for the font faces managed by the driver.
851
852 Extension ids are now strings, rather than 4-byte tags, as this is
853 usually more readable..
854
855 Each extension has:
856 - some data, associated to each face object
857 - an interface (table of function pointers)
858
859 An extension that is format-specific should simply register itself
860 to the correct font driver. Here is some example code:
861
862 // Registering an extensions
863 //
864 FT_Error FT_Init_XXXX_Extension( FT_Library library )
865 {
866 FT_DriverInterface* tt_driver;
867
868 driver = FT_Get_Driver( library, "truetype" );
869 if (!driver) return FT_Err_Unimplemented_Feature;
870
David Turnere49ab252000-05-16 23:44:38 +0000871 return FT_Register_Extension( driver, &extension_class );
David Turner5951ce91999-12-29 00:53:44 +0000872 }
873
David Turnere49ab252000-05-16 23:44:38 +0000874
David Turner5951ce91999-12-29 00:53:44 +0000875 // Implementing the extensions
876 //
877 FT_Error FT_Proceed_Extension_XXX( FT_Face face )
878 {
879 FT_XXX_Extension ext;
880 FT_XXX_Extension_Interface ext_interface;
881
882 ext = FT_Get_Extension( face, "extensionid", &ext_interface );
883 if (!ext) return error;
884
885 return ext_interface->do_it(ext);
886 }
David Turnerd2b1f351999-12-16 23:11:37 +0000887