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