blob: 4013727a62b7b73e0ecc6aa40f16d6e66187f9c4 [file] [log] [blame]
David Turner3475e7f2000-05-17 20:56:01 +00001LATEST_CHANGES
2
David Turnerf5dcdd52000-05-23 22:16:27 +00003 - a minor fix to the Type 1 driver to let them apply the font matrix
4 correctly (used for many oblique fonts..)
5
David Turner51179f02000-05-18 16:18:05 +00006 - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
7 to use %p instead of %lx).. Thanks to Karl Robillard
8
David Turner109fcf62000-05-17 23:35:37 +00009 - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added
10 a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when
11 loaded from a file (maybe I should move the bitmap cropper to the
12 base layer ??).
13
David Turner3475e7f2000-05-17 20:56:01 +000014 - changed the default number of gray levels of the smooth renderer to
15 256 (instead of the previous 128). Of course, the human eye can't
16 see any difference ;-)
17
18 - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of
19 subglyphs in a TrueType font now..
20
21=============================================================================
22OLD CHANGES 16 May 2000
David Turnerefce08d2000-05-11 18:23:52 +000023
David Turner968f0c32000-05-16 23:26:01 +000024 - tagged "BETA-6" in the CVS tree. This one is a serious release candidate
25 even though it doesn't incorporate the auto-hinter yet..
26
27 - various obsolete files were removed, and copyright header updated
28
29 - finally updated the standard raster to fix the monochrome rendering bug
30 + re-enable support for 5-gray levels anti-aliasing (suck, suck..)
31
32 - created new header files, and modified sources accordingly:
David Turnere49ab252000-05-16 23:44:38 +000033
David Turner968f0c32000-05-16 23:26:01 +000034 <freetype/fttypes.h> - simple FreeType types, without the API
35 <freetype/internal/ftmemory.h> - definition of memory-management macros
36
37 - added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h>
38
David Turnerc30aea92000-05-12 15:01:18 +000039 - light update/cleaning of the build system + changes to the sources in
40 order to get rid of _all_ compiler warnings with three compilers, i.e:
41
42 gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX"
43 and LCC
44
45 IMPORTANT NOTE FOR WIN32-LCC USERS:
46 |
47 | It seems the C pre-processor that comes with LCC is broken, it
48 | doesn't recognize the ANSI standard directives # and ## correctly
49 | when one of the argument is a macro. Also, something like:
David Turnere49ab252000-05-16 23:44:38 +000050 |
David Turnerc30aea92000-05-12 15:01:18 +000051 | #define F(x) print##x
David Turnere49ab252000-05-16 23:44:38 +000052 |
David Turnerc30aea92000-05-12 15:01:18 +000053 | F(("hello"))
David Turnere49ab252000-05-16 23:44:38 +000054 |
David Turnerc30aea92000-05-12 15:01:18 +000055 | will get incorrectly translated to:
David Turnere49ab252000-05-16 23:44:38 +000056 |
David Turnerc30aea92000-05-12 15:01:18 +000057 | print "hello")
David Turnere49ab252000-05-16 23:44:38 +000058 |
David Turnerc30aea92000-05-12 15:01:18 +000059 | by its pre-processor. For this reason, you simply cannot build
60 | FreeType 2 in debug mode with this compiler..
61
62
David Turnerbfe2f982000-05-12 12:17:15 +000063 - yet another massive grunt work. I've changed the definition of the
64 EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take
65 an argument, which is the function's return value type.
David Turnere49ab252000-05-16 23:44:38 +000066
David Turnerbfe2f982000-05-12 12:17:15 +000067 This is necessary to compile FreeType as a DLL on Windows and OS/2.
68 Depending on the compiler used, a compiler-specific keyword like __export
69 or __system must be placed before (VisualC++) or after (BorlandC++)
70 the type..
David Turnere49ab252000-05-16 23:44:38 +000071
David Turnerbfe2f982000-05-12 12:17:15 +000072 Of course, this needed a lot of changes throughout the source code
73 to make it compile again... All cleaned up now, apparently..
74
75 Note also that there is a new EXPORT_VAR macro defined to allow the
76 _declaration_ of an exportable public (constant) variable. This is the
77 case of the raster interfaces (see ftraster.h and ftgrays.h), as well
78 as each module's interface (see sfdriver.h, psdriver.h, etc..)
79
80 - new feature: it is now possible to pass extra parameters to font
81 drivers when creating a new face object. For now, this
82 capability is unused. It could however prove to be useful
83 in a near future..
84
85 the FT_Open_Args structure was changes, as well as the internal
86 driver interface (the specific "init_face" module function has now
87 a different signature).
88
89 - updated the tutorial (not finished though).
David Turnerc30aea92000-05-12 15:01:18 +000090 - updated the top-level BUILD document
David Turnerbfe2f982000-05-12 12:17:15 +000091
David Turnerc60c61c2000-05-12 15:26:58 +000092 - fixed a potential memory leak that could occur when loading embedded
93 bitmaps.
94
David Turnerbfe2f982000-05-12 12:17:15 +000095 - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as
96 it was missing from the public header (the implementation was already
97 in "ftobjs.c").
98
99 - the file <freetype/fterrors.h> has been seriously updated in order to
100 allow the automatic generation of error message tables. See the comments
101 within it for more information.
102
David Turnera9c251c2000-05-11 18:36:19 +0000103 - major directory hierarchy re-organisation. This was done for two things:
David Turnere49ab252000-05-16 23:44:38 +0000104
David Turnera9c251c2000-05-11 18:36:19 +0000105 * first, to ease the "manual" compilation of the library by requiring
106 at lot less include paths :-)
David Turnerbfe2f982000-05-12 12:17:15 +0000107
David Turnera9c251c2000-05-11 18:36:19 +0000108 * second, to allow external programs to effectively access internal
109 data fields. For example, this can be extremely useful if someone
110 wants to write a font producer or a font manager on top of FreeType.
111
112 Basically, you should now use the 'freetype/' prefix for header inclusion,
113 as in:
David Turnere49ab252000-05-16 23:44:38 +0000114
David Turnera9c251c2000-05-11 18:36:19 +0000115 #include <freetype/freetype.h>
116 #include <freetype/ftglyph.h>
117
118 Some new include sub-directories are available:
David Turnere49ab252000-05-16 23:44:38 +0000119
David Turnera9c251c2000-05-11 18:36:19 +0000120 a. the "freetype/config" directory, contains two files used to
121 configure the build of the library. Client applications should
122 not need to look at these normally, but they can if they want.
David Turnere49ab252000-05-16 23:44:38 +0000123
David Turnera9c251c2000-05-11 18:36:19 +0000124 #include <freetype/config/ftoption.h>
125 #include <freetype/config/ftconfig.h>
David Turnere49ab252000-05-16 23:44:38 +0000126
David Turnera9c251c2000-05-11 18:36:19 +0000127 b. the "freetype/internal" directory, contains header files that
128 describes library internals. These are the header files that were
129 previously found in the "src/base" and "src/shared" directories.
130
131
132 As usual, the build system and the demos have been updated to reflect
133 the change..
David Turnere49ab252000-05-16 23:44:38 +0000134
David Turnera9c251c2000-05-11 18:36:19 +0000135 Here's a layout of the new directory hierarchy:
David Turnere49ab252000-05-16 23:44:38 +0000136
David Turnera9c251c2000-05-11 18:36:19 +0000137 TOP
138 include/
139 freetype/
140 freetype.h
141 ...
142 config/
143 ftoption.h
144 ftconfig.h
145 ftmodule.h
David Turnere49ab252000-05-16 23:44:38 +0000146
David Turnera9c251c2000-05-11 18:36:19 +0000147 internal/
148 ftobjs.h
149 ftstream.h
150 ftcalc.h
151 ...
David Turnere49ab252000-05-16 23:44:38 +0000152
David Turnera9c251c2000-05-11 18:36:19 +0000153 src/
154 base/
155 ...
David Turnere49ab252000-05-16 23:44:38 +0000156
David Turnera9c251c2000-05-11 18:36:19 +0000157 sfnt/
158 psnames/
159 truetype/
160 type1/
161 type1z/
162
163
164 Compiling a module is now much easier, for example, the following should
David Turner968f0c32000-05-16 23:26:01 +0000165 work when in the TOP directory on an ANSI build:
David Turnere49ab252000-05-16 23:44:38 +0000166
David Turnera9c251c2000-05-11 18:36:19 +0000167 gcc -c -I./include -I./src/base src/base/ftbase.c
168 gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
169 etc..
170
171 (of course, using -Iconfig/<system> if you provide system-specific
172 configuration files).
David Turnerefce08d2000-05-11 18:23:52 +0000173
174
175 - updated the structure of FT_Outline_Funcs in order to allow
176 direct coordinate scaling within the outline decomposition routine
177 (this is important for virtual "on" points with TrueType outlines)
178 + updates to the rasters to support this..
179
180 - updated the OS/2 table loading code in "src/sfnt/ttload.c" in order
181 to support version 2 of the table (see OpenType 1.2 spec)
182
183 - created "include/tttables.h" and "include/t1tables.h" to allow
184 client applications to access some of the SFNT and T1 tables of a
185 face with a procedural interface (see FT_Get_Sfnt_Table())
186 + updates to internal source files to reflect the change..
187
188 - some cleanups in the source code to get rid of warnings when compiling
189 with the "-Wall -W -ansi -pedantic" options in gcc.
190
191 - debugged and moved the smooth renderer to "src/base/ftgrays.c" and
192 its header to "include/ftgrays.h"
193
194 - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with
195 up to 80 sub-glyphs !! Thanks to Werner
196
197================================================================================
198OLD CHANGES - 14-apr-2000
David Turner77054f22000-04-14 20:49:52 +0000199
200 - fixed a bug in the TrueType glyph loader that prevented the correct
201 loading of some CJK glyphs in mingli.ttf
David Turnere49ab252000-05-16 23:44:38 +0000202
David Turner77054f22000-04-14 20:49:52 +0000203 - improved the standard Type 1 hinter in "src/type1"
David Turnere49ab252000-05-16 23:44:38 +0000204
David Turner77054f22000-04-14 20:49:52 +0000205 - fixed two bugs in the experimental Type 1 driver in "src/type1z"
206 to handle the new XFree86 4.0 fonts (and a few other ones..)
207
208 - the smooth renderer is now complete and supports sub-banding
209 to render large glyphs at high speed. However, it is still located
210 in "demos/src/ftgrays.c" and should move to the library itself
211 in the next beta.. NOTE: The smooth renderer doesn't compile in
212 stand-alone mode anymore, but this should be fixed RSN..
David Turnere49ab252000-05-16 23:44:38 +0000213
David Turner77054f22000-04-14 20:49:52 +0000214 - introduced convenience functions to more easily deal with glyph
215 images, see "include/ftglyph.h" for more details, as well as the
216 new demo program named "demos/src/ftstring.c" that demonstrates
217 its use
218
219 - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
220 drivers (this is required by the auto-hinter to improve its results).
221
222 - changed the raster interface, in order to allow client applications
223 to provide their own span-drawing callbacks. However, only the
224 smooth renderer supports this. See "FT_Raster_Params" in the
225 file "include/ftimage.h"
226
227 - fixed a small bug in FT_MulFix that caused incorrect transform
228 computation !!
229
230 - Note: The tutorial is out-of-date, grumpf.. :-(
231
232================================================================================
233OLD CHANGES - 12-mar-2000
David Turnerc3c7e7f2000-03-13 14:19:31 +0000234
235 - changed the layout of configuration files : now, all ANSI configuration
236 files are located in "freetype2/config". System-specific over-rides
237 can be placed in "freetype2/config/<system>".
David Turnere49ab252000-05-16 23:44:38 +0000238
David Turnerc3c7e7f2000-03-13 14:19:31 +0000239 - moved all configuration macros to "config/ftoption.h"
David Turnere49ab252000-05-16 23:44:38 +0000240
David Turnerc3c7e7f2000-03-13 14:19:31 +0000241 - improvements in the Type 1 driver with AFM support
David Turnere49ab252000-05-16 23:44:38 +0000242
David Turnerc3c7e7f2000-03-13 14:19:31 +0000243 - changed the fields in the FT_Outline structure : the old "flags"
244 array is re-named "tags", while all ancient flags are encoded into
245 a single unsigned int named "flags".
246
247 - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in
248 "ftimage.h").
249
250 - changed outline functions to "FT_Outline_<action>" syntax
251
252 - added a smooth anti-alias renderer to the demonstration programs
253 - added Mac graphics driver (thanks Just)
David Turnere49ab252000-05-16 23:44:38 +0000254
David Turnerc3c7e7f2000-03-13 14:19:31 +0000255 - FT_Open_Face changed in order to received a pointer to a FT_Open_Args
256 descriptor..
David Turnere49ab252000-05-16 23:44:38 +0000257
David Turnerc3c7e7f2000-03-13 14:19:31 +0000258 - various cleanups, a few more API functions implemented (see FT_Attach_File)
259
260 - updated some docs
261
262================================================================================
263OLD CHANGES - 22-feb-2000
David Turner58c10b52000-02-22 14:31:42 +0000264
265 - introduced the "psnames" module. It is used to:
266
267 o convert a Postscript glyph name into the equivalent Unicode
268 character code (used by the Type 1 driver(s) to synthetize
269 on the fly a Unicode charmap).
270
271 o provide an interface to retrieve the Postscript names of
272 the Macintosh, Adobe Standard & Adobe Expert character codes.
273 (the Macintosh names are used by the SFNT-module postscript
274 names support routines, while the other two tables are used
275 by the Type 1 driver(s)).
276
277 - introduced the "type1z" alternate Type 1 driver. This is a (still
278 experimental) driver for the Type 1 format that will ultimately
279 replace the one in "src/type1". It uses pattern matching to load
280 data from the font, instead of a finite state analyzer. It works
281 much better than the "old" driver with "broken" fonts. It is also
282 much smaller (under 15 Kb).
283
284 - the Type 1 drivers (both in "src/type1" and "src/type1z") are
285 nearly complete. They both provide automatic Unicode charmap
286 synthesis through the "psnames" module. No re-encoding vector
287 is needed. (note that they still leak memory due to some code
288 missing, and I'm getting lazy).
289
290 Trivial AFM support has been added to read kerning information
291 but wasn't exactly tested as it should ;-)
292
293 - The TrueType glyph loader has been seriously rewritten (see the
294 file "src/truetype/ttgload.c". It is now much, much simpler as
295 well as easier to read, maintain and understand :-) Preliminary
296 versions introduced a memory leak that has been reported by Jack
297 Davis, and is now fixed..
298
299 - introduced the new "ft_glyph_format_plotter", used to represent
300 stroked outlines like Windows "Vector" fonts, and certain Type 1
301 fonts like "Hershey". The corresponding raster will be written
302 soon.
303
304 - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
305 interface that uses a structure to describe the input stream,
306 the driver (if required), etc..
307
308TODO
309 - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
310
311 - Add a function like FT_Load_Character( face, char_code, load_flags )
312 that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph
313 to ease developer's work.
314
315 - Update the tutorial !!
316 - consider adding support for Multiple Master fonts in the Type 1
317 drivers.
318
319 - Test the AFM routines of the Type 1 drivers to check that kerning
320 information is returned correctly.
321
322 - write a decent auto-gridding component !! We need this to release
323 FreeType 2.0 gold !
324
325
326----- less urgent needs : ----------
327 - add a CFF/Type2 driver
328 - add a BDF driver
329 - add a FNT/PCF/HBF driver
330 - add a Speedo driver from the X11 sources
331
332
333==============================================================================
334OLDER CHANGES - 27-jan-2000
David Turner633da992000-01-27 14:07:33 +0000335
336 - updated the "sfnt" module interface to allow several SFNT-based
337 drivers to co-exist peacefully
David Turnere49ab252000-05-16 23:44:38 +0000338
David Turner633da992000-01-27 14:07:33 +0000339 - updated the "T1_Face" type to better separate Postscript font content
340 from the rest of the FT_Face structure. Might be used later by the
341 CFF/Type2 driver..
David Turnere49ab252000-05-16 23:44:38 +0000342
David Turner633da992000-01-27 14:07:33 +0000343 - added an experimental replacement Type 1 driver featuring advanced
344 (and speedy) pattern matching to retrieve the data from postscript
345 fonts.
346
347 - very minor changes in the implementation of FT_Set_Char_Size and
348 FT_Set_Pixel_Sizes (they now implement default to ligthen the
349 font driver's code).
350
351
352=============================================================================
353OLD MESSAGE
354
David Turnerd2b1f351999-12-16 23:11:37 +0000355This file summarizes the changes that occured since the last "beta" of FreeType 2.
356Because the list is important, it has been divided into separate sections:
357
David Turner5951ce91999-12-29 00:53:44 +0000358Table Of Contents:
359
360 I High-Level Interface (easier !)
361 II Directory Structure
362 III Glyph Image Formats
363 IV Build System
364 V Portability
365 VI Font Drivers
David Turnerd2b1f351999-12-16 23:11:37 +0000366
367-----------------------------------------------------------------------------------------
368High-Level Interface :
369
370 The high-level API has been considerably simplified. Here is how :
371
David Turner5951ce91999-12-29 00:53:44 +0000372 - resource objects have disappeared. this means that face objects can
373 now be created with a single function call (see FT_New_Face and
David Turnerd2b1f351999-12-16 23:11:37 +0000374 FT_Open_Face)
David Turnere49ab252000-05-16 23:44:38 +0000375
David Turnerd2b1f351999-12-16 23:11:37 +0000376 - when calling either FT_New_Face & FT_Open_Face, a size object and a
377 glyph slot object are automatically created for the face, and can be
378 accessed through "face->glyph" and "face->size" if one really needs to.
379 In most cases, there's no need to call FT_New_Size or FT_New_Glyph.
David Turnere49ab252000-05-16 23:44:38 +0000380
David Turnerd2b1f351999-12-16 23:11:37 +0000381 - similarly, FT_Load_Glyph now only takes a "face" argument (instead of
382 a glyph slot and a size). Also, it's "result" parameter is gone, as
383 the glyph image type is returned in the field "face->glyph.format"
David Turnere49ab252000-05-16 23:44:38 +0000384
David Turnerd2b1f351999-12-16 23:11:37 +0000385 - the list of available charmaps is directly accessible through
386 "face->charmaps", counting "face->num_charmaps" elements. Each
387 charmap has an 'encoding' field which specifies which known encoding
388 it deals with. Valid values are, for example :
David Turnere49ab252000-05-16 23:44:38 +0000389
David Turnerd2b1f351999-12-16 23:11:37 +0000390 ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
391 ft_encoding_apple_roman
392 ft_encoding_sjis
393 ft_encoding_adobe_standard
David Turner5951ce91999-12-29 00:53:44 +0000394 ft_encoding_adobe_expert
David Turnere49ab252000-05-16 23:44:38 +0000395
David Turnerd2b1f351999-12-16 23:11:37 +0000396 other values may be added in the future. Each charmap still holds its
397 "platform_id" and "encoding_id" values in case the encoding is too
398 exotic for the current library
399
400
401-----------------------------------------------------------------------------------------
402Directory Structure:
403
404 Should seem obvious to most of you:
405
406 freetype/
407 config/ -- configuration sub-makefiles
408 ansi/
David Turner5951ce91999-12-29 00:53:44 +0000409 unix/ -- platform-specific configuration files
David Turnerd2b1f351999-12-16 23:11:37 +0000410 win32/
411 os2/
412 msdos/
413
414 include/ -- public header files, those to be included directly
415 by client apps
416
417 src/ -- sources of the library
418 base/ -- the base layer
419 sfnt/ -- the sfnt "driver" (see the drivers section below)
420 truetype/ -- the truetype driver
421 type1/ -- the type1 driver
422 shared/ -- some header files shared between drivers
423
424 demos/ -- demos/tools
425
426 docs/ -- documentation (a bit empty for now)
427
428-----------------------------------------------------------------------------------------
429Glyph Image Formats :
430
431 Drivers are now able to register new glyph image formats within the library.
432 For now, the base layer supports of course bitmaps and vector outlines, but
433 one could imagine something different like colored bitmaps, bi-color
434 vectors or wathever else (Metafonts anyone ??).
435
436 See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is
437 gone, and is now replaced by FT_Bitmap, which should encompass all known
438 bitmap types.
439
440 Each new image format must provide at least one "raster", i.e. a module
David Turner5951ce91999-12-29 00:53:44 +0000441 capable of transforming the glyph image into a bitmap. It's also possible
David Turnerd2b1f351999-12-16 23:11:37 +0000442 to change the default raster used for a given glyph image format.
443
444 The default outline scan-converter now uses 128 levels of grays by default,
445 which tends to smooth many things. Note that the demo programs have been
David Turner5951ce91999-12-29 00:53:44 +0000446 updated significantly in order to display these..
David Turnerd2b1f351999-12-16 23:11:37 +0000447
448
449-----------------------------------------------------------------------------------------
450Build system :
451
452 You still need GNU Make to build the library. The build system has been
453 very seriously re-vamped in order to provide things like :
454
455 - automatic host platform detection (reverting to 'config/ansi'
456 if it is not detected, with pseudo-standard compilation flags)
457
458 - the ability to compile from the Makefiles with very different and
459 exotic compilers. Note that linking the library can be difficult for
460 some platforms.
461
462 For example, the file `config/win32/lcclib.bat' is invoked by the
463 build system to create the ".lib" file with LCC-Win32 because its
464 librarian has too many flaws to be invoked directly from the Makefile.
465
466 Here's how it works :
467
468 - the first time you type `make', the build system runs a series of
469 sub-makefiles in order to detect your host platform. It then dumps
470 what it found, and creates a file called `config.mk' in the current
471 directory. This is a sub-Makefile used to define many important Make
472 variables used to build the library.
473
474 - the second time, the build system detects the `config.mk' then use it
475 to build the library. All object files go into 'obj' by default, as
476 well as the library file, but this can easily be changed.
477
478 Note that you can run "make setup" to force another host platform detection
479 even if a `config.mk' is present in the current directory. Another solution
480 is simply to delete the file, then re-run make.
481
482 Finally, the default compiler for all platforms is gcc (for now, this will
483 hopefully changed in the future). You can however specify a different
484 compiler by specifying it after the 'setup' target as in :
485
486 gnumake setup lcc on Win32 to use the LCC compiler
487 gnumake setup visualc on Win32 to use Visual C++
488
489 See the file `config/<system>/detect.mk' for a list of supported compilers
490 for your platforms.
491
492 It should be relatively easy to write new detection rules files and
493 config.mk..
494
495 Finally, to build the demo programs, go to `demos' and launch GNU Make,
496 it will use the `config.mk' in the top directory to build the test
497 programs..
498
499-----------------------------------------------------------------------------------------
500Portability :
501
502 In the previous beta, a single FT_System object was used to encompass
503 all low-level operations like thread synchronisation, memory management
504 and i/o access. This has been greatly simplified :
505
506 - thread synchronisation has been dropped, for the simple reason that
507 the library is already re-entrant, and that if you really need two
508 threads accessing the same FT_Library, you should really synchronize
509 access to it yourself with a simple mutex.
510
511 - memory management is performed through a very simple object called
512 "FT_Memory", which really is a table containing a table of pointers
513 to functions like malloc, realloc and free as well as some user data
514 (closure).
515
516 - resources have disappeared (they created more problems than they
517 solved), and i/o management have been simplified greatly as a
518 result. Streams are defined through FT_Stream objects, which can
519 be either memory-based or disk-based.
520
521 Note that each face has its own stream, which is closed only when
522 the face object is destroyed. Hence, a function like TT_Flush_Face
523 in 1.x cannot be directly supported. However, if you really need
524 something like this, you can easily tailor your own streams to achieve
525 the same feature at a lower level (and use FT_Open_Face instead of
526 FT_New_Face to create the face).
527
528 See the file "include/ftsystem.h" for more details, as well as the
529 implementations found in "config/unix" and "config/ansi".
530
531
532-----------------------------------------------------------------------------------------
David Turner5951ce91999-12-29 00:53:44 +0000533Font Drivers :
David Turnere49ab252000-05-16 23:44:38 +0000534
David Turner5951ce91999-12-29 00:53:44 +0000535
536 The Font Driver interface has been modified in order to support
537 extensions & versioning.
538
539
540 The list of the font drivers that are statically linked to the
541 library at compile time is managed through a new configuration file
542 called `config/<platform>/ftmodule.h'.
543
544 This file is autogenerated when invoking `make modules'. This target
545 will parse all sub-directories of 'src', looking for a "module.mk"
546 rules file, used to describe the driver to the build system.
547
548 Hence, one should call `make modules' each time a font driver is added
549 or removed from the `src' directory.
550
551
552 Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
553 driver doesn't support font files directly, but provides services used
554 by all TrueType-like font drivers. Hence, its code is shared between
555 the TrueType & OpenType font formats, and possibly more formats to
556 come if we're lucky..
David Turnerd2b1f351999-12-16 23:11:37 +0000557
558-----------------------------------------------------------------------------------------
559Extensions support :
David Turner5951ce91999-12-29 00:53:44 +0000560
561 The extensions support is inspired by the one found in 1.x.
562
563 Now, each font driver has its own "extension registry", which lists
564 which extensions are available for the font faces managed by the driver.
565
566 Extension ids are now strings, rather than 4-byte tags, as this is
567 usually more readable..
568
569 Each extension has:
570 - some data, associated to each face object
571 - an interface (table of function pointers)
572
573 An extension that is format-specific should simply register itself
574 to the correct font driver. Here is some example code:
575
576 // Registering an extensions
577 //
578 FT_Error FT_Init_XXXX_Extension( FT_Library library )
579 {
580 FT_DriverInterface* tt_driver;
581
582 driver = FT_Get_Driver( library, "truetype" );
583 if (!driver) return FT_Err_Unimplemented_Feature;
584
David Turnere49ab252000-05-16 23:44:38 +0000585 return FT_Register_Extension( driver, &extension_class );
David Turner5951ce91999-12-29 00:53:44 +0000586 }
587
David Turnere49ab252000-05-16 23:44:38 +0000588
David Turner5951ce91999-12-29 00:53:44 +0000589 // Implementing the extensions
590 //
591 FT_Error FT_Proceed_Extension_XXX( FT_Face face )
592 {
593 FT_XXX_Extension ext;
594 FT_XXX_Extension_Interface ext_interface;
595
596 ext = FT_Get_Extension( face, "extensionid", &ext_interface );
597 if (!ext) return error;
598
599 return ext_interface->do_it(ext);
600 }
David Turnerd2b1f351999-12-16 23:11:37 +0000601