David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 1 | LATEST CHANGES |
| 2 | |
David Turner | a39acf5 | 2000-08-23 02:47:57 +0000 | [diff] [blame] | 3 | - updated "docs/docmaker.py", a draft API reference is available at |
| 4 | http://www.freetype.org/ft2api.html |
| 5 | |
| 6 | - changed "type1z" to use "psaux" |
| 7 | |
| 8 | - created a new module named "psaux" to hold the Type 1 & Type 2 parsing |
| 9 | routines. It should be used by "type1z", "cid" and "cff" in the future |
| 10 | |
| 11 | - fixed an important bug in "FT_Glyph_Get_CBox" |
| 12 | |
David Turner | b169341 | 2000-07-27 21:48:48 +0000 | [diff] [blame] | 13 | - fixed some compiler warnings that happened since the TrueType |
| 14 | bytecode decoder was deactivated by default.. |
| 15 | |
David Turner | c5cdf8b | 2000-07-27 21:40:22 +0000 | [diff] [blame] | 16 | - fixed two memory leaks: |
| 17 | - the memory manager (16 bytes) isn't released in FT_Done_FreeType !! |
| 18 | |
| 19 | - using custom input streams, the copy of the original stream |
| 20 | was never released |
| 21 | |
| 22 | - fixed the auto-hinter by performing automatic computation of the |
| 23 | "filling direction" of each glyph. This is done through a simple and |
| 24 | fast approximation, and seems to work (problems spotted by Werner |
| 25 | though). The Arphic fonts are a lot nicer though there are still a |
| 26 | lot of things to do to handle Asian fonts correctly.. |
| 27 | |
| 28 | =========================================================================== |
| 29 | BETA-8 (RELEASE CANDIDATE) CHANGES |
| 30 | |
David Turner | 5f5b446 | 2000-07-26 19:13:51 +0000 | [diff] [blame] | 31 | - deactivated the trueType bytecode interpreter by default |
| 32 | |
| 33 | - deactivated the "src/type1" font driver. Now "src/type1z" is |
| 34 | used by default.. |
| 35 | |
David Turner | 5fe4c00 | 2000-07-26 19:04:08 +0000 | [diff] [blame] | 36 | - updates to the build system. We now compile the library correctly |
| 37 | under Unix system through "configure" which is automatically called |
| 38 | on the first "make" invocation. |
| 39 | |
| 40 | - added the auto-hinting module !!. Fixing some bugs here and there.. |
| 41 | |
David Turner | 49bd4f0 | 2000-07-12 16:57:37 +0000 | [diff] [blame] | 42 | - found some bugs in the composite loader (seac) of the Type1-based |
| 43 | font drivers.. |
| 44 | |
| 45 | - renamed the directory "freetype2/config" to "freetype2/builds" and |
David Turner | 1ca6f2d | 2000-07-08 00:49:43 +0000 | [diff] [blame] | 46 | updated all relevant files.. |
| 47 | |
David Turner | 9b3d1c7 | 2000-07-07 19:47:34 +0000 | [diff] [blame] | 48 | - found a memory leak in the "type1" driver |
| 49 | |
| 50 | - incorporated Tom's patches to support flex operators correctly |
| 51 | in OpenType/CFF fonts.. Now all I need is to support pure CFF |
| 52 | and CEF fonts to be done with this driver.. :-) |
| 53 | |
| 54 | - added the Windows FNT/FON driver in "src/winfonts". For now, |
| 55 | it always "simulates" a Unicode charmap, so it shouldn't be |
| 56 | considered completed right now.. |
| 57 | |
| 58 | It's there to be more a proof of concept than anything else |
| 59 | anyway. The driver is a single C source file, that compiles |
| 60 | to 3 Kb of code.. |
| 61 | |
| 62 | I'm still working on the PCF/BDF drivers.. but I'm too lazy |
| 63 | to finish them now.. |
| 64 | |
| 65 | |
David Turner | c06aba2 | 2000-06-30 23:38:23 +0000 | [diff] [blame] | 66 | - CHANGES TO THE HIGH-LEVEL API |
| 67 | |
| 68 | o FT_Get_Kerning has a new parameter that allows you to select |
| 69 | the coordinates of the kerning vector ( font units, scaled, |
| 70 | scaled + grid-fitted ). |
| 71 | |
| 72 | o the outline functions are now in <freetype/ftoutln.h> and not |
| 73 | part of <freetype/freetype.h> anymore |
| 74 | |
| 75 | o <freetype/ftmodule.h> now contains declarations for |
| 76 | FT_New_Library, FT_Done_Library, FT_Add_Default_Modules |
| 77 | |
| 78 | o the so-called convenience functions have moved from "ftoutln.c" |
| 79 | to "ftglyph.c", and are thus available with this optional component |
| 80 | of the library. They are declared in <freetype/ftglyph.h> now.. |
| 81 | |
| 82 | o anti-aliased rendering is now the default for FT_Render_Glyph |
| 83 | (i.e. corresponds to render_mode == 0 == ft_render_mode_normal). |
| 84 | To generate a monochrome bitmap, use ft_render_mode_mono, or the |
| 85 | FT_LOAD_MONOCHROME flag in FT_Load_Glyph/FT_Load_Char. |
| 86 | |
| 87 | FT_LOAD_ANTI_ALIAS is still defined, but values to 0. |
| 88 | |
| 89 | o <freetype/freetype.h> now include <freetype/config/ftconfig.h>, |
| 90 | solving a few headaches :-) |
| 91 | |
| 92 | o the type FT_GlyphSlotRec has now a "library" field. |
| 93 | |
| 94 | |
| 95 | |
| 96 | - CHANGES TO THE "ftglyph.h" API |
| 97 | |
| 98 | This API has been severely modified in order to make it simpler, |
| 99 | clearer, and more efficient. It certainly now looks like a real |
| 100 | "glyph factory" object, and allows client applications to manage |
| 101 | (i.e. transform, bbox and render) glyph images without ever knowing |
| 102 | their original format. |
| 103 | |
David Turner | 9825861 | 2000-06-28 20:43:07 +0000 | [diff] [blame] | 104 | - added support for CID-keyed fonts to the CFF driver. |
| 105 | maybe support for pure CFF + CEF fonts should come in ?? |
David Turner | 9d636b6 | 2000-06-27 23:32:27 +0000 | [diff] [blame] | 106 | |
| 107 | |
| 108 | - cleaned up source code in order to avoid two functions with the |
| 109 | same name. Also changed the names of the files in "type1z" from |
| 110 | "t1XXXX" to "z1XXXX" in order to avoid any conflicts. |
| 111 | |
| 112 | "make multi" now works well :-) |
| 113 | |
David Turner | 81bb4ad | 2000-06-28 04:19:49 +0000 | [diff] [blame] | 114 | Also removed the use of "cidafm" for now, even if the source files |
| 115 | are still there. This functionality will certainly go into a specific |
| 116 | module.. |
David Turner | c06aba2 | 2000-06-30 23:38:23 +0000 | [diff] [blame] | 117 | |
| 118 | |
| 119 | |
| 120 | - ADDED SUPPORT FOR THE AUTO-HINTER |
| 121 | |
| 122 | It works :-) I have a demo program which simply is a copy of "ftview" |
| 123 | that does a FT_Add_Module( library, &autohinter_module_class ) after |
| 124 | library initialisation, and Type 1 & OpenType/CFF fonts are now hinted. |
| 125 | |
| 126 | CID fonts are not hinted, as they include no charmap and the auto-hinter |
| 127 | doesn't include "generic" global metrics computations yet.. |
| 128 | |
| 129 | Now, I need to release this thing to the FreeType 2 source.. |
| 130 | |
| 131 | |
| 132 | |
David Turner | 9d636b6 | 2000-06-27 23:32:27 +0000 | [diff] [blame] | 133 | |
| 134 | |
| 135 | - CHANGES TO THE RENDERER MODULES |
| 136 | |
| 137 | the monochrome and smooth renderers are now in two distinct directories, |
| 138 | namely "src/raster1" and "src/smooth". Note that the old "src/renderer" |
| 139 | is now gone.. |
| 140 | |
| 141 | I ditched the 5-gray-levels renderers. Basically, it involved a simple |
| 142 | #define toggle in 'src/raster1/ftraster.c' |
| 143 | |
| 144 | FT_Render_Glyph, FT_Outline_Render & FT_Outline_Get_Bitmap now select |
| 145 | the best renderer available, depending on render mode. If the current |
| 146 | renderer for a given glyph image format isn't capable of supporting |
| 147 | the render mode, another one will be found in the library's list. |
| 148 | |
| 149 | This means that client applications do not need to switch or set the |
| 150 | renderers themselves (as in the latest change), they'll get what they |
| 151 | want automatically... At last.. |
| 152 | |
| 153 | Changed the demo programs accordingly.. |
| 154 | |
| 155 | |
| 156 | |
David Turner | f0df85b | 2000-06-22 00:17:42 +0000 | [diff] [blame] | 157 | - MAJOR INTERNAL REDESIGN: |
| 158 | |
| 159 | A lot of internal modifications have been performed lately on the |
| 160 | source in order to provide the following enhancements: |
| 161 | |
| 162 | - more generic module support: |
| 163 | |
| 164 | The FT_Module type is now defined to represent a handle to a given |
| 165 | module. The file <freetype/ftmodule.h> contains the FT_Module_Class |
| 166 | definition, as well as the module-loading public API |
| 167 | |
| 168 | The FT_Driver type is still defined, and still represents a pointer |
| 169 | to a font driver. Note that FT_Add_Driver is replaced by FT_Add_Module, |
| 170 | FT_Get_Driver by FT_Get_Module, etc.. |
| 171 | |
| 172 | |
| 173 | - support for generic glyph image types: |
| 174 | |
| 175 | The FT_Renderer type is a pointer to a module used to perform various |
| 176 | operations on glyph image. |
| 177 | |
| 178 | Each renderer is capable of handling images in a single format |
| 179 | (e.g. ft_glyph_format_outline). Its functions are used to: |
| 180 | |
| 181 | - transform an glyph image |
| 182 | - render a glyph image into a bitmap |
| 183 | - return the control box (dimensions) of a given glyph image |
| 184 | |
| 185 | |
| 186 | The scan converters "ftraster.c" and "ftgrays.c" have been moved |
| 187 | to the new directory "src/renderer", and are used to provide two |
| 188 | default renderer modules. |
| 189 | |
| 190 | One corresponds to the "standard" scan-converter, the other to the |
| 191 | "smooth" one. |
| 192 | |
| 193 | The current renderer can be set through the new function |
| 194 | FT_Set_Renderer. |
| 195 | |
| 196 | The old raster-related function FT_Set_Raster, FT_Get_Raster and |
| 197 | FT_Set_Raster_Mode have now disappeared, in favor of the new: |
| 198 | |
| 199 | FT_Get_Renderer |
| 200 | FT_Set_Renderer |
| 201 | |
| 202 | see the file <freetype/ftrender.h> for more details.. |
| 203 | |
| 204 | These changes were necessary to properly support different scalable |
| 205 | formats in the future, like bi-color glyphs, etc.. |
| 206 | |
| 207 | |
| 208 | - glyph loader object: |
| 209 | |
| 210 | A new internal object, called a 'glyph loader' has been introduced |
| 211 | in the base layer. It is used by all scalable format font drivers |
| 212 | to load glyphs and composites. |
| 213 | |
| 214 | This object has been created to reduce the code size of each driver, |
| 215 | as each one of them basically re-implemented its functionality. |
| 216 | |
| 217 | See <freetype/internal/ftobjs.h> and the FT_GlyphLoader type for |
| 218 | more information.. |
| 219 | |
| 220 | |
| 221 | |
| 222 | - FT_GlyphSlot had new fields: |
| 223 | |
| 224 | In order to support extended features (see below), the FT_GlyphSlot |
| 225 | structure has a few new fields: |
| 226 | |
| 227 | linearHoriAdvance: this field gives the linearly scaled (i.e. |
| 228 | scaled but unhinted) advance width for the glyph, |
| 229 | expressed as a 16.16 fixed pixel value. This |
| 230 | is useful to perform WYSIWYG text. |
| 231 | |
| 232 | linearVertAdvance: this field gives the linearly scaled advance |
| 233 | height for the glyph (relevant in vertical glyph |
| 234 | layouts only). This is useful to perform |
| 235 | WYSIWYG text. |
| 236 | |
| 237 | Note that the two above field replace the removed "metrics2" field |
| 238 | in the glyph slot. |
| 239 | |
| 240 | advance: this field is a vector that gives the transformed |
| 241 | advance for the glyph. By default, it corresponds |
| 242 | to the advance width, unless FT_LOAD_VERTICAL_LAYOUT |
| 243 | was specified when calling FT_Load_Glyph or FT_Load_Char |
| 244 | |
| 245 | bitmap_left: this field gives the distance in integer pixels from |
| 246 | the current pen position to the left-most pixel of |
| 247 | a glyph image WHEN IT IS A BITMAP. It is only valid |
| 248 | when the "format" field is set to |
| 249 | "ft_glyph_format_bitmap", for example, after calling |
| 250 | the new function FT_Render_Glyph. |
| 251 | |
| 252 | bitmap_top: this field gives the distance in integer pixels from |
| 253 | the current pen position (located on the baseline) to |
| 254 | the top-most pixel of the glyph image WHEN IT IS A |
| 255 | BITMAP. Positive values correspond to upwards Y. |
| 256 | |
| 257 | loader: this is a new private field for the glyph slot. Client |
| 258 | applications should not touch it.. |
| 259 | |
| 260 | |
| 261 | - support for transforms and direct rendering in FT_Load_Glyph: |
| 262 | |
| 263 | Most of the functionality found in <freetype/ftglyph.h> has been |
| 264 | moved to the core library. Hence, the following: |
| 265 | |
| 266 | - a transform can be specified for a face through FT_Set_Transform. |
| 267 | this transform is applied by FT_Load_Glyph to scalable glyph images |
| 268 | (i.e. NOT TO BITMAPS) before the function returns, unless the |
| 269 | bit flag FT_LOAD_IGNORE_TRANSFORM was set in the load flags.. |
| 270 | |
| 271 | |
| 272 | - once a glyph image has been loaded, it can be directly converted to |
| 273 | a bitmap by using the new FT_Render_Glyph function. Note that this |
| 274 | function takes the glyph image from the glyph slot, and converts |
| 275 | it to a bitmap whose properties are returned in "face.glyph.bitmap", |
| 276 | "face.glyph.bitmap_left" and "face.glyph.bitmap_top". The original |
| 277 | native image might be lost after the conversion. |
| 278 | |
| 279 | |
| 280 | - when using the new bit flag FT_LOAD_RENDER, the FT_Load_Glyph |
| 281 | and FT_Load_Char functions will call FT_Render_Glyph automatically |
| 282 | when needed. |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
David Turner | f9b8dec | 2000-06-16 19:34:52 +0000 | [diff] [blame] | 287 | - reformated all modules source code in order to get rid of the basic |
| 288 | data types redifinitions (i.e. "TT_Int" instead of "FT_Int", "T1_Fixed" |
| 289 | instead of "FT_Fixed"). Hence the format-specific prefixes like "TT_", |
| 290 | "T1_", "T2_" and "CID_" are only used for relevant structures.. |
| 291 | |
| 292 | ============================================================================ |
| 293 | OLD CHANGES FOR BETA 7 |
David Turner | 3475e7f | 2000-05-17 20:56:01 +0000 | [diff] [blame] | 294 | |
David Turner | 2b9be99 | 2000-06-07 23:41:17 +0000 | [diff] [blame] | 295 | - bug-fixed the OpenType/CFF parser. It now loads and displays my two |
| 296 | fonts nicely, but I'm pretty certain that more testing is needed :-) |
| 297 | |
| 298 | - fixed the crummy Type 1 hinter, it now handles accented characters |
| 299 | correctly (well, the accent is not always well placed, but that's |
| 300 | another problem..) |
| 301 | |
David Turner | 04aa800 | 2000-06-01 03:27:48 +0000 | [diff] [blame] | 302 | - added the CID-keyed Type 1 driver in "src/cid". Works pretty well for |
| 303 | only 13 Kb of code ;-) Doesn't read AFM files though, nor the really |
| 304 | useful CMAP files.. |
| 305 | |
| 306 | - fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks to |
| 307 | Boris Letocha for spotting them and providing a fix.. |
| 308 | |
David Turner | 4f99c3c | 2000-05-29 20:55:13 +0000 | [diff] [blame] | 309 | - fixed potential "divide by zero" bugs in ftcalc.c.. my god.. |
| 310 | |
| 311 | - added source code for the OpenType/CFF driver (still incomplete though..) |
| 312 | |
| 313 | - modified the SFNT driver slightly to perform more robust header |
| 314 | checks in TT_Load_SFNT_Header. This prevents certain font files |
| 315 | (e.g. some Type 1 Multiple Masters) from being incorrectly "recognized" |
| 316 | as TrueType font files.. |
| 317 | |
David Turner | 2e42131 | 2000-05-26 22:13:17 +0000 | [diff] [blame] | 318 | - moved a lot of stuff from the TrueType driver to the SFNT module, |
| 319 | this allows greater code re-use between font drivers (e.g. TrueType, |
| 320 | OpenType, Compact-TrueType, etc..) |
| 321 | |
| 322 | - added a tiny segment cache to the SFNT Charmap 4 decoder, in order |
| 323 | to minimally speed it up.. |
| 324 | |
David Turner | 1118720 | 2000-05-26 17:13:23 +0000 | [diff] [blame] | 325 | - added support for Multiple Master fonts in "type1z". There is also |
| 326 | a new file named <freetype/ftmm.h> which defines functions to |
| 327 | manage them from client applications. |
| 328 | |
| 329 | The new file "src/base/ftmm.c" is also optional to the engine.. |
| 330 | |
| 331 | - various formatting changes (e.g. EXPORT_DEF -> FT_EXPORT_DEF) + |
| 332 | small bug fixes in FT_Load_Glyph, the "type1" driver, etc.. |
| 333 | |
David Turner | f5dcdd5 | 2000-05-23 22:16:27 +0000 | [diff] [blame] | 334 | - a minor fix to the Type 1 driver to let them apply the font matrix |
| 335 | correctly (used for many oblique fonts..) |
| 336 | |
David Turner | 51179f0 | 2000-05-18 16:18:05 +0000 | [diff] [blame] | 337 | - some fixes for 64-bit systems (mainly changing some FT_TRACE calls |
| 338 | to use %p instead of %lx).. Thanks to Karl Robillard |
| 339 | |
David Turner | 109fcf6 | 2000-05-17 23:35:37 +0000 | [diff] [blame] | 340 | - fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) + added |
| 341 | a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be cropped when |
| 342 | loaded from a file (maybe I should move the bitmap cropper to the |
| 343 | base layer ??). |
| 344 | |
David Turner | 3475e7f | 2000-05-17 20:56:01 +0000 | [diff] [blame] | 345 | - changed the default number of gray levels of the smooth renderer to |
| 346 | 256 (instead of the previous 128). Of course, the human eye can't |
| 347 | see any difference ;-) |
| 348 | |
| 349 | - removed TT_MAX_SUBGLYPHS, there is no static limit on the number of |
| 350 | subglyphs in a TrueType font now.. |
| 351 | |
| 352 | ============================================================================= |
| 353 | OLD CHANGES 16 May 2000 |
David Turner | efce08d | 2000-05-11 18:23:52 +0000 | [diff] [blame] | 354 | |
David Turner | 968f0c3 | 2000-05-16 23:26:01 +0000 | [diff] [blame] | 355 | - tagged "BETA-6" in the CVS tree. This one is a serious release candidate |
| 356 | even though it doesn't incorporate the auto-hinter yet.. |
| 357 | |
| 358 | - various obsolete files were removed, and copyright header updated |
| 359 | |
| 360 | - finally updated the standard raster to fix the monochrome rendering bug |
| 361 | + re-enable support for 5-gray levels anti-aliasing (suck, suck..) |
| 362 | |
| 363 | - created new header files, and modified sources accordingly: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 364 | |
David Turner | 968f0c3 | 2000-05-16 23:26:01 +0000 | [diff] [blame] | 365 | <freetype/fttypes.h> - simple FreeType types, without the API |
| 366 | <freetype/internal/ftmemory.h> - definition of memory-management macros |
| 367 | |
| 368 | - added the "DSIG" (OpenType Digital Signature) tag to <freetype/tttags.h> |
| 369 | |
David Turner | c30aea9 | 2000-05-12 15:01:18 +0000 | [diff] [blame] | 370 | - light update/cleaning of the build system + changes to the sources in |
| 371 | order to get rid of _all_ compiler warnings with three compilers, i.e: |
| 372 | |
| 373 | gcc with "-ansi -pedantic -Wall -W", Visual C++ with "/W3 /WX" |
| 374 | and LCC |
| 375 | |
| 376 | IMPORTANT NOTE FOR WIN32-LCC USERS: |
| 377 | | |
| 378 | | It seems the C pre-processor that comes with LCC is broken, it |
| 379 | | doesn't recognize the ANSI standard directives # and ## correctly |
| 380 | | when one of the argument is a macro. Also, something like: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 381 | | |
David Turner | c30aea9 | 2000-05-12 15:01:18 +0000 | [diff] [blame] | 382 | | #define F(x) print##x |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 383 | | |
David Turner | c30aea9 | 2000-05-12 15:01:18 +0000 | [diff] [blame] | 384 | | F(("hello")) |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 385 | | |
David Turner | c30aea9 | 2000-05-12 15:01:18 +0000 | [diff] [blame] | 386 | | will get incorrectly translated to: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 387 | | |
David Turner | c30aea9 | 2000-05-12 15:01:18 +0000 | [diff] [blame] | 388 | | print "hello") |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 389 | | |
David Turner | c30aea9 | 2000-05-12 15:01:18 +0000 | [diff] [blame] | 390 | | by its pre-processor. For this reason, you simply cannot build |
| 391 | | FreeType 2 in debug mode with this compiler.. |
| 392 | |
| 393 | |
David Turner | bfe2f98 | 2000-05-12 12:17:15 +0000 | [diff] [blame] | 394 | - yet another massive grunt work. I've changed the definition of the |
| 395 | EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now take |
| 396 | an argument, which is the function's return value type. |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 397 | |
David Turner | bfe2f98 | 2000-05-12 12:17:15 +0000 | [diff] [blame] | 398 | This is necessary to compile FreeType as a DLL on Windows and OS/2. |
| 399 | Depending on the compiler used, a compiler-specific keyword like __export |
| 400 | or __system must be placed before (VisualC++) or after (BorlandC++) |
| 401 | the type.. |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 402 | |
David Turner | bfe2f98 | 2000-05-12 12:17:15 +0000 | [diff] [blame] | 403 | Of course, this needed a lot of changes throughout the source code |
| 404 | to make it compile again... All cleaned up now, apparently.. |
| 405 | |
| 406 | Note also that there is a new EXPORT_VAR macro defined to allow the |
| 407 | _declaration_ of an exportable public (constant) variable. This is the |
| 408 | case of the raster interfaces (see ftraster.h and ftgrays.h), as well |
| 409 | as each module's interface (see sfdriver.h, psdriver.h, etc..) |
| 410 | |
| 411 | - new feature: it is now possible to pass extra parameters to font |
| 412 | drivers when creating a new face object. For now, this |
| 413 | capability is unused. It could however prove to be useful |
| 414 | in a near future.. |
| 415 | |
| 416 | the FT_Open_Args structure was changes, as well as the internal |
| 417 | driver interface (the specific "init_face" module function has now |
| 418 | a different signature). |
| 419 | |
| 420 | - updated the tutorial (not finished though). |
David Turner | c30aea9 | 2000-05-12 15:01:18 +0000 | [diff] [blame] | 421 | - updated the top-level BUILD document |
David Turner | bfe2f98 | 2000-05-12 12:17:15 +0000 | [diff] [blame] | 422 | |
David Turner | c60c61c | 2000-05-12 15:26:58 +0000 | [diff] [blame] | 423 | - fixed a potential memory leak that could occur when loading embedded |
| 424 | bitmaps. |
| 425 | |
David Turner | bfe2f98 | 2000-05-12 12:17:15 +0000 | [diff] [blame] | 426 | - added the declaration of FT_New_Memory_Face in <freetype/freetype.h>, as |
| 427 | it was missing from the public header (the implementation was already |
| 428 | in "ftobjs.c"). |
| 429 | |
| 430 | - the file <freetype/fterrors.h> has been seriously updated in order to |
| 431 | allow the automatic generation of error message tables. See the comments |
| 432 | within it for more information. |
| 433 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 434 | - major directory hierarchy re-organisation. This was done for two things: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 435 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 436 | * first, to ease the "manual" compilation of the library by requiring |
| 437 | at lot less include paths :-) |
David Turner | bfe2f98 | 2000-05-12 12:17:15 +0000 | [diff] [blame] | 438 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 439 | * second, to allow external programs to effectively access internal |
| 440 | data fields. For example, this can be extremely useful if someone |
| 441 | wants to write a font producer or a font manager on top of FreeType. |
| 442 | |
| 443 | Basically, you should now use the 'freetype/' prefix for header inclusion, |
| 444 | as in: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 445 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 446 | #include <freetype/freetype.h> |
| 447 | #include <freetype/ftglyph.h> |
| 448 | |
| 449 | Some new include sub-directories are available: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 450 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 451 | a. the "freetype/config" directory, contains two files used to |
| 452 | configure the build of the library. Client applications should |
| 453 | 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] | 454 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 455 | #include <freetype/config/ftoption.h> |
| 456 | #include <freetype/config/ftconfig.h> |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 457 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 458 | b. the "freetype/internal" directory, contains header files that |
| 459 | describes library internals. These are the header files that were |
| 460 | previously found in the "src/base" and "src/shared" directories. |
| 461 | |
| 462 | |
| 463 | As usual, the build system and the demos have been updated to reflect |
| 464 | the change.. |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 465 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 466 | Here's a layout of the new directory hierarchy: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 467 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 468 | TOP |
| 469 | include/ |
| 470 | freetype/ |
| 471 | freetype.h |
| 472 | ... |
| 473 | config/ |
| 474 | ftoption.h |
| 475 | ftconfig.h |
| 476 | ftmodule.h |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 477 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 478 | internal/ |
| 479 | ftobjs.h |
| 480 | ftstream.h |
| 481 | ftcalc.h |
| 482 | ... |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 483 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 484 | src/ |
| 485 | base/ |
| 486 | ... |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 487 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 488 | sfnt/ |
| 489 | psnames/ |
| 490 | truetype/ |
| 491 | type1/ |
| 492 | type1z/ |
| 493 | |
| 494 | |
| 495 | Compiling a module is now much easier, for example, the following should |
David Turner | 968f0c3 | 2000-05-16 23:26:01 +0000 | [diff] [blame] | 496 | work when in the TOP directory on an ANSI build: |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 497 | |
David Turner | a9c251c | 2000-05-11 18:36:19 +0000 | [diff] [blame] | 498 | gcc -c -I./include -I./src/base src/base/ftbase.c |
| 499 | gcc -c -I./include -I./src/sfnt src/sfnt/sfnt.c |
| 500 | etc.. |
| 501 | |
| 502 | (of course, using -Iconfig/<system> if you provide system-specific |
| 503 | configuration files). |
David Turner | efce08d | 2000-05-11 18:23:52 +0000 | [diff] [blame] | 504 | |
| 505 | |
| 506 | - updated the structure of FT_Outline_Funcs in order to allow |
| 507 | direct coordinate scaling within the outline decomposition routine |
| 508 | (this is important for virtual "on" points with TrueType outlines) |
| 509 | + updates to the rasters to support this.. |
| 510 | |
| 511 | - updated the OS/2 table loading code in "src/sfnt/ttload.c" in order |
| 512 | to support version 2 of the table (see OpenType 1.2 spec) |
| 513 | |
| 514 | - created "include/tttables.h" and "include/t1tables.h" to allow |
| 515 | client applications to access some of the SFNT and T1 tables of a |
| 516 | face with a procedural interface (see FT_Get_Sfnt_Table()) |
| 517 | + updates to internal source files to reflect the change.. |
| 518 | |
| 519 | - some cleanups in the source code to get rid of warnings when compiling |
| 520 | with the "-Wall -W -ansi -pedantic" options in gcc. |
| 521 | |
| 522 | - debugged and moved the smooth renderer to "src/base/ftgrays.c" and |
| 523 | its header to "include/ftgrays.h" |
| 524 | |
| 525 | - updated TT_MAX_SUBGLYPHS to 96 as some CJK fonts have composites with |
| 526 | up to 80 sub-glyphs !! Thanks to Werner |
| 527 | |
| 528 | ================================================================================ |
| 529 | OLD CHANGES - 14-apr-2000 |
David Turner | 77054f2 | 2000-04-14 20:49:52 +0000 | [diff] [blame] | 530 | |
| 531 | - fixed a bug in the TrueType glyph loader that prevented the correct |
| 532 | loading of some CJK glyphs in mingli.ttf |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 533 | |
David Turner | 77054f2 | 2000-04-14 20:49:52 +0000 | [diff] [blame] | 534 | - improved the standard Type 1 hinter in "src/type1" |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 535 | |
David Turner | 77054f2 | 2000-04-14 20:49:52 +0000 | [diff] [blame] | 536 | - fixed two bugs in the experimental Type 1 driver in "src/type1z" |
| 537 | to handle the new XFree86 4.0 fonts (and a few other ones..) |
| 538 | |
| 539 | - the smooth renderer is now complete and supports sub-banding |
| 540 | to render large glyphs at high speed. However, it is still located |
| 541 | in "demos/src/ftgrays.c" and should move to the library itself |
| 542 | in the next beta.. NOTE: The smooth renderer doesn't compile in |
| 543 | stand-alone mode anymore, but this should be fixed RSN.. |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 544 | |
David Turner | 77054f2 | 2000-04-14 20:49:52 +0000 | [diff] [blame] | 545 | - introduced convenience functions to more easily deal with glyph |
| 546 | images, see "include/ftglyph.h" for more details, as well as the |
| 547 | new demo program named "demos/src/ftstring.c" that demonstrates |
| 548 | its use |
| 549 | |
| 550 | - implemented FT_LOAD_NO_RECURSE in both the TrueType and Type 1 |
| 551 | drivers (this is required by the auto-hinter to improve its results). |
| 552 | |
| 553 | - changed the raster interface, in order to allow client applications |
| 554 | to provide their own span-drawing callbacks. However, only the |
| 555 | smooth renderer supports this. See "FT_Raster_Params" in the |
| 556 | file "include/ftimage.h" |
| 557 | |
| 558 | - fixed a small bug in FT_MulFix that caused incorrect transform |
| 559 | computation !! |
| 560 | |
| 561 | - Note: The tutorial is out-of-date, grumpf.. :-( |
| 562 | |
| 563 | ================================================================================ |
| 564 | OLD CHANGES - 12-mar-2000 |
David Turner | c3c7e7f | 2000-03-13 14:19:31 +0000 | [diff] [blame] | 565 | |
| 566 | - changed the layout of configuration files : now, all ANSI configuration |
| 567 | files are located in "freetype2/config". System-specific over-rides |
| 568 | can be placed in "freetype2/config/<system>". |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 569 | |
David Turner | c3c7e7f | 2000-03-13 14:19:31 +0000 | [diff] [blame] | 570 | - moved all configuration macros to "config/ftoption.h" |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 571 | |
David Turner | c3c7e7f | 2000-03-13 14:19:31 +0000 | [diff] [blame] | 572 | - improvements in the Type 1 driver with AFM support |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 573 | |
David Turner | c3c7e7f | 2000-03-13 14:19:31 +0000 | [diff] [blame] | 574 | - changed the fields in the FT_Outline structure : the old "flags" |
| 575 | array is re-named "tags", while all ancient flags are encoded into |
| 576 | a single unsigned int named "flags". |
| 577 | |
| 578 | - introduced new flags in FT_Outline.flags (see ft_outline_.... enums in |
| 579 | "ftimage.h"). |
| 580 | |
| 581 | - changed outline functions to "FT_Outline_<action>" syntax |
| 582 | |
| 583 | - added a smooth anti-alias renderer to the demonstration programs |
| 584 | - added Mac graphics driver (thanks Just) |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 585 | |
David Turner | c3c7e7f | 2000-03-13 14:19:31 +0000 | [diff] [blame] | 586 | - FT_Open_Face changed in order to received a pointer to a FT_Open_Args |
| 587 | descriptor.. |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 588 | |
David Turner | c3c7e7f | 2000-03-13 14:19:31 +0000 | [diff] [blame] | 589 | - various cleanups, a few more API functions implemented (see FT_Attach_File) |
| 590 | |
| 591 | - updated some docs |
| 592 | |
| 593 | ================================================================================ |
| 594 | OLD CHANGES - 22-feb-2000 |
David Turner | 58c10b5 | 2000-02-22 14:31:42 +0000 | [diff] [blame] | 595 | |
| 596 | - introduced the "psnames" module. It is used to: |
| 597 | |
| 598 | o convert a Postscript glyph name into the equivalent Unicode |
| 599 | character code (used by the Type 1 driver(s) to synthetize |
| 600 | on the fly a Unicode charmap). |
| 601 | |
| 602 | o provide an interface to retrieve the Postscript names of |
| 603 | the Macintosh, Adobe Standard & Adobe Expert character codes. |
| 604 | (the Macintosh names are used by the SFNT-module postscript |
| 605 | names support routines, while the other two tables are used |
| 606 | by the Type 1 driver(s)). |
| 607 | |
| 608 | - introduced the "type1z" alternate Type 1 driver. This is a (still |
| 609 | experimental) driver for the Type 1 format that will ultimately |
| 610 | replace the one in "src/type1". It uses pattern matching to load |
| 611 | data from the font, instead of a finite state analyzer. It works |
| 612 | much better than the "old" driver with "broken" fonts. It is also |
| 613 | much smaller (under 15 Kb). |
| 614 | |
| 615 | - the Type 1 drivers (both in "src/type1" and "src/type1z") are |
| 616 | nearly complete. They both provide automatic Unicode charmap |
| 617 | synthesis through the "psnames" module. No re-encoding vector |
| 618 | is needed. (note that they still leak memory due to some code |
| 619 | missing, and I'm getting lazy). |
| 620 | |
| 621 | Trivial AFM support has been added to read kerning information |
| 622 | but wasn't exactly tested as it should ;-) |
| 623 | |
| 624 | - The TrueType glyph loader has been seriously rewritten (see the |
| 625 | file "src/truetype/ttgload.c". It is now much, much simpler as |
| 626 | well as easier to read, maintain and understand :-) Preliminary |
| 627 | versions introduced a memory leak that has been reported by Jack |
| 628 | Davis, and is now fixed.. |
| 629 | |
| 630 | - introduced the new "ft_glyph_format_plotter", used to represent |
| 631 | stroked outlines like Windows "Vector" fonts, and certain Type 1 |
| 632 | fonts like "Hershey". The corresponding raster will be written |
| 633 | soon. |
| 634 | |
| 635 | - FT_New_Memory_Face is gone. Likewise, FT_Open_Face has a new |
| 636 | interface that uses a structure to describe the input stream, |
| 637 | the driver (if required), etc.. |
| 638 | |
| 639 | TODO |
| 640 | - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap |
| 641 | |
| 642 | - Add a function like FT_Load_Character( face, char_code, load_flags ) |
| 643 | that would really embbed a call to FT_Get_Char_Index then FT_Load_Glyph |
| 644 | to ease developer's work. |
| 645 | |
| 646 | - Update the tutorial !! |
| 647 | - consider adding support for Multiple Master fonts in the Type 1 |
| 648 | drivers. |
| 649 | |
| 650 | - Test the AFM routines of the Type 1 drivers to check that kerning |
| 651 | information is returned correctly. |
| 652 | |
| 653 | - write a decent auto-gridding component !! We need this to release |
| 654 | FreeType 2.0 gold ! |
| 655 | |
| 656 | |
| 657 | ----- less urgent needs : ---------- |
| 658 | - add a CFF/Type2 driver |
| 659 | - add a BDF driver |
| 660 | - add a FNT/PCF/HBF driver |
| 661 | - add a Speedo driver from the X11 sources |
| 662 | |
| 663 | |
| 664 | ============================================================================== |
| 665 | OLDER CHANGES - 27-jan-2000 |
David Turner | 633da99 | 2000-01-27 14:07:33 +0000 | [diff] [blame] | 666 | |
| 667 | - updated the "sfnt" module interface to allow several SFNT-based |
| 668 | drivers to co-exist peacefully |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 669 | |
David Turner | 633da99 | 2000-01-27 14:07:33 +0000 | [diff] [blame] | 670 | - updated the "T1_Face" type to better separate Postscript font content |
| 671 | from the rest of the FT_Face structure. Might be used later by the |
| 672 | CFF/Type2 driver.. |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 673 | |
David Turner | 633da99 | 2000-01-27 14:07:33 +0000 | [diff] [blame] | 674 | - added an experimental replacement Type 1 driver featuring advanced |
| 675 | (and speedy) pattern matching to retrieve the data from postscript |
| 676 | fonts. |
| 677 | |
| 678 | - very minor changes in the implementation of FT_Set_Char_Size and |
| 679 | FT_Set_Pixel_Sizes (they now implement default to ligthen the |
| 680 | font driver's code). |
| 681 | |
| 682 | |
| 683 | ============================================================================= |
| 684 | OLD MESSAGE |
| 685 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 686 | This file summarizes the changes that occured since the last "beta" of FreeType 2. |
| 687 | Because the list is important, it has been divided into separate sections: |
| 688 | |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 689 | Table Of Contents: |
| 690 | |
| 691 | I High-Level Interface (easier !) |
| 692 | II Directory Structure |
| 693 | III Glyph Image Formats |
| 694 | IV Build System |
| 695 | V Portability |
| 696 | VI Font Drivers |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 697 | |
| 698 | ----------------------------------------------------------------------------------------- |
| 699 | High-Level Interface : |
| 700 | |
| 701 | The high-level API has been considerably simplified. Here is how : |
| 702 | |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 703 | - resource objects have disappeared. this means that face objects can |
| 704 | 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] | 705 | FT_Open_Face) |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 706 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 707 | - when calling either FT_New_Face & FT_Open_Face, a size object and a |
| 708 | glyph slot object are automatically created for the face, and can be |
| 709 | accessed through "face->glyph" and "face->size" if one really needs to. |
| 710 | 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] | 711 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 712 | - similarly, FT_Load_Glyph now only takes a "face" argument (instead of |
| 713 | a glyph slot and a size). Also, it's "result" parameter is gone, as |
| 714 | the glyph image type is returned in the field "face->glyph.format" |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 715 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 716 | - the list of available charmaps is directly accessible through |
| 717 | "face->charmaps", counting "face->num_charmaps" elements. Each |
| 718 | charmap has an 'encoding' field which specifies which known encoding |
| 719 | it deals with. Valid values are, for example : |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 720 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 721 | ft_encoding_unicode (for ASCII, Latin-1 and Unicode) |
| 722 | ft_encoding_apple_roman |
| 723 | ft_encoding_sjis |
| 724 | ft_encoding_adobe_standard |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 725 | ft_encoding_adobe_expert |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 726 | |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 727 | other values may be added in the future. Each charmap still holds its |
| 728 | "platform_id" and "encoding_id" values in case the encoding is too |
| 729 | exotic for the current library |
| 730 | |
| 731 | |
| 732 | ----------------------------------------------------------------------------------------- |
| 733 | Directory Structure: |
| 734 | |
| 735 | Should seem obvious to most of you: |
| 736 | |
| 737 | freetype/ |
| 738 | config/ -- configuration sub-makefiles |
| 739 | ansi/ |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 740 | unix/ -- platform-specific configuration files |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 741 | win32/ |
| 742 | os2/ |
| 743 | msdos/ |
| 744 | |
| 745 | include/ -- public header files, those to be included directly |
| 746 | by client apps |
| 747 | |
| 748 | src/ -- sources of the library |
| 749 | base/ -- the base layer |
| 750 | sfnt/ -- the sfnt "driver" (see the drivers section below) |
| 751 | truetype/ -- the truetype driver |
| 752 | type1/ -- the type1 driver |
| 753 | shared/ -- some header files shared between drivers |
| 754 | |
| 755 | demos/ -- demos/tools |
| 756 | |
| 757 | docs/ -- documentation (a bit empty for now) |
| 758 | |
| 759 | ----------------------------------------------------------------------------------------- |
| 760 | Glyph Image Formats : |
| 761 | |
| 762 | Drivers are now able to register new glyph image formats within the library. |
| 763 | For now, the base layer supports of course bitmaps and vector outlines, but |
| 764 | one could imagine something different like colored bitmaps, bi-color |
| 765 | vectors or wathever else (Metafonts anyone ??). |
| 766 | |
| 767 | See the file `include/ftimage.h'. Note also that the type FT_Raster_Map is |
| 768 | gone, and is now replaced by FT_Bitmap, which should encompass all known |
| 769 | bitmap types. |
| 770 | |
| 771 | 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] | 772 | 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] | 773 | to change the default raster used for a given glyph image format. |
| 774 | |
| 775 | The default outline scan-converter now uses 128 levels of grays by default, |
| 776 | 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] | 777 | updated significantly in order to display these.. |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 778 | |
| 779 | |
| 780 | ----------------------------------------------------------------------------------------- |
| 781 | Build system : |
| 782 | |
| 783 | You still need GNU Make to build the library. The build system has been |
| 784 | very seriously re-vamped in order to provide things like : |
| 785 | |
| 786 | - automatic host platform detection (reverting to 'config/ansi' |
| 787 | if it is not detected, with pseudo-standard compilation flags) |
| 788 | |
| 789 | - the ability to compile from the Makefiles with very different and |
| 790 | exotic compilers. Note that linking the library can be difficult for |
| 791 | some platforms. |
| 792 | |
| 793 | For example, the file `config/win32/lcclib.bat' is invoked by the |
| 794 | build system to create the ".lib" file with LCC-Win32 because its |
| 795 | librarian has too many flaws to be invoked directly from the Makefile. |
| 796 | |
| 797 | Here's how it works : |
| 798 | |
| 799 | - the first time you type `make', the build system runs a series of |
| 800 | sub-makefiles in order to detect your host platform. It then dumps |
| 801 | what it found, and creates a file called `config.mk' in the current |
| 802 | directory. This is a sub-Makefile used to define many important Make |
| 803 | variables used to build the library. |
| 804 | |
| 805 | - the second time, the build system detects the `config.mk' then use it |
| 806 | to build the library. All object files go into 'obj' by default, as |
| 807 | well as the library file, but this can easily be changed. |
| 808 | |
| 809 | Note that you can run "make setup" to force another host platform detection |
| 810 | even if a `config.mk' is present in the current directory. Another solution |
| 811 | is simply to delete the file, then re-run make. |
| 812 | |
| 813 | Finally, the default compiler for all platforms is gcc (for now, this will |
| 814 | hopefully changed in the future). You can however specify a different |
| 815 | compiler by specifying it after the 'setup' target as in : |
| 816 | |
| 817 | gnumake setup lcc on Win32 to use the LCC compiler |
| 818 | gnumake setup visualc on Win32 to use Visual C++ |
| 819 | |
| 820 | See the file `config/<system>/detect.mk' for a list of supported compilers |
| 821 | for your platforms. |
| 822 | |
| 823 | It should be relatively easy to write new detection rules files and |
| 824 | config.mk.. |
| 825 | |
| 826 | Finally, to build the demo programs, go to `demos' and launch GNU Make, |
| 827 | it will use the `config.mk' in the top directory to build the test |
| 828 | programs.. |
| 829 | |
| 830 | ----------------------------------------------------------------------------------------- |
| 831 | Portability : |
| 832 | |
| 833 | In the previous beta, a single FT_System object was used to encompass |
| 834 | all low-level operations like thread synchronisation, memory management |
| 835 | and i/o access. This has been greatly simplified : |
| 836 | |
| 837 | - thread synchronisation has been dropped, for the simple reason that |
| 838 | the library is already re-entrant, and that if you really need two |
| 839 | threads accessing the same FT_Library, you should really synchronize |
| 840 | access to it yourself with a simple mutex. |
| 841 | |
| 842 | - memory management is performed through a very simple object called |
| 843 | "FT_Memory", which really is a table containing a table of pointers |
| 844 | to functions like malloc, realloc and free as well as some user data |
| 845 | (closure). |
| 846 | |
| 847 | - resources have disappeared (they created more problems than they |
| 848 | solved), and i/o management have been simplified greatly as a |
| 849 | result. Streams are defined through FT_Stream objects, which can |
| 850 | be either memory-based or disk-based. |
| 851 | |
| 852 | Note that each face has its own stream, which is closed only when |
| 853 | the face object is destroyed. Hence, a function like TT_Flush_Face |
| 854 | in 1.x cannot be directly supported. However, if you really need |
| 855 | something like this, you can easily tailor your own streams to achieve |
| 856 | the same feature at a lower level (and use FT_Open_Face instead of |
| 857 | FT_New_Face to create the face). |
| 858 | |
| 859 | See the file "include/ftsystem.h" for more details, as well as the |
| 860 | implementations found in "config/unix" and "config/ansi". |
| 861 | |
| 862 | |
| 863 | ----------------------------------------------------------------------------------------- |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 864 | Font Drivers : |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 865 | |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 866 | |
| 867 | The Font Driver interface has been modified in order to support |
| 868 | extensions & versioning. |
| 869 | |
| 870 | |
| 871 | The list of the font drivers that are statically linked to the |
| 872 | library at compile time is managed through a new configuration file |
| 873 | called `config/<platform>/ftmodule.h'. |
| 874 | |
| 875 | This file is autogenerated when invoking `make modules'. This target |
| 876 | will parse all sub-directories of 'src', looking for a "module.mk" |
| 877 | rules file, used to describe the driver to the build system. |
| 878 | |
| 879 | Hence, one should call `make modules' each time a font driver is added |
| 880 | or removed from the `src' directory. |
| 881 | |
| 882 | |
| 883 | Finally, this version provides a "pseudo-driver" in `src/sfnt'. This |
| 884 | driver doesn't support font files directly, but provides services used |
| 885 | by all TrueType-like font drivers. Hence, its code is shared between |
| 886 | the TrueType & OpenType font formats, and possibly more formats to |
| 887 | come if we're lucky.. |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 888 | |
| 889 | ----------------------------------------------------------------------------------------- |
| 890 | Extensions support : |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 891 | |
| 892 | The extensions support is inspired by the one found in 1.x. |
| 893 | |
| 894 | Now, each font driver has its own "extension registry", which lists |
| 895 | which extensions are available for the font faces managed by the driver. |
| 896 | |
| 897 | Extension ids are now strings, rather than 4-byte tags, as this is |
| 898 | usually more readable.. |
| 899 | |
| 900 | Each extension has: |
| 901 | - some data, associated to each face object |
| 902 | - an interface (table of function pointers) |
| 903 | |
| 904 | An extension that is format-specific should simply register itself |
| 905 | to the correct font driver. Here is some example code: |
| 906 | |
| 907 | // Registering an extensions |
| 908 | // |
| 909 | FT_Error FT_Init_XXXX_Extension( FT_Library library ) |
| 910 | { |
| 911 | FT_DriverInterface* tt_driver; |
| 912 | |
| 913 | driver = FT_Get_Driver( library, "truetype" ); |
| 914 | if (!driver) return FT_Err_Unimplemented_Feature; |
| 915 | |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 916 | return FT_Register_Extension( driver, &extension_class ); |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 917 | } |
| 918 | |
David Turner | e49ab25 | 2000-05-16 23:44:38 +0000 | [diff] [blame] | 919 | |
David Turner | 5951ce9 | 1999-12-29 00:53:44 +0000 | [diff] [blame] | 920 | // Implementing the extensions |
| 921 | // |
| 922 | FT_Error FT_Proceed_Extension_XXX( FT_Face face ) |
| 923 | { |
| 924 | FT_XXX_Extension ext; |
| 925 | FT_XXX_Extension_Interface ext_interface; |
| 926 | |
| 927 | ext = FT_Get_Extension( face, "extensionid", &ext_interface ); |
| 928 | if (!ext) return error; |
| 929 | |
| 930 | return ext_interface->do_it(ext); |
| 931 | } |
David Turner | d2b1f35 | 1999-12-16 23:11:37 +0000 | [diff] [blame] | 932 | |