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