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