blob: 6e1db46a083ee7d72f8ee63bfc202b4b2b680ea7 [file] [log] [blame]
David Turnerf9b8dec2000-06-16 19:34:52 +00001LATEST CHANGES
2
David Turner27c88272000-11-09 19:10:22 +00003 - changed the default installation path for public headers from
4 "include/freetype" to "include/freetype2".
5
6 Also added a new "freetype-config" that is automatically
7 generated and installed on Unix and Cygwin systems. The
8 script itself is used to retrieve the current install path,
9 C compilation flags as well as linker flags..
10
11 - fixed several small bugs:
12
13 - incorrect max advance width for fixed-pitch Type 1 fonts
14
15 - incorrect glyph names for certain TrueType fonts
16
17 - the glyph advance was not copied when FT_Glyph_To_Bitmap was called
18
19 - the linearHoriAdvance and linerVertAdvance fields were not
20 correctly returned for glyphs processed by the auto-hinter
21
Werner Lembergb5084e12000-10-28 17:10:06 +000022 - "type1z" renamed back to "type1"; the old "type1" module has been
23 removed
24
David Turner046f7a02000-09-15 22:42:06 +000025 - revamped the build system to make it a lot more generic. This will
26 allow us to re-use nearly un-modified in lots of other projects
27 (including FreeType Layout)
28
David Turner34f1c2f2000-08-23 22:47:44 +000029 - changed "cid" to use "psaux" too..
30
David Turner3b2c50e2000-08-23 21:11:13 +000031 - added the cache sub-system. See <freetype/ftcache.h> as well as the
32 sources in "src/cache". Note that it compiles but is still untested
33 for now ..
34
David Turnera39acf52000-08-23 02:47:57 +000035 - updated "docs/docmaker.py", a draft API reference is available at
36 http://www.freetype.org/ft2api.html
37
Werner Lembergb5084e12000-10-28 17:10:06 +000038 - changed "type1" to use "psaux"
David Turnera39acf52000-08-23 02:47:57 +000039
40 - created a new module named "psaux" to hold the Type 1 & Type 2 parsing
Werner Lembergb5084e12000-10-28 17:10:06 +000041 routines. It should be used by "type1", "cid" and "cff" in the future
David Turnera39acf52000-08-23 02:47:57 +000042
43 - fixed an important bug in "FT_Glyph_Get_CBox"
44
David Turnerb1693412000-07-27 21:48:48 +000045 - fixed some compiler warnings that happened since the TrueType
46 bytecode decoder was deactivated by default..
47
David Turnerc5cdf8b2000-07-27 21:40:22 +000048 - fixed two memory leaks:
49 - the memory manager (16 bytes) isn't released in FT_Done_FreeType !!
Werner Lemberge4b32a52000-10-31 20:42:18 +000050
David Turnerc5cdf8b2000-07-27 21:40:22 +000051 - using custom input streams, the copy of the original stream
52 was never released
53
54 - fixed the auto-hinter by performing automatic computation of the
55 "filling direction" of each glyph. This is done through a simple and
56 fast approximation, and seems to work (problems spotted by Werner
57 though). The Arphic fonts are a lot nicer though there are still a
58 lot of things to do to handle Asian fonts correctly..
59
60===========================================================================
61BETA-8 (RELEASE CANDIDATE) CHANGES
62
David Turner5f5b4462000-07-26 19:13:51 +000063 - deactivated the trueType bytecode interpreter by default
Werner Lemberge4b32a52000-10-31 20:42:18 +000064
David Turner5f5b4462000-07-26 19:13:51 +000065 - deactivated the "src/type1" font driver. Now "src/type1z" is
66 used by default..
67
David Turner5fe4c002000-07-26 19:04:08 +000068 - updates to the build system. We now compile the library correctly
69 under Unix system through "configure" which is automatically called
70 on the first "make" invocation.
Werner Lemberge4b32a52000-10-31 20:42:18 +000071
David Turner5fe4c002000-07-26 19:04:08 +000072 - added the auto-hinting module !!. Fixing some bugs here and there..
73
David Turner49bd4f02000-07-12 16:57:37 +000074 - found some bugs in the composite loader (seac) of the Type1-based
75 font drivers..
76
77 - renamed the directory "freetype2/config" to "freetype2/builds" and
David Turner1ca6f2d2000-07-08 00:49:43 +000078 updated all relevant files..
79
David Turner9b3d1c72000-07-07 19:47:34 +000080 - found a memory leak in the "type1" driver
Werner Lemberge4b32a52000-10-31 20:42:18 +000081
David Turner9b3d1c72000-07-07 19:47:34 +000082 - incorporated Tom's patches to support flex operators correctly
83 in OpenType/CFF fonts.. Now all I need is to support pure CFF
84 and CEF fonts to be done with this driver.. :-)
85
86 - added the Windows FNT/FON driver in "src/winfonts". For now,
87 it always "simulates" a Unicode charmap, so it shouldn't be
88 considered completed right now..
Werner Lemberge4b32a52000-10-31 20:42:18 +000089
David Turner9b3d1c72000-07-07 19:47:34 +000090 It's there to be more a proof of concept than anything else
91 anyway. The driver is a single C source file, that compiles
92 to 3 Kb of code..
Werner Lemberge4b32a52000-10-31 20:42:18 +000093
David Turner9b3d1c72000-07-07 19:47:34 +000094 I'm still working on the PCF/BDF drivers.. but I'm too lazy
95 to finish them now..
96
97
David Turnerc06aba22000-06-30 23:38:23 +000098 - CHANGES TO THE HIGH-LEVEL API
Werner Lemberge4b32a52000-10-31 20:42:18 +000099
David Turnerc06aba22000-06-30 23:38:23 +0000100 o FT_Get_Kerning has a new parameter that allows you to select
101 the coordinates of the kerning vector ( font units, scaled,
102 scaled + grid-fitted ).
Werner Lemberge4b32a52000-10-31 20:42:18 +0000103
David Turnerc06aba22000-06-30 23:38:23 +0000104 o the outline functions are now in <freetype/ftoutln.h> and not
105 part of <freetype/freetype.h> anymore
Werner Lemberge4b32a52000-10-31 20:42:18 +0000106
David Turnerc06aba22000-06-30 23:38:23 +0000107 o <freetype/ftmodule.h> now contains declarations for
108 FT_New_Library, FT_Done_Library, FT_Add_Default_Modules
109
110 o the so-called convenience functions have moved from "ftoutln.c"
111 to "ftglyph.c", and are thus available with this optional component
112 of the library. They are declared in <freetype/ftglyph.h> now..
113
114 o anti-aliased rendering is now the default for FT_Render_Glyph
115 (i.e. corresponds to render_mode == 0 == ft_render_mode_normal).
116 To generate a monochrome bitmap, use ft_render_mode_mono, or the
117 FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000118
David Turnerc06aba22000-06-30 23:38:23 +0000119 FT_LOAD_ANTI_ALIAS is still defined, but values to 0.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000120
David Turnerc06aba22000-06-30 23:38:23 +0000121 o <freetype/freetype.h> now include <freetype/config/ftconfig.h>,
122 solving a few headaches :-)
123
124 o the type FT_GlyphSlotRec has now a "library" field.
125
126
127
128 - CHANGES TO THE "ftglyph.h" API
Werner Lemberge4b32a52000-10-31 20:42:18 +0000129
David Turnerc06aba22000-06-30 23:38:23 +0000130 This API has been severely modified in order to make it simpler,
131 clearer, and more efficient. It certainly now looks like a real
132 "glyph factory" object, and allows client applications to manage
133 (i.e. transform, bbox and render) glyph images without ever knowing
134 their original format.
135
David Turner98258612000-06-28 20:43:07 +0000136 - added support for CID-keyed fonts to the CFF driver.
137 maybe support for pure CFF + CEF fonts should come in ??
David Turner9d636b62000-06-27 23:32:27 +0000138
139
140 - cleaned up source code in order to avoid two functions with the
141 same name. Also changed the names of the files in "type1z" from
142 "t1XXXX" to "z1XXXX" in order to avoid any conflicts.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000143
David Turner9d636b62000-06-27 23:32:27 +0000144 "make multi" now works well :-)
Werner Lemberge4b32a52000-10-31 20:42:18 +0000145
David Turner81bb4ad2000-06-28 04:19:49 +0000146 Also removed the use of "cidafm" for now, even if the source files
147 are still there. This functionality will certainly go into a specific
148 module..
David Turnerc06aba22000-06-30 23:38:23 +0000149
150
151
Werner Lemberge4b32a52000-10-31 20:42:18 +0000152 - ADDED SUPPORT FOR THE AUTO-HINTER
153
David Turnerc06aba22000-06-30 23:38:23 +0000154 It works :-) I have a demo program which simply is a copy of "ftview"
155 that does a FT_Add_Module( library, &autohinter_module_class ) after
156 library initialisation, and Type 1 & OpenType/CFF fonts are now hinted.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000157
David Turnerc06aba22000-06-30 23:38:23 +0000158 CID fonts are not hinted, as they include no charmap and the auto-hinter
159 doesn't include "generic" global metrics computations yet..
Werner Lemberge4b32a52000-10-31 20:42:18 +0000160
David Turnerc06aba22000-06-30 23:38:23 +0000161 Now, I need to release this thing to the FreeType 2 source..
162
163
Werner Lemberge4b32a52000-10-31 20:42:18 +0000164
165
David Turner9d636b62000-06-27 23:32:27 +0000166
167 - CHANGES TO THE RENDERER MODULES
Werner Lemberge4b32a52000-10-31 20:42:18 +0000168
David Turner9d636b62000-06-27 23:32:27 +0000169 the monochrome and smooth renderers are now in two distinct directories,
170 namely "src/raster1" and "src/smooth". Note that the old "src/renderer"
171 is now gone..
Werner Lemberge4b32a52000-10-31 20:42:18 +0000172
David Turner9d636b62000-06-27 23:32:27 +0000173 I ditched the 5-gray-levels renderers. Basically, it involved a simple
174 #define toggle in 'src/raster1/ftraster.c'
Werner Lemberge4b32a52000-10-31 20:42:18 +0000175
David Turner9d636b62000-06-27 23:32:27 +0000176 FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now select
177 the best renderer available, depending on render mode. If the current
178 renderer for a given glyph image format isn't capable of supporting
179 the render mode, another one will be found in the library's list.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000180
David Turner9d636b62000-06-27 23:32:27 +0000181 This means that client applications do not need to switch or set the
182 renderers themselves (as in the latest change), they'll get what they
183 want automatically... At last..
Werner Lemberge4b32a52000-10-31 20:42:18 +0000184
David Turner9d636b62000-06-27 23:32:27 +0000185 Changed the demo programs accordingly..
Werner Lemberge4b32a52000-10-31 20:42:18 +0000186
187
David Turner9d636b62000-06-27 23:32:27 +0000188
David Turnerf0df85b2000-06-22 00:17:42 +0000189 - MAJOR INTERNAL REDESIGN:
Werner Lemberge4b32a52000-10-31 20:42:18 +0000190
David Turnerf0df85b2000-06-22 00:17:42 +0000191 A lot of internal modifications have been performed lately on the
192 source in order to provide the following enhancements:
Werner Lemberge4b32a52000-10-31 20:42:18 +0000193
David Turnerf0df85b2000-06-22 00:17:42 +0000194 - more generic module support:
Werner Lemberge4b32a52000-10-31 20:42:18 +0000195
David Turnerf0df85b2000-06-22 00:17:42 +0000196 The FT_Module type is now defined to represent a handle to a given
197 module. The file <freetype/ftmodule.h> contains the FT_Module_Class
198 definition, as well as the module-loading public API
199
200 The FT_Driver type is still defined, and still represents a pointer
201 to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
202 FT_Get_Driver by FT_Get_Module, etc..
203
204
205 - support for generic glyph image types:
206
207 The FT_Renderer type is a pointer to a module used to perform various
208 operations on glyph image.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000209
David Turnerf0df85b2000-06-22 00:17:42 +0000210 Each renderer is capable of handling images in a single format
211 (e.g. ft_glyph_format_outline). Its functions are used to:
Werner Lemberge4b32a52000-10-31 20:42:18 +0000212
David Turnerf0df85b2000-06-22 00:17:42 +0000213 - transform an glyph image
214 - render a glyph image into a bitmap
215 - return the control box (dimensions) of a given glyph image
216
217
218 The scan converters "ftraster.c" and "ftgrays.c" have been moved
219 to the new directory "src/renderer", and are used to provide two
220 default renderer modules.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000221
David Turnerf0df85b2000-06-22 00:17:42 +0000222 One corresponds to the "standard" scan-converter, the other to the
223 "smooth" one.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000224
David Turnerf0df85b2000-06-22 00:17:42 +0000225 The current renderer can be set through the new function
226 FT_Set_Renderer.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000227
David Turnerf0df85b2000-06-22 00:17:42 +0000228 The old raster-related function FT_Set_Raster, FT_Get_Raster and
229 FT_Set_Raster_Mode have now disappeared, in favor of the new:
Werner Lemberge4b32a52000-10-31 20:42:18 +0000230
David Turnerf0df85b2000-06-22 00:17:42 +0000231 FT_Get_Renderer
232 FT_Set_Renderer
233
234 see the file <freetype/ftrender.h> for more details..
235
236 These changes were necessary to properly support different scalable
237 formats in the future, like bi-color glyphs, etc..
238
239
240 - glyph loader object:
241
242 A new internal object, called a 'glyph loader' has been introduced
243 in the base layer. It is used by all scalable format font drivers
244 to load glyphs and composites.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000245
David Turnerf0df85b2000-06-22 00:17:42 +0000246 This object has been created to reduce the code size of each driver,
247 as each one of them basically re-implemented its functionality.
248
249 See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
250 more information..
251
252
253
254 - FT_GlyphSlot had new fields:
255
256 In order to support extended features (see below), the FT_GlyphSlot
257 structure has a few new fields:
Werner Lemberge4b32a52000-10-31 20:42:18 +0000258
David Turnerf0df85b2000-06-22 00:17:42 +0000259 linearHoriAdvance: this field gives the linearly scaled (i.e.
260 scaled but unhinted) advance width for the glyph,
261 expressed as a 16.16 fixed pixel value. This
262 is useful to perform WYSIWYG text.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000263
David Turnerf0df85b2000-06-22 00:17:42 +0000264 linearVertAdvance: this field gives the linearly scaled advance
265 height for the glyph (relevant in vertical glyph
266 layouts only). This is useful to perform
Werner Lemberge4b32a52000-10-31 20:42:18 +0000267 WYSIWYG text.
David Turnerf0df85b2000-06-22 00:17:42 +0000268
269 Note that the two above field replace the removed "metrics2" field
270 in the glyph slot.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000271
David Turnerf0df85b2000-06-22 00:17:42 +0000272 advance: this field is a vector that gives the transformed
273 advance for the glyph. By default, it corresponds
274 to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
275 was specified when calling FT_Load_Glyph or FT_Load_Char
276
277 bitmap_left: this field gives the distance in integer pixels from
278 the current pen position to the left-most pixel of
279 a glyph image WHEN IT IS A BITMAP. It is only valid
280 when the "format" field is set to
281 "ft_glyph_format_bitmap", for example, after calling
282 the new function FT_Render_Glyph.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000283
David Turnerf0df85b2000-06-22 00:17:42 +0000284 bitmap_top: this field gives the distance in integer pixels from
285 the current pen position (located on the baseline) to
286 the top-most pixel of the glyph image WHEN IT IS A
287 BITMAP. Positive values correspond to upwards Y.
288
289 loader: this is a new private field for the glyph slot. Client
290 applications should not touch it..
291
292
293 - support for transforms and direct rendering in FT_Load_Glyph:
294
295 Most of the functionality found in <freetype/ftglyph.h> has been
296 moved to the core library. Hence, the following:
Werner Lemberge4b32a52000-10-31 20:42:18 +0000297
David Turnerf0df85b2000-06-22 00:17:42 +0000298 - a transform can be specified for a face through FT_Set_Transform.
299 this transform is applied by FT_Load_Glyph to scalable glyph images
300 (i.e. NOT TO BITMAPS) before the function returns, unless the
301 bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
302
303
304 - once a glyph image has been loaded, it can be directly converted to
305 a bitmap by using the new FT_Render_Glyph function. Note that this
306 function takes the glyph image from the glyph slot, and converts
307 it to a bitmap whose properties are returned in "face.glyph.bitmap",
308 "face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
309 native image might be lost after the conversion.
310
311
312 - when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
313 and FT_Load_Char functions will call FT_Render_Glyph automatically
314 when needed.
315
316
317
318
David Turnerf9b8dec2000-06-16 19:34:52 +0000319 - reformated all modules source code in order to get rid of the basic
320 data types redifinitions (i.e. "TT_Int" instead of "FT_Int", "T1_Fixed"
321 instead of "FT_Fixed"). Hence the format-specific prefixes like "TT_",
322 "T1_", "T2_" and "CID_" are only used for relevant structures..
323
324============================================================================
325OLD CHANGES FOR BETA 7
David Turner3475e7f2000-05-17 20:56:01 +0000326
David Turner2b9be992000-06-07 23:41:17 +0000327 - bug-fixed the OpenType/CFF parser. It now loads and displays my two
328 fonts nicely, but I'm pretty certain that more testing is needed :-)
Werner Lemberge4b32a52000-10-31 20:42:18 +0000329
David Turner2b9be992000-06-07 23:41:17 +0000330 - fixed the crummy Type 1 hinter, it now handles accented characters
331 correctly (well, the accent is not always well placed, but that's
332 another problem..)
333
David Turner04aa8002000-06-01 03:27:48 +0000334 - added the CID-keyed Type 1 driver in "src/cid". Works pretty well for
335 only 13 Kb of code ;-) Doesn't read AFM files though, nor the really
336 useful CMAP files..
337
338 - fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks to
339 Boris Letocha for spotting them and providing a fix..
340
David Turner4f99c3c2000-05-29 20:55:13 +0000341 - fixed potential "divide by zero" bugs in ftcalc.c.. my god..
342
343 - added source code for the OpenType/CFF driver (still incomplete though..)
344
345 - modified the SFNT driver slightly to perform more robust header
346 checks in TT_Load_SFNT_Header. This prevents certain font files
347 (e.g. some Type 1 Multiple Masters) from being incorrectly "recognized"
348 as TrueType font files..
349
David Turner2e421312000-05-26 22:13:17 +0000350 - moved a lot of stuff from the TrueType driver to the SFNT module,
351 this allows greater code re-use between font drivers (e.g. TrueType,
352 OpenType, Compact-TrueType, etc..)
353
354 - added a tiny segment cache to the SFNT Charmap 4 decoder, in order
355 to minimally speed it up..
356
David Turner11187202000-05-26 17:13:23 +0000357 - added support for Multiple Master fonts in "type1z". There is also
358 a new file named <freetype/ftmm.h> which defines functions to
359 manage them from client applications.
Werner Lemberge4b32a52000-10-31 20:42:18 +0000360
David Turner11187202000-05-26 17:13:23 +0000361 The new file "src/base/ftmm.c" is also optional to the engine..
362
363 - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) +
364 small bug fixes in FT_Load_Glyph, the "type1" driver, etc..
365
David Turnerf5dcdd52000-05-23 22:16:27 +0000366 - a minor fix to the Type 1 driver to let them apply the font matrix
367 correctly (used for many oblique fonts..)
368
David Turner51179f02000-05-18 16:18:05 +0000369 - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
370 to use %p instead of %lx).. Thanks to Karl Robillard
371
David Turner109fcf62000-05-17 23:35:37 +0000372 - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added
373 a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when
374 loaded from a file (maybe I should move the bitmap cropper to the
375 base layer ??).
376
David Turner3475e7f2000-05-17 20:56:01 +0000377 - changed the default number of gray levels of the smooth renderer to
378 256 (instead of the previous 128). Of course, the human eye can't
Werner Lembergb5084e12000-10-28 17:10:06 +0000379 see any difference ;-)
David Turner3475e7f2000-05-17 20:56:01 +0000380
381 - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of
382 subglyphs in a TrueType font now..
383
384=============================================================================
385OLD CHANGES 16 May 2000
David Turnerefce08d2000-05-11 18:23:52 +0000386
David Turner968f0c32000-05-16 23:26:01 +0000387 - tagged "BETA-6" in the CVS tree. This one is a serious release candidate
388 even though it doesn't incorporate the auto-hinter yet..
389
390 - various obsolete files were removed, and copyright header updated
391
392 - finally updated the standard raster to fix the monochrome rendering bug
393 + re-enable support for 5-gray levels anti-aliasing (suck, suck..)
394
395 - created new header files, and modified sources accordingly:
David Turnere49ab252000-05-16 23:44:38 +0000396
David Turner968f0c32000-05-16 23:26:01 +0000397 <freetype/fttypes.h> - simple FreeType types, without the API
398 <freetype/internal/ftmemory.h> - definition of memory-management macros
399
400 - added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h>
401
David Turnerc30aea92000-05-12 15:01:18 +0000402 - light update/cleaning of the build system + changes to the sources in
403 order to get rid of _all_ compiler warnings with three compilers, i.e:
404
405 gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX"
406 and LCC
407
408 IMPORTANT NOTE FOR WIN32-LCC USERS:
409 |
410 | It seems the C pre-processor that comes with LCC is broken, it
411 | doesn't recognize the ANSI standard directives # and ## correctly
412 | when one of the argument is a macro. Also, something like:
David Turnere49ab252000-05-16 23:44:38 +0000413 |
David Turnerc30aea92000-05-12 15:01:18 +0000414 | #define F(x) print##x
David Turnere49ab252000-05-16 23:44:38 +0000415 |
David Turnerc30aea92000-05-12 15:01:18 +0000416 | F(("hello"))
David Turnere49ab252000-05-16 23:44:38 +0000417 |
David Turnerc30aea92000-05-12 15:01:18 +0000418 | will get incorrectly translated to:
David Turnere49ab252000-05-16 23:44:38 +0000419 |
David Turnerc30aea92000-05-12 15:01:18 +0000420 | print "hello")
David Turnere49ab252000-05-16 23:44:38 +0000421 |
David Turnerc30aea92000-05-12 15:01:18 +0000422 | by its pre-processor. For this reason, you simply cannot build
423 | FreeType 2 in debug mode with this compiler..
424
425
David Turnerbfe2f982000-05-12 12:17:15 +0000426 - yet another massive grunt work. I've changed the definition of the
427 EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
428 an argument, which is the function's return value type.
David Turnere49ab252000-05-16 23:44:38 +0000429
David Turnerbfe2f982000-05-12 12:17:15 +0000430 This is necessary to compile FreeType as a DLL on Windows and OS/2.
431 Depending on the compiler used, a compiler-specific keyword like __export
432 or __system must be placed before (VisualC++) or after (BorlandC++)
433 the type..
David Turnere49ab252000-05-16 23:44:38 +0000434
David Turnerbfe2f982000-05-12 12:17:15 +0000435 Of course, this needed a lot of changes throughout the source code
436 to make it compile again... All cleaned up now, apparently..
437
438 Note also that there is a new EXPORT_VAR macro defined to allow the
439 _declaration_ of an exportable public (constant) variable. This is the
440 case of the raster interfaces (see ftraster.h and ftgrays.h), as well
441 as each module's interface (see sfdriver.h, psdriver.h, etc..)
442
443 - new feature: it is now possible to pass extra parameters to font
444 drivers when creating a new face object. For now, this
445 capability is unused. It could however prove to be useful
446 in a near future..
447
448 the FT_Open_Args structure was changes, as well as the internal
449 driver interface (the specific "init_face" module function has now
450 a different signature).
451
452 - updated the tutorial (not finished though).
David Turnerc30aea92000-05-12 15:01:18 +0000453 - updated the top-level BUILD document
David Turnerbfe2f982000-05-12 12:17:15 +0000454
David Turnerc60c61c2000-05-12 15:26:58 +0000455 - fixed a potential memory leak that could occur when loading embedded
456 bitmaps.
457
David Turnerbfe2f982000-05-12 12:17:15 +0000458 - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as
459 it was missing from the public header (the implementation was already
460 in "ftobjs.c").
461
462 - the file <freetype/fterrors.h> has been seriously updated in order to
463 allow the automatic generation of error message tables. See the comments
464 within it for more information.
465
David Turnera9c251c2000-05-11 18:36:19 +0000466 - major directory hierarchy re-organisation. This was done for two things:
David Turnere49ab252000-05-16 23:44:38 +0000467
David Turnera9c251c2000-05-11 18:36:19 +0000468 * first, to ease the "manual" compilation of the library by requiring
469 at lot less include paths :-)
David Turnerbfe2f982000-05-12 12:17:15 +0000470
David Turnera9c251c2000-05-11 18:36:19 +0000471 * second, to allow external programs to effectively access internal
472 data fields. For example, this can be extremely useful if someone
473 wants to write a font producer or a font manager on top of FreeType.
474
475 Basically, you should now use the 'freetype/' prefix for header inclusion,
476 as in:
David Turnere49ab252000-05-16 23:44:38 +0000477
David Turnera9c251c2000-05-11 18:36:19 +0000478 #include <freetype/freetype.h>
479 #include <freetype/ftglyph.h>
480
481 Some new include sub-directories are available:
David Turnere49ab252000-05-16 23:44:38 +0000482
David Turnera9c251c2000-05-11 18:36:19 +0000483 a. the "freetype/config" directory, contains two files used to
484 configure the build of the library. Client applications should
485 not need to look at these normally, but they can if they want.
David Turnere49ab252000-05-16 23:44:38 +0000486
David Turnera9c251c2000-05-11 18:36:19 +0000487 #include <freetype/config/ftoption.h>
488 #include <freetype/config/ftconfig.h>
David Turnere49ab252000-05-16 23:44:38 +0000489
David Turnera9c251c2000-05-11 18:36:19 +0000490 b. the "freetype/internal" directory, contains header files that
491 describes library internals. These are the header files that were
492 previously found in the "src/base" and "src/shared" directories.
493
494
495 As usual, the build system and the demos have been updated to reflect
496 the change..
David Turnere49ab252000-05-16 23:44:38 +0000497
David Turnera9c251c2000-05-11 18:36:19 +0000498 Here's a layout of the new directory hierarchy:
David Turnere49ab252000-05-16 23:44:38 +0000499
David Turnera9c251c2000-05-11 18:36:19 +0000500 TOP
501 include/
502 freetype/
503 freetype.h
504 ...
505 config/
506 ftoption.h
507 ftconfig.h
508 ftmodule.h
David Turnere49ab252000-05-16 23:44:38 +0000509
David Turnera9c251c2000-05-11 18:36:19 +0000510 internal/
511 ftobjs.h
512 ftstream.h
513 ftcalc.h
514 ...
David Turnere49ab252000-05-16 23:44:38 +0000515
David Turnera9c251c2000-05-11 18:36:19 +0000516 src/
517 base/
518 ...
David Turnere49ab252000-05-16 23:44:38 +0000519
David Turnera9c251c2000-05-11 18:36:19 +0000520 sfnt/
521 psnames/
522 truetype/
523 type1/
524 type1z/
525
526
527 Compiling a module is now much easier, for example, the following should
David Turner968f0c32000-05-16 23:26:01 +0000528 work when in the TOP directory on an ANSI build:
David Turnere49ab252000-05-16 23:44:38 +0000529
David Turnera9c251c2000-05-11 18:36:19 +0000530 gcc -c -I./include -I./src/base src/base/ftbase.c
531 gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
532 etc..
533
534 (of course, using -Iconfig/<system> if you provide system-specific
535 configuration files).
David Turnerefce08d2000-05-11 18:23:52 +0000536
537
538 - updated the structure of FT_Outline_Funcs in order to allow
539 direct coordinate scaling within the outline decomposition routine
540 (this is important for virtual "on" points with TrueType outlines)
541 + updates to the rasters to support this..
542
543 - updated the OS/2 table loading code in "src/sfnt/ttload.c" in order
544 to support version 2 of the table (see OpenType 1.2 spec)
545
546 - created "include/tttables.h" and "include/t1tables.h" to allow
547 client applications to access some of the SFNT and T1 tables of a
548 face with a procedural interface (see FT_Get_Sfnt_Table())
549 + updates to internal source files to reflect the change..
550
551 - some cleanups in the source code to get rid of warnings when compiling
552 with the "-Wall -W -ansi -pedantic" options in gcc.
553
554 - debugged and moved the smooth renderer to "src/base/ftgrays.c" and
555 its header to "include/ftgrays.h"
556
557 - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with
558 up to 80 sub-glyphs !! Thanks to Werner
559
560================================================================================
561OLD CHANGES - 14-apr-2000
David Turner77054f22000-04-14 20:49:52 +0000562
563 - fixed a bug in the TrueType glyph loader that prevented the correct
564 loading of some CJK glyphs in mingli.ttf
David Turnere49ab252000-05-16 23:44:38 +0000565
David Turner77054f22000-04-14 20:49:52 +0000566 - improved the standard Type 1 hinter in "src/type1"
David Turnere49ab252000-05-16 23:44:38 +0000567
David Turner77054f22000-04-14 20:49:52 +0000568 - fixed two bugs in the experimental Type 1 driver in "src/type1z"
569 to handle the new XFree86 4.0 fonts (and a few other ones..)
570
571 - the smooth renderer is now complete and supports sub-banding
572 to render large glyphs at high speed. However, it is still located
573 in "demos/src/ftgrays.c" and should move to the library itself
574 in the next beta.. NOTE: The smooth renderer doesn't compile in
575 stand-alone mode anymore, but this should be fixed RSN..
David Turnere49ab252000-05-16 23:44:38 +0000576
David Turner77054f22000-04-14 20:49:52 +0000577 - introduced convenience functions to more easily deal with glyph
578 images, see "include/ftglyph.h" for more details, as well as the
579 new demo program named "demos/src/ftstring.c" that demonstrates
580 its use
581
582 - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
583 drivers (this is required by the auto-hinter to improve its results).
584
585 - changed the raster interface, in order to allow client applications
586 to provide their own span-drawing callbacks. However, only the
587 smooth renderer supports this. See "FT_Raster_Params" in the
588 file "include/ftimage.h"
589
590 - fixed a small bug in FT_MulFix that caused incorrect transform
591 computation !!
592
593 - Note: The tutorial is out-of-date, grumpf.. :-(
594
595================================================================================
596OLD CHANGES - 12-mar-2000
David Turnerc3c7e7f2000-03-13 14:19:31 +0000597
598 - changed the layout of configuration files : now, all ANSI configuration
599 files are located in "freetype2/config". System-specific over-rides
600 can be placed in "freetype2/config/<system>".
David Turnere49ab252000-05-16 23:44:38 +0000601
David Turnerc3c7e7f2000-03-13 14:19:31 +0000602 - moved all configuration macros to "config/ftoption.h"
David Turnere49ab252000-05-16 23:44:38 +0000603
David Turnerc3c7e7f2000-03-13 14:19:31 +0000604 - improvements in the Type 1 driver with AFM support
David Turnere49ab252000-05-16 23:44:38 +0000605
David Turnerc3c7e7f2000-03-13 14:19:31 +0000606 - changed the fields in the FT_Outline structure : the old "flags"
607 array is re-named "tags", while all ancient flags are encoded into
608 a single unsigned int named "flags".
609
610 - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in
611 "ftimage.h").
612
613 - changed outline functions to "FT_Outline_<action>" syntax
614
615 - added a smooth anti-alias renderer to the demonstration programs
616 - added Mac graphics driver (thanks Just)
David Turnere49ab252000-05-16 23:44:38 +0000617
David Turnerc3c7e7f2000-03-13 14:19:31 +0000618 - FT_Open_Face changed in order to received a pointer to a FT_Open_Args
619 descriptor..
David Turnere49ab252000-05-16 23:44:38 +0000620
David Turnerc3c7e7f2000-03-13 14:19:31 +0000621 - various cleanups, a few more API functions implemented (see FT_Attach_File)
622
623 - updated some docs
624
625================================================================================
626OLD CHANGES - 22-feb-2000
David Turner58c10b52000-02-22 14:31:42 +0000627
628 - introduced the "psnames" module. It is used to:
629
630 o convert a Postscript glyph name into the equivalent Unicode
631 character code (used by the Type 1 driver(s) to synthetize
632 on the fly a Unicode charmap).
633
634 o provide an interface to retrieve the Postscript names of
635 the Macintosh, Adobe Standard & Adobe Expert character codes.
636 (the Macintosh names are used by the SFNT-module postscript
637 names support routines, while the other two tables are used
638 by the Type 1 driver(s)).
639
640 - introduced the "type1z" alternate Type 1 driver. This is a (still
641 experimental) driver for the Type 1 format that will ultimately
642 replace the one in "src/type1". It uses pattern matching to load
643 data from the font, instead of a finite state analyzer. It works
644 much better than the "old" driver with "broken" fonts. It is also
645 much smaller (under 15 Kb).
646
647 - the Type 1 drivers (both in "src/type1" and "src/type1z") are
648 nearly complete. They both provide automatic Unicode charmap
649 synthesis through the "psnames" module. No re-encoding vector
650 is needed. (note that they still leak memory due to some code
651 missing, and I'm getting lazy).
652
653 Trivial AFM support has been added to read kerning information
654 but wasn't exactly tested as it should ;-)
655
656 - The TrueType glyph loader has been seriously rewritten (see the
657 file "src/truetype/ttgload.c". It is now much, much simpler as
658 well as easier to read, maintain and understand :-) Preliminary
659 versions introduced a memory leak that has been reported by Jack
660 Davis, and is now fixed..
661
662 - introduced the new "ft_glyph_format_plotter", used to represent
663 stroked outlines like Windows "Vector" fonts, and certain Type 1
664 fonts like "Hershey". The corresponding raster will be written
665 soon.
666
667 - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
668 interface that uses a structure to describe the input stream,
669 the driver (if required), etc..
670
671TODO
672 - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
673
674 - Add a function like FT_Load_Character( face, char_code, load_flags )
675 that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph
676 to ease developer's work.
677
678 - Update the tutorial !!
679 - consider adding support for Multiple Master fonts in the Type 1
680 drivers.
681
682 - Test the AFM routines of the Type 1 drivers to check that kerning
683 information is returned correctly.
684
685 - write a decent auto-gridding component !! We need this to release
686 FreeType 2.0 gold !
687
688
689----- less urgent needs : ----------
690 - add a CFF/Type2 driver
691 - add a BDF driver
692 - add a FNT/PCF/HBF driver
693 - add a Speedo driver from the X11 sources
694
695
696==============================================================================
697OLDER CHANGES - 27-jan-2000
David Turner633da992000-01-27 14:07:33 +0000698
699 - updated the "sfnt" module interface to allow several SFNT-based
700 drivers to co-exist peacefully
David Turnere49ab252000-05-16 23:44:38 +0000701
David Turner633da992000-01-27 14:07:33 +0000702 - updated the "T1_Face" type to better separate Postscript font content
703 from the rest of the FT_Face structure. Might be used later by the
704 CFF/Type2 driver..
David Turnere49ab252000-05-16 23:44:38 +0000705
David Turner633da992000-01-27 14:07:33 +0000706 - added an experimental replacement Type 1 driver featuring advanced
707 (and speedy) pattern matching to retrieve the data from postscript
708 fonts.
709
710 - very minor changes in the implementation of FT_Set_Char_Size and
711 FT_Set_Pixel_Sizes (they now implement default to ligthen the
712 font driver's code).
713
714
715=============================================================================
716OLD MESSAGE
717
David Turnerd2b1f351999-12-16 23:11:37 +0000718This file summarizes the changes that occured since the last "beta" of FreeType 2.
719Because the list is important, it has been divided into separate sections:
720
David Turner5951ce91999-12-29 00:53:44 +0000721Table Of Contents:
722
723 I High-Level Interface (easier !)
724 II Directory Structure
725 III Glyph Image Formats
726 IV Build System
727 V Portability
728 VI Font Drivers
David Turnerd2b1f351999-12-16 23:11:37 +0000729
730-----------------------------------------------------------------------------------------
731High-Level Interface :
732
733 The high-level API has been considerably simplified. Here is how :
734
David Turner5951ce91999-12-29 00:53:44 +0000735 - resource objects have disappeared. this means that face objects can
736 now be created with a single function call (see FT_New_Face and
David Turnerd2b1f351999-12-16 23:11:37 +0000737 FT_Open_Face)
David Turnere49ab252000-05-16 23:44:38 +0000738
David Turnerd2b1f351999-12-16 23:11:37 +0000739 - when calling either FT_New_Face & FT_Open_Face, a size object and a
740 glyph slot object are automatically created for the face, and can be
741 accessed through "face->glyph" and "face->size" if one really needs to.
742 In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
David Turnere49ab252000-05-16 23:44:38 +0000743
David Turnerd2b1f351999-12-16 23:11:37 +0000744 - similarly, FT_Load_Glyph now only takes a "face" argument (instead of
745 a glyph slot and a size). Also, it's "result" parameter is gone, as
746 the glyph image type is returned in the field "face->glyph.format"
David Turnere49ab252000-05-16 23:44:38 +0000747
David Turnerd2b1f351999-12-16 23:11:37 +0000748 - the list of available charmaps is directly accessible through
749 "face->charmaps", counting "face->num_charmaps" elements. Each
750 charmap has an 'encoding' field which specifies which known encoding
751 it deals with. Valid values are, for example :
David Turnere49ab252000-05-16 23:44:38 +0000752
David Turnerd2b1f351999-12-16 23:11:37 +0000753 ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
754 ft_encoding_apple_roman
755 ft_encoding_sjis
756 ft_encoding_adobe_standard
David Turner5951ce91999-12-29 00:53:44 +0000757 ft_encoding_adobe_expert
David Turnere49ab252000-05-16 23:44:38 +0000758
David Turnerd2b1f351999-12-16 23:11:37 +0000759 other values may be added in the future. Each charmap still holds its
760 "platform_id" and "encoding_id" values in case the encoding is too
761 exotic for the current library
762
763
764-----------------------------------------------------------------------------------------
765Directory Structure:
766
767 Should seem obvious to most of you:
768
769 freetype/
770 config/ -- configuration sub-makefiles
771 ansi/
David Turner5951ce91999-12-29 00:53:44 +0000772 unix/ -- platform-specific configuration files
David Turnerd2b1f351999-12-16 23:11:37 +0000773 win32/
774 os2/
775 msdos/
776
777 include/ -- public header files, those to be included directly
778 by client apps
779
780 src/ -- sources of the library
781 base/ -- the base layer
782 sfnt/ -- the sfnt "driver" (see the drivers section below)
783 truetype/ -- the truetype driver
784 type1/ -- the type1 driver
785 shared/ -- some header files shared between drivers
786
787 demos/ -- demos/tools
788
789 docs/ -- documentation (a bit empty for now)
790
791-----------------------------------------------------------------------------------------
792Glyph Image Formats :
793
794 Drivers are now able to register new glyph image formats within the library.
795 For now, the base layer supports of course bitmaps and vector outlines, but
796 one could imagine something different like colored bitmaps, bi-color
797 vectors or wathever else (Metafonts anyone ??).
798
799 See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is
800 gone, and is now replaced by FT_Bitmap, which should encompass all known
801 bitmap types.
802
803 Each new image format must provide at least one "raster", i.e. a module
David Turner5951ce91999-12-29 00:53:44 +0000804 capable of transforming the glyph image into a bitmap. It's also possible
David Turnerd2b1f351999-12-16 23:11:37 +0000805 to change the default raster used for a given glyph image format.
806
807 The default outline scan-converter now uses 128 levels of grays by default,
808 which tends to smooth many things. Note that the demo programs have been
David Turner5951ce91999-12-29 00:53:44 +0000809 updated significantly in order to display these..
David Turnerd2b1f351999-12-16 23:11:37 +0000810
811
812-----------------------------------------------------------------------------------------
813Build system :
814
815 You still need GNU Make to build the library. The build system has been
816 very seriously re-vamped in order to provide things like :
817
818 - automatic host platform detection (reverting to 'config/ansi'
819 if it is not detected, with pseudo-standard compilation flags)
820
821 - the ability to compile from the Makefiles with very different and
822 exotic compilers. Note that linking the library can be difficult for
823 some platforms.
824
825 For example, the file `config/win32/lcclib.bat' is invoked by the
826 build system to create the ".lib" file with LCC-Win32 because its
827 librarian has too many flaws to be invoked directly from the Makefile.
828
829 Here's how it works :
830
831 - the first time you type `make', the build system runs a series of
832 sub-makefiles in order to detect your host platform. It then dumps
833 what it found, and creates a file called `config.mk' in the current
834 directory. This is a sub-Makefile used to define many important Make
835 variables used to build the library.
836
837 - the second time, the build system detects the `config.mk' then use it
838 to build the library. All object files go into 'obj' by default, as
839 well as the library file, but this can easily be changed.
840
841 Note that you can run "make setup" to force another host platform detection
842 even if a `config.mk' is present in the current directory. Another solution
843 is simply to delete the file, then re-run make.
844
845 Finally, the default compiler for all platforms is gcc (for now, this will
846 hopefully changed in the future). You can however specify a different
847 compiler by specifying it after the 'setup' target as in :
848
849 gnumake setup lcc on Win32 to use the LCC compiler
850 gnumake setup visualc on Win32 to use Visual C++
851
852 See the file `config/<system>/detect.mk' for a list of supported compilers
853 for your platforms.
854
855 It should be relatively easy to write new detection rules files and
856 config.mk..
857
858 Finally, to build the demo programs, go to `demos' and launch GNU Make,
859 it will use the `config.mk' in the top directory to build the test
860 programs..
861
862-----------------------------------------------------------------------------------------
863Portability :
864
865 In the previous beta, a single FT_System object was used to encompass
866 all low-level operations like thread synchronisation, memory management
867 and i/o access. This has been greatly simplified :
868
869 - thread synchronisation has been dropped, for the simple reason that
870 the library is already re-entrant, and that if you really need two
871 threads accessing the same FT_Library, you should really synchronize
872 access to it yourself with a simple mutex.
873
874 - memory management is performed through a very simple object called
875 "FT_Memory", which really is a table containing a table of pointers
876 to functions like malloc, realloc and free as well as some user data
877 (closure).
878
879 - resources have disappeared (they created more problems than they
880 solved), and i/o management have been simplified greatly as a
881 result. Streams are defined through FT_Stream objects, which can
882 be either memory-based or disk-based.
883
884 Note that each face has its own stream, which is closed only when
885 the face object is destroyed. Hence, a function like TT_Flush_Face
886 in 1.x cannot be directly supported. However, if you really need
887 something like this, you can easily tailor your own streams to achieve
888 the same feature at a lower level (and use FT_Open_Face instead of
889 FT_New_Face to create the face).
890
891 See the file "include/ftsystem.h" for more details, as well as the
892 implementations found in "config/unix" and "config/ansi".
893
894
895-----------------------------------------------------------------------------------------
David Turner5951ce91999-12-29 00:53:44 +0000896Font Drivers :
David Turnere49ab252000-05-16 23:44:38 +0000897
David Turner5951ce91999-12-29 00:53:44 +0000898
899 The Font Driver interface has been modified in order to support
900 extensions & versioning.
901
902
903 The list of the font drivers that are statically linked to the
904 library at compile time is managed through a new configuration file
905 called `config/<platform>/ftmodule.h'.
906
907 This file is autogenerated when invoking `make modules'. This target
908 will parse all sub-directories of 'src', looking for a "module.mk"
909 rules file, used to describe the driver to the build system.
910
911 Hence, one should call `make modules' each time a font driver is added
912 or removed from the `src' directory.
913
914
915 Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
916 driver doesn't support font files directly, but provides services used
917 by all TrueType-like font drivers. Hence, its code is shared between
918 the TrueType & OpenType font formats, and possibly more formats to
919 come if we're lucky..
David Turnerd2b1f351999-12-16 23:11:37 +0000920
921-----------------------------------------------------------------------------------------
922Extensions support :
David Turner5951ce91999-12-29 00:53:44 +0000923
924 The extensions support is inspired by the one found in 1.x.
925
926 Now, each font driver has its own "extension registry", which lists
927 which extensions are available for the font faces managed by the driver.
928
929 Extension ids are now strings, rather than 4-byte tags, as this is
930 usually more readable..
931
932 Each extension has:
933 - some data, associated to each face object
934 - an interface (table of function pointers)
935
936 An extension that is format-specific should simply register itself
937 to the correct font driver. Here is some example code:
938
939 // Registering an extensions
940 //
941 FT_Error FT_Init_XXXX_Extension( FT_Library library )
942 {
943 FT_DriverInterface* tt_driver;
944
945 driver = FT_Get_Driver( library, "truetype" );
946 if (!driver) return FT_Err_Unimplemented_Feature;
947
David Turnere49ab252000-05-16 23:44:38 +0000948 return FT_Register_Extension( driver, &extension_class );
David Turner5951ce91999-12-29 00:53:44 +0000949 }
950
David Turnere49ab252000-05-16 23:44:38 +0000951
David Turner5951ce91999-12-29 00:53:44 +0000952 // Implementing the extensions
953 //
954 FT_Error FT_Proceed_Extension_XXX( FT_Face face )
955 {
956 FT_XXX_Extension ext;
957 FT_XXX_Extension_Interface ext_interface;
958
959 ext = FT_Get_Extension( face, "extensionid", &ext_interface );
960 if (!ext) return error;
961
962 return ext_interface->do_it(ext);
963 }
David Turnerd2b1f351999-12-16 23:11:37 +0000964