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