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