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