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