1 LATEST CHANGES BETWEEN 2.1.4 and 2.1.3
5 - updated to newest libtool version, fixes build problems on various
8 - a fix in the Gzip stream reader, it couldn't read certain .gz files
9 properly due to a small typo. In certain cases, FreeType could also
10 loop endlessly when trying to load tiny gzipped files.
12 - the configure script now tries to use the system-wide zlib when
13 it finds one (instead of the copy found in src/gzip). And
14 "freetype-config" has been updated to return relevant flags in this
15 case when invoked with "--libs" (e.g. "-lzlib")
17 - certain fonts couldn't be loaded by 2.1.3 because they lacked a
18 Unicode charmap (e.g. SYMBOL.TTF). FreeType erroneously rejected
21 - the CFF loader was modified to accept fonts which only
22 contain a subset of their reference charset. This prevented the
23 correct use of PDF-embedded fonts.
25 - the logic to detect Unicode charmaps has been modified. this is required
26 to support fonts which include both 16-bit and 32-bit charmaps (like
27 very recent asian ones) using the new 10 and 12 SFNT formats.
29 - the TrueType loader now limits the depth of composite glyphs. This is
30 necessary to prevent broken fonts to break the engine by blowing the
31 stack with recursive glyph definitions.
33 - the CMap cache is now capable of managing UCS-4 character codes that
34 are mapped through extended charmaps in recent TrueType/OpenType fonts
36 - the cache sub-system now properly manages out-of-memory conditions,
37 instead of blindly reporting them to the caller. This means that it
38 will try to empty the cache before restarting its allocations to see
41 - the PFR driver didn't return the list of available embedded bitmaps
46 - David Chester contributed some enhancements to the auto-hinter that
47 significantly increase the quality of its output. The Postscript hinter
48 was also improved in several ways..
50 - the FT_RENDER_MODE_LIGHT render mode was implemented
52 - a new API, called FT_Get_BDF_Property has been added to FT_BDF_H to
53 retrieve BDF properties from BDF _and_ PCF font files. THIS IS STILL
54 EXPERIMENTAL, since it hasn't been properly tested yet.
56 - a Windows FNT specific API has been added, mostly to access font
57 headers. This is used by Wine
59 - TrueType tables without a "hmtx" table are now tolerated when an
60 incremental interface is used. This happens for certain Type42 fonts
61 passed from Ghostscript to FreeType.
63 - the PFR font driver is now capable of returning the font family and
64 style names when they're available (instead of the sole "FontID"). This
65 is performed by parsing an *undocumented* portion of the font file !!
69 - the path stroker in FT_STROKER_H has entered beta stage. It now works
70 very well, but it's interface might change a bit in the future. More
71 on this in later releases
73 - the documentation for FT_Size_Metrics didn't appear properly in the
76 - the file docs/VERSION.DLL has been updated to explain versioning
77 with FreeType (i.e. comparing release/libtool/so numbers, and how
78 to use them in Autoconf scripts)
80 - the installation documentation has been seriously revamped. Everything
81 is now in the "docs" directory.
83 ==============================================================================
84 LATEST CHANGES BETWEEN 2.1.3 and 2.1.2
86 I. IMPORTANT BUG FIXES
88 - FT_Vector_Transform had been incorrectly modified in 2.1.2, resulting
89 in incorrect transformations being applied (for example, rotations
90 were processed in opposite angles).
92 - The format 8 and 12 TrueType charmap enumeration routines have been
93 fixed (FT_Get_Next_Char returned invalid values).
95 - The PFR font driver returned incorrect advance widths if the outline
96 and metrics resolution defined in the font file were different.
98 - FT_Glyph_To_Bitmap now returns successfully when called with an
99 FT_BitmapGlyph argument (it previously returned an error).
101 - A bug in the Type 1 loader that prevented valid font bounding boxes to
102 be loaded from multiple master fonts.
104 - The SFNT validation code has been rewritten. FreeType can now load
105 "broken" fonts that were usable on Windows, but not with previous
106 versions of the library.
108 - The computation of bearings in the BDF driver has been fixed.
110 - The Postscript hinter crashed when trying to hint certain glyphs (more
111 precisely, when trying to apply hints to an empty glyph outline).
113 - The TrueType glyph loader now supports composites in "Apple format"
114 (they differ slightly from Microsoft/OpenType ones in the way transform
115 offsets are computed).
117 - FreeType was very slow at opening certain asian CID/CFF fonts, due
118 to fixed increment in dynamic array re-allocations. This has been
119 changed to exponential behaviour to get acceptable performance
121 II. IMPORTANT CHANGES
123 - the PCF driver now supports gzip-compressed font files natively. This
124 means that you'll be able to use all these bitmap fonts that come
125 with XFree86 with FreeType (and libXft/libXft2, by extension).
127 - The automatic and postscript hinters have both been updated. This
128 results in a relatively important increase of rendering quality since
129 many nasty defaults have been supressed. Please visit the web page:
131 http://www.freetype.org/hinting/smooth-hinting.html
133 for additional details on this topic.
135 - The "load_flags" parameter of FT_Load_Glyph is now an FT_Int32
136 (instead of just being an FT_Int). This breaks source and binary
137 compatibility for 16bit systems only, while retaining both of them for
140 Some new flags have been added consequently:
142 FT_LOAD_NO_AUTOHINT :: Disable the use of the auto-hinter
143 (but not native format hinters).
145 FT_LOAD_TARGET_NORMAL :: Hint and render for normal anti-aliased
148 FT_LOAD_TARGET_MONO :: Hint and render for 1-bit displays.
150 FT_LOAD_TARGET_LCD :: Hint and render for horizontal RGB or BGR
151 sub-pixel displays (like LCD screens).
152 THIS IS STILL EXPERIMENTAL!
154 FT_LOAD_TARGET_LCD_V :: Same as FT_LOAD_TARGET_LCD, for vertical
155 sub-pixel displays (like rotated LCD
156 screens). THIS IS STILL EXPERIMENTAL!
158 FT_LOAD_MONOCHROME is still supported, but only affects rendering, not
161 Note that the 'ftview' demo program available in the 'ft2demos' package
162 has been updated to support LCD-optimized display on non-paletted
163 displays (under Win32 and X11)
165 - The PFR driver now supports embedded bitmaps (all formats supported),
166 and returns correct kerning metrics for all glyphs
168 - The TrueType charmap loader now supports certain "broken" fonts that
169 load under Windows without problems.
171 - The cache API has been slightly modified (it's still a beta!):
173 - The type FTC_ImageDesc has been removed; it is now replaced by
174 FTC_ImageTypeRec. Note that one of its fields is a `load_flag'
175 parameter for FT_Load_Glyph.
177 - The field "num_grays" of FT_SBitRec has been changed to "max_grays"
178 in order to fit within a single byte. Its maximum value is thus 255
179 (instead of 256 as previously).
184 - Added support for the DESTDIR variable during "make install". This
185 simplifies packaging of FreeType.
187 - included modified copies of the ZLib sources in 'src/gzip' in order
188 to support gzip-compressed PCF fonts. We do not use the system-provided
189 zlib for now, though this is a probable enhancement for future releases
191 - The DocMaker tool used to generate the on-line API reference has been
192 completely rewritten. It is now located in
193 "src/tools/docmaker/docmaker.py". Features:
195 - better cross-referenced output
196 - more polished output
197 - uses Python regular expressions (though it didn't speed the
199 - much more modular structure, which allows for different "backends"
200 in order to generate HTML, XML, or whatever format.
202 One can regenerate the API reference by calling:
204 python src/tools/docmaker/docmaker.py \
206 --title=FreeType-2.1.3 \
207 --output=<outputdirectory>
208 include/freetype/*.h \
209 include/freetype/config/*.h \
210 include/freetype/cache/*.h
212 - A new, experimental, support for incremental font loading (i.e.,
213 loading of fonts where the glyphs are not in the font file itself, but
214 provided by an external component, like a Postscript interpreter) has
215 been added by Graham Asher. This is still work in progress, however.
217 - A new, EXPERIMENTAL, path stroker has been added. It doesn't suffer
218 from severe rounding errors and treat bezier arcs directly. Still
219 work in progress (i.e. not part of the official API). See the file
220 <freetype/ftstroker.h> for some of the details.
222 - The massive re-formatting of sources and internal re-design is still
223 under-way. Many internal functions, constants, and types have been
227 ========================================================================
229 LATEST CHANGES BETWEEN 2.1.2 and 2.1.1
231 I. IMPORTANT BUG FIXES
233 - Many font drivers didn't select a Unicode charmap by default when
234 a new face was opened (with the FT_CONFIG_OPTION_USE_CMAPS options
235 enabled), causing many applications to not be able to display text
236 correctly with the 2.1.x releases.
238 - The PFR driver had a bug in its composite loading code that produces
239 incorrectly placed accents with many fonts.
241 - The Type42 driver crashed sometimes due to a nasty bug.
243 - The Type 1 custom encoding charmap didn't handle the case where the
244 first glyph index wasn't 0.
246 - A serious typo in the TrueType composite loader produced incorrectly
247 placed glyphs in fonts like "Wingdings" and a few others.
252 - The Win32 Visual C++ project file has been updated to include the
255 - "freetype.m4" is now installed by default by "make install" on Unix
258 - The function FT_Get_PS_Font_Info now works with CID and Type42 fonts
262 ========================================================================
264 LATEST CHANGES BETWEEN 2.1.1 and 2.1.0
266 I. IMPORTANT BUG FIXES
268 - The `version_info' returned by `freetype-config' in 2.1.0 returned an
269 invalid value. It now returns 9:1:3 (2.0.9 returned 9:0:3).
271 - Version 2.1.0 couldn't be linked against applications on Win32 and
272 Amiga systems due to a new debug function that wasn't properly
273 propagated to the system-specific directory in `builds'.
275 - Various MacOS and Mac OS X specific fixes.
277 - Fixed a bug in the TrueType charmap validation routines that made
278 version 2.1.0 too restrictive -- many popular fonts have been
281 - There was still a very small difference between the monochrome glyph
282 bitmaps produced by FreeType 1.x and FreeType 2.x with the bytecode
283 interpreter enabled. This was caused by an invalid flag setting in
284 the TrueType glyph loader, making the rasterizer change its drop-out
285 control mode. Now theresults should _really_ be completely identical.
287 - The TrueType name table loader has been improved to support many
288 popular though buggy Asian fonts. It now ignores empty name entries,
289 invalid pointer offsets and a few other incorrect subtleties.
290 Moreover, name strings are now loaded on demand, which reduces the
291 memory load of many faces (e.g. the ARIAL.TTF font file contains a
292 10kByte name table with 70 names).
294 - Fixed a bug in the Postscript hinter that prevented family blues
295 substitution to happen correctly.
300 - Three new font drivers in this release:
302 * A BDF font driver, contributed by Franco Zappa Nardelli, heavily
303 modified by Werner Lemberg. It also supports anti-aliased bitmaps
304 (using a slightly extended BDF format).
306 * A Type42 font driver, contributed by Roberto Alameda. It is
307 still experimental but seems to work relatively well.
309 * A PFR font driver, contributed by David Turner himself. It doesn't
310 support PFR hinting -- note that BitStream has at least two patents
316 - The cache sub-system has been optimized in important ways. Cache hits
317 are now significantly faster. For example, using the CMap cache is
318 about twice faster than calling FT_Get_Char_Index on most platforms.
319 Similarly, using an SBit cache is about five times faster than loading
320 the bitmaps from a bitmap file, and 300 to 500 times faster than
321 generating them from a scalable format.
323 Note that you should recompile your sources if you designed a custom
324 cache class for the FT2 Cache subsystem, since the changes performed
325 are source, but not binary, compatible.
328 ========================================================================
330 LATEST CHANGES BETWEEN 2.1.0 and 2.0.9
332 I. IMPORTANT BUG FIXES
334 - The TrueType bytecode interpreter has been fixed to produce
335 _exactly_ the same output as FreeType 1.x. Previous differences
336 were due to slightly distinct fixed-point computation routines
337 used to perform dot products and vector length measurements.
339 It seems that native TrueType hinting is _extremely_ sensitive
340 to rounding errors. The required vector computation routines have
341 been optimized and placed within the "ttinterp.c" file.
343 - Fixed the parsing of accelerator tables in the PCF font driver.
345 - Fixed the Type1 glyph loader routine used to compute the font's
346 maximum advance width.
350 - The `configure' script used on Unix systems has been modified to
351 check that GNU Make is being used to build the library. Otherwise,
352 it will display a message proposing to use the GNUMAKE environment
355 The Unix-specific file README.UNX has been modified accordingly.
360 - The FreeType License in `docs/FTL.txt' has been updated to include
361 a proposed preferred disclaimer. If you are using FreeType in your
362 products, you are encouraged (but not mandated) to use the following
363 text in your documentation:
366 Portions of this software are copyright © 1996-2002 The FreeType
367 Project (www.freetype.org). All rights reserved.
370 - The default size of the render pool has been reduced to 16kByte.
371 This shouldn't result in any noticeable performance penalty, unless
372 you are using the engine as-is to render very large and complex
375 - The FreeType 2 redesign has begun. More information can be found
378 http://www.freetype.org/freetype2/redesign.html
380 The following internal changes have been performed within the sources
383 - Many internal types have been renamed to increase consistency.
384 The following should be true, except for public types:
386 * All structure types have a name ending in "Rec" (short for
389 * A pointer-to-structure type has the same name as the
390 structure, _without_ the "Rec" suffix.
394 typedef struct FooRec_
400 - Many internal macros have been renamed to increase consistency.
401 The following should be true:
403 * All macros have a name beginning with "FT_". This required
408 REALLOC => FT_REALLOC
410 * All macros are completely UPPERCASE. This required a few
413 READ_Short => FT_READ_SHORT
414 NEXT_Short => FT_NEXT_SHORT
415 GET_ULongLE => FT_GET_ULONG_LE
416 MEM_Set => FT_MEM_SET
417 MEM_Copy => FT_MEM_COPY
420 * Whenever possible, all macro names follow the
421 FT_<OBJECT>_<METHOD> pattern. For example
423 ACCESS_Frame => FT_FRAME_ENTER
424 FORGET_Frame => FT_FRAME_EXIT
425 EXTRACT_Frame => FT_FRAME_EXTRACT
426 RELEASE_Frame => FT_FRAME_RELEASE
428 FILE_Pos => FT_STREAM_POS
429 FILE_Seek => FT_STREAM_SEEK
430 FILE_Read => FT_STREAM_READ
431 FILE_ReadAt => FT_STREAM_READ_AT
432 READ_Fields => FT_STREAM_READ_FIELDS
434 - Many internal functions have been renamed to follow the
435 FT_<Object>_<Method> pattern. For example:
437 FT_Seek_Stream => FT_Stream_Seek
438 FT_Read_Stream_At => FT_Stream_ReadAt
439 FT_Done_Stream => FT_Stream_Close
440 FT_New_Stream => FT_Stream_Open
441 FT_New_Memory_Stream => FT_Stream_OpenMemory
442 FT_Extract_Frame => FT_Stream_ExtractFrame
444 Note that method names do not contain "_".
446 - The FT_ALLOC_ARRAY and FT_REALLOC_ARRAY have been replaced
447 with FT_NEW_ARRAY and FT_RENEW_ARRAY which do not take a type
448 as the fourth argument. Instead, the array element type size
449 is computed automatically from the type of the target pointer
452 - A new object class, FT_CMap, has been introduced. These
453 internal objects are used to model character maps. This eases
454 the support of additional charmap types within the engine.
456 - A new configuration file named "ftstdlib.h" has been added
457 to `include/freetype/config'. It is used to define aliases
458 for _every_ routine of the ISO C library that the font engine
459 uses. Each aliases has a "ft_" prefix (e.g. "ft_strlen" is an
462 This is used to ease the porting of FreeType 2 to exotic runtime
463 environments where the ISO C Library isn't available (e.g.
464 XFree86 extension modules).
466 More details are available in the "ChangeLog" file.
469 ============================================================================
471 LATEST CHANGES BETWEEN 2.0.9 and 2.0.8
473 I. IMPORTANT BUG FIXES
475 - Certain fonts like "foxjump.ttf" contain broken name tables with
476 invalid entries and wild offsets. This caused FreeType to crash when
479 The SFNT `name' table loader has been fixed to be able to support
482 Moreover, the code in charge of processing this table has been changed
483 to always favour Windows-formatted entries over other ones. Hence, a
484 font that works on Windows but not on the Mac will load cleanly in
485 FreeType and report accurate values for Family & PostScript names.
487 - The CID font driver has been fixed. It unfortunately returned a
488 Postscript Font name with a leading slash, as in
489 "/MunhwaGothic-Regular".
491 - FreeType 2 should now compile fine on AIX 4.3.3 as a shared library.
493 - A bug in the Postscript hinter has been found and fixed, removing
494 un-even stem widths at small pixel sizes (like 14-17).
496 This improves the quality of a certain number of Postscript fonts.
501 - A new function named `FT_Library_Version' has been added to return
502 the current library's major, minor, and patch version numbers. This
503 is important since the macros FREETYPE_MAJOR, FREETYPE_MINOR, and
504 FREETYPE_PATCH cannot be used when the library is dynamically linked
507 - Two new APIs have been added: `FT_Get_First_Char' and
510 Together, these can be used to iterate efficiently over the currently
511 selected charmap of a given face. Read the API reference for more
517 - The FreeType sources are under heavy internal re-factoring. As a
518 consequence, we have created a branch named "STABLE" on the CVS to
519 hold all future releases/fixes in the 2.0.x family.
521 The HEAD branch now contains the re-factored sources and shouldn't be
522 used for testing or packaging new releases. In case you would like
523 to access the 2.0.9 sources from our CVS repository, use the tag
527 ============================================================================
529 LATEST CHANGES BETWEEN 2.0.8 and 2.0.7
531 I. IMPORTANT BUG FIXES
533 - There was a small but nasty bug in "freetype-config.in" which
534 caused the "freetype-config" script to fail on Unix.
536 This didn't prevent the installation of the library or even
537 its execution, but caused problems when trying to compile many
538 Unix packages that depend on it.
540 - Some TrueType or OpenType fonts embedded in PDF documents do
541 not have a 'cmap', 'post' and 'name' as is required by the
542 specification. FreeType no longer refuses to load such fonts.
544 - various fixes to the PCF font driver
547 ============================================================================
549 LATEST CHANGES BETWEEN 2.0.7 and 2.0.6
551 I. IMPORTANT BUG FIXES
553 - Fixed two bugs in the Type 1 font driver. The first one resulted in a
554 memory leak in subtle cases. The other one caused FreeType to crash
555 when trying to load ".gsf" files (Ghostscript so-called Postscript
558 (This made _many_ KDE applications crash on certain systems. FreeType
559 _is_ becoming a critical system component on Linux :-)
561 - Fixed a memory leak in the CFF font driver.
563 - Fixed a memory leak in the PCF font driver.
565 - Fixed the Visual C++ project file "builds/win32/visualc/freetype.dsp"
566 since it didn't include the Postscript hinter component, causing
567 errors at build time.
569 - Fixed a small rendering bug in the anti-aliased renderer that only
570 occurred when trying to draw thin (less than 1 pixel) strokes.
572 - Fixed "builds/unix/freetype2.a4" which is used to generate a valid
573 "freetype2.m4" for use with autoconf.
575 - Fixed the OpenVMS Makefiles.
580 - Added "configure" and "install" scripts to the top-level directory.
581 A GNU-style installation is thus now easily possible with
583 ./configure <options>
588 ============================================================================
590 LATEST CHANGES BETWEEN 2.0.6 and 2.0.5
592 I. IMPORTANT BUG FIXES
594 - It wasn't possible to load embedded bitmaps when the auto-hinter was
595 used. This is now fixed.
597 - The TrueType font driver didn't load some composites properly (the
598 sub-glyphs were slightly shifted, and this was only noticeable when
599 using monochrome rendering).
601 - Various fixes to the auto-hinter. They merely improve the output of
602 sans-serif fonts. Note that there are still problems with serifed
603 fonts and composites (accented characters).
605 - All scalable font drivers erroneously returned un-fitted glyph
606 advances when hinting was requested. This created problems for a
607 number of layout applications. This is a very old bug that got
608 undetected mainly because most test/demo program perform rounding
609 explicitly or implicitly (through the cache).
611 - FT_Glyph_To_Bitmap() did erroneously modify the source glyph in
614 - "glnames.py" still contained a bug that made FreeType return invalid
615 names for certain glyphs.
617 - The library crashed when loading certain Type 1 fonts like "sadn.pfb"
618 ("Stalingrad Normal"), which appear to contain pathetic font info
621 - The TrueType glyph loader is now much more paranoid and checks everything
622 when loading a given glyph image. This was necessary to avoid
623 problems (crashes and/or memory overwrites) with broken fonts that
624 came from a really buggy automatic font converter.
627 II. IMPORTANT UPDATES AND NEW FEATURES
629 - Important updates to the Mac-specific parts of the library.
631 - The caching sub-system has been completely re-designed, and its API
632 has evolved (the old one is still supported for backwards
635 The documentation for it is not yet completed, sorry. For now, you
636 are encouraged to continue using the old API. However, the ftview
637 demo program in the ft2demos package has already been updated to use
638 the new caching functions.
640 - A new charmap cache is provided too. See FTC_CMapCache(). This is
641 useful to perform character code -> glyph index translations quickly,
642 without the need for an opened FT_Face.
644 - A NEW POSTSCRIPT HINTER module has been added to support native hints
645 in the following formats: PostScript Type 1, PostScript CID, and
648 Please test! Note that the auto-hinter produces better results for a
649 number of badly-hinted fonts (mostly auto-generated ones) though.
651 - A memory debugger is now part of the standard FreeType sources. To
652 enable it, define FT_DEBUG_MEMORY in <freetype/config/ftoption.h>, and
653 recompile the library.
655 Additionally, define the _environment_ variable FT_DEBUG_MEMORY and
656 run any program using FreeType. When the library is exited, a summary
657 of memory footprints and possible leaks will be displayed.
659 This works transparently with _any_ program that uses FreeType.
660 However, you will need a lot of memory to use this (allocated blocks
661 are never released to the heap to detect double deletes easily).
666 - We are aware of subtle differences between the output of FreeType
667 versions 1 and 2 when it comes to monochrome TrueType-hinted glyphs.
668 These are most probably due to small differences in the monochrome
669 rasterizers and will be worked out in an upcoming release.
671 - We have decided to fork the sources in a "stable" branch, and an
672 "unstable" one, since FreeType is becoming a critical component of
675 The next bug-fix releases of the library will be named 2.0.7, 2.0.8,
676 etc., while the "2.1" branch will contain a version of the sources
677 where we will start major reworking of the library's internals, in
678 order to produce FreeType 2.2.0 (or even 3.0) in a more distant
681 We also hope that this scheme will allow much more frequent releases
685 ============================================================================
687 LATEST CHANGES BETWEEN 2.0.5 and 2.0.4
689 NOTE THAT 2.0.5 DOES NOT CONTAIN THE POSTSCRIPT HINTER. THIS MODULE WILL
690 BE PART OF THE NEXT RELEASE (EITHER 2.0.6 or 2.1)
692 - Fixed a bug that made certain glyphs, like "Cacute", "cacute" and
693 "lslash" unavailable from Unicode charmaps of Postscript fonts. This
694 prevented the correct display of Polish text, for example.
696 - The kerning table of Type 1 fonts was loaded by FreeType, when its AFM
697 file was attached to its face, but the FT_FACE_FLAG_HAS_KERNING bit
698 flags was not set correctly, preventing FT_Get_Kerning to return
701 - Improved SFNT (TrueType & OpenType) charmap support. Slightly better
702 performance, as well as support for the new formats defined by the
703 OpenType 1.3 specification (8, 10, and 12)
705 - Fixed a serious typo in "src/base/ftcalc.c" which caused invalid
706 computations in certain rare cases, producing ugly artefacts.
708 - The size of the EM square is computed with a more accurate algorithm
709 for Postscript fonts. The old one caused slight errors with embedded
710 fonts found in PDF documents.
712 - Fixed a bug in the cache manager that prevented normal LRU behaviour
713 within the cache manager, causing unnecessary reloads (for FT_Face and
714 FT_Size objects only).
716 - Added a new function named "FT_Get_Name_Index" to retrieve the glyph
717 index of a given glyph name, when found in a face.
719 - Added a new function named "FT_Get_Postscript_Name" to retrieve the
720 "unique" Postscript font name of a given face.
722 - Added a new public header size named FT_SIZES_H (or
723 <freetype/ftsizes.h>) providing new FT_Size-management functions:
724 FT_New_Size, FT_Activate_Size, FT_Done_Size.
726 - Fixed a reallocation bug that generated a dangling pointer (and possibly
727 memory leaks) with Postscript fonts (in src/psaux/psobjs.c).
729 - Many fixes for 16-bit correctness.
731 - Removed many pedantic compiler warnings from the sources.
733 - Added an Amiga build directory in "builds/amiga".
735 ============================================================================
737 LATEST CHANGES BETWEEN 2.0.4 and 2.0.3
739 - Fixed a rather annoying bug that was introduced in 2.0.3. Namely, the
740 font transformation set through FT_Set_Transform was applied twice to
741 auto-hinted glyphs, resulting in incorrectly rotated text output.
743 - Fixed _many_ compiler warnings. FT2 should now compile cleanly with
744 Visual C++'s most pedantic warning level (/W4). It already compiled
745 fine with GCC and a few other compilers.
747 - Fixed a bug that prevented the linear advance width of composite
748 TrueType glyphs to be correctly returned.
750 - Fixed the Visual C++ project files located in "builds/win32/visualc"
751 (previous versions used older names of the library).
753 - Many 32-bit constants have an "L" appended to their value, in order
754 to improve the 16-bitness of the code. Someone is actually trying to
755 use FT2 on an Atari ST machine!
757 - Updated the "builds/detect.mk" file in order to automatically build
758 FT2 on AIX systems. AIX uses "/usr/sbin/init" instead of "/sbin/init"
759 and wasn't previously detected as a Unix platform by the FreeType build
762 - Updated the Unix-specific portions of the build system (new libtool
765 - The SFNT kerning lodaer now ensures that the table is sorted (since some
766 problem fonts do not meet this requirement).
768 ============================================================================
770 LATEST CHANGES BETWEEN 2.0.3 and 2.0.2
772 I. CHANGES TO THE MODULES / FONT DRIVERS
774 - THE AUTO-HINTER HAS BEEN SLIGHTLY IMPROVED, in order to fix several
775 annoying artefacts, mainly:
777 - Blue zone alignement of horizontal stems wasn't performed
778 correctly, resulting in artefacts like the "d" being placed one
779 pixel below the "b" in some fonts like Time New Roman.
781 - Overshoot thresholding wasn't performed correctly, creating
782 unpleasant artefacts at large character pixel sizes.
784 - Composite glyph loading has been simplified. This gets rid
785 of various artefacts where the components of a composite glyphs
786 were not correctly spaced.
788 These are the last changes to the current auto-hinting module. A new
789 hinting sub-system is currently in the work in order to support native
790 hints in Type 1 / CFF / OpenType fonts, as well as globally improve
793 - The PCF driver has been fixed. It reported invalid glyph dimensions
794 for the fonts available on Solaris.
796 - The Type 1, CID and CFF drivers have been modified to fix the
797 computation of the EM size.
799 - The Type 1 driver has been fixed to avoid a dangerous bug that
800 crashed the library with non-conforming fonts (i.e. ones that do not
801 place the .notdef glyph at position 0).
803 - The TrueType driver had a rather subtle bug (dangling pointer when
804 loading composite glyphs) that could crash the library in rare
808 II. HIGH-LEVEL API CHANGES
810 - The error code enumeration values have been changed. An error value
811 is decomposed in a generic error code, and a module number. see
812 <freetype/fterrors.h> for details.
814 - A new public header file has been introduced, named FT_TRIGONOMETRY_H
815 (include/freetype/fttrig.h), providing trigonometric functions to
816 compute sines, cosines, arctangents, etc. with 16.16 fixed precision.
817 The implementation is based on the CORDIC algorithm and is very fast
818 while being sufficiently accurate.
823 - Added BeOS-specific files in the old build sub-system. Note that
824 no changes were required to compile the library with Jam.
826 - The configuration is now capable of automatically detecting 64-bit
827 integers on a set of predefined compilers (GCC, Visual C++, Borland
828 C++) and will use them by default. This provides a small performance
831 - A small memory leak that happened when opening 0-sized files (duh!)
834 - Fixed bezier stack depth bug in the routines provided by the
835 FT_BBOX_H header file. Also fixed similar bugs in the rasterizers.
837 - The outline bounding box code has been rewritten to use direct
838 computations, instead of bezier sub-division, to compute the exact
839 bounding box of glyphs. This is slightly slower but more accurate.
841 - The build system has been improved and fixed, mainly to support "make"
842 on Windows 2000 correctly, avoid problems with "make distclean" on non
845 - Hexadecimal constants have been suffixed with "U" to avoid problems
846 with certain compilers on 64-bit platforms.
848 - A new directory named "src/tools" has been created. It contains
849 Python scripts and simple unit test programs used to develop the
852 - The DocMaker tool has been moved from "docs" to "src/tools" and
853 has been updated with the following:
855 - Now accepts the "--title=XXXX" or "-t XXXX" option from the
856 command line to set the project's name in the generated API
859 - Now accepts the "--output=DIR" or "-o DIR" option from the
860 command line to set the output directory for all generated HTML
863 - Now accepts the "--prefix=XXXX" or "-p XXX" option from the
864 command line to set the file prefix to use for all generated HTML
867 - Now generates the current time/data on each generated page
868 in order to distinguish between versions.
870 DocMaker can be used with other projects now, not only FT2 (e.g. MLib,
873 ===========================================================================
875 LATEST CHANGES BETWEEN 2.0.2 and 2.0.1
878 I. CHANGES TO THE MODULES / FONT DRIVERS
880 - THE TRUETYPE BYTECODE INTERPRETER IS NOW TURNED OFF, in order to
881 avoid legal problems with the Apple patents. It seems that we
882 mistakenly turned this option on in previous releases of the
885 Note that if you want to use the bytecode interpreter in order
886 to get high-quality TrueType rendering, you will need to toggle
887 by hand the definition of the
888 TT_CONFIG_OPTION_BYTECODE_INTERPRETER macro in the file
889 "include/freetype/config/ftoption.h".
891 - The CFF driver has been improved by Tom Kacvinsky and Sander van
894 * Support for "seac" emulation.
895 * Support for "dotsection".
896 * Support for retrieving glyph names through
899 The first two items are necessary to correctly a large number of
900 Type 1 fonts converted to the CFF formats by Adobe Acrobat.
902 - The Type 1 driver was also improved by Tom & others:
904 * Better EM size computation.
905 * Better support for synthetic (transformed) fonts.
906 * The Type 1 driver returns the charstrings corresponding to
907 each glyph in the "glyph->control_data" field after a call to
908 "FT_Load_Glyph" (thanks Ha Shao).
910 - Various other bugfixes, including the following:
912 * Fixed a nasty memory leak in the Type 1 driver.
913 * The autohinter and the pcf driver used static writable data
915 * Many casts were added to make the code more 64-bits safe. It
916 also now compiles on Windows XP 64-bits without warnings.
917 * Some incorrect writable statics were removed in the "autohint"
918 and "pcf" drivers. FreeType 2 now compiles on Epoc again.
921 II. CHANGES TO THE HIGH-LEVEL API
923 - The library header files inclusion scheme has been changed. The
924 old scheme looked like:
926 #include <freetype/freetype.h>
927 #include <freetype/ftglyph.h>
928 #include <freetype/ftcache.h>
929 #include <freetype/cache/ftimage.h>
933 #include <ft2build.h>
934 #include FT_FREETYPE_H
937 #include FT_CACHE_IMAGE_H
939 NOTE THAT THE OLD INCLUSION SCHEME WILL STILL WORK WITH THIS
940 RELEASE. HOWEVER, WE DO NOT GUARANTEE THAT THIS WILL STILL BE
941 TRUE IN THE NEXT ONE (A.K.A. FREETYPE 2.1).
943 The file <ft2build.h> is used to define the header filename
944 macros. The complete and commented list of macros is available
945 in the API reference under the section name "Header File Macros"
948 For more information, see section I of the following document:
950 http://www.freetype.org/
951 freetype2/docs/tutorial/step1.html
955 http://freetype.sourceforge.net/
956 freetype2/docs/tutorial/step1.html
958 - Many, many comments have been added to the public source file in
959 order to automatically generate the API Reference through the
960 "docmaker.py" Python script.
962 The latter has been updated to support the grouping of sections
963 in chapters and better index sort. See:
965 http://www.freetype.org/freetype2/docs/reference/ft2-toc.html
968 III. CHANGES TO THE BUILD PROCESS
970 - If you are not building FreeType 2 with its own build system
971 (but with your own Makefiles or project files), you will need to
972 be aware that the build process has changed a little bit.
974 You don't need to put the "src" directory in the include path
975 when compiling any FT2 component. Instead, simply put the
976 component's directory in the current include path.
978 So, if you were doing something like:
980 cc -c -Iinclude -Isrc src/base/ftbase.c
984 cc -c -Iinclude -Isrc/base src/base/ftbase.c
986 If you were doing something like:
989 cc -c -I../../include -I.. ftbase.c
994 cc -c -I../../include ftbase.c
997 ======================================================================
999 LATEST CHANGES BETWEEN 2.0.1 and 2.0
1001 2.0.1 introduces a few changes:
1003 - Fixed many bugs related to the support of CFF / OpenType fonts.
1004 These formats are now much better supported though there is
1005 still work planned to deal with charset tables and PDF-embedded
1006 CFF files that use the old "seac" command.
1008 - The library could not be compiled in debug mode with a very
1009 small number of C compilers whose pre-processors didn't
1010 implement the "##" directive correctly (i.e. per se the ANSI C
1011 specification!) An elegant fix was found.
1013 - Added support for the free Borland command-line C++ Builder
1014 compiler. Use "make setup bcc32". Also fixed a few source
1015 lines that generated new warnings with BCC32.
1017 - Fixed a bug in FT_Outline_Get_BBox when computing the extrema of
1020 - Updated the INSTALL file to add IDE compilation.
1022 - Other minor bug fixes, from invalid Type 1 style flags to
1023 correct support of synthetic (obliqued) fonts in the
1024 auto-hinter, better support for embedded bitmaps in a SFNT font.
1026 - Fixed some problems with "freetype-config".
1028 Finally, the "standard" scheme for including FreeType headers is now
1029 gradually changing, but this will be explained in a later release
1032 And very special thanks to Tom Kacvinsky and YAMANO-UCHI Hidetoshi
1033 for their contributions!
1036 ======================================================================
1038 CHANGES BETWEEN beta8 and 2.0
1040 - Changed the default installation path for public headers from
1041 "include/freetype" to "include/freetype2".
1043 Also added a new "freetype-config" that is automatically generated
1044 and installed on Unix and Cygwin systems. The script itself is
1045 used to retrieve the current install path, C compilation flags as
1046 well as linker flags.
1048 - Fixed several small bugs:
1050 * Incorrect max advance width for fixed-pitch Type 1 fonts.
1051 * Incorrect glyph names for certain TrueType fonts.
1052 * The glyph advance was not copied when FT_Glyph_To_Bitmap was
1054 * The linearHoriAdvance and linerVertAdvance fields were not
1055 correctly returned for glyphs processed by the auto-hinter.
1056 * "type1z" renamed back to "type1"; the old "type1" module has
1059 - Revamped the build system to make it a lot more generic. This
1060 will allow us to re-use nearly un-modified in lots of other
1061 projects (including FreeType Layout).
1063 - Changed "cid" to use "psaux" too.
1065 - Added the cache sub-system. See <freetype/ftcache.h> as well as
1066 the sources in "src/cache". Note that it compiles but is still
1069 - Updated "docs/docmaker.py", a draft API reference is available at
1070 http://www.freetype.org/ft2api.html.
1072 - Changed "type1" to use "psaux".
1074 - Created a new module named "psaux" to hold the Type 1 & Type 2
1075 parsing routines. It should be used by "type1", "cid", and "cff"
1078 - Fixed an important bug in "FT_Glyph_Get_CBox".
1080 - Fixed some compiler warnings that happened since the TrueType
1081 bytecode decoder was deactivated by default.
1083 - Fixed two memory leaks:
1085 * The memory manager (16 bytes) isn't released in
1087 * Using custom input streams, the copy of the original stream was
1090 - Fixed the auto-hinter by performing automatic computation of the
1091 "filling direction" of each glyph. This is done through a simple
1092 and fast approximation, and seems to work (problems spotted by
1093 Werner though). The Arphic fonts are a lot nicer though there are
1094 still a lot of things to do to handle Asian fonts correctly.
1097 ======================================================================
1099 BETA-8 (RELEASE CANDIDATE) CHANGES
1101 - Deactivated the TrueType bytecode interpreter by default.
1103 - Deactivated the "src/type1" font driver. Now "src/type1z" is used
1106 - Updates to the build system. We now compile the library correctly
1107 under Unix system through "configure" which is automatically
1108 called on the first "make" invocation.
1110 - Added the auto-hinting module! Fixing some bugs here and there.
1112 - Found some bugs in the composite loader (seac) of the Type1-based
1115 - Renamed the directory "freetype2/config" to "freetype2/builds" and
1116 updated all relevant files.
1118 - Found a memory leak in the "type1" driver.
1120 - Incorporated Tom's patches to support flex operators correctly in
1121 OpenType/CFF fonts. Now all I need is to support pure CFF and CEF
1122 fonts to be done with this driver :-)
1124 - Added the Windows FNT/FON driver in "src/winfonts". For now, it
1125 always "simulates" a Unicode charmap, so it shouldn't be
1126 considered completed right now.
1128 It is there to be more a proof of concept than anything else
1129 anyway. The driver is a single C source file, that compiles to 3
1132 I'm still working on the PCF/BDF drivers, but I'm too lazy to
1135 - CHANGES TO THE HIGH-LEVEL API
1137 * FT_Get_Kerning has a new parameter that allows you to select the
1138 coordinates of the kerning vector (font units, scaled, scaled +
1140 * The outline functions are now in <freetype/ftoutln.h> and not
1141 part of <freetype/freetype.h> anymore.
1142 * <freetype/ftmodule.h> now contains declarations for
1143 FT_New_Library, FT_Done_Library, FT_Add_Default_Modules.
1144 * The so-called convenience functions have moved from "ftoutln.c"
1145 to "ftglyph.c", and are thus available with this optional
1146 component of the library. They are declared in
1147 <freetype/ftglyph.h> now.
1148 * Anti-aliased rendering is now the default for FT_Render_Glyph
1149 (i.e. corresponds to render_mode == 0 == ft_render_mode_normal).
1150 To generate a monochrome bitmap, use ft_render_mode_mono, or the
1151 FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char.
1152 FT_LOAD_ANTI_ALIAS is still defined, but values to 0.
1153 * <freetype/freetype.h> now include <freetype/config/ftconfig.h>,
1154 solving a few headaches :-)
1155 * The type FT_GlyphSlotRec has now a "library" field.
1157 - CHANGES TO THE "ftglyph.h" API
1159 This API has been severely modified in order to make it simpler,
1160 clearer, and more efficient. It certainly now looks like a real
1161 "glyph factory" object, and allows client applications to manage
1162 (i.e. transform, bbox and render) glyph images without ever
1163 knowing their original format.
1165 - Added support for CID-keyed fonts to the CFF driver. Maybe
1166 support for pure CFF + CEF fonts should come in?
1168 - Cleaned up source code in order to avoid two functions with the
1169 same name. Also changed the names of the files in "type1z" from
1170 "t1XXXX" to "z1XXXX" in order to avoid any conflicts.
1172 "make multi" now works well :-)
1174 Also removed the use of "cidafm" for now, even if the source files
1175 are still there. This functionality will certainly go into a
1178 - ADDED SUPPORT FOR THE AUTO-HINTER
1180 It works :-) I have a demo program which simply is a copy of
1181 "ftview" that does a `FT_Add_Module(library,
1182 &autohinter_module_class)' after library initialization, and Type
1183 1 & OpenType/CFF fonts are now hinted.
1185 CID fonts are not hinted, as they include no charmap and the
1186 auto-hinter doesn't include "generic" global metrics computations
1189 Now, I need to release this thing to the FreeType 2 source.
1191 - CHANGES TO THE RENDERER MODULES
1193 The monochrome and smooth renderers are now in two distinct
1194 directories, namely "src/raster1" and "src/smooth". Note that the
1195 old "src/renderer" is now gone.
1197 I ditched the 5-gray-levels renderers. Basically, it involved a
1198 simple #define toggle in 'src/raster1/ftraster.c'.
1200 FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now
1201 select the best renderer available, depending on render mode. If
1202 the current renderer for a given glyph image format isn't capable
1203 of supporting the render mode, another one will be found in the
1204 library's list. This means that client applications do not need
1205 to switch or set the renderers themselves (as in the latest
1206 change), they'll get what they want automatically. At last.
1208 Changed the demo programs accordingly.
1210 - MAJOR INTERNAL REDESIGN:
1212 A lot of internal modifications have been performed lately on the
1213 source in order to provide the following enhancements:
1215 * More generic module support:
1217 The FT_Module type is now defined to represent a handle to a
1218 given module. The file <freetype/ftmodule.h> contains the
1219 FT_Module_Class definition, as well as the module-loading public
1222 The FT_Driver type is still defined, and still represents a
1223 pointer to a font driver. Note that FT_Add_Driver is replaced
1224 by FT_Add_Module, FT_Get_Driver by FT_Get_Module, etc.
1226 * Support for generic glyph image types:
1228 The FT_Renderer type is a pointer to a module used to perform
1229 various operations on glyph image.
1231 Each renderer is capable of handling images in a single format
1232 (e.g. ft_glyph_format_outline). Its functions are used to:
1234 - transform an glyph image
1235 - render a glyph image into a bitmap
1236 - return the control box (dimensions) of a given glyph image
1238 The scan converters "ftraster.c" and "ftgrays.c" have been moved
1239 to the new directory "src/renderer", and are used to provide two
1240 default renderer modules.
1242 One corresponds to the "standard" scan-converter, the other to
1245 he current renderer can be set through the new function
1248 The old raster-related function FT_Set_Raster, FT_Get_Raster and
1249 FT_Set_Raster_Mode have now disappeared, in favor of the new:
1254 See the file <freetype/ftrender.h> for more details.
1256 These changes were necessary to properly support different
1257 scalable formats in the future, like bi-color glyphs, etc.
1259 * Glyph loader object:
1261 A new internal object, called a 'glyph loader' has been
1262 introduced in the base layer. It is used by all scalable format
1263 font drivers to load glyphs and composites.
1265 This object has been created to reduce the code size of each
1266 driver, as each one of them basically re-implemented its
1269 See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for
1272 * FT_GlyphSlot has new fields:
1274 In order to support extended features (see below), the
1275 FT_GlyphSlot structure has a few new fields:
1279 This field gives the linearly scaled (i.e. scaled but
1280 unhinted) advance width for the glyph, expressed as a 16.16
1281 fixed pixel value. This is useful to perform WYSIWYG text.
1284 This field gives the linearly scaled advance height for the
1285 glyph (relevant in vertical glyph layouts only). This is
1286 useful to perform WYSIWYG text.
1288 Note that the two above field replace the removed "metrics2"
1289 field in the glyph slot.
1292 This field is a vector that gives the transformed advance for
1293 the glyph. By default, it corresponds to the advance width,
1294 unless FT_LOAD_VERTICAL_LAYOUT was specified when calling
1295 FT_Load_Glyph or FT_Load_Char.
1298 This field gives the distance in integer pixels from the
1299 current pen position to the left-most pixel of a glyph image
1300 IF IT IS A BITMAP. It is only valid when the "format" field
1301 is set to "ft_glyph_format_bitmap", for example, after calling
1302 the new function FT_Render_Glyph.
1305 This field gives the distance in integer pixels from the
1306 current pen position (located on the baseline) to the top-most
1307 pixel of the glyph image IF IT IS A BITMAP. Positive values
1308 correspond to upwards Y.
1311 This is a new private field for the glyph slot. Client
1312 applications should not touch it.
1315 * Support for transforms and direct rendering in FT_Load_Glyph:
1317 Most of the functionality found in <freetype/ftglyph.h> has been
1318 moved to the core library. Hence, the following:
1320 - A transform can be specified for a face through
1321 FT_Set_Transform. this transform is applied by FT_Load_Glyph
1322 to scalable glyph images (i.e. NOT TO BITMAPS) before the
1323 function returns, unless the bit flag FT_LOAD_IGNORE_TRANSFORM
1324 was set in the load flags.
1326 - Once a glyph image has been loaded, it can be directly
1327 converted to a bitmap by using the new FT_Render_Glyph
1328 function. Note that this function takes the glyph image from
1329 the glyph slot, and converts it to a bitmap whose properties
1330 are returned in "face.glyph.bitmap", "face.glyph.bitmap_left"
1331 and "face.glyph.bitmap_top". The original native image might
1332 be lost after the conversion.
1334 - When using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph
1335 and FT_Load_Char functions will call FT_Render_Glyph
1336 automatically when needed.
1338 - Reformatted all modules source code in order to get rid of the
1339 basic data types redifinitions (i.e. "TT_Int" instead of "FT_Int",
1340 "T1_Fixed" instead of "FT_Fixed"). Hence the format-specific
1341 prefixes like "TT_", "T1_", "T2_" and "CID_" are only used for
1342 relevant structures.
1345 ======================================================================
1347 OLD CHANGES FOR BETA 7
1349 - bug-fixed the OpenType/CFF parser. It now loads and displays my
1350 two fonts nicely, but I'm pretty certain that more testing is
1353 - fixed the crummy Type 1 hinter, it now handles accented characters
1354 correctly (well, the accent is not always well placed, but that's
1357 - added the CID-keyed Type 1 driver in "src/cid". Works pretty well
1358 for only 13 Kb of code ;-) Doesn't read AFM files though, nor the
1359 really useful CMAP files..
1361 - fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks
1362 to Boris Letocha for spotting them and providing a fix..
1364 - fixed potential "divide by zero" bugs in ftcalc.c.. my god..
1366 - added source code for the OpenType/CFF driver (still incomplete
1369 - modified the SFNT driver slightly to perform more robust header
1370 checks in TT_Load_SFNT_Header. This prevents certain font files
1371 (e.g. some Type 1 Multiple Masters) from being incorrectly
1372 "recognized" as TrueType font files..
1374 - moved a lot of stuff from the TrueType driver to the SFNT module,
1375 this allows greater code re-use between font drivers
1376 (e.g. TrueType, OpenType, Compact-TrueType, etc..)
1378 - added a tiny segment cache to the SFNT Charmap 4 decoder, in order
1379 to minimally speed it up..
1381 - added support for Multiple Master fonts in "type1z". There is also
1382 a new file named <freetype/ftmm.h> which defines functions to
1383 manage them from client applications.
1385 The new file "src/base/ftmm.c" is also optional to the engine..
1387 - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) +
1388 small bug fixes in FT_Load_Glyph, the "type1" driver, etc..
1390 - a minor fix to the Type 1 driver to let them apply the font matrix
1391 correctly (used for many oblique fonts..)
1393 - some fixes for 64-bit systems (mainly changing some FT_TRACE calls
1394 to use %p instead of %lx).. Thanks to Karl Robillard
1396 - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) +
1397 added a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be
1398 cropped when loaded from a file (maybe I should move the bitmap
1399 cropper to the base layer ??).
1401 - changed the default number of gray levels of the smooth renderer
1402 to 256 (instead of the previous 128). Of course, the human eye
1403 can't see any difference ;-)
1405 - removed TT_MAX_SUBGLYPHS, there is no static limit on the number
1406 of subglyphs in a TrueType font now..
1409 ======================================================================
1411 OLD CHANGES 16 May 2000
1413 - tagged "BETA-6" in the CVS tree. This one is a serious release
1414 candidate even though it doesn't incorporate the auto-hinter yet..
1416 - various obsolete files were removed, and copyright header updated
1418 - finally updated the standard raster to fix the monochrome
1419 rendering bug + re-enable support for 5-gray levels anti-aliasing
1422 - created new header files, and modified sources accordingly:
1424 <freetype/fttypes.h>
1425 - simple FreeType types, without the API
1426 <freetype/internal/ftmemory.h>
1427 - definition of memory-management macros
1429 - added the "DSIG" (OpenType Digital Signature) tag to
1432 - light update/cleaning of the build system + changes to the sources
1433 in order to get rid of _all_ compiler warnings with three
1436 gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX" and
1439 IMPORTANT NOTE FOR WIN32-LCC USERS:
1441 | It seems the C pre-processor that comes with LCC is broken, it
1442 | doesn't recognize the ANSI standard directives # and ##
1443 | correctly when one of the argument is a macro. Also, something
1446 | #define F(x) print##x
1450 | will get incorrectly translated to:
1454 | by its pre-processor. For this reason, you simply cannot build
1455 | FreeType 2 in debug mode with this compiler..
1457 - yet another massive grunt work. I've changed the definition of the
1458 EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now
1459 take an argument, which is the function's return value type.
1461 This is necessary to compile FreeType as a DLL on Windows and
1462 OS/2. Depending on the compiler used, a compiler-specific keyword
1463 like __export or __system must be placed before (VisualC++) or
1464 after (BorlandC++) the type..
1466 Of course, this needed a lot of changes throughout the source code
1467 to make it compile again... All cleaned up now, apparently..
1469 Note also that there is a new EXPORT_VAR macro defined to allow
1470 the _declaration_ of an exportable public (constant)
1471 variable. This is the case of the raster interfaces (see
1472 ftraster.h and ftgrays.h), as well as each module's interface (see
1473 sfdriver.h, psdriver.h, etc..)
1475 - new feature: it is now possible to pass extra parameters to font
1476 drivers when creating a new face object. For now,
1477 this capability is unused. It could however prove to
1478 be useful in a near future..
1480 the FT_Open_Args structure was changes, as well as the internal
1481 driver interface (the specific "init_face" module function has
1482 now a different signature).
1484 - updated the tutorial (not finished though).
1486 - updated the top-level BUILD document
1488 - fixed a potential memory leak that could occur when loading
1491 - added the declaration of FT_New_Memory_Face in
1492 <freetype/freetype.h>, as it was missing from the public header
1493 (the implementation was already in "ftobjs.c").
1495 - the file <freetype/fterrors.h> has been seriously updated in order
1496 to allow the automatic generation of error message tables. See the
1497 comments within it for more information.
1499 - major directory hierarchy re-organisation. This was done for two
1502 * first, to ease the "manual" compilation of the library by
1503 requiring at lot less include paths :-)
1505 * second, to allow external programs to effectively access
1506 internal data fields. For example, this can be extremely
1507 useful if someone wants to write a font producer or a font
1508 manager on top of FreeType.
1510 Basically, you should now use the 'freetype/' prefix for header
1513 #include <freetype/freetype.h>
1514 #include <freetype/ftglyph.h>
1516 Some new include sub-directories are available:
1518 a. the "freetype/config" directory, contains two files used to
1519 configure the build of the library. Client applications should
1520 not need to look at these normally, but they can if they want.
1522 #include <freetype/config/ftoption.h>
1523 #include <freetype/config/ftconfig.h>
1525 b. the "freetype/internal" directory, contains header files that
1526 describes library internals. These are the header files that
1527 were previously found in the "src/base" and "src/shared"
1531 As usual, the build system and the demos have been updated to
1532 reflect the change..
1534 Here's a layout of the new directory hierarchy:
1563 Compiling a module is now much easier, for example, the following
1564 should work when in the TOP_DIR directory on an ANSI build:
1566 gcc -c -I./include -I./src/base src/base/ftbase.c
1567 gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c
1570 (of course, using -Iconfig/<system> if you provide system-specific
1571 configuration files).
1573 - updated the structure of FT_Outline_Funcs in order to allow direct
1574 coordinate scaling within the outline decomposition routine (this
1575 is important for virtual "on" points with TrueType outlines) +
1576 updates to the rasters to support this..
1578 - updated the OS/2 table loading code in "src/sfnt/ttload.c" in
1579 order to support version 2 of the table (see OpenType 1.2 spec)
1581 - created "include/tttables.h" and "include/t1tables.h" to allow
1582 client applications to access some of the SFNT and T1 tables of a
1583 face with a procedural interface (see FT_Get_Sfnt_Table()) +
1584 updates to internal source files to reflect the change..
1586 - some cleanups in the source code to get rid of warnings when
1587 compiling with the "-Wall -W -ansi -pedantic" options in gcc.
1589 - debugged and moved the smooth renderer to "src/base/ftgrays.c" and
1590 its header to "include/ftgrays.h"
1592 - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites
1593 with up to 80 sub-glyphs !! Thanks to Werner
1596 ======================================================================
1598 OLD CHANGES - 14-apr-2000
1600 - fixed a bug in the TrueType glyph loader that prevented the
1601 correct loading of some CJK glyphs in mingli.ttf
1603 - improved the standard Type 1 hinter in "src/type1"
1605 - fixed two bugs in the experimental Type 1 driver in "src/type1z"
1606 to handle the new XFree86 4.0 fonts (and a few other ones..)
1608 - the smooth renderer is now complete and supports sub-banding to
1609 render large glyphs at high speed. However, it is still located in
1610 "demos/src/ftgrays.c" and should move to the library itself in the
1611 next beta.. NOTE: The smooth renderer doesn't compile in
1612 stand-alone mode anymore, but this should be fixed RSN..
1614 - introduced convenience functions to more easily deal with glyph
1615 images, see "include/ftglyph.h" for more details, as well as the
1616 new demo program named "demos/src/ftstring.c" that demonstrates
1619 - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1
1620 drivers (this is required by the auto-hinter to improve its
1623 - changed the raster interface, in order to allow client
1624 applications to provide their own span-drawing callbacks. However,
1625 only the smooth renderer supports this. See "FT_Raster_Params" in
1626 the file "include/ftimage.h"
1628 - fixed a small bug in FT_MulFix that caused incorrect transform
1631 - Note: The tutorial is out-of-date, grumpf.. :-(
1634 ======================================================================
1636 OLD CHANGES - 12-mar-2000
1638 - changed the layout of configuration files : now, all ANSI
1639 configuration files are located in
1640 "freetype2/config". System-specific over-rides can be placed in
1641 "freetype2/config/<system>".
1643 - moved all configuration macros to "config/ftoption.h"
1645 - improvements in the Type 1 driver with AFM support
1647 - changed the fields in the FT_Outline structure : the old "flags"
1648 array is re-named "tags", while all ancient flags are encoded into
1649 a single unsigned int named "flags".
1651 - introduced new flags in FT_Outline.flags (see
1652 ft_outline_.... enums in "ftimage.h").
1654 - changed outline functions to "FT_Outline_<action>" syntax
1656 - added a smooth anti-alias renderer to the demonstration programs
1658 - added Mac graphics driver (thanks Just)
1660 - FT_Open_Face changed in order to received a pointer to a
1661 FT_Open_Args descriptor..
1663 - various cleanups, a few more API functions implemented (see
1669 ======================================================================
1671 OLD CHANGES - 22-feb-2000
1673 - introduced the "psnames" module. It is used to:
1675 o convert a Postscript glyph name into the equivalent Unicode
1676 character code (used by the Type 1 driver(s) to synthetize on
1677 the fly a Unicode charmap).
1679 o provide an interface to retrieve the Postscript names of the
1680 Macintosh, Adobe Standard & Adobe Expert character codes.
1681 (the Macintosh names are used by the SFNT-module postscript
1682 names support routines, while the other two tables are used by
1683 the Type 1 driver(s)).
1685 - introduced the "type1z" alternate Type 1 driver. This is a (still
1686 experimental) driver for the Type 1 format that will ultimately
1687 replace the one in "src/type1". It uses pattern matching to load
1688 data from the font, instead of a finite state analyzer. It works
1689 much better than the "old" driver with "broken" fonts. It is also
1690 much smaller (under 15 Kb).
1692 - the Type 1 drivers (both in "src/type1" and "src/type1z") are
1693 nearly complete. They both provide automatic Unicode charmap
1694 synthesis through the "psnames" module. No re-encoding vector is
1695 needed. (note that they still leak memory due to some code
1696 missing, and I'm getting lazy).
1698 Trivial AFM support has been added to read kerning information but
1699 wasn't exactly tested as it should ;-)
1701 - The TrueType glyph loader has been seriously rewritten (see the
1702 file "src/truetype/ttgload.c". It is now much, much simpler as
1703 well as easier to read, maintain and understand :-) Preliminary
1704 versions introduced a memory leak that has been reported by Jack
1705 Davis, and is now fixed..
1707 - introduced the new "ft_glyph_format_plotter", used to represent
1708 stroked outlines like Windows "Vector" fonts, and certain Type 1
1709 fonts like "Hershey". The corresponding raster will be written
1712 - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new
1713 interface that uses a structure to describe the input stream, the
1714 driver (if required), etc..
1719 - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
1721 - Add a function like FT_Load_Character( face, char_code, load_flags
1722 ) that would really embbed a call to FT_Get_Char_Index then
1723 FT_Load_Glyph to ease developer's work.
1725 - Update the tutorial!
1727 - consider adding support for Multiple Master fonts in the Type 1
1730 - Test the AFM routines of the Type 1 drivers to check that kerning
1731 information is returned correctly.
1733 - write a decent auto-gridding component !! We need this to release
1739 - add a CFF/Type2 driver
1741 - add a FNT/PCF/HBF driver
1742 - add a Speedo driver from the X11 sources
1745 ======================================================================
1747 OLDER CHANGES - 27-jan-2000
1749 - updated the "sfnt" module interface to allow several SFNT-based
1750 drivers to co-exist peacefully
1752 - updated the "T1_Face" type to better separate Postscript font
1753 content from the rest of the FT_Face structure. Might be used
1754 later by the CFF/Type2 driver..
1756 - added an experimental replacement Type 1 driver featuring advanced
1757 (and speedy) pattern matching to retrieve the data from postscript
1760 - very minor changes in the implementation of FT_Set_Char_Size and
1761 FT_Set_Pixel_Sizes (they now implement default to ligthen the font
1765 ======================================================================
1769 This file summarizes the changes that occured since the last "beta" of
1770 FreeType 2. Because the list is important, it has been divided into
1775 I High-Level Interface (easier !)
1776 II Directory Structure
1777 III Glyph Image Formats
1783 ----------------------------------------------------------------------
1785 High-Level Interface:
1787 The high-level API has been considerably simplified. Here is how:
1789 - resource objects have disappeared. this means that face objects
1790 can now be created with a single function call (see FT_New_Face
1793 - when calling either FT_New_Face & FT_Open_Face, a size object
1794 and a glyph slot object are automatically created for the face,
1795 and can be accessed through "face->glyph" and "face->size" if
1796 one really needs to. In most cases, there's no need to call
1797 FT_New_Size or FT_New_Glyph.
1799 - similarly, FT_Load_Glyph now only takes a "face" argument
1800 (instead of a glyph slot and a size). Also, it's "result"
1801 parameter is gone, as the glyph image type is returned in the
1802 field "face->glyph.format"
1804 - the list of available charmaps is directly accessible through
1805 "face->charmaps", counting "face->num_charmaps" elements. Each
1806 charmap has an 'encoding' field which specifies which known
1807 encoding it deals with. Valid values are, for example :
1809 ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
1810 ft_encoding_apple_roman
1812 ft_encoding_adobe_standard
1813 ft_encoding_adobe_expert
1815 other values may be added in the future. Each charmap still
1816 holds its "platform_id" and "encoding_id" values in case the
1817 encoding is too exotic for the current library
1820 ----------------------------------------------------------------------
1822 Directory Structure:
1824 Should seem obvious to most of you:
1827 config/ -- configuration sub-makefiles
1829 unix/ -- platform-specific configuration files
1834 include/ -- public header files, those to be included
1835 directly by client apps
1837 src/ -- sources of the library
1838 base/ -- the base layer
1839 sfnt/ -- the sfnt "driver" (see the drivers section
1841 truetype/ -- the truetype driver
1842 type1/ -- the type1 driver
1843 shared/ -- some header files shared between drivers
1845 demos/ -- demos/tools
1847 docs/ -- documentation (a bit empty for now)
1850 ----------------------------------------------------------------------
1852 Glyph Image Formats:
1854 Drivers are now able to register new glyph image formats within the
1855 library. For now, the base layer supports of course bitmaps and
1856 vector outlines, but one could imagine something different like
1857 colored bitmaps, bi-color vectors or wathever else (Metafonts anyone
1860 See the file `include/ftimage.h'. Note also that the type
1861 FT_Raster_Map is gone, and is now replaced by FT_Bitmap, which
1862 should encompass all known bitmap types.
1864 Each new image format must provide at least one "raster", i.e. a
1865 module capable of transforming the glyph image into a bitmap. It's
1866 also possible to change the default raster used for a given glyph
1869 The default outline scan-converter now uses 128 levels of grays by
1870 default, which tends to smooth many things. Note that the demo
1871 programs have been updated significantly in order to display these..
1874 ----------------------------------------------------------------------
1878 You still need GNU Make to build the library. The build system has
1879 been very seriously re-vamped in order to provide things like :
1881 - automatic host platform detection (reverting to 'config/ansi' if
1882 it is not detected, with pseudo-standard compilation flags)
1884 - the ability to compile from the Makefiles with very different and
1885 exotic compilers. Note that linking the library can be difficult
1888 For example, the file `config/win32/lcclib.bat' is invoked by the
1889 build system to create the ".lib" file with LCC-Win32 because its
1890 librarian has too many flaws to be invoked directly from the
1893 Here's how it works:
1895 - the first time you type `make', the build system runs a series of
1896 sub-makefiles in order to detect your host platform. It then dumps
1897 what it found, and creates a file called `config.mk' in the
1898 current directory. This is a sub-Makefile used to define many
1899 important Make variables used to build the library.
1901 - the second time, the build system detects the `config.mk' then use
1902 it to build the library. All object files go into 'obj' by
1903 default, as well as the library file, but this can easily be
1906 Note that you can run "make setup" to force another host platform
1907 detection even if a `config.mk' is present in the current
1908 directory. Another solution is simply to delete the file, then
1911 Finally, the default compiler for all platforms is gcc (for now,
1912 this will hopefully changed in the future). You can however specify
1913 a different compiler by specifying it after the 'setup' target as
1916 gnumake setup lcc on Win32 to use the LCC compiler
1917 gnumake setup visualc on Win32 to use Visual C++
1919 See the file `config/<system>/detect.mk' for a list of supported
1920 compilers for your platforms.
1922 It should be relatively easy to write new detection rules files and
1925 Finally, to build the demo programs, go to `demos' and launch GNU
1926 Make, it will use the `config.mk' in the top directory to build the
1930 ----------------------------------------------------------------------
1934 In the previous beta, a single FT_System object was used to
1935 encompass all low-level operations like thread synchronisation,
1936 memory management and i/o access. This has been greatly simplified:
1938 - thread synchronisation has been dropped, for the simple reason
1939 that the library is already re-entrant, and that if you really
1940 need two threads accessing the same FT_Library, you should
1941 really synchronize access to it yourself with a simple mutex.
1943 - memory management is performed through a very simple object
1944 called "FT_Memory", which really is a table containing a table
1945 of pointers to functions like malloc, realloc and free as well
1946 as some user data (closure).
1948 - resources have disappeared (they created more problems than they
1949 solved), and i/o management have been simplified greatly as a
1950 result. Streams are defined through FT_Stream objects, which can
1951 be either memory-based or disk-based.
1953 Note that each face has its own stream, which is closed only
1954 when the face object is destroyed. Hence, a function like
1955 TT_Flush_Face in 1.x cannot be directly supported. However, if
1956 you really need something like this, you can easily tailor your
1957 own streams to achieve the same feature at a lower level (and
1958 use FT_Open_Face instead of FT_New_Face to create the face).
1960 See the file "include/ftsystem.h" for more details, as well as the
1961 implementations found in "config/unix" and "config/ansi".
1964 ----------------------------------------------------------------------
1968 The Font Driver interface has been modified in order to support
1969 extensions & versioning.
1972 The list of the font drivers that are statically linked to the
1973 library at compile time is managed through a new configuration file
1974 called `config/<platform>/ftmodule.h'.
1976 This file is autogenerated when invoking `make modules'. This target
1977 will parse all sub-directories of 'src', looking for a "module.mk"
1978 rules file, used to describe the driver to the build system.
1980 Hence, one should call `make modules' each time a font driver is
1981 added or removed from the `src' directory.
1983 Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
1984 driver doesn't support font files directly, but provides services
1985 used by all TrueType-like font drivers. Hence, its code is shared
1986 between the TrueType & OpenType font formats, and possibly more
1987 formats to come if we're lucky..
1990 ----------------------------------------------------------------------
1994 The extensions support is inspired by the one found in 1.x.
1996 Now, each font driver has its own "extension registry", which lists
1997 which extensions are available for the font faces managed by the
2000 Extension ids are now strings, rather than 4-byte tags, as this is
2001 usually more readable..
2004 - some data, associated to each face object
2005 - an interface (table of function pointers)
2007 An extension that is format-specific should simply register itself
2008 to the correct font driver. Here is some example code:
2010 // Registering an extensions
2012 FT_Error FT_Init_XXXX_Extension( FT_Library library )
2014 FT_DriverInterface* tt_driver;
2016 driver = FT_Get_Driver( library, "truetype" );
2017 if (!driver) return FT_Err_Unimplemented_Feature;
2019 return FT_Register_Extension( driver, &extension_class );
2023 // Implementing the extensions
2025 FT_Error FT_Proceed_Extension_XXX( FT_Face face )
2027 FT_XXX_Extension ext;
2028 FT_XXX_Extension_Interface ext_interface;
2030 ext = FT_Get_Extension( face, "extensionid", &ext_interface );
2031 if (!ext) return error;
2033 return ext_interface->do_it(ext);
2036 --- end of CHANGES ---