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