blob: 5c1b7ae4aee438a85604bd099f0c15256ac65d45 [file] [log] [blame]
David Turner3475e7f2000-05-17 20:56:01 +00001LATEST_CHANGES
2
David Turner4f99c3c2000-05-29 20:55:13 +00003 - fixed potential "divide by zero" bugs in ftcalc.c.. my god..
4
5 - added source code for the OpenType/CFF driver (still incomplete though..)
6
7 - modified the SFNT driver slightly to perform more robust header
8 checks in TT_Load_SFNT_Header. This prevents certain font files
9 (e.g. some Type 1 Multiple Masters) from being incorrectly "recognized"
10 as TrueType font files..
11
David Turner2e421312000-05-26 22:13:17 +000012 - moved a lot of stuff from the TrueType driver to the SFNT module,
13 this allows greater code re-use between font drivers (e.g. TrueType,
14 OpenType, Compact-TrueType, etc..)
15
16 - added a tiny segment cache to the SFNT Charmap 4 decoder, in order
17 to minimally speed it up..
18
David Turner11187202000-05-26 17:13:23 +000019 - added support for Multiple Master fonts in "type1z". There is also
20 a new file named <freetype/ftmm.h> which defines functions to
21 manage them from client applications.
22
23 The new file "src/base/ftmm.c" is also optional to the engine..
24
25 - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) +
26 small bug fixes in FT_Load_Glyph, the "type1" driver, etc..
27
David Turnerf5dcdd52000-05-23 22:16:27 +000028 - a minor fix to the Type 1 driver to let them apply the font matrix
29 correctly (used for many oblique fonts..)
30
David Turner51179f02000-05-18 16:18:05 +000031 - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
32 to use %p instead of %lx).. Thanks to Karl Robillard
33
David Turner109fcf62000-05-17 23:35:37 +000034 - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added
35 a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when
36 loaded from a file (maybe I should move the bitmap cropper to the
37 base layer ??).
38
David Turner3475e7f2000-05-17 20:56:01 +000039 - changed the default number of gray levels of the smooth renderer to
40 256 (instead of the previous 128). Of course, the human eye can't
41 see any difference ;-)
42
43 - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of
44 subglyphs in a TrueType font now..
45
46=============================================================================
47OLD CHANGES 16 May 2000
David Turnerefce08d2000-05-11 18:23:52 +000048
David Turner968f0c32000-05-16 23:26:01 +000049 - tagged "BETA-6" in the CVS tree. This one is a serious release candidate
50 even though it doesn't incorporate the auto-hinter yet..
51
52 - various obsolete files were removed, and copyright header updated
53
54 - finally updated the standard raster to fix the monochrome rendering bug
55 + re-enable support for 5-gray levels anti-aliasing (suck, suck..)
56
57 - created new header files, and modified sources accordingly:
David Turnere49ab252000-05-16 23:44:38 +000058
David Turner968f0c32000-05-16 23:26:01 +000059 <freetype/fttypes.h> - simple FreeType types, without the API
60 <freetype/internal/ftmemory.h> - definition of memory-management macros
61
62 - added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h>
63
David Turnerc30aea92000-05-12 15:01:18 +000064 - light update/cleaning of the build system + changes to the sources in
65 order to get rid of _all_ compiler warnings with three compilers, i.e:
66
67 gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX"
68 and LCC
69
70 IMPORTANT NOTE FOR WIN32-LCC USERS:
71 |
72 | It seems the C pre-processor that comes with LCC is broken, it
73 | doesn't recognize the ANSI standard directives # and ## correctly
74 | when one of the argument is a macro. Also, something like:
David Turnere49ab252000-05-16 23:44:38 +000075 |
David Turnerc30aea92000-05-12 15:01:18 +000076 | #define F(x) print##x
David Turnere49ab252000-05-16 23:44:38 +000077 |
David Turnerc30aea92000-05-12 15:01:18 +000078 | F(("hello"))
David Turnere49ab252000-05-16 23:44:38 +000079 |
David Turnerc30aea92000-05-12 15:01:18 +000080 | will get incorrectly translated to:
David Turnere49ab252000-05-16 23:44:38 +000081 |
David Turnerc30aea92000-05-12 15:01:18 +000082 | print "hello")
David Turnere49ab252000-05-16 23:44:38 +000083 |
David Turnerc30aea92000-05-12 15:01:18 +000084 | by its pre-processor. For this reason, you simply cannot build
85 | FreeType 2 in debug mode with this compiler..
86
87
David Turnerbfe2f982000-05-12 12:17:15 +000088 - yet another massive grunt work. I've changed the definition of the
89 EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
90 an argument, which is the function's return value type.
David Turnere49ab252000-05-16 23:44:38 +000091
David Turnerbfe2f982000-05-12 12:17:15 +000092 This is necessary to compile FreeType as a DLL on Windows and OS/2.
93 Depending on the compiler used, a compiler-specific keyword like __export
94 or __system must be placed before (VisualC++) or after (BorlandC++)
95 the type..
David Turnere49ab252000-05-16 23:44:38 +000096
David Turnerbfe2f982000-05-12 12:17:15 +000097 Of course, this needed a lot of changes throughout the source code
98 to make it compile again... All cleaned up now, apparently..
99
100 Note also that there is a new EXPORT_VAR macro defined to allow the
101 _declaration_ of an exportable public (constant) variable. This is the
102 case of the raster interfaces (see ftraster.h and ftgrays.h), as well
103 as each module's interface (see sfdriver.h, psdriver.h, etc..)
104
105 - new feature: it is now possible to pass extra parameters to font
106 drivers when creating a new face object. For now, this
107 capability is unused. It could however prove to be useful
108 in a near future..
109
110 the FT_Open_Args structure was changes, as well as the internal
111 driver interface (the specific "init_face" module function has now
112 a different signature).
113
114 - updated the tutorial (not finished though).
David Turnerc30aea92000-05-12 15:01:18 +0000115 - updated the top-level BUILD document
David Turnerbfe2f982000-05-12 12:17:15 +0000116
David Turnerc60c61c2000-05-12 15:26:58 +0000117 - fixed a potential memory leak that could occur when loading embedded
118 bitmaps.
119
David Turnerbfe2f982000-05-12 12:17:15 +0000120 - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as
121 it was missing from the public header (the implementation was already
122 in "ftobjs.c").
123
124 - the file <freetype/fterrors.h> has been seriously updated in order to
125 allow the automatic generation of error message tables. See the comments
126 within it for more information.
127
David Turnera9c251c2000-05-11 18:36:19 +0000128 - major directory hierarchy re-organisation. This was done for two things:
David Turnere49ab252000-05-16 23:44:38 +0000129
David Turnera9c251c2000-05-11 18:36:19 +0000130 * first, to ease the "manual" compilation of the library by requiring
131 at lot less include paths :-)
David Turnerbfe2f982000-05-12 12:17:15 +0000132
David Turnera9c251c2000-05-11 18:36:19 +0000133 * second, to allow external programs to effectively access internal
134 data fields. For example, this can be extremely useful if someone
135 wants to write a font producer or a font manager on top of FreeType.
136
137 Basically, you should now use the 'freetype/' prefix for header inclusion,
138 as in:
David Turnere49ab252000-05-16 23:44:38 +0000139
David Turnera9c251c2000-05-11 18:36:19 +0000140 #include <freetype/freetype.h>
141 #include <freetype/ftglyph.h>
142
143 Some new include sub-directories are available:
David Turnere49ab252000-05-16 23:44:38 +0000144
David Turnera9c251c2000-05-11 18:36:19 +0000145 a. the "freetype/config" directory, contains two files used to
146 configure the build of the library. Client applications should
147 not need to look at these normally, but they can if they want.
David Turnere49ab252000-05-16 23:44:38 +0000148
David Turnera9c251c2000-05-11 18:36:19 +0000149 #include <freetype/config/ftoption.h>
150 #include <freetype/config/ftconfig.h>
David Turnere49ab252000-05-16 23:44:38 +0000151
David Turnera9c251c2000-05-11 18:36:19 +0000152 b. the "freetype/internal" directory, contains header files that
153 describes library internals. These are the header files that were
154 previously found in the "src/base" and "src/shared" directories.
155
156
157 As usual, the build system and the demos have been updated to reflect
158 the change..
David Turnere49ab252000-05-16 23:44:38 +0000159
David Turnera9c251c2000-05-11 18:36:19 +0000160 Here's a layout of the new directory hierarchy:
David Turnere49ab252000-05-16 23:44:38 +0000161
David Turnera9c251c2000-05-11 18:36:19 +0000162 TOP
163 include/
164 freetype/
165 freetype.h
166 ...
167 config/
168 ftoption.h
169 ftconfig.h
170 ftmodule.h
David Turnere49ab252000-05-16 23:44:38 +0000171
David Turnera9c251c2000-05-11 18:36:19 +0000172 internal/
173 ftobjs.h
174 ftstream.h
175 ftcalc.h
176 ...
David Turnere49ab252000-05-16 23:44:38 +0000177
David Turnera9c251c2000-05-11 18:36:19 +0000178 src/
179 base/
180 ...
David Turnere49ab252000-05-16 23:44:38 +0000181
David Turnera9c251c2000-05-11 18:36:19 +0000182 sfnt/
183 psnames/
184 truetype/
185 type1/
186 type1z/
187
188
189 Compiling a module is now much easier, for example, the following should
David Turner968f0c32000-05-16 23:26:01 +0000190 work when in the TOP directory on an ANSI build:
David Turnere49ab252000-05-16 23:44:38 +0000191
David Turnera9c251c2000-05-11 18:36:19 +0000192 gcc -c -I./include -I./src/base src/base/ftbase.c
193 gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
194 etc..
195
196 (of course, using -Iconfig/<system> if you provide system-specific
197 configuration files).
David Turnerefce08d2000-05-11 18:23:52 +0000198
199
200 - updated the structure of FT_Outline_Funcs in order to allow
201 direct coordinate scaling within the outline decomposition routine
202 (this is important for virtual "on" points with TrueType outlines)
203 + updates to the rasters to support this..
204
205 - updated the OS/2 table loading code in "src/sfnt/ttload.c" in order
206 to support version 2 of the table (see OpenType 1.2 spec)
207
208 - created "include/tttables.h" and "include/t1tables.h" to allow
209 client applications to access some of the SFNT and T1 tables of a
210 face with a procedural interface (see FT_Get_Sfnt_Table())
211 + updates to internal source files to reflect the change..
212
213 - some cleanups in the source code to get rid of warnings when compiling
214 with the "-Wall -W -ansi -pedantic" options in gcc.
215
216 - debugged and moved the smooth renderer to "src/base/ftgrays.c" and
217 its header to "include/ftgrays.h"
218
219 - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with
220 up to 80 sub-glyphs !! Thanks to Werner
221
222================================================================================
223OLD CHANGES - 14-apr-2000
David Turner77054f22000-04-14 20:49:52 +0000224
225 - fixed a bug in the TrueType glyph loader that prevented the correct
226 loading of some CJK glyphs in mingli.ttf
David Turnere49ab252000-05-16 23:44:38 +0000227
David Turner77054f22000-04-14 20:49:52 +0000228 - improved the standard Type 1 hinter in "src/type1"
David Turnere49ab252000-05-16 23:44:38 +0000229
David Turner77054f22000-04-14 20:49:52 +0000230 - fixed two bugs in the experimental Type 1 driver in "src/type1z"
231 to handle the new XFree86 4.0 fonts (and a few other ones..)
232
233 - the smooth renderer is now complete and supports sub-banding
234 to render large glyphs at high speed. However, it is still located
235 in "demos/src/ftgrays.c" and should move to the library itself
236 in the next beta.. NOTE: The smooth renderer doesn't compile in
237 stand-alone mode anymore, but this should be fixed RSN..
David Turnere49ab252000-05-16 23:44:38 +0000238
David Turner77054f22000-04-14 20:49:52 +0000239 - introduced convenience functions to more easily deal with glyph
240 images, see "include/ftglyph.h" for more details, as well as the
241 new demo program named "demos/src/ftstring.c" that demonstrates
242 its use
243
244 - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
245 drivers (this is required by the auto-hinter to improve its results).
246
247 - changed the raster interface, in order to allow client applications
248 to provide their own span-drawing callbacks. However, only the
249 smooth renderer supports this. See "FT_Raster_Params" in the
250 file "include/ftimage.h"
251
252 - fixed a small bug in FT_MulFix that caused incorrect transform
253 computation !!
254
255 - Note: The tutorial is out-of-date, grumpf.. :-(
256
257================================================================================
258OLD CHANGES - 12-mar-2000
David Turnerc3c7e7f2000-03-13 14:19:31 +0000259
260 - changed the layout of configuration files : now, all ANSI configuration
261 files are located in "freetype2/config". System-specific over-rides
262 can be placed in "freetype2/config/<system>".
David Turnere49ab252000-05-16 23:44:38 +0000263
David Turnerc3c7e7f2000-03-13 14:19:31 +0000264 - moved all configuration macros to "config/ftoption.h"
David Turnere49ab252000-05-16 23:44:38 +0000265
David Turnerc3c7e7f2000-03-13 14:19:31 +0000266 - improvements in the Type 1 driver with AFM support
David Turnere49ab252000-05-16 23:44:38 +0000267
David Turnerc3c7e7f2000-03-13 14:19:31 +0000268 - changed the fields in the FT_Outline structure : the old "flags"
269 array is re-named "tags", while all ancient flags are encoded into
270 a single unsigned int named "flags".
271
272 - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in
273 "ftimage.h").
274
275 - changed outline functions to "FT_Outline_<action>" syntax
276
277 - added a smooth anti-alias renderer to the demonstration programs
278 - added Mac graphics driver (thanks Just)
David Turnere49ab252000-05-16 23:44:38 +0000279
David Turnerc3c7e7f2000-03-13 14:19:31 +0000280 - FT_Open_Face changed in order to received a pointer to a FT_Open_Args
281 descriptor..
David Turnere49ab252000-05-16 23:44:38 +0000282
David Turnerc3c7e7f2000-03-13 14:19:31 +0000283 - various cleanups, a few more API functions implemented (see FT_Attach_File)
284
285 - updated some docs
286
287================================================================================
288OLD CHANGES - 22-feb-2000
David Turner58c10b52000-02-22 14:31:42 +0000289
290 - introduced the "psnames" module. It is used to:
291
292 o convert a Postscript glyph name into the equivalent Unicode
293 character code (used by the Type 1 driver(s) to synthetize
294 on the fly a Unicode charmap).
295
296 o provide an interface to retrieve the Postscript names of
297 the Macintosh, Adobe Standard & Adobe Expert character codes.
298 (the Macintosh names are used by the SFNT-module postscript
299 names support routines, while the other two tables are used
300 by the Type 1 driver(s)).
301
302 - introduced the "type1z" alternate Type 1 driver. This is a (still
303 experimental) driver for the Type 1 format that will ultimately
304 replace the one in "src/type1". It uses pattern matching to load
305 data from the font, instead of a finite state analyzer. It works
306 much better than the "old" driver with "broken" fonts. It is also
307 much smaller (under 15 Kb).
308
309 - the Type 1 drivers (both in "src/type1" and "src/type1z") are
310 nearly complete. They both provide automatic Unicode charmap
311 synthesis through the "psnames" module. No re-encoding vector
312 is needed. (note that they still leak memory due to some code
313 missing, and I'm getting lazy).
314
315 Trivial AFM support has been added to read kerning information
316 but wasn't exactly tested as it should ;-)
317
318 - The TrueType glyph loader has been seriously rewritten (see the
319 file "src/truetype/ttgload.c". It is now much, much simpler as
320 well as easier to read, maintain and understand :-) Preliminary
321 versions introduced a memory leak that has been reported by Jack
322 Davis, and is now fixed..
323
324 - introduced the new "ft_glyph_format_plotter", used to represent
325 stroked outlines like Windows "Vector" fonts, and certain Type 1
326 fonts like "Hershey". The corresponding raster will be written
327 soon.
328
329 - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
330 interface that uses a structure to describe the input stream,
331 the driver (if required), etc..
332
333TODO
334 - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
335
336 - Add a function like FT_Load_Character( face, char_code, load_flags )
337 that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph
338 to ease developer's work.
339
340 - Update the tutorial !!
341 - consider adding support for Multiple Master fonts in the Type 1
342 drivers.
343
344 - Test the AFM routines of the Type 1 drivers to check that kerning
345 information is returned correctly.
346
347 - write a decent auto-gridding component !! We need this to release
348 FreeType 2.0 gold !
349
350
351----- less urgent needs : ----------
352 - add a CFF/Type2 driver
353 - add a BDF driver
354 - add a FNT/PCF/HBF driver
355 - add a Speedo driver from the X11 sources
356
357
358==============================================================================
359OLDER CHANGES - 27-jan-2000
David Turner633da992000-01-27 14:07:33 +0000360
361 - updated the "sfnt" module interface to allow several SFNT-based
362 drivers to co-exist peacefully
David Turnere49ab252000-05-16 23:44:38 +0000363
David Turner633da992000-01-27 14:07:33 +0000364 - updated the "T1_Face" type to better separate Postscript font content
365 from the rest of the FT_Face structure. Might be used later by the
366 CFF/Type2 driver..
David Turnere49ab252000-05-16 23:44:38 +0000367
David Turner633da992000-01-27 14:07:33 +0000368 - added an experimental replacement Type 1 driver featuring advanced
369 (and speedy) pattern matching to retrieve the data from postscript
370 fonts.
371
372 - very minor changes in the implementation of FT_Set_Char_Size and
373 FT_Set_Pixel_Sizes (they now implement default to ligthen the
374 font driver's code).
375
376
377=============================================================================
378OLD MESSAGE
379
David Turnerd2b1f351999-12-16 23:11:37 +0000380This file summarizes the changes that occured since the last "beta" of FreeType 2.
381Because the list is important, it has been divided into separate sections:
382
David Turner5951ce91999-12-29 00:53:44 +0000383Table Of Contents:
384
385 I High-Level Interface (easier !)
386 II Directory Structure
387 III Glyph Image Formats
388 IV Build System
389 V Portability
390 VI Font Drivers
David Turnerd2b1f351999-12-16 23:11:37 +0000391
392-----------------------------------------------------------------------------------------
393High-Level Interface :
394
395 The high-level API has been considerably simplified. Here is how :
396
David Turner5951ce91999-12-29 00:53:44 +0000397 - resource objects have disappeared. this means that face objects can
398 now be created with a single function call (see FT_New_Face and
David Turnerd2b1f351999-12-16 23:11:37 +0000399 FT_Open_Face)
David Turnere49ab252000-05-16 23:44:38 +0000400
David Turnerd2b1f351999-12-16 23:11:37 +0000401 - when calling either FT_New_Face & FT_Open_Face, a size object and a
402 glyph slot object are automatically created for the face, and can be
403 accessed through "face->glyph" and "face->size" if one really needs to.
404 In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
David Turnere49ab252000-05-16 23:44:38 +0000405
David Turnerd2b1f351999-12-16 23:11:37 +0000406 - similarly, FT_Load_Glyph now only takes a "face" argument (instead of
407 a glyph slot and a size). Also, it's "result" parameter is gone, as
408 the glyph image type is returned in the field "face->glyph.format"
David Turnere49ab252000-05-16 23:44:38 +0000409
David Turnerd2b1f351999-12-16 23:11:37 +0000410 - the list of available charmaps is directly accessible through
411 "face->charmaps", counting "face->num_charmaps" elements. Each
412 charmap has an 'encoding' field which specifies which known encoding
413 it deals with. Valid values are, for example :
David Turnere49ab252000-05-16 23:44:38 +0000414
David Turnerd2b1f351999-12-16 23:11:37 +0000415 ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
416 ft_encoding_apple_roman
417 ft_encoding_sjis
418 ft_encoding_adobe_standard
David Turner5951ce91999-12-29 00:53:44 +0000419 ft_encoding_adobe_expert
David Turnere49ab252000-05-16 23:44:38 +0000420
David Turnerd2b1f351999-12-16 23:11:37 +0000421 other values may be added in the future. Each charmap still holds its
422 "platform_id" and "encoding_id" values in case the encoding is too
423 exotic for the current library
424
425
426-----------------------------------------------------------------------------------------
427Directory Structure:
428
429 Should seem obvious to most of you:
430
431 freetype/
432 config/ -- configuration sub-makefiles
433 ansi/
David Turner5951ce91999-12-29 00:53:44 +0000434 unix/ -- platform-specific configuration files
David Turnerd2b1f351999-12-16 23:11:37 +0000435 win32/
436 os2/
437 msdos/
438
439 include/ -- public header files, those to be included directly
440 by client apps
441
442 src/ -- sources of the library
443 base/ -- the base layer
444 sfnt/ -- the sfnt "driver" (see the drivers section below)
445 truetype/ -- the truetype driver
446 type1/ -- the type1 driver
447 shared/ -- some header files shared between drivers
448
449 demos/ -- demos/tools
450
451 docs/ -- documentation (a bit empty for now)
452
453-----------------------------------------------------------------------------------------
454Glyph Image Formats :
455
456 Drivers are now able to register new glyph image formats within the library.
457 For now, the base layer supports of course bitmaps and vector outlines, but
458 one could imagine something different like colored bitmaps, bi-color
459 vectors or wathever else (Metafonts anyone ??).
460
461 See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is
462 gone, and is now replaced by FT_Bitmap, which should encompass all known
463 bitmap types.
464
465 Each new image format must provide at least one "raster", i.e. a module
David Turner5951ce91999-12-29 00:53:44 +0000466 capable of transforming the glyph image into a bitmap. It's also possible
David Turnerd2b1f351999-12-16 23:11:37 +0000467 to change the default raster used for a given glyph image format.
468
469 The default outline scan-converter now uses 128 levels of grays by default,
470 which tends to smooth many things. Note that the demo programs have been
David Turner5951ce91999-12-29 00:53:44 +0000471 updated significantly in order to display these..
David Turnerd2b1f351999-12-16 23:11:37 +0000472
473
474-----------------------------------------------------------------------------------------
475Build system :
476
477 You still need GNU Make to build the library. The build system has been
478 very seriously re-vamped in order to provide things like :
479
480 - automatic host platform detection (reverting to 'config/ansi'
481 if it is not detected, with pseudo-standard compilation flags)
482
483 - the ability to compile from the Makefiles with very different and
484 exotic compilers. Note that linking the library can be difficult for
485 some platforms.
486
487 For example, the file `config/win32/lcclib.bat' is invoked by the
488 build system to create the ".lib" file with LCC-Win32 because its
489 librarian has too many flaws to be invoked directly from the Makefile.
490
491 Here's how it works :
492
493 - the first time you type `make', the build system runs a series of
494 sub-makefiles in order to detect your host platform. It then dumps
495 what it found, and creates a file called `config.mk' in the current
496 directory. This is a sub-Makefile used to define many important Make
497 variables used to build the library.
498
499 - the second time, the build system detects the `config.mk' then use it
500 to build the library. All object files go into 'obj' by default, as
501 well as the library file, but this can easily be changed.
502
503 Note that you can run "make setup" to force another host platform detection
504 even if a `config.mk' is present in the current directory. Another solution
505 is simply to delete the file, then re-run make.
506
507 Finally, the default compiler for all platforms is gcc (for now, this will
508 hopefully changed in the future). You can however specify a different
509 compiler by specifying it after the 'setup' target as in :
510
511 gnumake setup lcc on Win32 to use the LCC compiler
512 gnumake setup visualc on Win32 to use Visual C++
513
514 See the file `config/<system>/detect.mk' for a list of supported compilers
515 for your platforms.
516
517 It should be relatively easy to write new detection rules files and
518 config.mk..
519
520 Finally, to build the demo programs, go to `demos' and launch GNU Make,
521 it will use the `config.mk' in the top directory to build the test
522 programs..
523
524-----------------------------------------------------------------------------------------
525Portability :
526
527 In the previous beta, a single FT_System object was used to encompass
528 all low-level operations like thread synchronisation, memory management
529 and i/o access. This has been greatly simplified :
530
531 - thread synchronisation has been dropped, for the simple reason that
532 the library is already re-entrant, and that if you really need two
533 threads accessing the same FT_Library, you should really synchronize
534 access to it yourself with a simple mutex.
535
536 - memory management is performed through a very simple object called
537 "FT_Memory", which really is a table containing a table of pointers
538 to functions like malloc, realloc and free as well as some user data
539 (closure).
540
541 - resources have disappeared (they created more problems than they
542 solved), and i/o management have been simplified greatly as a
543 result. Streams are defined through FT_Stream objects, which can
544 be either memory-based or disk-based.
545
546 Note that each face has its own stream, which is closed only when
547 the face object is destroyed. Hence, a function like TT_Flush_Face
548 in 1.x cannot be directly supported. However, if you really need
549 something like this, you can easily tailor your own streams to achieve
550 the same feature at a lower level (and use FT_Open_Face instead of
551 FT_New_Face to create the face).
552
553 See the file "include/ftsystem.h" for more details, as well as the
554 implementations found in "config/unix" and "config/ansi".
555
556
557-----------------------------------------------------------------------------------------
David Turner5951ce91999-12-29 00:53:44 +0000558Font Drivers :
David Turnere49ab252000-05-16 23:44:38 +0000559
David Turner5951ce91999-12-29 00:53:44 +0000560
561 The Font Driver interface has been modified in order to support
562 extensions & versioning.
563
564
565 The list of the font drivers that are statically linked to the
566 library at compile time is managed through a new configuration file
567 called `config/<platform>/ftmodule.h'.
568
569 This file is autogenerated when invoking `make modules'. This target
570 will parse all sub-directories of 'src', looking for a "module.mk"
571 rules file, used to describe the driver to the build system.
572
573 Hence, one should call `make modules' each time a font driver is added
574 or removed from the `src' directory.
575
576
577 Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
578 driver doesn't support font files directly, but provides services used
579 by all TrueType-like font drivers. Hence, its code is shared between
580 the TrueType & OpenType font formats, and possibly more formats to
581 come if we're lucky..
David Turnerd2b1f351999-12-16 23:11:37 +0000582
583-----------------------------------------------------------------------------------------
584Extensions support :
David Turner5951ce91999-12-29 00:53:44 +0000585
586 The extensions support is inspired by the one found in 1.x.
587
588 Now, each font driver has its own "extension registry", which lists
589 which extensions are available for the font faces managed by the driver.
590
591 Extension ids are now strings, rather than 4-byte tags, as this is
592 usually more readable..
593
594 Each extension has:
595 - some data, associated to each face object
596 - an interface (table of function pointers)
597
598 An extension that is format-specific should simply register itself
599 to the correct font driver. Here is some example code:
600
601 // Registering an extensions
602 //
603 FT_Error FT_Init_XXXX_Extension( FT_Library library )
604 {
605 FT_DriverInterface* tt_driver;
606
607 driver = FT_Get_Driver( library, "truetype" );
608 if (!driver) return FT_Err_Unimplemented_Feature;
609
David Turnere49ab252000-05-16 23:44:38 +0000610 return FT_Register_Extension( driver, &extension_class );
David Turner5951ce91999-12-29 00:53:44 +0000611 }
612
David Turnere49ab252000-05-16 23:44:38 +0000613
David Turner5951ce91999-12-29 00:53:44 +0000614 // Implementing the extensions
615 //
616 FT_Error FT_Proceed_Extension_XXX( FT_Face face )
617 {
618 FT_XXX_Extension ext;
619 FT_XXX_Extension_Interface ext_interface;
620
621 ext = FT_Get_Extension( face, "extensionid", &ext_interface );
622 if (!ext) return error;
623
624 return ext_interface->do_it(ext);
625 }
David Turnerd2b1f351999-12-16 23:11:37 +0000626