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