blob: 665c6a893057d5df6d042092d5c97b0af4210aac [file] [log] [blame]
David Turner3475e7f2000-05-17 20:56:01 +00001LATEST_CHANGES
2
3 - changed the default number of gray levels of the smooth renderer to
4 256 (instead of the previous 128). Of course, the human eye can't
5 see any difference ;-)
6
7 - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of
8 subglyphs in a TrueType font now..
9
10=============================================================================
11OLD CHANGES 16 May 2000
David Turnerefce08d2000-05-11 18:23:52 +000012
David Turner968f0c32000-05-16 23:26:01 +000013 - tagged "BETA-6" in the CVS tree. This one is a serious release candidate
14 even though it doesn't incorporate the auto-hinter yet..
15
16 - various obsolete files were removed, and copyright header updated
17
18 - finally updated the standard raster to fix the monochrome rendering bug
19 + re-enable support for 5-gray levels anti-aliasing (suck, suck..)
20
21 - created new header files, and modified sources accordingly:
David Turnere49ab252000-05-16 23:44:38 +000022
David Turner968f0c32000-05-16 23:26:01 +000023 <freetype/fttypes.h> - simple FreeType types, without the API
24 <freetype/internal/ftmemory.h> - definition of memory-management macros
25
26 - added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h>
27
David Turnerc30aea92000-05-12 15:01:18 +000028 - light update/cleaning of the build system + changes to the sources in
29 order to get rid of _all_ compiler warnings with three compilers, i.e:
30
31 gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX"
32 and LCC
33
34 IMPORTANT NOTE FOR WIN32-LCC USERS:
35 |
36 | It seems the C pre-processor that comes with LCC is broken, it
37 | doesn't recognize the ANSI standard directives # and ## correctly
38 | when one of the argument is a macro. Also, something like:
David Turnere49ab252000-05-16 23:44:38 +000039 |
David Turnerc30aea92000-05-12 15:01:18 +000040 | #define F(x) print##x
David Turnere49ab252000-05-16 23:44:38 +000041 |
David Turnerc30aea92000-05-12 15:01:18 +000042 | F(("hello"))
David Turnere49ab252000-05-16 23:44:38 +000043 |
David Turnerc30aea92000-05-12 15:01:18 +000044 | will get incorrectly translated to:
David Turnere49ab252000-05-16 23:44:38 +000045 |
David Turnerc30aea92000-05-12 15:01:18 +000046 | print "hello")
David Turnere49ab252000-05-16 23:44:38 +000047 |
David Turnerc30aea92000-05-12 15:01:18 +000048 | by its pre-processor. For this reason, you simply cannot build
49 | FreeType 2 in debug mode with this compiler..
50
51
David Turnerbfe2f982000-05-12 12:17:15 +000052 - yet another massive grunt work. I've changed the definition of the
53 EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
54 an argument, which is the function's return value type.
David Turnere49ab252000-05-16 23:44:38 +000055
David Turnerbfe2f982000-05-12 12:17:15 +000056 This is necessary to compile FreeType as a DLL on Windows and OS/2.
57 Depending on the compiler used, a compiler-specific keyword like __export
58 or __system must be placed before (VisualC++) or after (BorlandC++)
59 the type..
David Turnere49ab252000-05-16 23:44:38 +000060
David Turnerbfe2f982000-05-12 12:17:15 +000061 Of course, this needed a lot of changes throughout the source code
62 to make it compile again... All cleaned up now, apparently..
63
64 Note also that there is a new EXPORT_VAR macro defined to allow the
65 _declaration_ of an exportable public (constant) variable. This is the
66 case of the raster interfaces (see ftraster.h and ftgrays.h), as well
67 as each module's interface (see sfdriver.h, psdriver.h, etc..)
68
69 - new feature: it is now possible to pass extra parameters to font
70 drivers when creating a new face object. For now, this
71 capability is unused. It could however prove to be useful
72 in a near future..
73
74 the FT_Open_Args structure was changes, as well as the internal
75 driver interface (the specific "init_face" module function has now
76 a different signature).
77
78 - updated the tutorial (not finished though).
David Turnerc30aea92000-05-12 15:01:18 +000079 - updated the top-level BUILD document
David Turnerbfe2f982000-05-12 12:17:15 +000080
David Turnerc60c61c2000-05-12 15:26:58 +000081 - fixed a potential memory leak that could occur when loading embedded
82 bitmaps.
83
David Turnerbfe2f982000-05-12 12:17:15 +000084 - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as
85 it was missing from the public header (the implementation was already
86 in "ftobjs.c").
87
88 - the file <freetype/fterrors.h> has been seriously updated in order to
89 allow the automatic generation of error message tables. See the comments
90 within it for more information.
91
David Turnera9c251c2000-05-11 18:36:19 +000092 - major directory hierarchy re-organisation. This was done for two things:
David Turnere49ab252000-05-16 23:44:38 +000093
David Turnera9c251c2000-05-11 18:36:19 +000094 * first, to ease the "manual" compilation of the library by requiring
95 at lot less include paths :-)
David Turnerbfe2f982000-05-12 12:17:15 +000096
David Turnera9c251c2000-05-11 18:36:19 +000097 * second, to allow external programs to effectively access internal
98 data fields. For example, this can be extremely useful if someone
99 wants to write a font producer or a font manager on top of FreeType.
100
101 Basically, you should now use the 'freetype/' prefix for header inclusion,
102 as in:
David Turnere49ab252000-05-16 23:44:38 +0000103
David Turnera9c251c2000-05-11 18:36:19 +0000104 #include <freetype/freetype.h>
105 #include <freetype/ftglyph.h>
106
107 Some new include sub-directories are available:
David Turnere49ab252000-05-16 23:44:38 +0000108
David Turnera9c251c2000-05-11 18:36:19 +0000109 a. the "freetype/config" directory, contains two files used to
110 configure the build of the library. Client applications should
111 not need to look at these normally, but they can if they want.
David Turnere49ab252000-05-16 23:44:38 +0000112
David Turnera9c251c2000-05-11 18:36:19 +0000113 #include <freetype/config/ftoption.h>
114 #include <freetype/config/ftconfig.h>
David Turnere49ab252000-05-16 23:44:38 +0000115
David Turnera9c251c2000-05-11 18:36:19 +0000116 b. the "freetype/internal" directory, contains header files that
117 describes library internals. These are the header files that were
118 previously found in the "src/base" and "src/shared" directories.
119
120
121 As usual, the build system and the demos have been updated to reflect
122 the change..
David Turnere49ab252000-05-16 23:44:38 +0000123
David Turnera9c251c2000-05-11 18:36:19 +0000124 Here's a layout of the new directory hierarchy:
David Turnere49ab252000-05-16 23:44:38 +0000125
David Turnera9c251c2000-05-11 18:36:19 +0000126 TOP
127 include/
128 freetype/
129 freetype.h
130 ...
131 config/
132 ftoption.h
133 ftconfig.h
134 ftmodule.h
David Turnere49ab252000-05-16 23:44:38 +0000135
David Turnera9c251c2000-05-11 18:36:19 +0000136 internal/
137 ftobjs.h
138 ftstream.h
139 ftcalc.h
140 ...
David Turnere49ab252000-05-16 23:44:38 +0000141
David Turnera9c251c2000-05-11 18:36:19 +0000142 src/
143 base/
144 ...
David Turnere49ab252000-05-16 23:44:38 +0000145
David Turnera9c251c2000-05-11 18:36:19 +0000146 sfnt/
147 psnames/
148 truetype/
149 type1/
150 type1z/
151
152
153 Compiling a module is now much easier, for example, the following should
David Turner968f0c32000-05-16 23:26:01 +0000154 work when in the TOP directory on an ANSI build:
David Turnere49ab252000-05-16 23:44:38 +0000155
David Turnera9c251c2000-05-11 18:36:19 +0000156 gcc -c -I./include -I./src/base src/base/ftbase.c
157 gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
158 etc..
159
160 (of course, using -Iconfig/<system> if you provide system-specific
161 configuration files).
David Turnerefce08d2000-05-11 18:23:52 +0000162
163
164 - updated the structure of FT_Outline_Funcs in order to allow
165 direct coordinate scaling within the outline decomposition routine
166 (this is important for virtual "on" points with TrueType outlines)
167 + updates to the rasters to support this..
168
169 - updated the OS/2 table loading code in "src/sfnt/ttload.c" in order
170 to support version 2 of the table (see OpenType 1.2 spec)
171
172 - created "include/tttables.h" and "include/t1tables.h" to allow
173 client applications to access some of the SFNT and T1 tables of a
174 face with a procedural interface (see FT_Get_Sfnt_Table())
175 + updates to internal source files to reflect the change..
176
177 - some cleanups in the source code to get rid of warnings when compiling
178 with the "-Wall -W -ansi -pedantic" options in gcc.
179
180 - debugged and moved the smooth renderer to "src/base/ftgrays.c" and
181 its header to "include/ftgrays.h"
182
183 - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with
184 up to 80 sub-glyphs !! Thanks to Werner
185
186================================================================================
187OLD CHANGES - 14-apr-2000
David Turner77054f22000-04-14 20:49:52 +0000188
189 - fixed a bug in the TrueType glyph loader that prevented the correct
190 loading of some CJK glyphs in mingli.ttf
David Turnere49ab252000-05-16 23:44:38 +0000191
David Turner77054f22000-04-14 20:49:52 +0000192 - improved the standard Type 1 hinter in "src/type1"
David Turnere49ab252000-05-16 23:44:38 +0000193
David Turner77054f22000-04-14 20:49:52 +0000194 - fixed two bugs in the experimental Type 1 driver in "src/type1z"
195 to handle the new XFree86 4.0 fonts (and a few other ones..)
196
197 - the smooth renderer is now complete and supports sub-banding
198 to render large glyphs at high speed. However, it is still located
199 in "demos/src/ftgrays.c" and should move to the library itself
200 in the next beta.. NOTE: The smooth renderer doesn't compile in
201 stand-alone mode anymore, but this should be fixed RSN..
David Turnere49ab252000-05-16 23:44:38 +0000202
David Turner77054f22000-04-14 20:49:52 +0000203 - introduced convenience functions to more easily deal with glyph
204 images, see "include/ftglyph.h" for more details, as well as the
205 new demo program named "demos/src/ftstring.c" that demonstrates
206 its use
207
208 - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
209 drivers (this is required by the auto-hinter to improve its results).
210
211 - changed the raster interface, in order to allow client applications
212 to provide their own span-drawing callbacks. However, only the
213 smooth renderer supports this. See "FT_Raster_Params" in the
214 file "include/ftimage.h"
215
216 - fixed a small bug in FT_MulFix that caused incorrect transform
217 computation !!
218
219 - Note: The tutorial is out-of-date, grumpf.. :-(
220
221================================================================================
222OLD CHANGES - 12-mar-2000
David Turnerc3c7e7f2000-03-13 14:19:31 +0000223
224 - changed the layout of configuration files : now, all ANSI configuration
225 files are located in "freetype2/config". System-specific over-rides
226 can be placed in "freetype2/config/<system>".
David Turnere49ab252000-05-16 23:44:38 +0000227
David Turnerc3c7e7f2000-03-13 14:19:31 +0000228 - moved all configuration macros to "config/ftoption.h"
David Turnere49ab252000-05-16 23:44:38 +0000229
David Turnerc3c7e7f2000-03-13 14:19:31 +0000230 - improvements in the Type 1 driver with AFM support
David Turnere49ab252000-05-16 23:44:38 +0000231
David Turnerc3c7e7f2000-03-13 14:19:31 +0000232 - changed the fields in the FT_Outline structure : the old "flags"
233 array is re-named "tags", while all ancient flags are encoded into
234 a single unsigned int named "flags".
235
236 - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in
237 "ftimage.h").
238
239 - changed outline functions to "FT_Outline_<action>" syntax
240
241 - added a smooth anti-alias renderer to the demonstration programs
242 - added Mac graphics driver (thanks Just)
David Turnere49ab252000-05-16 23:44:38 +0000243
David Turnerc3c7e7f2000-03-13 14:19:31 +0000244 - FT_Open_Face changed in order to received a pointer to a FT_Open_Args
245 descriptor..
David Turnere49ab252000-05-16 23:44:38 +0000246
David Turnerc3c7e7f2000-03-13 14:19:31 +0000247 - various cleanups, a few more API functions implemented (see FT_Attach_File)
248
249 - updated some docs
250
251================================================================================
252OLD CHANGES - 22-feb-2000
David Turner58c10b52000-02-22 14:31:42 +0000253
254 - introduced the "psnames" module. It is used to:
255
256 o convert a Postscript glyph name into the equivalent Unicode
257 character code (used by the Type 1 driver(s) to synthetize
258 on the fly a Unicode charmap).
259
260 o provide an interface to retrieve the Postscript names of
261 the Macintosh, Adobe Standard & Adobe Expert character codes.
262 (the Macintosh names are used by the SFNT-module postscript
263 names support routines, while the other two tables are used
264 by the Type 1 driver(s)).
265
266 - introduced the "type1z" alternate Type 1 driver. This is a (still
267 experimental) driver for the Type 1 format that will ultimately
268 replace the one in "src/type1". It uses pattern matching to load
269 data from the font, instead of a finite state analyzer. It works
270 much better than the "old" driver with "broken" fonts. It is also
271 much smaller (under 15 Kb).
272
273 - the Type 1 drivers (both in "src/type1" and "src/type1z") are
274 nearly complete. They both provide automatic Unicode charmap
275 synthesis through the "psnames" module. No re-encoding vector
276 is needed. (note that they still leak memory due to some code
277 missing, and I'm getting lazy).
278
279 Trivial AFM support has been added to read kerning information
280 but wasn't exactly tested as it should ;-)
281
282 - The TrueType glyph loader has been seriously rewritten (see the
283 file "src/truetype/ttgload.c". It is now much, much simpler as
284 well as easier to read, maintain and understand :-) Preliminary
285 versions introduced a memory leak that has been reported by Jack
286 Davis, and is now fixed..
287
288 - introduced the new "ft_glyph_format_plotter", used to represent
289 stroked outlines like Windows "Vector" fonts, and certain Type 1
290 fonts like "Hershey". The corresponding raster will be written
291 soon.
292
293 - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
294 interface that uses a structure to describe the input stream,
295 the driver (if required), etc..
296
297TODO
298 - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
299
300 - Add a function like FT_Load_Character( face, char_code, load_flags )
301 that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph
302 to ease developer's work.
303
304 - Update the tutorial !!
305 - consider adding support for Multiple Master fonts in the Type 1
306 drivers.
307
308 - Test the AFM routines of the Type 1 drivers to check that kerning
309 information is returned correctly.
310
311 - write a decent auto-gridding component !! We need this to release
312 FreeType 2.0 gold !
313
314
315----- less urgent needs : ----------
316 - add a CFF/Type2 driver
317 - add a BDF driver
318 - add a FNT/PCF/HBF driver
319 - add a Speedo driver from the X11 sources
320
321
322==============================================================================
323OLDER CHANGES - 27-jan-2000
David Turner633da992000-01-27 14:07:33 +0000324
325 - updated the "sfnt" module interface to allow several SFNT-based
326 drivers to co-exist peacefully
David Turnere49ab252000-05-16 23:44:38 +0000327
David Turner633da992000-01-27 14:07:33 +0000328 - updated the "T1_Face" type to better separate Postscript font content
329 from the rest of the FT_Face structure. Might be used later by the
330 CFF/Type2 driver..
David Turnere49ab252000-05-16 23:44:38 +0000331
David Turner633da992000-01-27 14:07:33 +0000332 - added an experimental replacement Type 1 driver featuring advanced
333 (and speedy) pattern matching to retrieve the data from postscript
334 fonts.
335
336 - very minor changes in the implementation of FT_Set_Char_Size and
337 FT_Set_Pixel_Sizes (they now implement default to ligthen the
338 font driver's code).
339
340
341=============================================================================
342OLD MESSAGE
343
David Turnerd2b1f351999-12-16 23:11:37 +0000344This file summarizes the changes that occured since the last "beta" of FreeType 2.
345Because the list is important, it has been divided into separate sections:
346
David Turner5951ce91999-12-29 00:53:44 +0000347Table Of Contents:
348
349 I High-Level Interface (easier !)
350 II Directory Structure
351 III Glyph Image Formats
352 IV Build System
353 V Portability
354 VI Font Drivers
David Turnerd2b1f351999-12-16 23:11:37 +0000355
356-----------------------------------------------------------------------------------------
357High-Level Interface :
358
359 The high-level API has been considerably simplified. Here is how :
360
David Turner5951ce91999-12-29 00:53:44 +0000361 - resource objects have disappeared. this means that face objects can
362 now be created with a single function call (see FT_New_Face and
David Turnerd2b1f351999-12-16 23:11:37 +0000363 FT_Open_Face)
David Turnere49ab252000-05-16 23:44:38 +0000364
David Turnerd2b1f351999-12-16 23:11:37 +0000365 - when calling either FT_New_Face & FT_Open_Face, a size object and a
366 glyph slot object are automatically created for the face, and can be
367 accessed through "face->glyph" and "face->size" if one really needs to.
368 In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
David Turnere49ab252000-05-16 23:44:38 +0000369
David Turnerd2b1f351999-12-16 23:11:37 +0000370 - similarly, FT_Load_Glyph now only takes a "face" argument (instead of
371 a glyph slot and a size). Also, it's "result" parameter is gone, as
372 the glyph image type is returned in the field "face->glyph.format"
David Turnere49ab252000-05-16 23:44:38 +0000373
David Turnerd2b1f351999-12-16 23:11:37 +0000374 - the list of available charmaps is directly accessible through
375 "face->charmaps", counting "face->num_charmaps" elements. Each
376 charmap has an 'encoding' field which specifies which known encoding
377 it deals with. Valid values are, for example :
David Turnere49ab252000-05-16 23:44:38 +0000378
David Turnerd2b1f351999-12-16 23:11:37 +0000379 ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
380 ft_encoding_apple_roman
381 ft_encoding_sjis
382 ft_encoding_adobe_standard
David Turner5951ce91999-12-29 00:53:44 +0000383 ft_encoding_adobe_expert
David Turnere49ab252000-05-16 23:44:38 +0000384
David Turnerd2b1f351999-12-16 23:11:37 +0000385 other values may be added in the future. Each charmap still holds its
386 "platform_id" and "encoding_id" values in case the encoding is too
387 exotic for the current library
388
389
390-----------------------------------------------------------------------------------------
391Directory Structure:
392
393 Should seem obvious to most of you:
394
395 freetype/
396 config/ -- configuration sub-makefiles
397 ansi/
David Turner5951ce91999-12-29 00:53:44 +0000398 unix/ -- platform-specific configuration files
David Turnerd2b1f351999-12-16 23:11:37 +0000399 win32/
400 os2/
401 msdos/
402
403 include/ -- public header files, those to be included directly
404 by client apps
405
406 src/ -- sources of the library
407 base/ -- the base layer
408 sfnt/ -- the sfnt "driver" (see the drivers section below)
409 truetype/ -- the truetype driver
410 type1/ -- the type1 driver
411 shared/ -- some header files shared between drivers
412
413 demos/ -- demos/tools
414
415 docs/ -- documentation (a bit empty for now)
416
417-----------------------------------------------------------------------------------------
418Glyph Image Formats :
419
420 Drivers are now able to register new glyph image formats within the library.
421 For now, the base layer supports of course bitmaps and vector outlines, but
422 one could imagine something different like colored bitmaps, bi-color
423 vectors or wathever else (Metafonts anyone ??).
424
425 See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is
426 gone, and is now replaced by FT_Bitmap, which should encompass all known
427 bitmap types.
428
429 Each new image format must provide at least one "raster", i.e. a module
David Turner5951ce91999-12-29 00:53:44 +0000430 capable of transforming the glyph image into a bitmap. It's also possible
David Turnerd2b1f351999-12-16 23:11:37 +0000431 to change the default raster used for a given glyph image format.
432
433 The default outline scan-converter now uses 128 levels of grays by default,
434 which tends to smooth many things. Note that the demo programs have been
David Turner5951ce91999-12-29 00:53:44 +0000435 updated significantly in order to display these..
David Turnerd2b1f351999-12-16 23:11:37 +0000436
437
438-----------------------------------------------------------------------------------------
439Build system :
440
441 You still need GNU Make to build the library. The build system has been
442 very seriously re-vamped in order to provide things like :
443
444 - automatic host platform detection (reverting to 'config/ansi'
445 if it is not detected, with pseudo-standard compilation flags)
446
447 - the ability to compile from the Makefiles with very different and
448 exotic compilers. Note that linking the library can be difficult for
449 some platforms.
450
451 For example, the file `config/win32/lcclib.bat' is invoked by the
452 build system to create the ".lib" file with LCC-Win32 because its
453 librarian has too many flaws to be invoked directly from the Makefile.
454
455 Here's how it works :
456
457 - the first time you type `make', the build system runs a series of
458 sub-makefiles in order to detect your host platform. It then dumps
459 what it found, and creates a file called `config.mk' in the current
460 directory. This is a sub-Makefile used to define many important Make
461 variables used to build the library.
462
463 - the second time, the build system detects the `config.mk' then use it
464 to build the library. All object files go into 'obj' by default, as
465 well as the library file, but this can easily be changed.
466
467 Note that you can run "make setup" to force another host platform detection
468 even if a `config.mk' is present in the current directory. Another solution
469 is simply to delete the file, then re-run make.
470
471 Finally, the default compiler for all platforms is gcc (for now, this will
472 hopefully changed in the future). You can however specify a different
473 compiler by specifying it after the 'setup' target as in :
474
475 gnumake setup lcc on Win32 to use the LCC compiler
476 gnumake setup visualc on Win32 to use Visual C++
477
478 See the file `config/<system>/detect.mk' for a list of supported compilers
479 for your platforms.
480
481 It should be relatively easy to write new detection rules files and
482 config.mk..
483
484 Finally, to build the demo programs, go to `demos' and launch GNU Make,
485 it will use the `config.mk' in the top directory to build the test
486 programs..
487
488-----------------------------------------------------------------------------------------
489Portability :
490
491 In the previous beta, a single FT_System object was used to encompass
492 all low-level operations like thread synchronisation, memory management
493 and i/o access. This has been greatly simplified :
494
495 - thread synchronisation has been dropped, for the simple reason that
496 the library is already re-entrant, and that if you really need two
497 threads accessing the same FT_Library, you should really synchronize
498 access to it yourself with a simple mutex.
499
500 - memory management is performed through a very simple object called
501 "FT_Memory", which really is a table containing a table of pointers
502 to functions like malloc, realloc and free as well as some user data
503 (closure).
504
505 - resources have disappeared (they created more problems than they
506 solved), and i/o management have been simplified greatly as a
507 result. Streams are defined through FT_Stream objects, which can
508 be either memory-based or disk-based.
509
510 Note that each face has its own stream, which is closed only when
511 the face object is destroyed. Hence, a function like TT_Flush_Face
512 in 1.x cannot be directly supported. However, if you really need
513 something like this, you can easily tailor your own streams to achieve
514 the same feature at a lower level (and use FT_Open_Face instead of
515 FT_New_Face to create the face).
516
517 See the file "include/ftsystem.h" for more details, as well as the
518 implementations found in "config/unix" and "config/ansi".
519
520
521-----------------------------------------------------------------------------------------
David Turner5951ce91999-12-29 00:53:44 +0000522Font Drivers :
David Turnere49ab252000-05-16 23:44:38 +0000523
David Turner5951ce91999-12-29 00:53:44 +0000524
525 The Font Driver interface has been modified in order to support
526 extensions & versioning.
527
528
529 The list of the font drivers that are statically linked to the
530 library at compile time is managed through a new configuration file
531 called `config/<platform>/ftmodule.h'.
532
533 This file is autogenerated when invoking `make modules'. This target
534 will parse all sub-directories of 'src', looking for a "module.mk"
535 rules file, used to describe the driver to the build system.
536
537 Hence, one should call `make modules' each time a font driver is added
538 or removed from the `src' directory.
539
540
541 Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
542 driver doesn't support font files directly, but provides services used
543 by all TrueType-like font drivers. Hence, its code is shared between
544 the TrueType & OpenType font formats, and possibly more formats to
545 come if we're lucky..
David Turnerd2b1f351999-12-16 23:11:37 +0000546
547-----------------------------------------------------------------------------------------
548Extensions support :
David Turner5951ce91999-12-29 00:53:44 +0000549
550 The extensions support is inspired by the one found in 1.x.
551
552 Now, each font driver has its own "extension registry", which lists
553 which extensions are available for the font faces managed by the driver.
554
555 Extension ids are now strings, rather than 4-byte tags, as this is
556 usually more readable..
557
558 Each extension has:
559 - some data, associated to each face object
560 - an interface (table of function pointers)
561
562 An extension that is format-specific should simply register itself
563 to the correct font driver. Here is some example code:
564
565 // Registering an extensions
566 //
567 FT_Error FT_Init_XXXX_Extension( FT_Library library )
568 {
569 FT_DriverInterface* tt_driver;
570
571 driver = FT_Get_Driver( library, "truetype" );
572 if (!driver) return FT_Err_Unimplemented_Feature;
573
David Turnere49ab252000-05-16 23:44:38 +0000574 return FT_Register_Extension( driver, &extension_class );
David Turner5951ce91999-12-29 00:53:44 +0000575 }
576
David Turnere49ab252000-05-16 23:44:38 +0000577
David Turner5951ce91999-12-29 00:53:44 +0000578 // Implementing the extensions
579 //
580 FT_Error FT_Proceed_Extension_XXX( FT_Face face )
581 {
582 FT_XXX_Extension ext;
583 FT_XXX_Extension_Interface ext_interface;
584
585 ext = FT_Get_Extension( face, "extensionid", &ext_interface );
586 if (!ext) return error;
587
588 return ext_interface->do_it(ext);
589 }
David Turnerd2b1f351999-12-16 23:11:37 +0000590