blob: 9bb65c372d0cc81f9b41637e36cf733adc94833e [file] [log] [blame]
David Turnerf9b8dec2000-06-16 19:34:52 +00001LATEST CHANGES
2
David Turner98258612000-06-28 20:43:07 +00003 - added support for CID-keyed fonts to the CFF driver.
4 maybe support for pure CFF + CEF fonts should come in ??
David Turner9d636b62000-06-27 23:32:27 +00005
6
7 - cleaned up source code in order to avoid two functions with the
8 same name. Also changed the names of the files in "type1z" from
9 "t1XXXX" to "z1XXXX" in order to avoid any conflicts.
10
11 "make multi" now works well :-)
12
David Turner81bb4ad2000-06-28 04:19:49 +000013 Also removed the use of "cidafm" for now, even if the source files
14 are still there. This functionality will certainly go into a specific
15 module..
David Turner9d636b62000-06-27 23:32:27 +000016
17
18 - CHANGES TO THE RENDERER MODULES
19
20 the monochrome and smooth renderers are now in two distinct directories,
21 namely "src/raster1" and "src/smooth". Note that the old "src/renderer"
22 is now gone..
23
24 I ditched the 5-gray-levels renderers. Basically, it involved a simple
25 #define toggle in 'src/raster1/ftraster.c'
26
27 FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now select
28 the best renderer available, depending on render mode. If the current
29 renderer for a given glyph image format isn't capable of supporting
30 the render mode, another one will be found in the library's list.
31
32 This means that client applications do not need to switch or set the
33 renderers themselves (as in the latest change), they'll get what they
34 want automatically... At last..
35
36 Changed the demo programs accordingly..
37
38
39
David Turnerf0df85b2000-06-22 00:17:42 +000040 - MAJOR INTERNAL REDESIGN:
41
42 A lot of internal modifications have been performed lately on the
43 source in order to provide the following enhancements:
44
45 - more generic module support:
46
47 The FT_Module type is now defined to represent a handle to a given
48 module. The file <freetype/ftmodule.h> contains the FT_Module_Class
49 definition, as well as the module-loading public API
50
51 The FT_Driver type is still defined, and still represents a pointer
52 to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module,
53 FT_Get_Driver by FT_Get_Module, etc..
54
55
56 - support for generic glyph image types:
57
58 The FT_Renderer type is a pointer to a module used to perform various
59 operations on glyph image.
60
61 Each renderer is capable of handling images in a single format
62 (e.g. ft_glyph_format_outline). Its functions are used to:
63
64 - transform an glyph image
65 - render a glyph image into a bitmap
66 - return the control box (dimensions) of a given glyph image
67
68
69 The scan converters "ftraster.c" and "ftgrays.c" have been moved
70 to the new directory "src/renderer", and are used to provide two
71 default renderer modules.
72
73 One corresponds to the "standard" scan-converter, the other to the
74 "smooth" one.
75
76 The current renderer can be set through the new function
77 FT_Set_Renderer.
78
79 The old raster-related function FT_Set_Raster, FT_Get_Raster and
80 FT_Set_Raster_Mode have now disappeared, in favor of the new:
81
82 FT_Get_Renderer
83 FT_Set_Renderer
84
85 see the file <freetype/ftrender.h> for more details..
86
87 These changes were necessary to properly support different scalable
88 formats in the future, like bi-color glyphs, etc..
89
90
91 - glyph loader object:
92
93 A new internal object, called a 'glyph loader' has been introduced
94 in the base layer. It is used by all scalable format font drivers
95 to load glyphs and composites.
96
97 This object has been created to reduce the code size of each driver,
98 as each one of them basically re-implemented its functionality.
99
100 See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
101 more information..
102
103
104
105 - FT_GlyphSlot had new fields:
106
107 In order to support extended features (see below), the FT_GlyphSlot
108 structure has a few new fields:
109
110 linearHoriAdvance: this field gives the linearly scaled (i.e.
111 scaled but unhinted) advance width for the glyph,
112 expressed as a 16.16 fixed pixel value. This
113 is useful to perform WYSIWYG text.
114
115 linearVertAdvance: this field gives the linearly scaled advance
116 height for the glyph (relevant in vertical glyph
117 layouts only). This is useful to perform
118 WYSIWYG text.
119
120 Note that the two above field replace the removed "metrics2" field
121 in the glyph slot.
122
123 advance: this field is a vector that gives the transformed
124 advance for the glyph. By default, it corresponds
125 to the advance width, unless FT_LOAD_VERTICAL_LAYOUT
126 was specified when calling FT_Load_Glyph or FT_Load_Char
127
128 bitmap_left: this field gives the distance in integer pixels from
129 the current pen position to the left-most pixel of
130 a glyph image WHEN IT IS A BITMAP. It is only valid
131 when the "format" field is set to
132 "ft_glyph_format_bitmap", for example, after calling
133 the new function FT_Render_Glyph.
134
135 bitmap_top: this field gives the distance in integer pixels from
136 the current pen position (located on the baseline) to
137 the top-most pixel of the glyph image WHEN IT IS A
138 BITMAP. Positive values correspond to upwards Y.
139
140 loader: this is a new private field for the glyph slot. Client
141 applications should not touch it..
142
143
144 - support for transforms and direct rendering in FT_Load_Glyph:
145
146 Most of the functionality found in <freetype/ftglyph.h> has been
147 moved to the core library. Hence, the following:
148
149 - a transform can be specified for a face through FT_Set_Transform.
150 this transform is applied by FT_Load_Glyph to scalable glyph images
151 (i.e. NOT TO BITMAPS) before the function returns, unless the
152 bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags..
153
154
155 - once a glyph image has been loaded, it can be directly converted to
156 a bitmap by using the new FT_Render_Glyph function. Note that this
157 function takes the glyph image from the glyph slot, and converts
158 it to a bitmap whose properties are returned in "face.glyph.bitmap",
159 "face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original
160 native image might be lost after the conversion.
161
162
163 - when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
164 and FT_Load_Char functions will call FT_Render_Glyph automatically
165 when needed.
166
167
168
169
David Turnerf9b8dec2000-06-16 19:34:52 +0000170 - reformated all modules source code in order to get rid of the basic
171 data types redifinitions (i.e. "TT_Int" instead of "FT_Int", "T1_Fixed"
172 instead of "FT_Fixed"). Hence the format-specific prefixes like "TT_",
173 "T1_", "T2_" and "CID_" are only used for relevant structures..
174
175============================================================================
176OLD CHANGES FOR BETA 7
David Turner3475e7f2000-05-17 20:56:01 +0000177
David Turner2b9be992000-06-07 23:41:17 +0000178 - bug-fixed the OpenType/CFF parser. It now loads and displays my two
179 fonts nicely, but I'm pretty certain that more testing is needed :-)
180
181 - fixed the crummy Type 1 hinter, it now handles accented characters
182 correctly (well, the accent is not always well placed, but that's
183 another problem..)
184
David Turner04aa8002000-06-01 03:27:48 +0000185 - added the CID-keyed Type 1 driver in "src/cid". Works pretty well for
186 only 13 Kb of code ;-) Doesn't read AFM files though, nor the really
187 useful CMAP files..
188
189 - fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks to
190 Boris Letocha for spotting them and providing a fix..
191
David Turner4f99c3c2000-05-29 20:55:13 +0000192 - fixed potential "divide by zero" bugs in ftcalc.c.. my god..
193
194 - added source code for the OpenType/CFF driver (still incomplete though..)
195
196 - modified the SFNT driver slightly to perform more robust header
197 checks in TT_Load_SFNT_Header. This prevents certain font files
198 (e.g. some Type 1 Multiple Masters) from being incorrectly "recognized"
199 as TrueType font files..
200
David Turner2e421312000-05-26 22:13:17 +0000201 - moved a lot of stuff from the TrueType driver to the SFNT module,
202 this allows greater code re-use between font drivers (e.g. TrueType,
203 OpenType, Compact-TrueType, etc..)
204
205 - added a tiny segment cache to the SFNT Charmap 4 decoder, in order
206 to minimally speed it up..
207
David Turner11187202000-05-26 17:13:23 +0000208 - added support for Multiple Master fonts in "type1z". There is also
209 a new file named <freetype/ftmm.h> which defines functions to
210 manage them from client applications.
211
212 The new file "src/base/ftmm.c" is also optional to the engine..
213
214 - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) +
215 small bug fixes in FT_Load_Glyph, the "type1" driver, etc..
216
David Turnerf5dcdd52000-05-23 22:16:27 +0000217 - a minor fix to the Type 1 driver to let them apply the font matrix
218 correctly (used for many oblique fonts..)
219
David Turner51179f02000-05-18 16:18:05 +0000220 - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
221 to use %p instead of %lx).. Thanks to Karl Robillard
222
David Turner109fcf62000-05-17 23:35:37 +0000223 - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added
224 a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when
225 loaded from a file (maybe I should move the bitmap cropper to the
226 base layer ??).
227
David Turner3475e7f2000-05-17 20:56:01 +0000228 - changed the default number of gray levels of the smooth renderer to
229 256 (instead of the previous 128). Of course, the human eye can't
230 see any difference ;-)
231
232 - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of
233 subglyphs in a TrueType font now..
234
235=============================================================================
236OLD CHANGES 16 May 2000
David Turnerefce08d2000-05-11 18:23:52 +0000237
David Turner968f0c32000-05-16 23:26:01 +0000238 - tagged "BETA-6" in the CVS tree. This one is a serious release candidate
239 even though it doesn't incorporate the auto-hinter yet..
240
241 - various obsolete files were removed, and copyright header updated
242
243 - finally updated the standard raster to fix the monochrome rendering bug
244 + re-enable support for 5-gray levels anti-aliasing (suck, suck..)
245
246 - created new header files, and modified sources accordingly:
David Turnere49ab252000-05-16 23:44:38 +0000247
David Turner968f0c32000-05-16 23:26:01 +0000248 <freetype/fttypes.h> - simple FreeType types, without the API
249 <freetype/internal/ftmemory.h> - definition of memory-management macros
250
251 - added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h>
252
David Turnerc30aea92000-05-12 15:01:18 +0000253 - light update/cleaning of the build system + changes to the sources in
254 order to get rid of _all_ compiler warnings with three compilers, i.e:
255
256 gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX"
257 and LCC
258
259 IMPORTANT NOTE FOR WIN32-LCC USERS:
260 |
261 | It seems the C pre-processor that comes with LCC is broken, it
262 | doesn't recognize the ANSI standard directives # and ## correctly
263 | when one of the argument is a macro. Also, something like:
David Turnere49ab252000-05-16 23:44:38 +0000264 |
David Turnerc30aea92000-05-12 15:01:18 +0000265 | #define F(x) print##x
David Turnere49ab252000-05-16 23:44:38 +0000266 |
David Turnerc30aea92000-05-12 15:01:18 +0000267 | F(("hello"))
David Turnere49ab252000-05-16 23:44:38 +0000268 |
David Turnerc30aea92000-05-12 15:01:18 +0000269 | will get incorrectly translated to:
David Turnere49ab252000-05-16 23:44:38 +0000270 |
David Turnerc30aea92000-05-12 15:01:18 +0000271 | print "hello")
David Turnere49ab252000-05-16 23:44:38 +0000272 |
David Turnerc30aea92000-05-12 15:01:18 +0000273 | by its pre-processor. For this reason, you simply cannot build
274 | FreeType 2 in debug mode with this compiler..
275
276
David Turnerbfe2f982000-05-12 12:17:15 +0000277 - yet another massive grunt work. I've changed the definition of the
278 EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
279 an argument, which is the function's return value type.
David Turnere49ab252000-05-16 23:44:38 +0000280
David Turnerbfe2f982000-05-12 12:17:15 +0000281 This is necessary to compile FreeType as a DLL on Windows and OS/2.
282 Depending on the compiler used, a compiler-specific keyword like __export
283 or __system must be placed before (VisualC++) or after (BorlandC++)
284 the type..
David Turnere49ab252000-05-16 23:44:38 +0000285
David Turnerbfe2f982000-05-12 12:17:15 +0000286 Of course, this needed a lot of changes throughout the source code
287 to make it compile again... All cleaned up now, apparently..
288
289 Note also that there is a new EXPORT_VAR macro defined to allow the
290 _declaration_ of an exportable public (constant) variable. This is the
291 case of the raster interfaces (see ftraster.h and ftgrays.h), as well
292 as each module's interface (see sfdriver.h, psdriver.h, etc..)
293
294 - new feature: it is now possible to pass extra parameters to font
295 drivers when creating a new face object. For now, this
296 capability is unused. It could however prove to be useful
297 in a near future..
298
299 the FT_Open_Args structure was changes, as well as the internal
300 driver interface (the specific "init_face" module function has now
301 a different signature).
302
303 - updated the tutorial (not finished though).
David Turnerc30aea92000-05-12 15:01:18 +0000304 - updated the top-level BUILD document
David Turnerbfe2f982000-05-12 12:17:15 +0000305
David Turnerc60c61c2000-05-12 15:26:58 +0000306 - fixed a potential memory leak that could occur when loading embedded
307 bitmaps.
308
David Turnerbfe2f982000-05-12 12:17:15 +0000309 - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as
310 it was missing from the public header (the implementation was already
311 in "ftobjs.c").
312
313 - the file <freetype/fterrors.h> has been seriously updated in order to
314 allow the automatic generation of error message tables. See the comments
315 within it for more information.
316
David Turnera9c251c2000-05-11 18:36:19 +0000317 - major directory hierarchy re-organisation. This was done for two things:
David Turnere49ab252000-05-16 23:44:38 +0000318
David Turnera9c251c2000-05-11 18:36:19 +0000319 * first, to ease the "manual" compilation of the library by requiring
320 at lot less include paths :-)
David Turnerbfe2f982000-05-12 12:17:15 +0000321
David Turnera9c251c2000-05-11 18:36:19 +0000322 * second, to allow external programs to effectively access internal
323 data fields. For example, this can be extremely useful if someone
324 wants to write a font producer or a font manager on top of FreeType.
325
326 Basically, you should now use the 'freetype/' prefix for header inclusion,
327 as in:
David Turnere49ab252000-05-16 23:44:38 +0000328
David Turnera9c251c2000-05-11 18:36:19 +0000329 #include <freetype/freetype.h>
330 #include <freetype/ftglyph.h>
331
332 Some new include sub-directories are available:
David Turnere49ab252000-05-16 23:44:38 +0000333
David Turnera9c251c2000-05-11 18:36:19 +0000334 a. the "freetype/config" directory, contains two files used to
335 configure the build of the library. Client applications should
336 not need to look at these normally, but they can if they want.
David Turnere49ab252000-05-16 23:44:38 +0000337
David Turnera9c251c2000-05-11 18:36:19 +0000338 #include <freetype/config/ftoption.h>
339 #include <freetype/config/ftconfig.h>
David Turnere49ab252000-05-16 23:44:38 +0000340
David Turnera9c251c2000-05-11 18:36:19 +0000341 b. the "freetype/internal" directory, contains header files that
342 describes library internals. These are the header files that were
343 previously found in the "src/base" and "src/shared" directories.
344
345
346 As usual, the build system and the demos have been updated to reflect
347 the change..
David Turnere49ab252000-05-16 23:44:38 +0000348
David Turnera9c251c2000-05-11 18:36:19 +0000349 Here's a layout of the new directory hierarchy:
David Turnere49ab252000-05-16 23:44:38 +0000350
David Turnera9c251c2000-05-11 18:36:19 +0000351 TOP
352 include/
353 freetype/
354 freetype.h
355 ...
356 config/
357 ftoption.h
358 ftconfig.h
359 ftmodule.h
David Turnere49ab252000-05-16 23:44:38 +0000360
David Turnera9c251c2000-05-11 18:36:19 +0000361 internal/
362 ftobjs.h
363 ftstream.h
364 ftcalc.h
365 ...
David Turnere49ab252000-05-16 23:44:38 +0000366
David Turnera9c251c2000-05-11 18:36:19 +0000367 src/
368 base/
369 ...
David Turnere49ab252000-05-16 23:44:38 +0000370
David Turnera9c251c2000-05-11 18:36:19 +0000371 sfnt/
372 psnames/
373 truetype/
374 type1/
375 type1z/
376
377
378 Compiling a module is now much easier, for example, the following should
David Turner968f0c32000-05-16 23:26:01 +0000379 work when in the TOP directory on an ANSI build:
David Turnere49ab252000-05-16 23:44:38 +0000380
David Turnera9c251c2000-05-11 18:36:19 +0000381 gcc -c -I./include -I./src/base src/base/ftbase.c
382 gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
383 etc..
384
385 (of course, using -Iconfig/<system> if you provide system-specific
386 configuration files).
David Turnerefce08d2000-05-11 18:23:52 +0000387
388
389 - updated the structure of FT_Outline_Funcs in order to allow
390 direct coordinate scaling within the outline decomposition routine
391 (this is important for virtual "on" points with TrueType outlines)
392 + updates to the rasters to support this..
393
394 - updated the OS/2 table loading code in "src/sfnt/ttload.c" in order
395 to support version 2 of the table (see OpenType 1.2 spec)
396
397 - created "include/tttables.h" and "include/t1tables.h" to allow
398 client applications to access some of the SFNT and T1 tables of a
399 face with a procedural interface (see FT_Get_Sfnt_Table())
400 + updates to internal source files to reflect the change..
401
402 - some cleanups in the source code to get rid of warnings when compiling
403 with the "-Wall -W -ansi -pedantic" options in gcc.
404
405 - debugged and moved the smooth renderer to "src/base/ftgrays.c" and
406 its header to "include/ftgrays.h"
407
408 - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with
409 up to 80 sub-glyphs !! Thanks to Werner
410
411================================================================================
412OLD CHANGES - 14-apr-2000
David Turner77054f22000-04-14 20:49:52 +0000413
414 - fixed a bug in the TrueType glyph loader that prevented the correct
415 loading of some CJK glyphs in mingli.ttf
David Turnere49ab252000-05-16 23:44:38 +0000416
David Turner77054f22000-04-14 20:49:52 +0000417 - improved the standard Type 1 hinter in "src/type1"
David Turnere49ab252000-05-16 23:44:38 +0000418
David Turner77054f22000-04-14 20:49:52 +0000419 - fixed two bugs in the experimental Type 1 driver in "src/type1z"
420 to handle the new XFree86 4.0 fonts (and a few other ones..)
421
422 - the smooth renderer is now complete and supports sub-banding
423 to render large glyphs at high speed. However, it is still located
424 in "demos/src/ftgrays.c" and should move to the library itself
425 in the next beta.. NOTE: The smooth renderer doesn't compile in
426 stand-alone mode anymore, but this should be fixed RSN..
David Turnere49ab252000-05-16 23:44:38 +0000427
David Turner77054f22000-04-14 20:49:52 +0000428 - introduced convenience functions to more easily deal with glyph
429 images, see "include/ftglyph.h" for more details, as well as the
430 new demo program named "demos/src/ftstring.c" that demonstrates
431 its use
432
433 - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
434 drivers (this is required by the auto-hinter to improve its results).
435
436 - changed the raster interface, in order to allow client applications
437 to provide their own span-drawing callbacks. However, only the
438 smooth renderer supports this. See "FT_Raster_Params" in the
439 file "include/ftimage.h"
440
441 - fixed a small bug in FT_MulFix that caused incorrect transform
442 computation !!
443
444 - Note: The tutorial is out-of-date, grumpf.. :-(
445
446================================================================================
447OLD CHANGES - 12-mar-2000
David Turnerc3c7e7f2000-03-13 14:19:31 +0000448
449 - changed the layout of configuration files : now, all ANSI configuration
450 files are located in "freetype2/config". System-specific over-rides
451 can be placed in "freetype2/config/<system>".
David Turnere49ab252000-05-16 23:44:38 +0000452
David Turnerc3c7e7f2000-03-13 14:19:31 +0000453 - moved all configuration macros to "config/ftoption.h"
David Turnere49ab252000-05-16 23:44:38 +0000454
David Turnerc3c7e7f2000-03-13 14:19:31 +0000455 - improvements in the Type 1 driver with AFM support
David Turnere49ab252000-05-16 23:44:38 +0000456
David Turnerc3c7e7f2000-03-13 14:19:31 +0000457 - changed the fields in the FT_Outline structure : the old "flags"
458 array is re-named "tags", while all ancient flags are encoded into
459 a single unsigned int named "flags".
460
461 - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in
462 "ftimage.h").
463
464 - changed outline functions to "FT_Outline_<action>" syntax
465
466 - added a smooth anti-alias renderer to the demonstration programs
467 - added Mac graphics driver (thanks Just)
David Turnere49ab252000-05-16 23:44:38 +0000468
David Turnerc3c7e7f2000-03-13 14:19:31 +0000469 - FT_Open_Face changed in order to received a pointer to a FT_Open_Args
470 descriptor..
David Turnere49ab252000-05-16 23:44:38 +0000471
David Turnerc3c7e7f2000-03-13 14:19:31 +0000472 - various cleanups, a few more API functions implemented (see FT_Attach_File)
473
474 - updated some docs
475
476================================================================================
477OLD CHANGES - 22-feb-2000
David Turner58c10b52000-02-22 14:31:42 +0000478
479 - introduced the "psnames" module. It is used to:
480
481 o convert a Postscript glyph name into the equivalent Unicode
482 character code (used by the Type 1 driver(s) to synthetize
483 on the fly a Unicode charmap).
484
485 o provide an interface to retrieve the Postscript names of
486 the Macintosh, Adobe Standard & Adobe Expert character codes.
487 (the Macintosh names are used by the SFNT-module postscript
488 names support routines, while the other two tables are used
489 by the Type 1 driver(s)).
490
491 - introduced the "type1z" alternate Type 1 driver. This is a (still
492 experimental) driver for the Type 1 format that will ultimately
493 replace the one in "src/type1". It uses pattern matching to load
494 data from the font, instead of a finite state analyzer. It works
495 much better than the "old" driver with "broken" fonts. It is also
496 much smaller (under 15 Kb).
497
498 - the Type 1 drivers (both in "src/type1" and "src/type1z") are
499 nearly complete. They both provide automatic Unicode charmap
500 synthesis through the "psnames" module. No re-encoding vector
501 is needed. (note that they still leak memory due to some code
502 missing, and I'm getting lazy).
503
504 Trivial AFM support has been added to read kerning information
505 but wasn't exactly tested as it should ;-)
506
507 - The TrueType glyph loader has been seriously rewritten (see the
508 file "src/truetype/ttgload.c". It is now much, much simpler as
509 well as easier to read, maintain and understand :-) Preliminary
510 versions introduced a memory leak that has been reported by Jack
511 Davis, and is now fixed..
512
513 - introduced the new "ft_glyph_format_plotter", used to represent
514 stroked outlines like Windows "Vector" fonts, and certain Type 1
515 fonts like "Hershey". The corresponding raster will be written
516 soon.
517
518 - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
519 interface that uses a structure to describe the input stream,
520 the driver (if required), etc..
521
522TODO
523 - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
524
525 - Add a function like FT_Load_Character( face, char_code, load_flags )
526 that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph
527 to ease developer's work.
528
529 - Update the tutorial !!
530 - consider adding support for Multiple Master fonts in the Type 1
531 drivers.
532
533 - Test the AFM routines of the Type 1 drivers to check that kerning
534 information is returned correctly.
535
536 - write a decent auto-gridding component !! We need this to release
537 FreeType 2.0 gold !
538
539
540----- less urgent needs : ----------
541 - add a CFF/Type2 driver
542 - add a BDF driver
543 - add a FNT/PCF/HBF driver
544 - add a Speedo driver from the X11 sources
545
546
547==============================================================================
548OLDER CHANGES - 27-jan-2000
David Turner633da992000-01-27 14:07:33 +0000549
550 - updated the "sfnt" module interface to allow several SFNT-based
551 drivers to co-exist peacefully
David Turnere49ab252000-05-16 23:44:38 +0000552
David Turner633da992000-01-27 14:07:33 +0000553 - updated the "T1_Face" type to better separate Postscript font content
554 from the rest of the FT_Face structure. Might be used later by the
555 CFF/Type2 driver..
David Turnere49ab252000-05-16 23:44:38 +0000556
David Turner633da992000-01-27 14:07:33 +0000557 - added an experimental replacement Type 1 driver featuring advanced
558 (and speedy) pattern matching to retrieve the data from postscript
559 fonts.
560
561 - very minor changes in the implementation of FT_Set_Char_Size and
562 FT_Set_Pixel_Sizes (they now implement default to ligthen the
563 font driver's code).
564
565
566=============================================================================
567OLD MESSAGE
568
David Turnerd2b1f351999-12-16 23:11:37 +0000569This file summarizes the changes that occured since the last "beta" of FreeType 2.
570Because the list is important, it has been divided into separate sections:
571
David Turner5951ce91999-12-29 00:53:44 +0000572Table Of Contents:
573
574 I High-Level Interface (easier !)
575 II Directory Structure
576 III Glyph Image Formats
577 IV Build System
578 V Portability
579 VI Font Drivers
David Turnerd2b1f351999-12-16 23:11:37 +0000580
581-----------------------------------------------------------------------------------------
582High-Level Interface :
583
584 The high-level API has been considerably simplified. Here is how :
585
David Turner5951ce91999-12-29 00:53:44 +0000586 - resource objects have disappeared. this means that face objects can
587 now be created with a single function call (see FT_New_Face and
David Turnerd2b1f351999-12-16 23:11:37 +0000588 FT_Open_Face)
David Turnere49ab252000-05-16 23:44:38 +0000589
David Turnerd2b1f351999-12-16 23:11:37 +0000590 - when calling either FT_New_Face & FT_Open_Face, a size object and a
591 glyph slot object are automatically created for the face, and can be
592 accessed through "face->glyph" and "face->size" if one really needs to.
593 In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
David Turnere49ab252000-05-16 23:44:38 +0000594
David Turnerd2b1f351999-12-16 23:11:37 +0000595 - similarly, FT_Load_Glyph now only takes a "face" argument (instead of
596 a glyph slot and a size). Also, it's "result" parameter is gone, as
597 the glyph image type is returned in the field "face->glyph.format"
David Turnere49ab252000-05-16 23:44:38 +0000598
David Turnerd2b1f351999-12-16 23:11:37 +0000599 - the list of available charmaps is directly accessible through
600 "face->charmaps", counting "face->num_charmaps" elements. Each
601 charmap has an 'encoding' field which specifies which known encoding
602 it deals with. Valid values are, for example :
David Turnere49ab252000-05-16 23:44:38 +0000603
David Turnerd2b1f351999-12-16 23:11:37 +0000604 ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
605 ft_encoding_apple_roman
606 ft_encoding_sjis
607 ft_encoding_adobe_standard
David Turner5951ce91999-12-29 00:53:44 +0000608 ft_encoding_adobe_expert
David Turnere49ab252000-05-16 23:44:38 +0000609
David Turnerd2b1f351999-12-16 23:11:37 +0000610 other values may be added in the future. Each charmap still holds its
611 "platform_id" and "encoding_id" values in case the encoding is too
612 exotic for the current library
613
614
615-----------------------------------------------------------------------------------------
616Directory Structure:
617
618 Should seem obvious to most of you:
619
620 freetype/
621 config/ -- configuration sub-makefiles
622 ansi/
David Turner5951ce91999-12-29 00:53:44 +0000623 unix/ -- platform-specific configuration files
David Turnerd2b1f351999-12-16 23:11:37 +0000624 win32/
625 os2/
626 msdos/
627
628 include/ -- public header files, those to be included directly
629 by client apps
630
631 src/ -- sources of the library
632 base/ -- the base layer
633 sfnt/ -- the sfnt "driver" (see the drivers section below)
634 truetype/ -- the truetype driver
635 type1/ -- the type1 driver
636 shared/ -- some header files shared between drivers
637
638 demos/ -- demos/tools
639
640 docs/ -- documentation (a bit empty for now)
641
642-----------------------------------------------------------------------------------------
643Glyph Image Formats :
644
645 Drivers are now able to register new glyph image formats within the library.
646 For now, the base layer supports of course bitmaps and vector outlines, but
647 one could imagine something different like colored bitmaps, bi-color
648 vectors or wathever else (Metafonts anyone ??).
649
650 See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is
651 gone, and is now replaced by FT_Bitmap, which should encompass all known
652 bitmap types.
653
654 Each new image format must provide at least one "raster", i.e. a module
David Turner5951ce91999-12-29 00:53:44 +0000655 capable of transforming the glyph image into a bitmap. It's also possible
David Turnerd2b1f351999-12-16 23:11:37 +0000656 to change the default raster used for a given glyph image format.
657
658 The default outline scan-converter now uses 128 levels of grays by default,
659 which tends to smooth many things. Note that the demo programs have been
David Turner5951ce91999-12-29 00:53:44 +0000660 updated significantly in order to display these..
David Turnerd2b1f351999-12-16 23:11:37 +0000661
662
663-----------------------------------------------------------------------------------------
664Build system :
665
666 You still need GNU Make to build the library. The build system has been
667 very seriously re-vamped in order to provide things like :
668
669 - automatic host platform detection (reverting to 'config/ansi'
670 if it is not detected, with pseudo-standard compilation flags)
671
672 - the ability to compile from the Makefiles with very different and
673 exotic compilers. Note that linking the library can be difficult for
674 some platforms.
675
676 For example, the file `config/win32/lcclib.bat' is invoked by the
677 build system to create the ".lib" file with LCC-Win32 because its
678 librarian has too many flaws to be invoked directly from the Makefile.
679
680 Here's how it works :
681
682 - the first time you type `make', the build system runs a series of
683 sub-makefiles in order to detect your host platform. It then dumps
684 what it found, and creates a file called `config.mk' in the current
685 directory. This is a sub-Makefile used to define many important Make
686 variables used to build the library.
687
688 - the second time, the build system detects the `config.mk' then use it
689 to build the library. All object files go into 'obj' by default, as
690 well as the library file, but this can easily be changed.
691
692 Note that you can run "make setup" to force another host platform detection
693 even if a `config.mk' is present in the current directory. Another solution
694 is simply to delete the file, then re-run make.
695
696 Finally, the default compiler for all platforms is gcc (for now, this will
697 hopefully changed in the future). You can however specify a different
698 compiler by specifying it after the 'setup' target as in :
699
700 gnumake setup lcc on Win32 to use the LCC compiler
701 gnumake setup visualc on Win32 to use Visual C++
702
703 See the file `config/<system>/detect.mk' for a list of supported compilers
704 for your platforms.
705
706 It should be relatively easy to write new detection rules files and
707 config.mk..
708
709 Finally, to build the demo programs, go to `demos' and launch GNU Make,
710 it will use the `config.mk' in the top directory to build the test
711 programs..
712
713-----------------------------------------------------------------------------------------
714Portability :
715
716 In the previous beta, a single FT_System object was used to encompass
717 all low-level operations like thread synchronisation, memory management
718 and i/o access. This has been greatly simplified :
719
720 - thread synchronisation has been dropped, for the simple reason that
721 the library is already re-entrant, and that if you really need two
722 threads accessing the same FT_Library, you should really synchronize
723 access to it yourself with a simple mutex.
724
725 - memory management is performed through a very simple object called
726 "FT_Memory", which really is a table containing a table of pointers
727 to functions like malloc, realloc and free as well as some user data
728 (closure).
729
730 - resources have disappeared (they created more problems than they
731 solved), and i/o management have been simplified greatly as a
732 result. Streams are defined through FT_Stream objects, which can
733 be either memory-based or disk-based.
734
735 Note that each face has its own stream, which is closed only when
736 the face object is destroyed. Hence, a function like TT_Flush_Face
737 in 1.x cannot be directly supported. However, if you really need
738 something like this, you can easily tailor your own streams to achieve
739 the same feature at a lower level (and use FT_Open_Face instead of
740 FT_New_Face to create the face).
741
742 See the file "include/ftsystem.h" for more details, as well as the
743 implementations found in "config/unix" and "config/ansi".
744
745
746-----------------------------------------------------------------------------------------
David Turner5951ce91999-12-29 00:53:44 +0000747Font Drivers :
David Turnere49ab252000-05-16 23:44:38 +0000748
David Turner5951ce91999-12-29 00:53:44 +0000749
750 The Font Driver interface has been modified in order to support
751 extensions & versioning.
752
753
754 The list of the font drivers that are statically linked to the
755 library at compile time is managed through a new configuration file
756 called `config/<platform>/ftmodule.h'.
757
758 This file is autogenerated when invoking `make modules'. This target
759 will parse all sub-directories of 'src', looking for a "module.mk"
760 rules file, used to describe the driver to the build system.
761
762 Hence, one should call `make modules' each time a font driver is added
763 or removed from the `src' directory.
764
765
766 Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
767 driver doesn't support font files directly, but provides services used
768 by all TrueType-like font drivers. Hence, its code is shared between
769 the TrueType & OpenType font formats, and possibly more formats to
770 come if we're lucky..
David Turnerd2b1f351999-12-16 23:11:37 +0000771
772-----------------------------------------------------------------------------------------
773Extensions support :
David Turner5951ce91999-12-29 00:53:44 +0000774
775 The extensions support is inspired by the one found in 1.x.
776
777 Now, each font driver has its own "extension registry", which lists
778 which extensions are available for the font faces managed by the driver.
779
780 Extension ids are now strings, rather than 4-byte tags, as this is
781 usually more readable..
782
783 Each extension has:
784 - some data, associated to each face object
785 - an interface (table of function pointers)
786
787 An extension that is format-specific should simply register itself
788 to the correct font driver. Here is some example code:
789
790 // Registering an extensions
791 //
792 FT_Error FT_Init_XXXX_Extension( FT_Library library )
793 {
794 FT_DriverInterface* tt_driver;
795
796 driver = FT_Get_Driver( library, "truetype" );
797 if (!driver) return FT_Err_Unimplemented_Feature;
798
David Turnere49ab252000-05-16 23:44:38 +0000799 return FT_Register_Extension( driver, &extension_class );
David Turner5951ce91999-12-29 00:53:44 +0000800 }
801
David Turnere49ab252000-05-16 23:44:38 +0000802
David Turner5951ce91999-12-29 00:53:44 +0000803 // Implementing the extensions
804 //
805 FT_Error FT_Proceed_Extension_XXX( FT_Face face )
806 {
807 FT_XXX_Extension ext;
808 FT_XXX_Extension_Interface ext_interface;
809
810 ext = FT_Get_Extension( face, "extensionid", &ext_interface );
811 if (!ext) return error;
812
813 return ext_interface->do_it(ext);
814 }
David Turnerd2b1f351999-12-16 23:11:37 +0000815