Changeset 262 for trunk/poppler
- Timestamp:
- Jan 17, 2009, 10:45:05 AM (12 years ago)
- Location:
- trunk/poppler/freetype2
- Files:
-
- 3 added
- 118 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/poppler/freetype2/ChangeLog
r209 r262 1 2009-01-14 Werner Lemberg <wl@gnu.org> 2 3 * Version 2.3.8 released. 4 ========================= 5 6 7 Tag sources with `VER-2-3-8'. 8 9 * docs/VERSION.DLL: Update documentation and bump version number to 10 2.3.8. 11 12 * README, Jamfile (RefDoc), builds/win32/visualc/index.html, 13 builds/win32/visualc/freetype.dsp, 14 builds/win32/visualc/freetype.vcproj, 15 builds/win32/visualce/index.html, 16 builds/win32/visualce/freetype.dsp, 17 builds/win32/visualce/freetype.vcproj: s/2.3.7/2.3.8/, s/237/238/. 18 19 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8. 20 21 * builds/unix/configure.raw (version_info): Set to 9:19:3. 22 23 * docs/release: Updated. 24 25 2009-01-14 Werner Lemberg <wl@gnu.org> 26 27 * builds/toplevel.mk (dist): Compress better. 28 29 2009-01-13 Werner Lemberg <wl@gnu.org> 30 31 * src/base/ftobjs.c (FT_Get_FSType_Flags): Cast for compilation 32 with C++. 33 34 2009-01-13 Werner Lemberg <wl@gnu.org> 35 36 Don't use stdlib.h and friends directly. 37 Reported by Mickey Gabel <mickey@monfort.co.il>. 38 39 * src/base/ftdbgmem.c: s/<stdlib.h>/FT_CONFIG_STANDARD_LIBRARY_H/. 40 41 * src/gzip/ftgzip.c, src/lzw/ftlzw.c, src/raster/ftmisc.h: 42 s/<string.h>/FT_CONFIG_STANDARD_LIBRARY_H/. 43 44 * src/autofit/aftypes.h, src/autofit/afhints.c, 45 src/pshinter/pshalgo.c: s/<stdio.h>/FT_CONFIG_STANDARD_LIBRARY_H/ 46 47 * src/lzw/ftlzw.c, src/base/ftdbgmem.c: Don't include stdio.h. 48 49 2009-01-12 Werner Lemberg <wl@gnu.org> 50 51 Avoid compiler warnings. 52 53 * */*: s/do ; while ( 0 )/do { } while ( 0 )/. 54 Reported by Sean McBride <sean@rogue-research.com>. 55 56 2009-01-12 Werner Lemberg <wl@gnu.org> 57 58 Fix stdlib dependencies. 59 60 Problem reported by Mickey Gabel <mickey@monfort.co.il>. 61 62 * include/freetype/config/ftstdlib.h (ft_exit): Removed. Unused. 63 64 * src/autofit/afhints.c, src/base/ftlcdfil.c, src/smooth/ftsmooth.c: 65 s/memcpy/ft_memcpy/. 66 * src/psaux/t1decode.c: s/memset/ft_memset/, s/memcpy/ft_memcpy/. 67 68 2009-01-11 Werner Lemberg <wl@gnu.org> 69 70 * docs/formats.txt: Add link to PCF specification. 71 72 * include/freetype/ftbdf.h (FT_Get_BDF_Property): Improve 73 documentation. 74 75 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 76 77 * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance, 78 FT_Get_Advances): Change the type of load_flags from FT_UInt32 to 79 FT_Int32, to match with the flags for FT_Load_Glyph(). 80 * src/cff/cffdrivr.c (cff_get_advances): Ditto. 81 * src/truetype/ttdriver.c (tt_get_advances): Ditto. 82 * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances): 83 Ditto. 84 * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc): 85 Ditto. 86 87 2009-01-09 Daniel Zimmermann <netzimme@aol.com> 88 89 * src/gxvalid/gxvmort.c (gxv_mort_feature_validate): Fix wrong 90 length check. From Savannah patch #6682. 91 92 2009-01-09 Werner Lemberg <wl@gnu.org> 93 94 Fix problem with T1_FIELD_{NUM,FIXED}_TABLE2. 95 96 * src/psaux/psobjs.c (ps_parser_load_field_table): Don't handle 97 `count_offset' if it is zero (i.e., unused). Otherwise, the first 98 element of the structure which holds the data is erroneously 99 modified. Problem reported by Chi Nguyen <chint@necsv.com>. 100 101 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 102 103 * src/base/ftadvanc.c (_ft_face_scale_advances, FT_Get_Advance, 104 FT_Get_Advances): Extend the type of load_flags from FT_UInt to 105 FT_UInt32, to pass 32-bit flags on 16bit platforms. 106 * src/cff/cffdrivr.c (cff_get_advances): Ditto. 107 * src/truetype/ttdriver.c (tt_get_advances): Ditto. 108 * include/freetype/ftadvanc.h (FT_Get_Advance, FT_Get_Advances): 109 Ditto. 110 * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc): 111 Ditto. 112 113 2009-01-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 114 115 * src/base/ftobjs.c (FT_Done_Library): Issue an error message when 116 FT_Done_Face() cannot free all faces. If the list of the opened 117 faces includes broken face which FT_Done_Face() cannot free, 118 FT_Done_Library() retries FT_Done_Face() and it can fall into 119 an endless loop. See the discussion: 120 http://lists.gnu.org/archive/html/freetype-devel/2008-09/msg00047.html 121 http://lists.gnu.org/archive/html/freetype-devel/2008-10/msg00000.html 122 123 2009-01-07 Werner Lemberg <wl@gnu.org> 124 125 * docs/CHANGES: Document new key `a' in ftdiff. 126 127 2009-01-06 Werner Lemberg <wl@gnu.org> 128 129 * autogen.sh: Don't use GNUisms while calling sed. Problem reported 130 by Sean McBride. 131 132 2009-01-06 Werner Lemberg <wl@gnu.org> 133 134 * src/base/ftbitmap.c (FT_Bitmap_Convert): Handle FT_PIXEL_MODE_LCD 135 and FT_PIXEL_MODE_LCD_V. Problem reported by Chi Nguyen 136 <chint@necsv.com>. 137 138 2009-01-06 Diego Pettenò <flameeyes@gmail.com> 139 140 * builds/unix/configure.raw: Don't call AC_CANONICAL_BUILD and 141 AC_CANONICAL_TARGET and use $host_os only. A nice explanation for 142 this change can be found at 143 http://blog.flameeyes.eu/s/canonical-target. 144 145 From Savannah patch #6712. 146 147 2009-01-06 Sean McBride <sean@rogue-research.com> 148 149 * src/base/ftdbgmem.c (_debug_mem_dummy): Make it static. 150 151 * src/base/ftmac.c: Remove some #undefs. 152 153 2008-12-26 Werner Lemberg <wl@gnu.org> 154 155 Set `face_index' field in FT_Face for all font formats. 156 157 * cff/cffobjs.c (cff_face_init), winfonts/winfnt.c (FNT_Face_Init), 158 sfnt/sfobjs.c (sfnt_init_face): Do it. 159 160 * docs/CHANGES: Document it. 161 162 2008-12-22 Steve Grubb 163 164 * builds/unix/ftsystem.c (FT_Stream_Open): Reject zero-length files. 165 Patch from Savannah bug #25151. 166 167 2008-12-21 Werner Lemberg <wl@gnu.org> 168 169 * src/pfr/pfrdrivr.c, src/winfonts/winfnt.c, src/cache/ftcmanag.c, 170 src/smooth/ftgrays.c, src/base/ftobjc.s, src/sfobjs.c: 171 s/_Err_Bad_Argument/_Err_Invalid_Argument/. The former is for 172 errors in the bytecode interpreter only. 173 174 2008-12-21 Werner Lemberg <wl@gnu.org> 175 176 * src/base/ftpfr.c (FT_Get_PFR_Metrics): Protect against NULL 177 arguments. 178 Fix return value for non-PFR fonts. Both problems reported by Chi 179 Nguyen <chint@necsv.com>. 180 181 2008-12-21 anonymous 182 183 FT_USE_MODULE declares things as: 184 185 extern const FT_Module_Class 186 187 (or similar for C++). However, the actual types of the variables 188 being declared are often different, e.g., FT_Driver_ClassRec or 189 FT_Renderer_Class. (Some are, indeed, FT_Module_Class.) 190 191 This works with most C compilers (since those structs begin with an 192 FT_Module_Class struct), but technically it's undefined behavior. 193 194 To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7 195 paragraph 2: 196 197 All declarations that refer to the same object or function shall 198 have compatible type; otherwise, the behavior is undefined. 199 200 (And they are not compatible types.) 201 202 Most C compilers don't reject (or even detect!) code which has this 203 issue, but the GCC LTO development branch compiler does. (It 204 outputs the types of the objects while generating .o files, along 205 with a bunch of other information, then compares them when doing the 206 final link-time code generation pass.) 207 208 Patch from Savannah bug #25133. 209 210 * src/base/ftinit.c (FT_USE_MODULE): Include variable type. 211 212 * builds/amiga/include/freetype/config/ftmodule.h, 213 include/freetype/config/ftmodule.h, */module.mk: Updated to declare 214 pass correct types to FT_USE_MODULE. 215 216 2008-12-21 Hongbo Ni <hongbo@njstar.com> 217 218 * src/autofit/aflatin.c (af_latin_hint_edges), 219 src/autofit/aflatin2.c (af_latin2_hint_edges), src/autofit/afcjk.c 220 (af_cjk_hint_edges): Protect against division by zero. This fixes 221 Savannah bug #25124. 222 223 2008-12-18 Werner Lemberg <wl@gnu.org> 224 225 * docs/CHANGES: Updated. 226 227 2008-12-18 Bevan, David <dbevan@emtex.com> 228 229 Provide API for accessing embedding and subsetting restriction 230 information. 231 232 * include/freetype.h (FT_FSTYPE_INSTALLABLE_EMBEDDING, 233 FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING, 234 FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING, FT_FSTYPE_EDITABLE_EMBEDDING, 235 FT_FSTYPE_NO_SUBSETTING, FT_FSTYPE_BITMAP_EMBEDDING_ONLY): New 236 macros. 237 (FT_Get_FSType_Flags): New function declaration. 238 239 * src/base/ftobjs.c (FT_Get_FSType_Flags): New function. 240 241 * src/cid/cidtoken.h, src/type1/t1tokens.h, src/type42/t42parse.c 242 (t42_keywords): Handle `FSType'. 243 244 * include/freetype/t1tables.h (PS_FontInfoRec): Add `fs_type' field. 245 246 2008-12-17 Werner Lemberg <wl@gnu.org> 247 248 * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Don't use internal 249 macros so that copying the source code into an application works 250 out of the box. 251 252 2008-12-17 Werner Lemberg <wl@gnu.org> 253 254 * include/freetype/ftsynth.h, src/base/ftsynth.c: Move 255 FT_GlyphSlot_Own_Bitmap to... 256 * include/freetype/ftbitmap.h, src/base/ftbitmap.c: These files. 257 258 * docs/CHANGES: Document it. 259 260 2008-12-10 Werner Lemberg <wl@gnu.org> 261 262 Generalize the concept of `tricky' fonts by introducing 263 FT_FACE_FLAG_TRICKY to indicate that the font format's hinting 264 engine is necessary for correct rendering. 265 266 At the same time, slightly modify the behaviour of tricky fonts: 267 FT_LOAD_NO_HINTING is now ignored. To really force raw loading 268 of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and 269 FT_LOAD_NO_AUTOHINT must be used. 270 271 Finally, tricky TrueType fonts always use the bytecode interpreter 272 even if the patented code is used. 273 274 * include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY): 275 New macros. 276 277 * src/truetype/ttdriver.c (Load_Glyph): Handle new load flags 278 semantics as described above. 279 280 * src/truetype/ttobjs.c (tt_check_trickyness): New function, using 281 code of ... 282 (tt_face_init): This function, now simplified and updated to new 283 semantics. 284 285 * src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky 286 fonts. 287 288 * docs/CHANGES: Document it. 289 290 2008-12-09 Werner Lemberg <wl@gnu.org> 291 292 Really fix Savannah bug #25010: An SFNT font with neither outlines 293 nor bitmaps can be considered as containing space `glyphs' only. 294 295 * src/truetype/ttpload.c (tt_face_load_loca): Handle the case where 296 a `glyf' table is missing. 297 298 * src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no 299 `glyf' table but a non-zero `loca' entry. 300 (tt_loader_init): Handle missing `glyf' table. 301 302 * src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05. 303 304 * src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines 305 nor bitmaps is scalable. 306 307 2008-12-05 Werner Lemberg <wl@nu.org> 308 309 * src/autofit/aflatin.c (af_latin_uniranges): Add more ranges. This 310 fixes Savannah bug #21190 which also provides a basic patch. 311 312 2008-12-05 Werner Lemberg <wl@nu.org> 313 314 * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): Use value 315 0x100 instead of 0x10000; the latter value is already occupied by 316 FT_LOAD_TARGET_LIGHT. Bug reported by James Cloos. 317 318 319 Handle SFNT with neither outlines nor bitmaps. This fixes Savannah 320 bug #25010. 321 322 * src/base/ftobjs.c (FT_Load_Glyph): Reject fonts with neither 323 outlines nor bitmaps. 324 325 * src/sfnt/sfobjs.c (sfnt_load_face): Don't return an error if there 326 is no table with glyphs. 327 328 329 * src/sfnt/ttload.c (tt_face_lookup_table): Improve debugging 330 message. 331 332 2008-12-01 Werner Lemberg <wl@gnu.org> 333 334 GDEF tables need `glyph_count' too for validation. Problem reported 335 by Chi Nguyen <chint@necsv.com>. 336 337 * src/otvalid/otvgdef.c (otv_GDEF_validate), src/otvalid/otvalid.h 338 (otv_GDEF_validate), src/otvalid/otvmod.c (otv_validate): Pass 339 `glyph_count'. 340 341 2008-11-29 Werner Lemberg <wl@gnu.org> 342 343 * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c, 344 src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c, 345 src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c, 346 src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c, 347 src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings 348 (Atari PureC). 349 350 2008-11-29 James Cloos <cloos@jhcloos.com> 351 352 * src/type/t1load.c (mm_axis_unmap): Revert previous patch and fix 353 it correctly by using FT_INT_TO_FIXED (FreeType expects 16.16 values 354 in the /BlendDesignMap space). 355 356 2008-11-29 James Cloos <cloos@jhcloos.com> 357 358 * src/type1/t1load.c (mm_axis_unmap): `blend_points' is FT_Fixed*, 359 whereas `design_points' is FT_Long*. Therefore, return blend rather 360 than design points. 361 362 2008-11-27 Werner Lemberg <wl@gnu.org> 363 364 * src/cff/cffparse.c (cff_parse_real): Handle more than nine 365 significant digits correctly. This fixes Savannah bug #24953. 366 367 2008-11-25 Daniel Zimmermann <netzimme@aol.com> 368 369 * src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream 370 before the NULL check. From Savannah patch #6681. 371 372 2008-11-24 Werner Lemberg <wl@gnu.org> 373 374 Fixes from the gnuwin32 port. 375 376 * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/. 377 378 * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H. 379 380 * src/psaux/psobjs.c (ps_table_add): Check `length'. 381 382 2008-11-15 Werner Lemberg <wl@gnu.org> 383 384 * src/truetype/ttinterp.c (tt_default_graphics_state): The default 385 value for `scan_type' is zero, as confirmed by Greg Hitchcock from 386 Microsoft. Problem reported by Michal Nowakowski 387 <miszka@limes.com.pl>. 388 389 2008-11-12 Tor Andersson <tor.andersson@gmail.com> 390 391 * src/cff/cffdrivr.c (cff_get_cmap_info): Initialize `format' field. 392 This fixes Savannah bug #24819. 393 394 2008-11-08 Werner Lemberg <wl@gnu.org> 395 396 * src/sfnt/sfobjs.c (sfnt_load_face): Remove #if 0/#endif guards 397 since OpenType version 1.5 has been released. 398 399 * include/ttnameid.h (TT_NAME_ID_WWS_FAMILY, 400 TT_NAME_ID_WWS_SUBFAMILY): New macros for OpenType 1.5. 401 (TT_URC_COPTIC, TT_URC_VAI, TT_URC_NKO, TT_URC_BALINESE, 402 TT_URC_PHAGSPA, TT_URC_NON_PLANE_0, TT_URC_PHOENICIAN, 403 TT_URC_TAI_LE, TT_URC_NEW_TAI_LUE, TT_URC_BUGINESE, 404 TT_URC_GLAGOLITIC, TT_URC_YIJING, TT_URC_SYLOTI_NAGRI, 405 TT_URC_LINEAR_B, TT_URC_ANCIENT_GREEK_NUMBERS, TT_URC_UGARITIC, 406 TT_URC_OLD_PERSIAN, TT_URC_SHAVIAN, TT_URC_OSMANYA, 407 TT_URC_CYPRIOT_SYLLABARY, TT_URC_KHAROSHTHI, TT_URC_TAI_XUAN_JING, 408 TT_URC_CUNEIFORM, TT_URC_COUNTING_ROD_NUMERALS, TT_URC_SUNDANESE, 409 TT_URC_LEPCHA, TT_URC_OL_CHIKI, TT_URC_SAURASHTRA, TT_URC_KAYAH_LI, 410 TT_URC_REJANG, TT_URC_CHAM, TT_URC_ANCIENT_SYMBOLS, 411 TT_URC_PHAISTOS_DISC, TT_URC_OLD_ANATOLIAN, TT_URC_GAME_TILES): New 412 macros for OpenType 1.5. 413 414 2008-11-08 Wenlin Institute <wenlin@wenlin.com> 415 416 * src/base/ftobjs.c (ft_glyphslot_free_bitmap): Protect against 417 slot->internal == NULL. Reported by Graham Asher. 418 419 2008-11-08 Werner Lemberg <wl@gnu.org> 420 421 * src/sfnt/sfobjs.c (tt_face_get_name): Modified to return an error 422 code so that memory allocation problems can be distinguished from 423 missing table entries. Reported by Graham Asher. 424 (GET_NAME): New macro. 425 (sfnt_load_face): Use it. 426 427 2008-11-05 Werner Lemberg <wl@gnu.org> 428 429 * devel/ftoption.h, include/freetype/config/ftoption.h 430 [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Undefine 431 TT_CONFIG_OPTION_UNPATENTED_HINTING. This fixes the return value of 432 `FT_Get_TrueType_Engine_Type' (and makes it work as documented). 433 Reported in bug #441638 of bugzilla.novell.com. 434 435 * docs/CHANGES: Document it. 436 437 2008-11-03 Werner Lemberg <wl@gnu.org> 438 439 * src/type1/t1load.c (parse_subrs): Use an endless loop. There are 440 fonts (like HELVI.PFB version 003.001, used on OS/2) which define 441 some `subrs' elements more than once. Problem reported by Peter 442 Weilbacher <mozilla@weilbacher.org>. 443 444 2008-10-15 Graham Asher <graham.asher@btinternet.com> 445 446 * src/sfnt/ttpost.c (tt_post_default_names): Add `const'. 447 448 2008-10-15 David Turner <david@freetype.org> 449 450 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Disambiguate for 451 meddlesome compilers' warning against `for ( ...; ...; ...) ;'. 452 453 2008-10-14 Werner Lemberg <wl@gnu.org> 454 455 * src/cff/cffobjs.c (cff_face_init): Remove compiler warning. 456 Suggested by Bram Tassyns in Savannah patch #6651. 457 458 2008-10-12 Graham Asher <graham.asher@btinternet.com> 459 460 * src/sfnt/sfobjs.c (sfnt_load_face): Fix computation of 461 `underline_position'. 462 463 2008-10-12 Werner Lemberg <wl@gnu.org> 464 465 * docs/CHANGES: Updated. 466 467 2008-10-09 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 468 469 Fix Savannah bug #24468. 470 471 According to include/freetype/internal/ftobjs.h, the appropriate 472 type to interchange single character codepoint is FT_UInt32. It 473 should be distinguished from FT_UInt which can be 16bit integer. 474 475 * src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Change the type 476 of the second argument `pcharcode' from FT_UInt* to FT_UInt32*. 477 (tt_cmap4_char_map_binary): Ditto. 478 (tt_cmap14_get_nondef_chars): Change the type of return value 479 from FT_UInt* to FT_UInt32*. 480 481 2008-10-08 John Tytgat <John.Tytgat@esko.com> 482 483 Fix Savannah bug #24485. 484 485 * src/type1/t1load.c (parse_charstrings): Assure that we always have 486 a .notdef glyph. 487 488 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 489 490 * src/base/ftmac.c: Include FT_TRUETYPE_TAGS_H for multi build. 491 * builds/mac/ftmac.c: Ditto. 492 493 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 494 495 * include/freetype/tttags.h (TTAG_TYP1, TTAG_typ1): Fix definitions. 496 * src/base/ftobjs.c: Include FT_TRUETYPE_TAGS_H. 497 498 2008-10-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 499 500 * src/sfnt/sfobjs.c (sfnt_open_font): Allow `typ1' version tag in 501 the beginning of sfnt container. 502 * src/sfnt/ttload.c (check_table_dir): Return 503 `SFNT_Err_Table_Missing' when sfnt table directory structure is 504 correct but essential tables for TrueType fonts (`head', `bhed' or 505 `SING') are missing. Other errors are returned by 506 SFNT_Err_Unknown_File_Format. 507 508 * src/base/ftobjs.c (FT_Open_Face): When TrueType driver returns 509 `FT_Err_Table_Missing', try `open_face_PS_from_sfnt_stream'. It is 510 enabled only when old mac font support is configured. 511 512 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 513 514 * include/freetype/tttags.h (TTAG_CID, TTAG_FOND, TTAG_LWFN, 515 TTAG_POST, TTAG_sfnt, TTAG_TYP1, TTAG_typ1): New tags to simplify 516 the repeated calculations of these values in ftobjs.c and ftmac.c. 517 * src/base/ftobjs.c: Replace all FT_MAKE_TAG by new tags. 518 * src/base/ftmac.c: Ditto. 519 * builds/mac/ftmac.c: Ditto. 520 521 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 522 523 * src/base/ftobjs.c (ft_lookup_PS_in_sfnt_stream): Remove wrong 524 initialization of *is_sfnt_cid. 525 526 2008-10-04 Werner Lemberg <wl@gnu.org> 527 528 * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler 529 warnings. 530 531 2008-10-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 532 533 * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Replaced by... 534 (ft_lookup_PS_in_sfnt_stream): This. 535 (open_face_PS_from_sfnt_stream): New function. It checks whether 536 the stream is sfnt-wrapped Type1 PS font or sfnt-wrapped CID-keyed 537 font, then try to open a face for given face_index. 538 (Mac_Read_sfnt_Resource): Replace the combination of 539 `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' by 540 `open_face_PS_from_sfnt_stream'. 541 * src/base/ftmac.c (FT_New_Face_From_SFNT): Ditto. 542 * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto. 543 * src/base/ftbase.h: Remove `ft_lookup_PS_in_sfnt' and add 544 `open_face_PS_from_sfnt_stream'. 545 546 2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 547 548 * src/base/ftobjs.c (ft_lookup_PS_in_sfnt): Set *is_sfnt_cid to 549 FALSE if neither `CID ' nor `TYP1' is found in the sfnt container. 550 551 2008-10-03 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 552 553 * include/freetype/config/ftconfig.h: Define FT_MACINTOSH when SC or 554 MrC compiler of MPW is used. These compilers do not define the 555 macro __APPLE__ by themselves. 556 * builds/unix/ftconfig.in: Ditto. 557 * builds/vms/ftconfig.h: Ditto. 558 * src/base/ftbase.c: Use FT_MACINTOSH instead of __APPLE__, to 559 include ftmac.c if FreeType 2 is built by MPW. 560 * src/base/ftobjs.c: Use FT_MACINTOSH instead of __APPLE__, to 561 enable shared functions for ftmac.c if FreeType 2 is built by MPW. 562 563 * builds/mac/ftmac.c: Include ftbase.h. 564 (memory_stream_close): Removed. 565 (new_memory_stream): Ditto. 566 (open_face_from_buffer): Removed. Use the implementation in 567 ftobjs.c. 568 (ft_lookup_PS_in_sfnt): Ditto. 569 570 * builds/mac/FreeType.m68k_far.make.txt: Build ftmac.c as an 571 included part of ftbase.c, to share the functions in ftobjs.c. The 572 rule compiling ftmac.c separately is removed and the rule copying 573 ftbase.c from src/base/ftbase.c to builds/mac/ftbase.c is added. 574 * builds/mac/FreeType.m68k_cfm.make.txt: Ditto. 575 * builds/mac/FreeType.ppc_classic.make.txt: Ditto. 576 * builds/mac/FreeType.ppc_carbon.make.txt: Ditto. 577 578 2008-10-02 Bram Tassyns <bramt@enfocus.be> 579 580 * src/cff/cffgload.c (cff_slot_load): Map CID 0 to GID 0. This 581 fixes Savannah bug #24430. 582 583 2008-10-02 Werner Lemberg <wl@gnu.org> 584 585 * builds/freetype.mk (BASE_H): Rename to... 586 (INTERNAL_H): This. 587 (FREETYPE_H): Updated. 588 * src/base/rules.mk: (BASE_OBJ_S, OBJ_DIR/%.$O): Add BASE_H. 589 * src/bdf/rules.mk (BDF_DRV_H): Add bdferror.h. 590 * src/cache/rules.mk (CACHE_DRV_H): Add ftccache.h and ftcsbits.h. 591 * src/pcf/rules.mk (PCF_DRV_H): Add pcfread.h. 592 * src/raster/rules.mk (RASTER_DRV_H): Add ftmisc.h. 593 * src/type42/rules.mk (T42_DRV_H): Add t42types.h. 594 595 2008-10-02 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 596 597 * src/base/ftbase.h: New file to declare the private utility 598 functions shared by the sources of base modules. Currently, 599 `ft_lookup_PS_in_sfnt' and `open_face_from_buffer' are declared to 600 share between ftobjs.c and ftmac.c. 601 602 * src/base/rule.mk: Add ftbase.h. 603 604 * src/base/ftobjs.c: Include ftbase.h. 605 (memory_stream_close): Build on any platform when old MacOS font 606 support is enabled. 607 (new_memory_stream): Ditto. 608 (open_face_from_buffer): Build on any platform when old MacOS font 609 support is enabled. The counting of the face in a font file is 610 slightly different between Carbon-dependent parser and Carbon-free 611 parser. They are merged with the platform-specific conditional. 612 (ft_lookup_PS_in_sfnt): Ditto. 613 614 * src/base/ftmac.c: Include ftbase.h. 615 (memory_stream_close): Removed. 616 (new_memory_stream): Ditto. 617 (open_face_from_buffer): Removed. Use the implementation in 618 ftobjs.c. 619 (ft_lookup_PS_in_sfnt): Ditto. 620 621 2008-10-02 Werner Lemberg <wl@gnu.org> 622 623 * src/sfnt/sfobjs.c (sfnt_load_face): `psnames_error' is only needed 624 if TT_CONFIG_OPTION_POSTSCRIPT_NAMES is defined. 625 626 2008-10-01 Werner Lemberg <wl@gnu.org> 627 628 * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c 629 (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done), 630 src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c 631 (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done), 632 src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0. 633 Reported by Graham Asher. 634 635 2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 636 637 * src/base/rules.mk: Add conditional source to BASE_SRC, for `make 638 multi' on Mac OS X. If the macro $(ftmac_c) is defined, 639 $(BASE_DIR)/$(ftmac_c) is added to BASE_SRC. In a normal build, the 640 lack of ftmac.c in BASE_SRC is not serious because ftbase.c includes 641 ftmac.c. 642 * builds/unix/unix-def.in: Add a macro definition of $(ftmac_c). 643 * builds/unix/configure.raw: Add procedure to set up appropriate 644 value of $(ftmac_c) with the consideration of the availability of 645 Carbon framework. 646 647 2008-09-30 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 648 649 * src/base/Jamfile: Add target for multi build by jam on Mac OS X. 650 * src/base/ftobjs.c (FT_New_Face): Fix the condition to include this 651 function for MPW building. It is synchronized the condition to 652 include ftmac.c source into ftbase.c. 653 654 2008-09-22 Werner Lemberg <wl@gnu.org> 655 656 * src/cff/cffgload.c (CFF_Operator, cff_argument_counts, 657 cff_decoder_parse_charstrings): Handle (invalid) 658 `callothersubr' and `pop' instructions. 659 660 2008-09-22 John Tytgat <John.Tytgat@esko.com> 661 662 Fix Savannah bug #24307. 663 664 * include/freetype/internal/t1types.h (CID_FaceRec), 665 src/type42/t42types.h (T42_FaceRec): Comment out `afm_data'. 666 667 2008-09-21 Werner Lemberg <wl@gnu.org> 668 669 * src/smooth/ftgrays.c (gray_raster_render): Don't dereference 670 `target_map' if FT_RASTER_FLAG_DIRECT is set. Problem reported by 671 Stephan T. Lavavej <stl@nuwen.net>. 672 673 2008-09-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 674 675 * src/otvalid/Jamfile: Add missing target `otvmath' for multi build 676 by jam. 677 * src/sfnt/Jamfile: Add missing target `ttmtx' for multi build by 678 jam. 679 680 2008-09-20 Werner Lemberg <wl@gnu.org> 681 682 * src/smooth/ftgrays.c (gray_find_cell): Fix threshold. The values 683 passed to this function are already `normalized'. Problem reported 684 by Stephan T. Lavavej <stl@nuwen.net>. 685 686 * docs/CHANGES: Document it. 687 688 2008-09-20 Werner Lemberg <wl@gnu.org> 689 690 * src/base/ftoutln.c: Include FT_INTERNAL_DEBUG_H. 691 (FT_Outline_Decompose): Decorate with tracing messages. 692 693 * src/smooth/ftgrays.c [DEBUG_GRAYS]: Replace with 694 FT_DEBUG_LEVEL_TRACE. 695 [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: Include stdio.h and 696 stdarg.h. 697 698 (FT_TRACE) [_STANDALONE_]: Remove. 699 (FT_Message) [_STANDALONE_ && FT_DEBUG_LEVEL_TRACE]: New function. 700 (FT_TRACE5, FT_TRACE7) [_STANDALONE_]: New macros. 701 (FT_ERROR) [_STANDALONE_]: Updated. 702 703 (gray_hline) [FT_DEBUG_LEVEL_TRACE]: Fix condition. 704 Use FT_TRACE7. 705 (gray_dump_cells): Make it `static void'. 706 (gray_convert_glyph): Use FT_TRACE7. 707 708 (FT_Outline_Decompose) [_STANDALONE_]: Synchronize with version in 709 ftoutln.c. 710 711 * src/base/ftadvanc.c (FT_Get_Advance, FT_Get_Advances): Use 712 FT_ERROR_BASE. 713 714 * docs/formats.txt: Updated. 715 716 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 717 718 * src/base/ftmac.c: Import sfnt-wrapped Type1 and sfnt-wrapped 719 CID-keyed font support. 720 * builds/mac/ftmac.c: Ditto. 721 722 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 723 724 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Fix double free bug in 725 sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font support code. 726 `open_face_from_buffer' frees the passed buffer if it cannot open a 727 face from the buffer, so the caller must not free it. 728 729 2008-09-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 730 731 * src/base/ftobjs.c (Mac_Read_sfnt_Resource): Add initial support 732 for sfnt-wrapped Type1 and sfnt-wrapped CID-keyed font. 733 (ft_lookup_PS_in_sfnt): New function to look up `TYP1' or `CID ' 734 table in sfnt table directory. It is used before loading TrueType 735 font driver. 736 737 * docs/CHANGES: Add note about the current status of sfnt-wrapped 738 Type1 and sfnt-wrapped CID-keyed font support. 739 740 2008-09-18 Werner Lemberg <wl@gnu.org> 741 742 * src/base/ftsystem.c (FT_Done_Memory): Use ft_sfree directly for 743 orthogonality (ft_free and ft_sfree could belong to different memory 744 pools). This fixes Savannah bug #24297. 745 746 2008-09-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 747 748 * src/cff/cffobjs.c (cff_face_init): Use TTAG_OTTO defined 749 in ttags.h instead of numerical value 0x4F54544FL. 750 751 2008-09-16 Werner Lemberg <wl@gnu.org> 752 753 * src/cff/cffgload.h, src/cff/cffgload.c 754 (cff_decoder_set_width_only): Eliminate function call. 755 756 2008-09-15 George Williams <gww@silcom.com> 757 758 Fix Savannah bug #24179, reported by Bram Tassyns. 759 760 * src/type1/t1load.c (mm_axis_unmap, T1_Get_MM_Var): Fix computation 761 of default values. 762 763 2008-09-15 Werner Lemberg <wl@gnu.org> 764 765 * src/tools/glnames.py (main): Surround `ft_get_adobe_glyph_index' 766 and `ft_adobe_glyph_list' with FT_CONFIG_OPTION_ADOBE_GLYPH_LIST to 767 prevent unconditional definition. This fixes Savannah bug #24241. 768 769 * src/psnames/pstables.h: Regenerated. 770 771 2008-09-13 Werner Lemberg <wl@gnu.org> 772 773 * autogen.sh, builds/unix/configure.raw, 774 include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor 775 beautifying. 776 777 * include/freetype/ftadvanc.h, include/freetype/ftgasp.h, 778 include/freetype/ftlcdfil.h: Protect against FreeType 1. 779 Some other minor fixes. 780 781 * devel/ftoption.h: Synchronize with 782 include/freetype/config/ftoption.h. 783 784 2008-09-11 Werner Lemberg <wl@gnu.org> 785 786 * src/base/ftbase.c: Include ftadvanc.c. 787 788 2008-09-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 789 790 * builds/unix/ftconfig.in: Duplicate the cpp computation of 791 FT_SIZEOF_{INT|LONG} from include/freetype/config/ftconfig.h. 792 (FT_USE_AUTOCONF_SIZEOF_TYPES): New macro. If defined, the cpp 793 computation is disabled and the statically configured sizes are 794 used. This fixes Savannah bug #21250. 795 796 * builds/unix/configure.raw: Add the checks to compare the cpp 797 computation results of the bit length of int and long versus the 798 sizes detected by running `configure'. If the results are 799 different, FT_USE_AUTOCONF_SIZEOF_TYPES is defined to prioritize the 800 results. 801 New option --{enable|disable}-biarch-config is added to define or 802 undefine FT_USE_AUTOCONF_SIZEOF_TYPES manually. 803 804 2008-09-05 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 805 806 * builds/unix/configure.raw: Clear FT2_EXTRA_LIBS when Carbon or 807 ApplicationService framework is missing. Although this value is not 808 used in building of FreeType2, it is written in `freetype2.pc' and 809 `freetype-config'. 810 811 2008-09-01 david turner <david@freetype.org> 812 813 * src/cache/ftccmap.c (FTC_CMapCache_Lookup): Accept a negative cmap 814 index to mean `use default cached FT_Face's charmap'. This fixes 815 Savannah bug #22625. 816 * include/freetype/ftcache.h: Document it. 817 818 819 Make FT_MulFix an inlined function. This is done to speed up 820 FreeType a little (on x86 3% when loading+hinting, 10% when 821 rendering, ARM savings are more important though). Disable this by 822 undefining FT_CONFIG_OPTION_INLINE_MULFIX. 823 824 Use of assembler code can now be controlled with 825 FT_CONFIG_OPTION_NO_ASSEMBLER. 826 827 * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in 828 [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_arm): New assembler 829 implementation. 830 [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MulFix_i386): Assembler 831 implementation taken from `ftcalc.c'. 832 [!FT_CONFIG_OPTION_NO_ASSEMBLER] (FT_MULFIX_ASSEMBLER): New macro 833 which is defined to the platform-specific assembler implementation 834 of FT_MulFix. 835 [FT_CONFIG_OPTION_INLINE_MULFIX && FT_MULFIX_ASSEMBLER] 836 (FT_MULFIX_INLINED): New macro. 837 838 * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_NO_ASSEMBLER, 839 FT_CONFIG_OPTION_INLINE_MULFIX): New macros. 840 841 * include/freetype/freetype.h: Updated to handle FT_MULFIX_INLINED. 842 843 * src/base/ftcalc.c: Updated to use FT_MULFIX_ASSEMBLER and 844 FT_MULFIX_INLINED. 845 846 847 Add a new header named FT_ADVANCES_H declaring some new APIs to 848 extract the advances of one or more glyphs without necessarily 849 loading their outlines. Also provide `fast loaders' for the 850 TrueType, Type1, and CFF font drivers (more to come later). 851 852 * src/base/ftadvanc.c, include/freetype/ftadvanc.h: New files. 853 854 * include/freetype/config/ftheader.h (FT_ADVANCES_H): New macro. 855 * include/freetype/freetype.h (FT_LOAD_ADVANCE_ONLY): New macro. 856 857 * include/freetype/internal/ftdriver.h (FT_Face_GetAdvancesFunc): 858 `flags' and `advances' are now of type `FT_UInt' and `FT_Fixed', 859 respectively. 860 861 * src/base/Jamfile (_sources), src/base/rules.mk (BASE_SRC): Add 862 ftadvanc.c. 863 864 * src/cff/cffdrivr.c (cff_get_advances): New function. 865 (cff_driver_class): Register it. 866 867 * src/cff/cffgload.c (cff_decoder_set_width_only): New function. 868 (cff_decoder_parse_charstrings): Handle `width_only'. 869 (cff_slot_load): Handle FT_LOAD_ADVANCE_ONLY. 870 871 * src/cff/cffgload.h (cff_decoder): New element `width_only'. 872 (cff_decoder_set_width_only): New declaration. 873 874 * src/truetype/ttdriver.c (tt_get_advances): New function. 875 (tt_driver_class): Register it. 876 877 * src/truetype/ttgload.c (Get_HMetrics, Get_VMetrics): Renamed to... 878 (TT_Get_HMetrics, TT_Get_VMetrics): This. 879 Update callers. 880 * src/truetype/ttgload.h: Declare them. 881 882 * src/type1/t1gload.h, src/type1/t1gload.c (T1_Get_Advances): New 883 function. 884 * src/type1/t1driver.c (t1_driver_class): Register T1_Get_Advances. 885 886 887 Add checks for minimum version of the `autotools' stuff. 888 889 * autogen.sh: Implement it. 890 (get_major_version, get_minor_version, get_patch_version, 891 compare_to_minimum_version, check_tool_version): New auxiliary 892 functions. 893 894 * README.CVS: Document it. 895 896 2008-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 897 898 * src/sfnt/sfobjs.c (sfnt_open_font): Use TTAG_OTTO defined in 899 ttags.h instead of FT_MAKE_TAG( 'O', 'T', 'T', 'O' ). 900 901 2008-08-28 Werner Lemberg <wl@gnu.org> 902 903 * src/type1/t1load.c (parse_encoding): Protect against infinite 904 loop. This fixes Savannah bug #24150 (where a patch has been posted 905 too). 906 907 2008-08-23 Werner Lemberg <wl@gnu.org> 908 909 * src/type/t1afm.c (compare_kern_pairs), src/pxaux/afmparse.c 910 (afm_compare_kern_pairs): Fix comparison. This fixes Savannah bug 911 #24119. 912 913 2008-08-19 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 914 915 * src/base/ftobjs.c (FT_Stream_New): Initialize *astream always, 916 even if passed library or arguments are invalid. This fixes a bug 917 that an uninitialized stream is freed when an invalid library handle 918 is passed. Originally proposed by Mike Fabian, 2008/08/18 on 919 freetype-devel. 920 (FT_Open_Face): Ditto (stream). 921 (load_face_in_embedded_rfork): Ditto (stream2). 922 923 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 924 925 * src/base/ftmac.c: Add a fallback to guess the availability of the 926 `ResourceIndex' type. It is used when built without configure 927 (e.g., a build with Jam). 928 * builds/mac/ftmac.c: Ditto. 929 * builds/unix/configure.raw: Set HAVE_TYPE_RESOURCE_INDEX to 1 or 0 930 explicitly, even if `ResourceIndex' is unavailable. 931 932 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 933 934 * builds/unix/configure.raw: In checking of Mac OS X features, 935 all-in-one header file `Carbon.h' is replaced by the minimum 936 header file `CoreServices.h', similar to current src/base/ftmac.c. 937 938 2008-08-18 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 939 940 * src/sfnt/ttcmap.c (tt_cmap2_validate): Skip the validation of 941 sub-header when its code_count is 0. Many Japanese Dynalab fonts 942 include such an empty sub-header (code_count == 0, first_code == 0 943 delta == 0, but offset != 0) as the second sub-header in SJIS cmap. 944 945 2008-08-04 Werner Lemberg <wl@gnu.org> 946 947 * src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes 948 Savannah bug #23995. 949 950 * src/cid/cidload.c (parse_expansion_factor): New callback function. 951 (cid_field_records): Use it for `ExpansionFactor'. 952 * src/cod/cidtoken.h: Handle `ForceBold' keyword. 953 Don't handle `ExpansionFactor'. 954 955 2008-08-04 Bram Tassyns <bramt@enfocus.be> 956 957 * src/cff/cffparse.c (cff_parse_fixed_scaled): Fix thinko which 958 resulted in incorrect scaling. This fixes Savannah bug #23973. 959 960 2008-08-04 Werner Lemberg <wl@gnu.org> 961 962 Be more tolerant w.r.t. invalid entries in SFNT table directory. 963 964 * src/sfnt/ttload.c (check_table_dir): Ignore invalid entries and 965 adjust table count. 966 Add more trace messages. 967 (tt_face_load_font_dir): Updated. 968 969 2008-07-30 Werner Lemberg <wl@gnu.org> 970 971 * src/cff/cffgload.c (cff_decoder_parse_charstrings): No longer 972 assume that the first argument on the stack is the bottom-most 973 element. Two reasons: 974 975 o According to people from Adobe it is missing in the Type 2 976 specification that pushing of additional, superfluous arguments 977 on the stack is prohibited. 978 979 o Acroread in general handles fonts differently, namely by popping 980 the number of arguments needed for a particular operand (as a PS 981 interpreter would do). In case of buggy fonts this causes a 982 different interpretation which of the elements on the stack are 983 superfluous and which not. 984 985 Since there are CFF subfonts (embedded in PDFs) which rely on 986 Acroread's behaviour, FreeType now does the same. 987 988 2008-07-27 Werner Lemberg <wl@gnu.org> 989 990 Add extra mappings for `Tcommaaccent' and `tcommaaccent'. This 991 fixes Savannah bug #23940. 992 993 * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): Rename to... 994 (EXTRA_GLYPH_LIST_SIZE): This. 995 Increase by 2. 996 (ft_wgl_extra_unicodes): Rename to... 997 (ft_extra_glyph_unicodes): This. 998 Add two code values. 999 (ft_wgl_extra_glyph_names): Rename to... 1000 (ft_extra_glyph_names): This. 1001 Add two glyphs. 1002 (ft_wgl_extra_glyph_name_offsets): Rename to... 1003 (ft_extra_glyph_name_offsets): This. 1004 Add two offsets. 1005 1006 (ps_check_wgl_name, ps_check_wgl_unicode): Rename to... 1007 (ps_check_extra_glyph_name, ps_check_extra_glyph_unicode): This. 1008 Updated. 1009 (ps_unicodes_init): Updated. 1010 1011 2008-07-26 Werner Lemberg <wl@gnu.org> 1012 1013 * src/cff/cffgload.c (cff_decoder_prepare, 1014 cff_decoder_parse_charstrings): Improve debug output. 1015 1016 2008-07-22 Martin McBride <mmcbride@emtex.com> 1017 1018 * src/sfnt/ttcmap.c (tt_cmap4_validate, tt_cmap4_char_map_linear, 1019 tt_cmap4_char_map_binary): Handle fonts which treat the last segment 1020 specially. According to the specification, such fonts would be 1021 invalid but acroread accepts them. 1022 1023 2008-07-16 Jon Foster <Jon.Foster@cabot.co.uk> 1024 1025 * src/pfr/pfrdrivr.c (pfr_get_advance): Fix off-by-one error. 1026 1027 * src/base/ftcalc.c (FT_MulFix): Fix portability issue. 1028 1029 * src/sfnt/ttpost.c (MAC_NAME) [!FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: 1030 Fix compiler warning. 1031 1032 2008-07-16 Werner Lemberg <wl@gnu.org> 1033 1034 Handle CID-keyed fonts wrapped in an SFNT (with cmaps) correctly. 1035 1036 * src/cff/cffload.c (cff_font_load): Pass `pure_cff'. 1037 Invert sids table only if `pure_cff' is set. 1038 * src/cff/cffload.h: Udpated. 1039 1040 * src/cff/cffobjs.c (cff_face_init): Updated. 1041 Set FT_FACE_FLAG_CID_KEYED only if pure_cff is set. 1042 1043 * docs/CHANGES: Updated. 1044 1045 2008-07-09 Werner Lemberg <wl@gnu.org> 1046 1047 * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts 1048 where num_locations < num_glyphs. Problem reported by Ding Li. 1049 1050 2008-07-05 Werner Lemberg <wl@gnu.org> 1051 1052 Since FreeType uses `$(value ...)', we now need GNU make 3.80 or 1053 newer. This fixes Savannah bug #23648. 1054 1055 * configure: zsh doesn't like ${1+"$@"}. 1056 Update needed GNU make version. 1057 * builds/toplevel.mk: Check for `$(eval ...)'. 1058 * docs/INSTALL.GNU, docs/INSTALL.CROSS, docs/INSTALL.UNIX: Document 1059 it. 1060 1061 2008-07-04 Werner Lemberg <wl@gnu.org> 1062 1063 * src/raster/ftraster.c (Draw_Sweep): If span is smaller than one 1064 pixel, only check for dropouts if neither start nor end point lies 1065 on a pixel center. This fixes Savannah bug #23762. 1066 1067 2008-06-29 Werner Lemberg <wl@gnu.org> 1068 1069 * Version 2.3.7 released. 1070 ========================= 1071 1072 1073 Tag sources with `VER-2-3-7'. 1074 1075 * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump 1076 version number to 2.3.7. 1077 1078 * README, Jamfile (RefDoc), builds/win32/visualc/index.html, 1079 builds/win32/visualc/freetype.dsp, 1080 builds/win32/visualc/freetype.vcproj, 1081 builds/win32/visualce/index.html, 1082 builds/win32/visualce/freetype.dsp, 1083 builds/win32/visualce/freetype.vcproj: s/2.3.6/2.3.7/, s/236/237/. 1084 1085 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7. 1086 1087 * builds/unix/configure.raw (version_info): Set to 9:18:3. 1088 1089 * docs/release: Updated. 1090 1091 2008-06-28 Werner Lemberg <wl@gnu.org> 1092 1093 * src/ftglyph.c (FT_Matrix_Multiply, FT_Matrix_Invert): Move to... 1094 * src/ftcalc.c: Here. This fixes Savannah bug #23729. 1095 1096 2008-06-27 Werner Lemberg <wl@gnu.org> 1097 1098 * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, 1099 Horizontal_Gray_Sweep_Drop): Test for intersections which 1100 degenerate to a single point can be ignored; this has been confirmed 1101 by Greg Hitchcock from Microsoft. (This was commented out code.) 1102 1103 2008-06-26 Werner Lemberg <wl@gnu.org> 1104 1105 Improve navigation in API reference. 1106 1107 * src/tools/docmaker/tohtml.py (html_header_3): Renamed to... 1108 (html_header_6): This. 1109 (html_header_3, html_header_3i, html_header_4, html_header_5, 1110 html_header_5t): New strings. 1111 (toc_footer_start, toc_footer_end): New strings. 1112 (HtmlFormatter::html_header): Updated. 1113 (HtmlFormatter::html_index_header, HtmlFormatter::html_toc_header): 1114 New strings. 1115 (HtmlFormatter::index_enter): Use `html_index_header'. 1116 (HtmlFormatter::index_exit): Print `html_footer'. 1117 (HtmlFormatter::toc_enter): Use `html_toc_header'. 1118 (HtmlFormatter::toc_exit): Print proper footer. 1119 1120 Convert ~ to non-breakable space. 1121 1122 * src/tools/docmaker/tohtml.py (make_html_para): Implement it. 1123 Update header files accordingly. 1124 1125 2008-06-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1126 1127 * builds/unix/configure.raw: Check type `ResourceIndex' explicitly 1128 and define HAVE_TYPE_RESOURCE_INDEX if it is defined. Mac OS X 10.5 1129 bundles 10.4u SDK with MAC_OS_X_VERSION_10_5 macro but without 1130 ResourceIndex type definition. The macro does not inform the type 1131 availability. 1132 * src/base/ftmac.c: More parentheses are inserted to clarify the 1133 conditionals to disable legacy APIs in `10.5 and later' cases. If 1134 HAVE_TYPE_RESOURCE_INDEX is not defined, ResourceIndex is defined. 1135 1136 2008-06-24 Werner Lemberg <wl@gnu.org> 1137 1138 * src/truetype/ttinterp.c (Ins_SCANTYPE): Don't check rendering 1139 mode. 1140 1141 * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph, 1142 Draw_Sweep): No-dropout mode is value 2, not value 0. 1143 (Draw_Sweep): Really skip dropout handling for no-dropout mode. 1144 1145 2008-06-24 Werner Lemberg <wl@gnu.org> 1146 1147 * src/psaux/psobjs.c (t1_builder_close_contour): Don't add contour 1148 if it consists of one point only. Based on a patch from Savannah 1149 bug #23683 (from John Tytgat). 1150 1151 2008-06-22 Werner Lemberg <wl@gnu.org> 1152 1153 * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff 1154 with IS_HINTED. 1155 1156 * docs/CHANGES: Updated. 1157 1158 2008-06-22 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1159 1160 * builds/unix/configure.raw: If CFLAGS has `-isysroot XXX' option 1161 but LDFLAGS does not, import it to LDFLAGS. The option is used to 1162 specify non-default SDK on Mac OS X (e.g., universal binary SDK for 1163 Mac OS X 10.4 on PowerPC platform). Although Apple TechNote 2137 1164 recommends to add the option only to CFLAGS, LDFLAGS should include 1165 it because libfreetype.la is built with -no-undefined. This fixes a 1166 bug reported by Ryan Schmidt in MacPorts, 1167 http://trac.macports.org/ticket/15331. 1168 1169 2008-06-21 Werner Lemberg <wl@gnu.org> 1170 1171 Enable access to the various dropout rules of the B&W rasterizer. 1172 Pass dropout rules from the TT bytecode interpreter to the 1173 rasterizer. 1174 1175 * include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS, 1176 FT_OUTLINE_EXCLUDE_STUBS): New flags for for FT_Outline. 1177 1178 * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, 1179 Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the 1180 OpenType specification. 1181 Fix mode 4 computation. 1182 (Render_Glyph, Render_Gray_Glyph): Handle new outline flags. 1183 1184 * src/truetype/ttgload.c (TT_Load_Glyph) Convert scan conversion 1185 mode to FT_OUTLINE_XXX flags. 1186 1187 * src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check. 1188 1189 2008-06-19 Werner Lemberg <wl@gnu.org> 1190 1191 * src/cff/cffobjs.c (cff_face_init): Compute final 1192 `dict->units_per_em' value before assigning it to 1193 `cffface->units_per_EM'. Otherwise, CFFs without subfonts are 1194 scaled incorrectly if the font matrix is non-standard. This fixes 1195 Savannah bug #23630. 1196 1197 * docs/CHANGES: Updated. 1198 1199 2008-06-19 Werner Lemberg <wl@gnu.org> 1200 1201 * src/type/t1objs.c (T1_Face_Init): Slightly improve algorithm fix 1202 from 2008-06-19. 1203 1204 2008-06-18 Werner Lemberg <wl@gnu.org> 1205 1206 * src/type/t1objs.c (T1_Face_Init): Fix change from 2008-03-21. 1207 Reported by Peter Weilbacher <mozilla@weilbacher.org>. 1208 1209 * docs/CHANGES: Updated. 1210 1211 2008-06-15 George Williams <gww@silcom.com> 1212 1213 * src/otvalid/otvgpos.c (otv_MarkBasePos_validate): Set 1214 `valid->extra2' to 1. This is undocumented in the OpenType 1.5 1215 specification. 1216 1217 2008-06-15 Werner Lemberg <wl@gnu.org> 1218 1219 * src/base/ftcalc.c (FT_MulFix) <asm>: Protect registers correctly 1220 from clobbering. Patch from Savannah bug report #23556. 1221 1222 * docs/CHANGES: Document it. 1223 1224 2008-06-10 Werner Lemberg <wl@gnu.org> 1225 1226 * autogen.sh: Add option `--install' to libtoolize. 1227 1228 2008-06-10 Werner Lemberg <wl@gnu.org> 1229 1230 * Version 2.3.6 released. 1231 ========================= 1232 1233 1234 Tag sources with `VER-2-3-6'. 1235 1236 * docs/CHANGES, docs/VERSION.DLL: Update documentation and bump 1237 version number to 2.3.6. 1238 1239 * README, Jamfile (RefDoc), builds/win32/visualc/index.html, 1240 builds/win32/visualc/freetype.dsp, 1241 builds/win32/visualc/freetype.vcproj, 1242 builds/win32/visualce/index.html, 1243 builds/win32/visualce/freetype.dsp, 1244 builds/win32/visualce/freetype.vcproj: s/2.3.5/2.3.6/, s/235/236/. 1245 1246 * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6. 1247 1248 * builds/unix/configure.raw (version_info): Set to 9:17:3. 1249 1250 1251 * include/freetype/internal/psaux.h (T1_BuilderRec): Remove `scale_x' 1252 and `scale_y'. 1253 * src/cff/cffgload.h (CFF_Builder): Remove `scale_x' and `scale_y'. 1254 1255 1256 * src/cff/cffparse.c: Include FT_INTERNAL_DEBUG_H. 1257 * src/cff/cffobjs.h: Include FT_INTERNAL_POSTSCRIPT_HINTS_H. 1258 1259 2008-06-10 Werner Lemberg <wl@gnu.org> 1260 1261 * src/base/ftobjs.c (open_face): Check `clazz->init_face' and 1262 `clazz->done_face'. 1263 1264 2008-06-09 VaDiM <s_sliva@rambler.ru> 1265 1266 Support debugging on WinCE. From Savannah patch #6536; this fixes 1267 bug #23497. 1268 1269 * builds/win32/ftdebug.c (OutputDebugStringEx): New function/macro 1270 as a replacement for OutputDebugStringA (which WinCE doesn't have). 1271 Update all callers. 1272 (ft_debug_init) [_WIN32_CE]: WinCE apparently doesn't have 1273 environment variables. 1274 1275 2008-06-09 Werner Lemberg <wl@gnu.org> 1276 1277 * README.CVS: Updated. 1278 1279 * builds/unix/configure.raw, builds/unix/freetype-config.in: Updated 1280 for newer versions of autoconf and friends. 1281 1282 2008-06-08 Werner Lemberg <wl@gnu.org> 1283 1284 * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and 1285 `private_len' unsigned. 1286 1287 * src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read 1288 it as such. 1289 (T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned. 1290 1291 1292 * src/base/ftstream.c (FT_Stream_Skip): Reject negative values. 1293 1294 1295 * src/type1/t1load.c (parse_blend_design_positions): Check `n_axis' 1296 for sane value. 1297 Fix typo. 1298 1299 1300 * src/psaux/psobjs.c (ps_table_add): Check `idx' correctly. 1301 1302 1303 * src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check 1304 `last_point'. 1305 1306 1307 * src/sfnt/ttload.c (tt_face_load_max_profile): Limit 1308 `maxTwilightPoints'. 1309 1310 2008-06-06 Werner Lemberg <wl@gnu.org> 1311 1312 * src/truetype/ttinterp.c (Ins_IP): Handle case `org_dist == 0' 1313 correctly. This fixes glyphs `t' and `h' of Arial Narrow at 12ppem. 1314 1315 2008-06-03 Werner Lemberg <wl@gnu.org> 1316 1317 * include/freetype/ftcache.h (FTC_FaceID): Change type back to 1318 FT_Pointer. Reported by Ian Britten <britten@caris.com>. 1319 1320 2008-06-02 Werner Lemberg <wl@gnu.org> 1321 1322 Emit header info for defined FreeType objects in reference. 1323 1324 * src/tools/docmaker/content.py (re_header_macro): New regexp. 1325 (ContentProcessor::__init__): Initialize new dictionary `headers'. 1326 (DocBlock::__init__): Collect macro header definitions. 1327 1328 * src/tools/docmaker/tohtml.py (header_location_header, 1329 header_location_footer): New strings. 1330 (HtmlFormatter::__init__): Pass `headers' dictionary. 1331 (HtmlFormatter::print_html_field): Don't emit paragraph tags. 1332 (HtmlFormatter::print_html_field_list): Emit empty paragraph. 1333 (HtmlFormatter::block_enter): Emit header info. 1334 1335 2008-06-01 Werner Lemberg <wl@gnu.org> 1336 1337 * include/freetype/config/ftheader.h (FT_UNPATENTED_HINTING_H, 1338 FT_INCREMENTAL_H): Added. 1339 1340 2008-05-28 Werner Lemberg <wl@gnu.org> 1341 1342 * src/tools/docmaker/sources.py (SourceBlock::__init__): While 1343 looking for markup tags, return immediately as soon a single one is 1344 found. 1345 1346 2008-05-28 Werner Lemberg <wl@gnu.org> 1347 1348 * src/truetype/ttinterp.c (Ins_MD): The MD instruction also uses 1349 original, unscaled input values. Confirmed by Greg Hitchcock from 1350 Microsoft. 1351 1352 2008-05-27 Werner Lemberg <wl@gnu.org> 1353 1354 * src/tools/docmaker/tohtml.py (block_footer_start, 1355 block_footer_middle): Beautify output. 1356 1357 2008-05-25 Werner Lemberg <wl@gnu.org> 1358 1359 * src/raster/ftraster.c (fc_black_render): Return 0 when we are 1360 trying to render into a zero-width/height bitmap, not an error code. 1361 1362 * src/truetype/ttgload.c (load_truetype_glyph): Move initialization 1363 of the graphics state for subglyphs to... 1364 (TT_Hint_Glyph): This function. 1365 Hinting instructions for a composite glyph apparently refer to the 1366 just hinted subglyphs, not the unhinted, unscaled outline. This 1367 seems to fix Savannah bugs #20973 and (at least partially) #23310. 1368 1369 2008-05-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1370 1371 * src/base/ftmac.c (FT_New_Face_From_Suitcase): Check if valid 1372 `aface' is returned by FT_New_Face_From_FOND(). The patch was 1373 proposed by an anonymous reporter of Savannah bug #23204. 1374 1375 2008-05-18 Werner Lemberg <wl@gnu.org> 1376 1377 * src/pshinter/pshalgo.c (ps_hints_apply): Reset scale values after 1378 correction for pixel boundary. Without this patch, the effect can 1379 be cumulative under certain circumstances, making glyphs taller and 1380 taller after each call. This fixes Savannah bug #19976. 1381 1382 2008-05-18 Werner Lemberg <wl@gnu.org> 1383 1384 * src/base/ftdebug.c (FT_Message, FT_Panic): Send output to stderr. 1385 This fixes Savannah bug #23280. 1386 1387 * docs/CHANGES: Updated. 1388 1389 2008-05-18 David Turner <david@freetype.org> 1390 1391 * src/psnames/psmodule.c (ft_wgl_extra_unicodes, 1392 ft_wgl_extra_glyph_names, ft_wgl_extra_glyph_name_offsets, 1393 ps_check_wgl_name, ps_check_wgl_unicode): Use `static' to make 1394 declarations non-global. 1395 1396 * src/type1/t1load.c: Add missing comment. 1397 1398 2008-05-17 Sam Hocevar <samh> 1399 1400 * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour 1401 glyphs correctly. Patch from Savannah bug #23277. 1402 1403 2008-05-16 Werner Lemberg <wl@gnu.org> 1404 1405 * docs/CHANGES: Updated. 1406 1407 2008-05-16 Sergey Tolstov <stolstov@esri.com> 1408 1409 Improve support for WGL4 encoded fonts. 1410 1411 * src/psnames/psmodule.c (WGL_EXTRA_LIST_SIZE): New macro. 1412 (ft_wgl_extra_unicodes, ft_wgl_extra_glyph_names, 1413 ft_wgl_extra_glyph_name_offsets): New arrays. 1414 (ps_check_wgl_name, ps_check_wgl_unicode): New functions. 1415 (ps_unicodes_init): Use them to add additional Unicode mappings. 1416 1417 2008-05-15 Werner Lemberg <wl@gnu.org> 1418 1419 * src/psaux/t1decode.c (t1_decoder_parse_charstrings) 1420 <op_closepath>: `closepath' without a path is a no-op, not an error 1421 (cf. the PS reference manual). 1422 1423 Reported by Martin McBride. 1424 1425 2008-05-15 Werner Lemberg <wl@gnu.org> 1426 1427 * builds/toplevel.mk (CONFIG_GUESS, CONFIG_SUB): Updated. 1428 1429 2008-05-15 Werner Lemberg <wl@gnu.org> 1430 1431 * src/type1/t1load.c (parse_subrs): Accept fonts with a subrs array 1432 which contains a single but empty entry. This is technically 1433 invalid (since it must end with `return'), but... 1434 1435 Reported by Martin McBride. 1436 1437 2008-05-14 Werner Lemberg <wl@gnu.org> 1438 1439 Finish fix of scaling bug of CID-keyed CFF subfonts. 1440 1441 * include/freetype/internal/ftcalc.h, src/base/ftcalc.c 1442 (FT_Matrix_Multiply_Scaled, FT_Vector_Transform_Scaled): New 1443 functions. 1444 1445 * src/cff/cffobjs.h (CFF_Internal): New struct. It is used to 1446 provide global hinting data for both the top-font and all subfonts 1447 (with proper scaling). 1448 1449 * src/cff/cffobjs.c (cff_make_private_dict): New function, using 1450 code from `cff_size_init'. 1451 (cff_size_init, cff_size_done, cff_size_select, cff_size_request): 1452 Use CFF_Internal and handle subfonts. 1453 (cff_face_init): Handle top-dict and subfont matrices correctly; 1454 apply some heuristic in case of unlikely matrix concatenation 1455 results. This has been discussed with people from Adobe (thanks 1456 goes mainly to David Lemon) who confirm that the CFF specs are fuzzy 1457 and not correct. 1458 1459 * src/cff/cffgload.h (cff_decoder_prepare): Add `size' argument. 1460 1461 * src/cff/cffgload.c (cff_builder_init): Updated. 1462 (cff_decoder_prepare): Handle hints globals for subfonts. 1463 Update all callers. 1464 (cff_slot_load): Handling scaling of subfonts properly. 1465 1466 * src/cff/cffparse.c (cff_parse_fixed_dynamic): New function. 1467 (cff_parse_font_matrix): Use it. 1468 1469 * src/cff/cfftypes.h (CFF_FontDictRec): Make `units_per_em' 1470 FT_ULong. 1471 1472 * docs/CHANGES: Document it. 1473 1474 2008-05-13 Werner Lemberg <wl@gnu.org> 1475 1476 * src/winfonts/winfnt.c (fnt_face_get_dll_font, FNT_Face_Init): 1477 Handle case `face_index < 0'. 1478 * docs/CHANGES: Document it. 1479 1480 2008-05-04 Werner Lemberg <wl@gnu.org> 1481 1482 First steps to fix the scaling bug of CID-keyed CFF subfonts, 1483 reported by Ding Li on 2008/03/28 on freetype-devel. 1484 1485 * src/base/cff/cffparse.c (power_tens): New array. 1486 (cff_parse_real): Rewritten to introduce a fourth parameter which 1487 returns the `scaling' of the real number so that we have no 1488 precision loss. This is not used yet. 1489 Update all callers. 1490 (cff_parse_fixed_thousand): Replace with... 1491 (cff_parse_fixed_scaled): This function. Update all callers. 1492 1493 2008-05-03 Werner Lemberg <wl@gnu.org> 1494 1495 * src/base/ftobjs.c (FT_Load_Glyph): Call the auto-hinter without 1496 transformation since it recursively calls FT_Load_Glyph. This fixes 1497 Savannah bug #23143. 1498 1499 2008-04-26 Werner Lemberg <wl@gnu.org> 1500 1501 * include/freetype/internal/psaux.h (T1_BuilderRec): Mark `scale_x' 1502 and `scale_y' as obsolete since they aren't used. 1503 * src/psaux/psobjs.c (t1_builder_init): Updated. 1504 1505 * src/cff/cffgload.h (CFF_Builder): Mark `scale_x' and `scale_y' as 1506 obsolete since they aren't used. 1507 * src/cff/cffgload.c (cff_builder_init): Updated. 1508 1509 2008-04-14 Werner Lemberg <wl@gnu.org> 1510 1511 * src/pcf/pcfdrivr.c (PCF_Face_Init): Protect call to 1512 `FT_Stream_OpenLZW' with `FT_CONFIG_OPTION_USE_LZ'. From Savannah 1513 bug #22909. 1514 1515 2008-04-13 Werner Lemberg <wl@gnu.org> 1516 1517 * src/psaux/psconv.c (PS_Conv_ToFixed): Increase precision if 1518 integer part is zero. 1519 1520 2008-04-01 Werner Lemberg <wl@gnu.org> 1521 1522 Fix compilation with g++ 4.1 (with both `single' and `multi' 1523 targets). 1524 1525 * src/base/ftobjs.c (FT_Open_Face): Don't define a variable in block 1526 which is crossed by a `goto'. 1527 1528 * src/otvalid/otvalid.h (otv_MATH_validate): Add prototype. 1529 1530 2008-03-31 Werner Lemberg <wl@gnu.org> 1531 1532 Fix support for subsetted CID-keyed CFFs. 1533 1534 * include/freetype/freetype.h (FT_FACE_FLAG_CID_KEYED, 1535 FT_IS_CID_KEYED): New macros. 1536 1537 * src/cff/cffobjs.c (cff_face_init): Set number of glyphs to the 1538 maximum CID value in CID-keyed CFFs. 1539 Handle FT_FACE_FLAG_CID_KEYED flag. 1540 1541 * docs/CHANGES: Document it. 1542 1543 1544 Fix CFF font matrix calculation and improve precision. 1545 1546 * src/cff/cffparse.c (cff_parse_real): Increase precision if integer 1547 part is zero. 1548 (cff_parse_font_matrix): Simplify computation of `units_per_em'; 1549 this prevents overflow also. 1550 1551 1552 Support FT_Get_CID_Registry_Ordering_Supplement for PS CID fonts. 1553 1554 * src/cid/cidriver.c: Include FT_SERVICE_CID_H. 1555 (cid_get_ros): New function. 1556 (cid_service_cid_info): New service structure. 1557 (cid_services): Register it. 1558 1559 2008-03-23 Werner Lemberg <wl@gnu.org> 1560 1561 Adjustments for Visual C++ 8.0, as reported by Rainer Deyke. 1562 1563 * builds/compiler/visualc.mk (CFLAGS): Remove /W5. 1564 (ANSIFLAGS): Add _CRT_SECURE_NO_DEPRECATE. 1565 1566 2008-03-21 Laurence Darby <ldarby> 1567 1568 * src/type1/t1objs.c (T1_Face_Init): Use `/Weight'. Patch from 1569 Savannah bug #22675. 1570 1571 2008-03-13 Derek Clegg <dclegg@apple.com> 1572 1573 * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix named style loop. 1574 Patch from Savannah bug #22541. 1575 1576 2008-03-03 Masatoshi Kimura <VYV03354@nifty.ne.jp> 1577 1578 * src/sfnt/ttcmap.c (tt_cmap14_char_map_nondef_binary, 1579 tt_cmap14_find_variant): Return correct value. 1580 (tt_cmap14_variant_chars): Fix check for `di'. 1581 1582 2008-02-29 Wermer Lemberg <wl@gnu.org> 1583 1584 * docs/CHANGES: Updated. 1585 1586 2008-02-29 Wolf 1587 1588 Add build support for symbian platform. From Savannah bug #22440. 1589 1590 * builds/symbian/*: New files. 1591 1592 2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1593 1594 * src/base/ftmac.c (parse_fond): Fix a bug of PostScript font name 1595 synthesis. For any face of a specified FOND, always the name for 1596 the first face was used. Except of a FOND that refers multiple 1597 Type1 font files, wrong synthesized font names are not used at all, 1598 so this is an invisible bug. A few limit checks are added too. 1599 1600 * builds/mac/ftmac.c: Ditto. 1601 1602 2008-02-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1603 1604 * builds/unix/configure.raw: Split compiler option to link Carbon 1605 frameworks to one option for CoreServices framework and another 1606 option for ApplicationServices framework. The split options can be 1607 managed by GNU libtool to avoid unrequired duplication when FreeType 1608 is linked with other applications. Suggested by Daniel Macks, 1609 Savannah bug #22366. 1610 1611 2008-02-18 Victor Stinner <victor.stinner@haypocalc.com> 1612 1613 * src/truetype/ttinterp.c (Ins_IUP): Check number of points. Fix 1614 from Savannah bug #22356. 1615 1616 2008-02-17 Jonathan Blow <jon@number-none.com> 1617 1618 * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): 1619 Check for valid callback pointers. 1620 1621 2008-02-15 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1622 1623 * src/base/ftmac.c (FT_New_Face_From_SFNT): Check the sfnt resource 1624 handle by its value instead of ResError(), fix provided by Deron 1625 Kazmaier. According to the Resource Manager Reference, 1626 GetResource(), Get1Resource(), GetNamedResource(), 1627 Get1NamedResource() and RGetResource() set noErr but return NULL 1628 handle when they can not find the requested resource. These 1629 functions never return undefined values, so it is sufficient to 1630 check if the handle is not NULL. 1631 1632 * builds/mac/ftmac.c (FT_New_Face_From_SFNT): Ditto. 1633 1634 2008-02-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1635 1636 * src/base/ftbase.c: <ftmac.c> is replaced by "ftmac.c" as other 1637 inclusion styles. Now it always includes src/base/ftmac.c; 1638 builds/mac/ftmac.c is never included in any configuration. 1639 1640 * builds/unix/configure.raw: Print warning if configure is executed 1641 with options to specify Carbon functionalities explicitly. 1642 1643 * docs/INSTALL.MAC: Note that legacy builds/mac/ftmac.c is not 1644 included automatically and manual replacement is required. 1645 1646 2008-02-11 Werner Lemberg <wl@gnu.org> 1647 1648 * builds/modules.mk (CLOSE_MODULE, REMOVE_MODULE), builds/detect.mk 1649 (dos_setup), builds/freetype.mk (clean_project_dos, 1650 distclean_project_dos): Don't use \ but $(SEP). Reported by Duncan 1651 Murdoch. 1652 1653 2008-01-18 Sylvain Pasche <sylvain.pasche@gmail.com> 1654 1655 * src/base/ftlcdfil.c (_ft_lcd_filter_legacy): Updated comment to 1656 mention intra-pixel algorithm. 1657 1658 * include/freetype/freetype.h (FT_Render_Mode): Mention that 1659 FT_Library_SetLcdFilter can be used to reduce fringes. 1660 1661 2008-01-16 Werner Lemberg <wl@gnu.org> 1662 1663 * src/raster/ftraster.c (ft_black_render): Check `outline' before 1664 using it. Reported by Allan Yang. 1665 1666 2008-01-12 Werner Lemberg <wl@gnu.org> 1667 1668 * src/raster/ftraster.c (FT_CONFIG_OPTION_5_GRAY_LEVELS): Remove. 1669 1670 2008-01-12 Allan Yang, Jian Hua - SH <Allan.Yang@fmc.fujitsu.com> 1671 1672 * src/raster/ftraster.c (ft_black_init) 1673 [FT_RASTER_OPTION_ANTI_ALIASING]: Fix compilation. 1674 1675 2008-01-10 Werner Lemberg <wl@gnu.org> 1676 1677 * src/truetype/ttgload.c (load_truetype_glyph): Handle the case 1678 where the number of contours in a simple glyph is zero (and which 1679 does contain an entry in the `glyf' table). This fixes Savannah bug 1680 #21990. 1681 1682 2008-01-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1683 1684 Formatting suggested by Sean McBride. 1685 1686 * builds/mac/ftmac.c: Formatting (tab expanded). 1687 * src/autofit/afindic.c: Ditto. 1688 * src/base/ftcid.c: Ditto. 1689 * src/base/ftmac.c: Ditto. 1690 1691 2007-12-30 Werner Lemberg <wl@gnu.org> 1692 1693 * src/smooth/ftgrays.c (gray_raster_render): Check `outline' 1694 correctly. 1695 1696 2007-12-21 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1697 1698 Improvement of POSIX resource-fork accessor to load unsorted 1699 references in a resource. In HelveLTMM (resource-fork PostScript 1700 Type1 font bundled with Mac OS X since 10.3.x), the appearance order 1701 of PFB chunks is not sorted; sorting the chunks by reference IDs is 1702 required. 1703 1704 * include/freetype/internal/ftrfork.h (FT_RFork_Ref): New structure 1705 type to store a pair of reference ID and offset to the chunk. 1706 1707 * src/base/ftrfork.c (ft_raccess_sort_ref_by_id): New function to 1708 sort FT_RFork_Ref by their reference IDs. 1709 1710 (FT_Raccess_Get_DataOffsets): Returns an array of offsets that is 1711 sorted by reference ID. 1712 1713 2007-12-14 Werner Lemberg <wl@gnu.org> 1714 1715 * src/cff/cffparse.c (cff_parse_real): Don't apply `power_ten' 1716 division too early; otherwise the most significant digit(s) of the 1717 final result are lost as the value is truncated to an integer. This 1718 fixes Savannah bug #21794 (where the patch has been posted too). 1719 1720 2007-12-06 Fix <4d876b82@gmail.com> 1721 1722 Pass options from one configure script to another as-is (not 1723 expanded). This is needed for options like 1724 --includedir='${prefix}/include'. 1725 1726 * builds/unix/detect.mk, configure: Prevent argument expansion in 1727 call to the (real) `configure' script. 1728 1729 2007-12-06 Werner Lemberg <wl@gnu.org> 1730 1731 * src/truetype/ttgload.c (load_truetype_glyph): Fix compilation if 1732 TT_USE_BYTECODE_INTERPRETER isn't defined. 1733 1734 2007-12-06 Werner Lemberg <wl@gnu.org> 1735 1736 There exist CFFs which contain opcodes for the Type 1 operators 1737 `hsbw' and `closepath' which are both invalid in Type 2 charstrings. 1738 However, it doesn't harm to support them. 1739 1740 * src/cff/cffgload.c (CFF_Operator): Add `cff_op_hsbw' and 1741 `cff_op_closepath.' 1742 (cff_argument_counts): Ditto. 1743 1744 (cff_decoder_parse_charstrings): Handle Type 1 opcodes 9 (closepath) 1745 and 13 (hsbw) which are invalid in Type 2 charstrings. 1746 1747 2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1748 1749 * src/base/ftrfork.c (raccess_guess_darwin_newvfs): New function to 1750 support new pathname syntax `..namedfork/rsrc' to access a resource 1751 fork on Mac OS X. The legacy syntax `/rsrc' does not work on 1752 case-sensitive HFS+. 1753 (raccess_guess_darwin_hfsplus): Fix a bug in the calculation of 1754 buffer size to store a pathname. 1755 * include/freetype/internal/ftrfork.h: Increment the number of 1756 resource fork guessing rule. 1757 1758 2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1759 1760 * builds/unix/configure.raw: Improve the compile tests to search 1761 Carbon functions. 1762 * builds/mac/ftmac.c: Import fixes for Carbon incompatibilities 1763 proposed by Sean McBride from src/base/ftmac.c (see 2007-11-16). 1764 1765 2007-12-06 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1766 1767 The documents and comments for Mac OS X are improved by Sean 1768 McBride. 1769 1770 * src/base/ftmac.c: Fix a comment. 1771 * include/freetype/ftmac.h: Ditto. 1772 * docs/INSTALL.MAC: Improve English and add comment on lowest 1773 system version specified by MACOSX_DEPLOYMENT_TARGET. 1774 1775 2007-12-04 Werner Lemberg <wl@gnu.org> 1776 1777 * src/cff/cffload.c (cff_subfont_load): Don't use logical OR to 1778 concatenate error codes. 1779 * src/sfnt/ttsbit.c (Load_SBit_Range): Ditto. 1780 1781 2007-12-04 Graham Asher <graham.asher@btinternet.com> 1782 1783 * src/truetype/ttobjs.c (tt_face_init): Don't use logical OR to 1784 concatenate error codes. 1785 1786 2007-12-04 Sean McBride <sean@rogue-research.com> 1787 1788 * src/pfr/pfrgload.c (pfr_glyph_load_compound): Remove compiler 1789 warning. 1790 1791 2007-11-20 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1792 1793 Fix MacOS legacy font support by Masatake Yamato on Mac OS X. It is 1794 not working since 2.3.5. In FT_Open_New(), if FT_New_Stream() 1795 cannot mmap() the specified file and cannot seek to head of the 1796 specified file, it returns NULL stream and FT_Open_New() returns the 1797 error immediately. On MacOS, most legacy MacOS fonts fall into such 1798 a scenario because their data forks are zero-sized and cannot be 1799 sought. To proceed to guessing of resource fork fonts, the 1800 functions for legacy MacOS font must properly handle the NULL stream 1801 returned by FT_New_Stream(). 1802 1803 * src/base/ftobjs.c (IsMacBinary): Return error 1804 FT_Err_Invalid_Stream_Operation immediately when NULL stream is 1805 passed. 1806 (FT_Open_Face): Even when FT_New_Stream() returns an error, proceed 1807 to fallback. Originally, legacy MacOS font is tested in the cases 1808 of FT_Err_Invalid_Stream_Operation (occurs when data fork is empty) 1809 or FT_Err_Unknown_File_Format (occurs when AppleSingle header or 1810 .dfont header is combined). Now the case of 1811 FT_Err_Cannot_Open_Stream is included. 1812 1813 * src/base/ftrfork.c (FT_Raccess_Guess): When passed stream is NULL, 1814 skip FT_Stream_Seek(), which seeks to the head of stream, and 1815 proceed to unit testing of raccess_guess_XXX(). FT_Stream_Seek() 1816 for a NULL stream causes a Bus error on Mac OS X. 1817 (raccess_guess_apple_double): Return FT_Err_Cannot_Open_Stream 1818 immediately if passed stream is NULL. 1819 (raccess_guess_apple_single): Ditto. 1820 1821 2007-11-16 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1822 1823 Fix for Carbon incompatibilities since Mac OS X 10.5, 1824 proposed by Sean McBride. 1825 1826 * doc/INSTALL.MAC: Comment on MACOSX_DEPLOYMENT_TARGET. 1827 1828 * include/freetype/ftmac.h: Deprecate FT_New_Face_From_FOND and 1829 FT_GetFilePath_From_Mac_ATS_Name. Since Mac OS X 10.5, calling 1830 Carbon functions from a forked process is classified as unsafe 1831 by Apple. All Carbon-dependent functions should be deprecated. 1832 1833 * src/base/ftmac.c: Use essential header files 1834 <CoreServices/CoreServices.h> and 1835 <ApplicationServices/ApplicationServices.h> instead of 1836 all-in-one header file <Carbon/Carbon.h>. 1837 1838 Include <sys/syslimits.h> and replace HFS_MAXPATHLEN by Apple 1839 genuine macro PATH_MAX. 1840 1841 Add fallback macro for kATSOptionFlagsUnRestrictedScope which 1842 is not found in Mac OS X 10.0. 1843 1844 Multi-character constants ('POST', 'sfnt' etc) are replaced by 1845 64bit constants calculated by FT_MAKE_TAG() macro. 1846 1847 For the index in the segment of resource fork, new portable 1848 type ResourceIndex is introduced for better compatibility. 1849 This type is since Mac OS X 10.5, so it is defined as short 1850 when built on older platforms. 1851 1852 (FT_ATSFontGetFileReference): If build target is only the systems 1853 10.5 and newer, it calls Apple genuine ATSFontGetFileReference(). 1854 1855 (FT_GetFile_From_Mac_ATS_Name): Return an error if system is 10.5 1856 and newer or 64bit platform, because legacy type FSSpec type is 1857 removed completely. 1858 1859 (FT_New_Face_From_FSSpec): Ditto. 1860 1861 2007-11-01 Werner Lemberg <wl@gnu.org> 1862 1863 * src/sfnt/sfobjs.c (sfnt_done_face): Check `sfnt' everywhere. This 1864 fixes Savannah bug #21485. 1865 1866 2007-10-29 Daniel Svoboda <dasvo@planeta@cz> 1867 1868 * src/winfonts/winfnt.c (FNT_Face_Init): Check first that the driver 1869 can handle the font at all, then check `face_index'. Otherwise, the 1870 driver might return the wrong error code. This fixes Savannah bug 1871 #21468. 1872 1873 2007-10-21 Werner Lemberg <wl@gnu.org> 1874 1875 * src/sfnt/sfobjs.c (sfnt_load_face): Support bit 9 and prepare 1876 support for bit 8 of the `fsSelection' field in the `OS/2' table. 1877 MS is already using this; hopefully, this becomes part of OpenType 1878 1.5. 1879 Prepare also support for `name' IDs 21 (WWS_FAMILY) and 22 1880 (WWS_SUBFAMILY). 1881 1882 2007-10-20 Werner Lemberg <wl@gnu.org> 1883 1884 * src/tools/docmaker/tohtml.py (html_header_2): Fix typo. 1885 Add `td.left' element to CSS. 1886 (toc_section_enter): Use it. 1887 1888 2007-10-18 David Turner <david@freetype.org> 1889 1890 * include/freetype/freetype.h, src/base/ftobjs.c: Rename API 1891 functions related to cmap type 14 support to the 1892 `FT_Object_ActionName' scheme: 1893 1894 FT_Get_Char_Variant_index -> FT_Face_GetCharVariantIndex 1895 FT_Get_Char_Variant_IsDefault -> FT_Face_GetCharVariantIsDefault 1896 FT_Get_Variant_Selectors -> FT_Face_GetVariantSelectors 1897 FT_Get_Variants_Of_Char -> FT_Face_GetVariantsOfChar 1898 FT_Get_Chars_Of_Variant -> FT_Face_GetCharsOfVariant 1899 1900 Update documentation accordingly. 1901 1902 * src/sfnt/ttcmap.c: Stronger cmap 14 validation. 1903 Make the code a little more consistent with FreeType coding 1904 conventions and modify the cmap14 functions that returned a newly 1905 allocated array to use a persistent vector from the TT_CMap14 object 1906 instead. 1907 1908 (TT_CMap14Rec): Provide array and auxiliary data for result. 1909 (tt_cmap14_done, tt_cmap14_ensure): New functions. 1910 1911 (tt_cmap14_init, tt_cmap14_validate, tt_cmap14_char_map_def_binary, 1912 tt_cmap14_char_map_nondef_binary, tt_cmap14_find_variant, 1913 tt_cmap14_char_var_index, tt_cmap14_variants, 1914 tt_cmap14_char_variants, tt_cmap14_def_char_count, 1915 tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars, 1916 tt_cmap14_variant_chars, tt_cmap14_class_rec): Updated and improved. 1917 1918 2007-10-15 George Williams <gww@silcom.com> 1919 1920 Add support for cmap type 14. 1921 1922 * devel/ftoption.h, include/freetype/config/ftoption.h 1923 (TT_CONFIG_CMAP_FORMAT_14): New macro. 1924 1925 * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIndexFunc, 1926 FT_CMap_CharVarIsDefaultFunc, FT_CMap_VariantListFunc, 1927 FT_CMap_CharVariantListFunc, FT_CMap_VariantCharListFunc): New 1928 support function prototypes. 1929 (FT_CMap_ClassRec): Add them. 1930 Update all users. 1931 1932 * include/freetype/ttnameid.h (TT_APPLE_ID_VARIANT_SELECTOR): New 1933 macro. 1934 1935 * include/freetype/freetype.h (FT_Get_Char_Variant_Index, 1936 FT_Get_Char_Variant_IsDefault, FT_Get_Variant_Selectors, 1937 FT_Get_Variants_Of_Char, FT_Get_Chars_Of_Variant): New API 1938 functions. 1939 1940 * src/base/ftobjs.c (find_variant_selector_charmap): New auxiliary 1941 function. 1942 (FT_Set_Charmap): Disallow cmaps of type 14. 1943 (FT_Get_Char_Variant_Index, FT_Get_Char_Variant_IsDefault, 1944 FT_Get_Variant_Selectors, FT_Get_Variants_Of_Char, 1945 FT_Get_Chars_Of_Variant): New API functions. 1946 1947 * src/sfnt/ttcmap.c (TT_PEEK_UINT24, TT_NEXT_UINT24): New macros. 1948 1949 (TT_CMap14Rec, tt_cmap14_init, tt_cmap14_validate, 1950 tt_cmap14_char_index, tt_cmap14_char_next, tt_cmap14_get_info, 1951 tt_cmap14_char_map_def_binary, tt_cmap14_char_map_nondef_binary, 1952 tt_cmap14_find_variant, tt_cmap14_char_var_index, 1953 tt_cmap14_char_var_isdefault, tt_cmap14_variants, 1954 tt_cmap14_char_variants, tt_cmap14_def_char_count, 1955 tt_cmap14_get_def_chars, tt_cmap14_get_nondef_chars, 1956 tt_cmap14_variant_chars, tt_cmap14_class_rec): New functions and 1957 structures for cmap 14 support. 1958 (tt_cmap_classes): Register tt_cmap14_class_rec. 1959 (tt_face_build_cmaps): One more error message. 1960 1961 * docs/CHANGES: Mention cmap 14 support. 1962 1963 2007-10-01 Werner Lemberg <wl@gnu.org> 1964 1965 * src/base/ftobjs.c (find_unicode_charmap): If search for a UCS-4 1966 charmap fails, do the loop again while searching a UCS-2 charmap. 1967 This favours MS charmaps over Apple ones. 1968 1969 2007-08-29 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1970 1971 * src/base/ftmac.c: Introduction of abstract `short' data types, 1972 ResFileRefNum and ResID. These types were introduced for Copland, 1973 then backported to MPW. The variables exchanged with FileManager 1974 QuickDraw frameworks are redefined by these data types. Patch was 1975 proposed by Sean McBride. 1976 * builds/mac/ftmac.c: Ditto. 1977 1978 2007-08-18 Werner Lemberg <wl@gnu.org> 1979 1980 * src/otvalid/otvcmmn.c (otv_x_y_ux_sy): Skip context glyphs. Found 1981 by Imran Yousaf. Fixes Savannah bug #20773. 1982 1983 (otv_Lookup_validate): Correct handling of LookupType. Found by 1984 Imran Yousaf. Fixes Savannah bug #20782. 1985 1986 2007-08-17 George Williams <gww@silcom.com> 1987 1988 * src/otvalid/otvgsub.c (otv_SingleSubst_validate): Fix handling of 1989 SingleSubstFormat1. 1990 1991 2007-08-11 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 1992 1993 * builds/unix/configure.raw: Fix a bug which sets CC_BUILD by 1994 ${build-gcc} (unchecked) instead of by ${build}-gcc (checked). 1995 Found by Ryan Hill. 1996 1997 2007-08-11 George Williams <gww@silcom.com> 1998 1999 * src/otvalid/otvcommn.c, src/otvalid/otvcommn.h 2000 (otv_Coverage_validate): Add fourth argument to pass an expected 2001 count value. Update all users. 2002 Check glyph IDs. 2003 (otv_ClassDef_validate): Check `StartGlyph'. 2004 2005 * src/otvalid/otvgsub.c (otv_SingleSubst_validate): More glyph ID 2006 checks. 2007 2008 * src/otvalid/otvmath.c (otv_MathConstants_validate): There are only 2009 56 constants. 2010 (otv_GlyphAssembly_validate, otv_MathGlyphConstruction_validate): 2011 Check glyph IDs. 2012 2013 2007-08-08 Werner Lemberg <wl@gnu.org> 2014 2015 * src/otvalid/otvbase.c, src/otvalid/otvcommn.c, 2016 src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, 2017 src/otvalid/otvjstf.c: s/FT_INVALID_DATA/FT_INVALID_FORMAT/ where 2018 appropriate. Reported by George. 2019 2020 * include/freetype/internal/fttrace.h: Define `trace_otvmath'. 2021 2022 * src/otvalid/rules.mk (OTV_DRV_SRC): Add otvmath.c. 2023 2024 * docs/CHANGES: Updated. 2025 2026 2007-08-08 George Williams <gww@silcom.com> 2027 2028 Add `MATH' validating support to otvalid module. 2029 2030 * include/freetype/tttags.h (TTAG_MATH): New macro. 2031 * include/freetype/ftotval.h (FT_VALIDATE_MATH): New macro. 2032 (FT_VALIDATE_OT): Updated. 2033 2034 * src/otvalid/otmath.c: New file. 2035 2036 * src/otvalid/otvalid.c: Include otvmath.c. 2037 * src/otvalid/otvmod.c (otv_validate): Handle `MATH' table. 2038 2039 2007-08-04 Werner Lemberg <wl@gnu.org> 2040 2041 * builds/unix/configure.raw: Add call to AC_LIBTOOL_WIN32_DLL. 2042 Fixes Savannah bug #20686. 2043 2044 2007-08-03 Werner Lemberg <wl@gnu.org> 2045 2046 * src/psnames/psmodule.c: Fix usage of 2047 FT_CONFIG_OPTION_POSTSCRIPT_NAMES macro. Reported by Graham Asher. 2048 2049 2007-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> 2050 2051 * src/base/ftmac.c (open_face_from_buffer): The argument 2052 `driver_name' is typed as `const char*' to match with the 2053 callers in FT_New_Face_From_LWFN and FT_New_Face_From_SFNT. 2054 This is same with open_face_from_buffer in src/base/ftobjs.c. 2055 Found and fixed by Sean McBride. 2056 2057 2007-07-28 Werner Lemberg <wl@gnu.org> 2058 2059 * src/raster/ftraster.c (count_table): Make it conditional. 2060 * src/base/ftobjs.c (FT_New_Library): Check FT_RENDER_POOL_SIZE with 2061 a preprocessor statement. 2062 2063 2007-07-27 Werner Lemberg <wl@gnu.org> 2064 2065 * src/base/ftoutln.c (FT_Outline_Translate): Check `outline' before 2066 first usage. From Savannah patch #6115. 2067 2068 2007-07-16 Werner Lemberg <wl@gnu.org> 2069 2070 * docs/CHANGES: Updated. 2071 2072 2007-07-16 Derek Clegg <dclegg@apple.com> 2073 2074 Add new service for getting the ROS from a CID font. 2075 2076 * include/freetype/config/ftheader.h (FT_CID_H): New macro. 2077 * include/freetype/ftcid.h: New file. 2078 2079 * include/freetype/internal/ftserv.h (FT_SERVIVE_CID_H): New macro. 2080 * include/freetype/internal/services/svcid.h: New file. 2081 2082 * src/base/ftcid.c: New file. 2083 2084 * src/cff/cffdrivr.c: Include FT_SERVICE_CID_H. 2085 (cff_get_ros): New function. 2086 (cff_service_cid_info): New service structure. 2087 (cff_services): Register it. 2088 2089 * src/cff/cffload.c (cff_font_done): Free registry and ordering. 2090 2091 * src/cff/cfftypes.h (CFF_FontRec): Add `registry' and `ordering'. 2092 2093 * modules.cfg (BASE_EXTENSIONS): Add ftcid.c. 2094 2095 2007-07-11 Derek Clegg <dclegg@apple.com> 2096 2097 Add support for postscript name service to CFF driver. 2098 2099 * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_NAME_H. 2100 (cff_get_ps_name): New function. 2101 (cff_service_ps_name): New service structure. 2102 (cff_services): Register it. 2103 2104 2007-07-07 Werner Lemberg <wl@gnu.org> 2105 2106 * src/base/ftglyph.c (FT_Glyph_Copy): Fix initialization of 2107 `target'. Reported by Sean McBride. 2108 2109 2007-07-06 Werner Lemberg <wl@gnu.org> 2110 2111 * src/pfr/pfrcmap.c: Include pfrerror.h. 2112 2113 * src/autofit/afindic.c: Add some external declarations to pacify 2114 `make multi' compilation. 2115 2116 * src/cid/cidgload.c (cid_load_glyph): Pacify compiler. 2117 2118 * src/cff/cffdrivr.c (cff_ps_get_font_info), src/cff/cffobjs.c 2119 (cff_strcpy), include/freetype/internal/ftmemory.h (FT_MEM_STRDUP), 2120 src/autofit/aflatin.c (af_latin_hints_compute_edges), 2121 src/autofit/afcjk.c (af_cjk_hints_compute_edges), src/sfnt/ttmtx.c 2122 (tt_face_get_metrics), src/base/ftobjs.c (open_face) 2123 [FT_CONFIG_OPTION_INCREMENTAL]: Fix compilation with C++ compiler. 2124 2125 * docs/release: Mention test compilation targets. 2126 2127 2007-07-04 Werner Lemberg <wl@gnu.org> 2128 2129 * docs/PROBLEMS: Mention that some PS based fonts can't be 2130 handled correctly by FreeType. 2131 2132 * src/truetype/ttgload.c (load_truetype_glyph): Always allow a 2133 recursion depth of 1. This was the maximum value in TrueType 1.0, 2134 and some older fonts don't set this field correctly. 2135 2136 * src/gxvalid/gxvmort1.c 2137 (gxv_mort_subtable_type1_substTable_validate): Fix tracing message. 2138 2139 2007-07-03 Werner Lemberg <wl@gnu.org> 2140 2141 * src/autofit/aflatin.c (af_latin_metrics_init_blues): Initialize 2142 `round' to pacify compiler. 2143 1 2144 2007-07-02 Werner Lemberg <wl@gnu.org> 2 2145 … … 565 2708 zero in case of error. This fixes Savannah bug #19689. 566 2709 567 2007-04-25 Boris Letocha <b.letocha@cz.gmc.net>2710 2007-04-25 Boris Letocha <b.letocha@cz.gmc.net> 568 2711 569 2712 * src/truetype/ttobjs.c: Fix a typo that created a speed regression … … 1364 3507 * src/base/ftmac.c: Specialized for Mac OS X only. 1365 3508 * builds/unix/ftconfig.in: Fixed for ppc64 missing Carbon framework. 1366 * builds/unix/configure.raw: Ditto. When explicit switches for3509 * builds/unix/configure.raw: Ditto. When explicit switches for 1367 3510 FSSpec/FSRef/QuickDraw/ATS availability are given to configure, 1368 3511 builds/mac/ftmac.c is used instead of default src/base/ftmac.c. … … 1923 4066 Fix miscellaneous compiler warnings. 1924 4067 1925 * freetype2/include/freetype/internal/ftobjs.h: Close comment with1926 `*/' toavoid `/* in comment' compiler warning.1927 1928 * freetype2/src/base/ftdbgmem.c (ft_mem_table_get_source): Turn cast4068 * include/freetype/internal/ftobjs.h: Close comment with `*/' to 4069 avoid `/* in comment' compiler warning. 4070 4071 * src/base/ftdbgmem.c (ft_mem_table_get_source): Turn cast 1929 4072 `(FT_UInt32)(void*)' into `(FT_UInt32)(FT_PtrDist)(void*)' since on 1930 4073 64-bit platforms void* is larger than FT_UInt32. 1931 4074 1932 * freetype2/src/base/ftobjs.c (t_validator_error): Cast away4075 * src/base/ftobjs.c (t_validator_error): Cast away 1933 4076 volatileness of argument to ft_longjmp. Spotted by Werner 1934 4077 `Putzfrau' Lemberg. 1935 4078 1936 * freetype2/src/bdf/bdflib.c (bdf_load_font): Initialize local4079 * src/bdf/bdflib.c (bdf_load_font): Initialize local 1937 4080 variable `lineno'. 1938 4081 1939 * freetype2/src/gxvalid/gxvmod.c (classic_kern_validate): Mark local1940 variable`error' as volatile.4082 * src/gxvalid/gxvmod.c (classic_kern_validate): Mark local variable 4083 `error' as volatile. 1941 4084 1942 4085 2006-08-27 Werner Lemberg <wl@gnu.org> … … 1951 4094 non-volatile pointers. 1952 4095 1953 * freetype2/include/freetype/internal/ftvalid.h: Make FT_Validator1954 typedef apointer to a volatile object.1955 1956 * freetype2/src/gxvalid/gxvmod.c (gxv_load_table): Make function1957 argument`table' a pointer to a volatile object.1958 1959 * freetype2/src/otvalid/otvmod.c (otv_load_table): Make function1960 argument`table' a pointer to a volatile object.4096 * include/freetype/internal/ftvalid.h: Make FT_Validator typedef a 4097 pointer to a volatile object. 4098 4099 * src/gxvalid/gxvmod.c (gxv_load_table): Make function argument 4100 `table' a pointer to a volatile object. 4101 4102 * src/otvalid/otvmod.c (otv_load_table): Make function argument 4103 `table' a pointer to a volatile object. 1961 4104 1962 4105 2006-08-18 Jens Claudius <jens.claudius@yahoo.com> 1963 4106 1964 * freetype2/src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local 1965 variable `_sfnt' as volatile since it must keep its value across 1966 a call to ft_setjmp. 4107 * src/gxvalid/gxvmod.c (GXV_TABLE_DECL): Mark local variable `_sfnt' 4108 as volatile since it must keep its value across a call to ft_setjmp. 1967 4109 (gxv_validate): Same for local variables `memory' and `valid'. 1968 4110 (classic_kern_validate): Same for local variables `memory', 1969 4111 `ckern', and `valid'. 1970 4112 1971 * freetype2/src/otvalid/otvmod.c (otv_validate): Same for function1972 parameter `face' and local variables `base', `gdef', `gpos', `gsub',1973 `jstf',and 'valid'.1974 1975 * freetype2/src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for1976 local variable`cmap'.4113 * src/otvalid/otvmod.c (otv_validate): Same for function parameter 4114 `face' and local variables `base', `gdef', `gpos', `gsub', `jstf', 4115 and 'valid'. 4116 4117 * src/sfnt/ttcmap.c (tt_face_build_cmaps): Same for local variable 4118 `cmap'. 1977 4119 1978 4120 2006-08-16 David Turner <david@freetype.org> … … 1985 4127 1986 4128 1987 Improvements to native TrueType hinting. This is a first try,4129 Improvements to native TrueType hinting. This is a first try, 1988 4130 controlled by the FIX_BYTECODE macro in src/truetype/ttinterp.c. 1989 4131 … … 2033 4175 http://lists.nongnu.org/archive/html/freetype-devel/2006-08/msg00004.htm. 2034 4176 2035 * freetype2/src/otvalid/otvmod.c: Replace `ft_validator_run' by2036 `ft_setjmp'.It reverts the change introduced on 2005-08-20.2037 2038 * freetype2/src/gxvalid/gxvmod.c: Ditto.4177 * src/otvalid/otvmod.c: Replace `ft_validator_run' by `ft_setjmp'. 4178 It reverts the change introduced on 2005-08-20. 4179 4180 * src/gxvalid/gxvmod.c: Ditto. 2039 4181 2040 4182 2006-08-13 Jens Claudius <jens.claudius@yahoo.com> 2041 4183 2042 * f reetype2/include/freetype/internal/psaux.h: (T1_TokenType): Add4184 * finclude/freetype/internal/psaux.h: (T1_TokenType): Add 2043 4185 T1_TOKEN_TYPE_KEY. 2044 4186 (T1_FieldRec): Add `dict'. … … 2047 4189 keyword is expected as an additional argument. 2048 4190 2049 * freetype2/src/cid/cidload.c: (cid_field_records): Adjust2050 invocations ofT1_FIELD_XXX.2051 2052 * freetype2/src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX.2053 2054 * freetype2/src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing.4191 * src/cid/cidload.c: (cid_field_records): Adjust invocations of 4192 T1_FIELD_XXX. 4193 4194 * src/cid/cidtoken.h: Adjust invocations of T1_FIELD_XXX. 4195 4196 * src/psaux/psobjs.c: Add macro FT_COMPONENT for tracing. 2055 4197 (ps_parser_to_token): Report a PostScript key as T1_TOKEN_TYPE_KEY, 2056 4198 not T1_TOKEN_TYPE_ANY. … … 2059 4201 Avoid memory leak if a keyword has been already encountered and its 2060 4202 value is overwritten. 2061 * freetype2/src/type1/t1load.c: (t1_keywords): Adjust invocations of4203 * src/type1/t1load.c: (t1_keywords): Adjust invocations of 2062 4204 T1_FIELD_XXX. 2063 4205 (parse_dict): Ignore keywords that occur in the wrong dictionary 2064 4206 (e.g., in `Private' instead of `FontDict'). 2065 4207 2066 * freetype2/src/type1/t1tokens.h: Adjust invocations of 4208 * src/type1/t1tokens.h: Adjust invocations of T1_FIELD_XXX. 4209 4210 * src/type42/t42parse.c: (t42_keywords): Adjust invocations of 2067 4211 T1_FIELD_XXX. 2068 2069 * freetype2/src/type42/t42parse.c: (t42_keywords): Adjust2070 invocations of T1_FIELD_XXX.2071 4212 2072 4213 2006-07-18 Jens Claudius <jens.claudius@yahoo.com> … … 2079 4220 and `T1_Compute_Max_Advance'. 2080 4221 2081 * freetype2/include/freetype/internal/psaux.h (T1_DecoderRec):2082 Remove field`face', add `len_buildchar'.2083 2084 * freetype2/include/freetype/internal/t1types.h (T1_FaceRec): Add2085 field`buildchar'.2086 2087 * freetype2/src/cid/cidgload.c (cid_face_compute_max_advance): Call2088 f inisher for T1_Decoder.4222 * include/freetype/internal/psaux.h (T1_DecoderRec): Remove field 4223 `face', add `len_buildchar'. 4224 4225 * include/freetype/internal/t1types.h (T1_FaceRec): Add field 4226 `buildchar'. 4227 4228 * src/cid/cidgload.c (cid_face_compute_max_advance): Call finisher 4229 for T1_Decoder. 2089 4230 (cid_slot_load_glyph): Do not ignore failure when initializing the 2090 4231 T1_Decoder. 2091 4232 2092 * freetype2/src/psaux/t1decode.c (t1_decoder_parse_charstrings): 2093 Updated. 4233 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Updated. 2094 4234 (t1_decoder_init): Remove initialization of fields `buildchar' and 2095 4235 `len_buildchar'. … … 2103 4243 case of error. 2104 4244 2105 * freetype2/src/type1/t1load.c (T1_Open_Face): Allocate new field2106 `buildchar'of T1_FaceRec.2107 2108 * freetype2/src/type1/t1objs.c (T1_Face_Done): Free new field2109 `buildchar' ofT1_FaceRec.4245 * src/type1/t1load.c (T1_Open_Face): Allocate new field `buildchar' 4246 of T1_FaceRec. 4247 4248 * src/type1/t1objs.c (T1_Face_Done): Free new field `buildchar' of 4249 T1_FaceRec. 2110 4250 2111 4251 2006-07-14 Jens Claudius <jens.claudius@yahoo.com> 2112 4252 2113 * freetype2/include/freetype/internal/psaux.h: New macros2114 IS_PS_ NEWLINE, IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT,2115 IS_PS_XDIGIT, and IS_PS_BASE85 (from freetype2/src/psaux/psconv.h).4253 * include/freetype/internal/psaux.h: New macros IS_PS_NEWLINE, 4254 IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, 4255 and IS_PS_BASE85 (from src/psaux/psconv.h). 2116 4256 (T1_FieldLocation): Add T1_FIELD_LOCATION_LOADER, 2117 4257 T1_FIELD_LOCATION_FACE, and T1_FIELD_LOCATION_BLEND. … … 2119 4259 (IS_PS_TOKEN): New macro. 2120 4260 2121 * freetype2/include/freetype/internal/t1types.h (T1_FaceRec): New2122 fields`ndv_idx', `cdv_idx', and `len_buildchar'.2123 2124 * freetype2/include/freetype/t1tables.h (PS_BlendRec): New fields4261 * include/freetype/internal/t1types.h (T1_FaceRec): New fields 4262 `ndv_idx', `cdv_idx', and `len_buildchar'. 4263 4264 * include/freetype/t1tables.h (PS_BlendRec): New fields 2125 4265 `default_design_vector' and `num_default_design_vector'. 2126 4266 2127 * freetype2/src/psaux/psconv.h: Move macros IS_PS_NEWLINE, 2128 IS_PS_SPACE, IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, 2129 and IS_PS_BASE85 to freetype2/include/freetype/internal/psaux.h. 2130 2131 * freetype2/src/psaux/psobjs.c (ps_parser_to_token_array): Allow 2132 `token' argument to be NULL if we want only to count the number of 2133 tokens. 4267 * src/psaux/psconv.h: Move macros IS_PS_NEWLINE, IS_PS_SPACE, 4268 IS_PS_SPECIAL, IS_PS_DELIM, IS_PS_DIGIT, IS_PS_XDIGIT, and 4269 IS_PS_BASE85 to include/freetype/internal/psaux.h. 4270 4271 * src/psaux/psobjs.c (ps_parser_to_token_array): Allow `token' 4272 argument to be NULL if we want only to count the number of tokens. 2134 4273 (ps_tocoordarray): Allow `coords' argument to be NULL if we just 2135 4274 want to skip the array. … … 2137 4276 want to skip the array. 2138 4277 2139 * freetype2/src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add2140 support for (partially commented out) othersubrs 19-25, 27, and 28.2141 (t1_decoder_init): Initialize new fields `face' and `buildchar'. 4278 * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add support 4279 for (partially commented out) othersubrs 19-25, 27, and 28. 4280 (t1_decoder_init): Initialize new fields `face' and `buildchar'. 2142 4281 (t1_decoder_done): Release new field `buildchar'. 2143 4282 2144 * freetype2/src/type1/t1load.c (parse_buildchar, parse_private): New4283 * src/type1/t1load.c (parse_buildchar, parse_private): New 2145 4284 functions. 2146 4285 (t1_keywords): Register them. … … 2157 4296 Remove `keywords_flags'. 2158 4297 2159 * freetype2/src/type1/t1load.h (T1_LoaderRect): New field4298 * src/type1/t1load.h (T1_LoaderRect): New field 2160 4299 `keywords_encountered'. 2161 4300 (T1_PRIVATE, T1_FONTDIR_AFTER_PRIVATE): New macros. 2162 4301 2163 * freetype2/src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]:2164 Newentries for parsing /NDV, /CDV, and /DesignVector.4302 * src/type1/t1tokens.h [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: New 4303 entries for parsing /NDV, /CDV, and /DesignVector. 2165 4304 2166 4305 2006-07-07 Werner Lemberg <wl@gnu.org> … … 2442 4581 ---------------------------------------------------------------------------- 2443 4582 2444 Copyright 2006, 2007 by4583 Copyright 2006, 2007, 2008, 2009 by 2445 4584 David Turner, Robert Wilhelm, and Werner Lemberg. 2446 4585 -
trunk/poppler/freetype2/README
r252 r262 10 10 11 11 12 FreeType 2.3. 712 FreeType 2.3.8 13 13 ============== 14 14 … … 27 27 and download one of the following files. 28 28 29 freetype-doc-2.3. 7.tar.bz230 freetype-doc-2.3. 7.tar.gz31 ftdoc23 7.zip29 freetype-doc-2.3.8.tar.bz2 30 freetype-doc-2.3.8.tar.gz 31 ftdoc238.zip 32 32 33 33 … … 52 52 ---------------------------------------------------------------------- 53 53 54 Copyright 2006, 2007, 2008 by54 Copyright 2006, 2007, 2008, 2009 by 55 55 David Turner, Robert Wilhelm, and Werner Lemberg. 56 56 -
trunk/poppler/freetype2/devel/ftoption.h
r251 r262 118 118 /*************************************************************************/ 119 119 /* */ 120 /* If this macro is defined, do not try to use an assembler version of */ 121 /* performance-critical functions (e.g. FT_MulFix). You should only do */ 122 /* that to verify that the assembler function works properly, or to */ 123 /* execute benchmark tests of the various implementations. */ 124 /* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ 125 126 127 /*************************************************************************/ 128 /* */ 129 /* If this macro is defined, try to use an inlined assembler version of */ 130 /* the `FT_MulFix' function, which is a `hotspot' when loading and */ 131 /* hinting glyphs, and which should be executed as fast as possible. */ 132 /* */ 133 /* Note that if your compiler or CPU is not supported, this will default */ 134 /* to the standard and portable implementation found in `ftcalc.c'. */ 135 /* */ 136 #define FT_CONFIG_OPTION_INLINE_MULFIX 137 138 139 /*************************************************************************/ 140 /* */ 120 141 /* LZW-compressed file support. */ 121 142 /* */ … … 225 246 /* `post' table. */ 226 247 /* */ 227 /* - The Type 1 driver will not be able to synthe tize a Unicode */248 /* - The Type 1 driver will not be able to synthesize a Unicode */ 228 249 /* charmap out of the glyphs found in the fonts. */ 229 250 /* */ … … 241 262 /* in. Among other things, the module is used to convert a glyph name */ 242 263 /* into a Unicode value. This is especially useful in order to */ 243 /* synthe tize on the fly a Unicode charmap from the CFF/Type 1 driver */264 /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ 244 265 /* through a big table named the `Adobe Glyph List' (AGL). */ 245 266 /* */ 246 267 /* Undefine this macro if you do not want the Adobe Glyph List */ 247 268 /* compiled in your `PSNames' module. The Type 1 driver will not be */ 248 /* able to synthe tize a Unicode charmap out of the glyphs found in the */269 /* able to synthesize a Unicode charmap out of the glyphs found in the */ 249 270 /* fonts. */ 250 271 /* */ … … 468 489 /* of the TrueType bytecode interpreter is used that doesn't implement */ 469 490 /* any of the patented opcodes and algorithms. Note that the */ 470 /* the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you*/471 /* define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; with other words,*/472 /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or*/491 /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */ 492 /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */ 493 /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ 473 494 /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ 474 495 /* */ … … 660 681 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER 661 682 #define TT_USE_BYTECODE_INTERPRETER 683 #undef TT_CONFIG_OPTION_UNPATENTED_HINTING 662 684 #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING 663 685 #define TT_USE_BYTECODE_INTERPRETER -
trunk/poppler/freetype2/include/freetype/config/ftconfig.h
r251 r262 5 5 /* ANSI-specific configuration file (specification only). */ 6 6 /* */ 7 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007 by*/7 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 44 44 #include FT_CONFIG_STANDARD_LIBRARY_H 45 45 46 46 47 FT_BEGIN_HEADER 47 48 … … 135 136 #define FT_MACINTOSH 1 136 137 #endif 138 139 #elif defined( __SC__ ) || defined( __MRC__ ) 140 /* Classic MacOS compilers */ 141 #include "ConditionalMacros.h" 142 #if TARGET_OS_MAC 143 #define FT_MACINTOSH 1 144 #endif 145 137 146 #endif 138 147 … … 213 222 #endif 214 223 224 215 225 /* look up an integer type that is at least 32 bits */ 216 226 #if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT) … … 270 280 271 281 282 /*************************************************************************/ 283 /* */ 284 /* A 64-bit data type will create compilation problems if you compile */ 285 /* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */ 286 /* is defined. You can however ignore this rule by defining the */ 287 /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ 288 /* */ 289 #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) 290 291 #ifdef __STDC__ 292 293 /* undefine the 64-bit macros in strict ANSI compilation mode */ 294 #undef FT_LONG64 295 #undef FT_INT64 296 297 #endif /* __STDC__ */ 298 299 #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ 300 301 272 302 #define FT_BEGIN_STMNT do { 273 303 #define FT_END_STMNT } while ( 0 ) … … 275 305 276 306 277 /*************************************************************************/ 278 /* */ 279 /* A 64-bit data type will create compilation problems if you compile */ 280 /* in strict ANSI mode. To avoid them, we disable their use if */ 281 /* __STDC__ is defined. You can however ignore this rule by */ 282 /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */ 283 /* */ 284 #if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 ) 285 286 #ifdef __STDC__ 287 288 /* undefine the 64-bit macros in strict ANSI compilation mode */ 289 #undef FT_LONG64 290 #undef FT_INT64 291 292 #endif /* __STDC__ */ 293 294 #endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */ 307 #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER 308 /* Provide assembler fragments for performance-critical functions. */ 309 /* These must be defined `static __inline__' with GCC. */ 310 311 #ifdef __GNUC__ 312 313 #if defined( __arm__ ) && !defined( __thumb__ ) 314 #define FT_MULFIX_ASSEMBLER FT_MulFix_arm 315 316 /* documentation is in freetype.h */ 317 318 static __inline__ FT_Int32 319 FT_MulFix_arm( FT_Int32 a, 320 FT_Int32 b ) 321 { 322 register FT_Int32 t, t2; 323 324 325 asm __volatile__ ( 326 "smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */ 327 "mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */ 328 "add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */ 329 "adds %1, %1, %0\n\t" /* %1 += %0 */ 330 "adc %2, %2, #0\n\t" /* %2 += carry */ 331 "mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */ 332 "orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */ 333 : "=r"(a), "=&r"(t2), "=&r"(t) 334 : "r"(a), "r"(b) ); 335 return a; 336 } 337 338 #endif /* __arm__ && !__thumb__ */ 339 340 #if defined( i386 ) 341 #define FT_MULFIX_ASSEMBLER FT_MulFix_i386 342 343 /* documentation is in freetype.h */ 344 345 static __inline__ FT_Int32 346 FT_MulFix_i386( FT_Int32 a, 347 FT_Int32 b ) 348 { 349 register FT_Int32 result; 350 351 352 __asm__ __volatile__ ( 353 "imul %%edx\n" 354 "movl %%edx, %%ecx\n" 355 "sarl $31, %%ecx\n" 356 "addl $0x8000, %%ecx\n" 357 "addl %%ecx, %%eax\n" 358 "adcl $0, %%edx\n" 359 "shrl $16, %%eax\n" 360 "shll $16, %%edx\n" 361 "addl %%edx, %%eax\n" 362 : "=a"(result), "+d"(b) 363 : "a"(a) 364 : "%ecx" ); 365 return result; 366 } 367 368 #endif /* i386 */ 369 370 #endif /* __GNUC__ */ 371 372 #endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */ 373 374 375 #ifdef FT_CONFIG_OPTION_INLINE_MULFIX 376 #ifdef FT_MULFIX_ASSEMBLER 377 #define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER 378 #endif 379 #endif 295 380 296 381 -
trunk/poppler/freetype2/include/freetype/config/ftheader.h
r251 r262 730 730 731 731 732 /************************************************************************* 733 * 734 * @macro: 735 * FT_ADVANCES_H 736 * 737 * @description: 738 * A macro used in #include statements to name the file containing the 739 * FreeType~2 API which returns individual and ranged glyph advances. 740 */ 741 #define FT_ADVANCES_H <freetype/ftadvanc.h> 742 743 732 744 /* */ 733 745 -
trunk/poppler/freetype2/include/freetype/config/ftmodule.h
r150 r262 11 11 */ 12 12 13 FT_USE_MODULE( autofit_module_class)14 FT_USE_MODULE( tt_driver_class)15 FT_USE_MODULE( t1_driver_class)16 FT_USE_MODULE( cff_driver_class)17 FT_USE_MODULE( t1cid_driver_class)18 FT_USE_MODULE( pfr_driver_class)19 FT_USE_MODULE( t42_driver_class)20 FT_USE_MODULE( winfnt_driver_class)21 FT_USE_MODULE( pcf_driver_class)22 FT_USE_MODULE( psaux_module_class)23 FT_USE_MODULE( psnames_module_class)24 FT_USE_MODULE( pshinter_module_class)25 FT_USE_MODULE( ft_raster1_renderer_class)26 FT_USE_MODULE( sfnt_module_class)27 FT_USE_MODULE( ft_smooth_renderer_class)28 FT_USE_MODULE( ft_smooth_lcd_renderer_class)29 FT_USE_MODULE( ft_smooth_lcdv_renderer_class)30 FT_USE_MODULE( bdf_driver_class)13 FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 31 32 32 /* EOF */ -
trunk/poppler/freetype2/include/freetype/config/ftoption.h
r251 r262 113 113 /* `configure' script on supported platforms. */ 114 114 /* */ 115 #undef FT_CONFIG_OPTION_FORCE_INT64 115 #undef FT_CONFIG_OPTION_FORCE_INT64 116 117 118 /*************************************************************************/ 119 /* */ 120 /* If this macro is defined, do not try to use an assembler version of */ 121 /* performance-critical functions (e.g. FT_MulFix). You should only do */ 122 /* that to verify that the assembler function works properly, or to */ 123 /* execute benchmark tests of the various implementations. */ 124 /* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ 125 126 127 /*************************************************************************/ 128 /* */ 129 /* If this macro is defined, try to use an inlined assembler version of */ 130 /* the `FT_MulFix' function, which is a `hotspot' when loading and */ 131 /* hinting glyphs, and which should be executed as fast as possible. */ 132 /* */ 133 /* Note that if your compiler or CPU is not supported, this will default */ 134 /* to the standard and portable implementation found in `ftcalc.c'. */ 135 /* */ 136 #define FT_CONFIG_OPTION_INLINE_MULFIX 116 137 117 138 … … 164 185 /* it for certain configurations only. */ 165 186 /* */ 166 /* #define 187 /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ 167 188 168 189 … … 205 226 /* them for certain configurations only. */ 206 227 /* */ 207 /* #define FT_EXPORT(x)extern x */208 /* #define FT_EXPORT_DEF(x)x */228 /* #define FT_EXPORT(x) extern x */ 229 /* #define FT_EXPORT_DEF(x) x */ 209 230 210 231 … … 213 234 /* Glyph Postscript Names handling */ 214 235 /* */ 215 /* By default, FreeType 2 is compiled with the ` PSNames' module. This */236 /* By default, FreeType 2 is compiled with the `psnames' module. This */ 216 237 /* module is in charge of converting a glyph name string into a */ 217 238 /* Unicode value, or return a Macintosh standard glyph name for the */ 218 239 /* use with the TrueType `post' table. */ 219 240 /* */ 220 /* Undefine this macro if you do not want ` PSNames' compiled in your */241 /* Undefine this macro if you do not want `psnames' compiled in your */ 221 242 /* build of FreeType. This has the following effects: */ 222 243 /* */ … … 225 246 /* `post' table. */ 226 247 /* */ 227 /* - The Type 1 driver will not be able to synthe tize a Unicode */248 /* - The Type 1 driver will not be able to synthesize a Unicode */ 228 249 /* charmap out of the glyphs found in the fonts. */ 229 250 /* */ … … 241 262 /* in. Among other things, the module is used to convert a glyph name */ 242 263 /* into a Unicode value. This is especially useful in order to */ 243 /* synthe tize on the fly a Unicode charmap from the CFF/Type 1 driver */264 /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */ 244 265 /* through a big table named the `Adobe Glyph List' (AGL). */ 245 266 /* */ 246 267 /* Undefine this macro if you do not want the Adobe Glyph List */ 247 268 /* compiled in your `PSNames' module. The Type 1 driver will not be */ 248 /* able to synthe tize a Unicode charmap out of the glyphs found in the */269 /* able to synthesize a Unicode charmap out of the glyphs found in the */ 249 270 /* fonts. */ 250 271 /* */ … … 468 489 /* of the TrueType bytecode interpreter is used that doesn't implement */ 469 490 /* any of the patented opcodes and algorithms. Note that the */ 470 /* the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you*/471 /* define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; with other words,*/472 /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or*/491 /* TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* if you define */ 492 /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, either define */ 493 /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */ 473 494 /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */ 474 495 /* */ … … 654 675 655 676 /* 656 * This variableis defined if either unpatented or native TrueType677 * This macro is defined if either unpatented or native TrueType 657 678 * hinting is requested by the definitions above. 658 679 */ 659 680 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER 660 681 #define TT_USE_BYTECODE_INTERPRETER 682 #undef TT_CONFIG_OPTION_UNPATENTED_HINTING 661 683 #elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING 662 684 #define TT_USE_BYTECODE_INTERPRETER -
trunk/poppler/freetype2/include/freetype/config/ftstdlib.h
r251 r262 6 6 /* only). */ 7 7 /* */ 8 /* Copyright 2002, 2003, 2004, 2005, 2006, 2007 by*/8 /* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */ 9 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 10 /* */ … … 54 54 /* In these case, `ftconfig.h' will refuse to compile anyway with a */ 55 55 /* message like `couldn't find 32-bit type' or something similar. */ 56 /* */57 /* IMPORTANT NOTE: We do not define aliases for heap management and */58 /* i/o routines (i.e. malloc/free/fopen/fread/...) */59 /* since these functions should all be encapsulated */60 /* by platform-specific implementations of */61 /* `ftsystem.c'. */62 56 /* */ 63 57 /**********************************************************************/ … … 125 119 #define ft_qsort qsort 126 120 127 #define ft_exit exit /* only used to exit from unhandled exceptions */128 129 121 130 122 /**********************************************************************/ -
trunk/poppler/freetype2/include/freetype/freetype.h
r251 r262 5 5 /* FreeType high-level API and common types (specification only). */ 6 6 /* */ 7 /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by*/7 /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 61 61 /* <Description> */ 62 62 /* FreeType assumes that structures allocated by the user and passed */ 63 /* as arguments are zeroed out except for the actual data. With*/64 /* other words, it is recommended to use `calloc' (or variants of it)*/63 /* as arguments are zeroed out except for the actual data. In other */ 64 /* words, it is recommended to use `calloc' (or variants of it) */ 65 65 /* instead of `malloc' for allocation. */ 66 66 /* */ … … 192 192 /* FT_Get_Charmap_Index */ 193 193 /* */ 194 /* FT_FSTYPE_INSTALLABLE_EMBEDDING */ 195 /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING */ 196 /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING */ 197 /* FT_FSTYPE_EDITABLE_EMBEDDING */ 198 /* FT_FSTYPE_NO_SUBSETTING */ 199 /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY */ 200 /* */ 201 /* FT_Get_FSType_Flags */ 202 /* */ 194 203 /*************************************************************************/ 195 204 … … 607 616 /* */ 608 617 /* <Note> */ 609 /* By default, FreeType automatically synthe tizes a Unicode charmap */618 /* By default, FreeType automatically synthesizes a Unicode charmap */ 610 619 /* for PostScript fonts, using their glyph names dictionaries. */ 611 620 /* However, it also reports the encodings defined explicitly in the */ … … 884 893 /* */ 885 894 /* underline_position :: The position, in font units, of the */ 886 /* underline line for this face. It 's the*/895 /* underline line for this face. It is the */ 887 896 /* center of the underlining stem. Only */ 888 897 /* relevant for scalable formats. */ … … 1037 1046 /* exist make FT_Load_Glyph return successfully; in all other cases */ 1038 1047 /* you get an `FT_Err_Invalid_Argument' error. */ 1048 /* */ 1049 /* Note that CID-keyed fonts which are in an SFNT wrapper don't */ 1050 /* have this flag set since the glyphs are accessed in the normal */ 1051 /* way (using contiguous indices); the `CID-ness' isn't visible to */ 1052 /* the application. */ 1053 /* */ 1054 /* FT_FACE_FLAG_TRICKY :: */ 1055 /* Set if the font is `tricky', this is, it always needs the */ 1056 /* font format's native hinting engine to get a reasonable result. */ 1057 /* A typical example is the Chinese font `mingli.ttf' which uses */ 1058 /* TrueType bytecode instructions to move and scale all of its */ 1059 /* subglyphs. */ 1060 /* */ 1061 /* It is not possible to autohint such fonts using */ 1062 /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ 1063 /* @FT_LOAD_NO_HINTING. You have to set both FT_LOAD_NO_HINTING */ 1064 /* and @FT_LOAD_NO_AUTOHINT to really disable hinting; however, you */ 1065 /* probably never want this except for demonstration purposes. */ 1066 /* */ 1067 /* Currently, there are six TrueType fonts in the list of tricky */ 1068 /* fonts; they are hard-coded in file `ttobjs.c'. */ 1039 1069 /* */ 1040 1070 #define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) … … 1051 1081 #define FT_FACE_FLAG_HINTER ( 1L << 11 ) 1052 1082 #define FT_FACE_FLAG_CID_KEYED ( 1L << 12 ) 1053 1054 /* */ 1083 #define FT_FACE_FLAG_TRICKY ( 1L << 13 ) 1055 1084 1056 1085 … … 1163 1192 ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES ) 1164 1193 1165 /* */1166 1167 1194 1168 1195 /************************************************************************* … … 1225 1252 1226 1253 1227 /*************************************************************************/ 1228 /* */ 1229 /* <Constant> */ 1254 /************************************************************************* 1255 * 1256 * @macro: 1257 * FT_IS_TRICKY( face ) 1258 * 1259 * @description: 1260 * A macro that returns true whenever a face represents a `tricky' font. 1261 * See the discussion of @FT_FACE_FLAG_TRICKY for more details. 1262 * 1263 */ 1264 #define FT_IS_TRICKY( face ) \ 1265 ( face->face_flags & FT_FACE_FLAG_TRICKY ) 1266 1267 1268 /*************************************************************************/ 1269 /* */ 1270 /* <Const> */ 1230 1271 /* FT_STYLE_FLAG_XXX */ 1231 1272 /* */ … … 1519 1560 /* This image can later be converted into a bitmap by calling */ 1520 1561 /* @FT_Render_Glyph. This function finds the current renderer for */ 1521 /* the native image's format then invokes it.*/1562 /* the native image's format, then invokes it. */ 1522 1563 /* */ 1523 1564 /* The renderer is in charge of transforming the native image through */ 1524 /* the slot's face transformation fields, then convert it into a*/1565 /* the slot's face transformation fields, then converting it into a */ 1525 1566 /* bitmap that is returned in `slot->bitmap'. */ 1526 1567 /* */ … … 1770 1811 /* */ 1771 1812 /* Ideally, both the `pathname' and `params' fields should be tagged */ 1772 /* as `const'; this is missing for API backwards compatibility. With*/1813 /* as `const'; this is missing for API backwards compatibility. In */ 1773 1814 /* other words, applications should treat them as read-only. */ 1774 1815 /* */ … … 2175 2216 /* both resolution values are zero, they are set to 72dpi. */ 2176 2217 /* */ 2177 2218 /* Don't use this function if you are using the FreeType cache API. */ 2219 /* */ 2178 2220 FT_EXPORT( FT_Error ) 2179 2221 FT_Set_Char_Size( FT_Face face, … … 2391 2433 * 2392 2434 * Note that this has no effect on the hinting algorithm used. You 2393 * should use @FT_LOAD_TARGET_MONO insteadso that the2435 * should rather use @FT_LOAD_TARGET_MONO so that the 2394 2436 * monochrome-optimized hinting algorithm is used. 2395 2437 * … … 2409 2451 * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be 2410 2452 * used at all. 2453 * 2454 * See the description of @FT_FACE_FLAG_TRICKY for a special exception 2455 * (affecting only a handful of Asian fonts). 2411 2456 * 2412 2457 * Besides deciding which hinter to use, you can also decide which … … 2427 2472 #define FT_LOAD_MONOCHROME 0x1000 2428 2473 #define FT_LOAD_LINEAR_DESIGN 0x2000 2429 #define FT_LOAD_SBITS_ONLY 0x4000 /* temporary hack! */2430 2474 #define FT_LOAD_NO_AUTOHINT 0x8000U 2431 2475 2432 2476 /* */ 2477 2478 /* used internally only by certain font drivers! */ 2479 #define FT_LOAD_ADVANCE_ONLY 0x100 2480 #define FT_LOAD_SBITS_ONLY 0x4000 2433 2481 2434 2482 … … 3155 3203 FT_Int *p_arg2, 3156 3204 FT_Matrix *p_transform ); 3205 3206 3207 /*************************************************************************/ 3208 /* */ 3209 /* <Enum> */ 3210 /* FT_FSTYPE_XXX */ 3211 /* */ 3212 /* <Description> */ 3213 /* A list of bit flags used in the `fsType' field of the OS/2 table */ 3214 /* in a TrueType or OpenType font and the `FSType' entry in a */ 3215 /* PostScript font. These bit flags are returned by */ 3216 /* @FT_Get_FSType_Flags; they inform client applications of embedding */ 3217 /* and subsetting restrictions associated with a font. */ 3218 /* */ 3219 /* See http://www.adobe.com/devnet/acrobat/pdfs/FontPolicies.pdf for */ 3220 /* more details. */ 3221 /* */ 3222 /* <Values> */ 3223 /* FT_FSTYPE_INSTALLABLE_EMBEDDING :: */ 3224 /* Fonts with no fsType bit set may be embedded and permanently */ 3225 /* installed on the remote system by an application. */ 3226 /* */ 3227 /* FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING :: */ 3228 /* Fonts that have only this bit set must not be modified, embedded */ 3229 /* or exchanged in any manner without first obtaining permission of */ 3230 /* the font software copyright owner. */ 3231 /* */ 3232 /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ 3233 /* If this bit is set, the font may be embedded and temporarily */ 3234 /* loaded on the remote system. Documents containing Preview & */ 3235 /* Print fonts must be opened `read-only'; no edits can be applied */ 3236 /* to the document. */ 3237 /* */ 3238 /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ 3239 /* If this bit is set, the font may be embedded but must only be */ 3240 /* installed temporarily on other systems. In contrast to Preview */ 3241 /* & Print fonts, documents containing editable fonts may be opened */ 3242 /* for reading, editing is permitted, and changes may be saved. */ 3243 /* */ 3244 /* FT_FSTYPE_NO_SUBSETTING :: */ 3245 /* If this bit is set, the font may not be subsetted prior to */ 3246 /* embedding. */ 3247 /* */ 3248 /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ 3249 /* If this bit is set, only bitmaps contained in the font may be */ 3250 /* embedded; no outline data may be embedded. If there are no */ 3251 /* bitmaps available in the font, then the font is unembeddable. */ 3252 /* */ 3253 /* <Note> */ 3254 /* While the fsType flags can indicate that a font may be embedded, a */ 3255 /* license with the font vendor may be separately required to use the */ 3256 /* font in this way. */ 3257 /* */ 3258 #define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 3259 #define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 3260 #define FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING 0x0004 3261 #define FT_FSTYPE_EDITABLE_EMBEDDING 0x0008 3262 #define FT_FSTYPE_NO_SUBSETTING 0x0100 3263 #define FT_FSTYPE_BITMAP_EMBEDDING_ONLY 0x0200 3264 3265 3266 /*************************************************************************/ 3267 /* */ 3268 /* <Function> */ 3269 /* FT_Get_FSType_Flags */ 3270 /* */ 3271 /* <Description> */ 3272 /* Return the fsType flags for a font. */ 3273 /* */ 3274 /* <Input> */ 3275 /* face :: A handle to the source face object. */ 3276 /* */ 3277 /* <Return> */ 3278 /* The fsType flags, @FT_FSTYPE_XXX. */ 3279 /* */ 3280 /* <Note> */ 3281 /* Use this function rather than directly reading the `fs_type' field */ 3282 /* in the @PS_FontInfoRec structure which is only guaranteed to */ 3283 /* return the correct results for Type~1 fonts. */ 3284 /* */ 3285 FT_EXPORT( FT_UShort ) 3286 FT_Get_FSType_Flags( FT_Face face ); 3157 3287 3158 3288 … … 3432 3562 3433 3563 3564 /* */ 3565 3566 /* The following #if 0 ... #endif is for the documentation formatter, */ 3567 /* hiding the internal `FT_MULFIX_INLINED' macro. */ 3568 3569 #if 0 3434 3570 /*************************************************************************/ 3435 3571 /* */ … … 3464 3600 FT_MulFix( FT_Long a, 3465 3601 FT_Long b ); 3602 3603 /* */ 3604 #endif 3605 3606 #ifdef FT_MULFIX_INLINED 3607 #define FT_MulFix( a, b ) FT_MULFIX_INLINED( a, b ) 3608 #else 3609 FT_EXPORT( FT_Long ) 3610 FT_MulFix( FT_Long a, 3611 FT_Long b ); 3612 #endif 3466 3613 3467 3614 … … 3612 3759 #define FREETYPE_MAJOR 2 3613 3760 #define FREETYPE_MINOR 3 3614 #define FREETYPE_PATCH 73761 #define FREETYPE_PATCH 8 3615 3762 3616 3763 … … 3696 3843 /* <Return> */ 3697 3844 /* The old setting value. This will always be false if this is not */ 3698 /* a SFNT font, or if the unpatented hinter is not compiled in this*/3845 /* an SFNT font, or if the unpatented hinter is not compiled in this */ 3699 3846 /* instance of the library. */ 3700 3847 /* */ -
trunk/poppler/freetype2/include/freetype/ftbdf.h
r251 r262 5 5 /* FreeType API for accessing BDF-specific strings (specification). */ 6 6 /* */ 7 /* Copyright 2002, 2003, 2004, 2006 by*/7 /* Copyright 2002, 2003, 2004, 2006, 2009 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 184 184 * font. 185 185 * 186 * A `property' is a either key-value pair within the STARTPROPERTIES 187 * ... ENDPROPERTIES block of a BDF font or a key-value pair from the 188 * `info->props' array within a `FontRec' structure of a PCF font. 189 * 190 * Integer properties are always stored as `signed' within PCF fonts; 191 * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value 192 * for BDF fonts only. 193 * 186 194 * In case of error, `aproperty->type' is always set to 187 195 * @BDF_PROPERTY_TYPE_NONE. -
trunk/poppler/freetype2/include/freetype/ftbitmap.h
r251 r262 3 3 /* ftbitmap.h */ 4 4 /* */ 5 /* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */ 6 /* bitmaps into 8bpp format (specification). */ 7 /* */ 8 /* Copyright 2004, 2005, 2006 by */ 5 /* FreeType utility functions for bitmaps (specification). */ 6 /* */ 7 /* Copyright 2004, 2005, 2006, 2008 by */ 9 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 9 /* */ … … 122 121 /* */ 123 122 /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */ 124 /* you should call `FT_GlyphSlot_Own_Bitmap' on the slot first.*/123 /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */ 125 124 /* */ 126 125 FT_EXPORT( FT_Error ) … … 174 173 /* */ 175 174 /* <Function> */ 175 /* FT_GlyphSlot_Own_Bitmap */ 176 /* */ 177 /* <Description> */ 178 /* Make sure that a glyph slot owns `slot->bitmap'. */ 179 /* */ 180 /* <Input> */ 181 /* slot :: The glyph slot. */ 182 /* */ 183 /* <Return> */ 184 /* FreeType error code. 0~means success. */ 185 /* */ 186 /* <Note> */ 187 /* This function is to be used in combination with */ 188 /* @FT_Bitmap_Embolden. */ 189 /* */ 190 FT_EXPORT( FT_Error ) 191 FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); 192 193 194 /*************************************************************************/ 195 /* */ 196 /* <Function> */ 176 197 /* FT_Bitmap_Done */ 177 198 /* */ -
trunk/poppler/freetype2/include/freetype/ftcache.h
r251 r262 610 610 * 611 611 * cmap_index :: 612 * The index of the charmap in the source face. 612 * The index of the charmap in the source face. Any negative value 613 * means to use the cache @FT_Face's default charmap. 613 614 * 614 615 * char_code :: … … 833 834 /* is persistent! */ 834 835 /* */ 836 /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ 837 /* glyphs; you should always use the FreeType cache API instead. */ 838 /* */ 835 839 FT_EXPORT( FT_Error ) 836 840 FTC_ImageCache_LookupScaler( FTC_ImageCache cache, -
trunk/poppler/freetype2/include/freetype/ftchapters.h
r251 r262 91 91 /* list_processing */ 92 92 /* outline_processing */ 93 /* quick_advance */ 93 94 /* bitmap_handling */ 94 95 /* raster */ -
trunk/poppler/freetype2/include/freetype/ftgasp.h
r251 r262 22 22 #include <ft2build.h> 23 23 #include FT_FREETYPE_H 24 25 #ifdef FREETYPE_H 26 #error "freetype.h of FreeType 1 has been loaded!" 27 #error "Please fix the directory search order for header files" 28 #error "so that freetype.h of FreeType 2 is found first." 29 #endif 30 24 31 25 32 /*************************************************************************** -
trunk/poppler/freetype2/include/freetype/ftglyph.h
r251 r262 5 5 /* FreeType convenience functions to handle glyphs (specification). */ 6 6 /* */ 7 /* Copyright 1996-2001, 2002, 2003, 2006 by*/7 /* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 220 220 /* */ 221 221 /* <Description> */ 222 /* A function used to extract a glyph image from a slot. */ 222 /* A function used to extract a glyph image from a slot. Note that */ 223 /* the created @FT_Glyph object must be released with @FT_Done_Glyph. */ 223 224 /* */ 224 225 /* <Input> */ … … 428 429 /* */ 429 430 /* <Input> */ 430 /* render_mode :: An enumeration that describe how the data is*/431 /* render_mode :: An enumeration that describes how the data is */ 431 432 /* rendered. */ 432 433 /* */ … … 444 445 /* */ 445 446 /* <Note> */ 447 /* This function does nothing if the glyph format isn't scalable. */ 448 /* */ 446 449 /* The glyph image is translated with the `origin' vector before */ 447 450 /* rendering. */ 448 451 /* */ 449 452 /* The first parameter is a pointer to an @FT_Glyph handle, that will */ 450 /* be replaced by this function. Typically, you would use (omitting*/451 /* error handling):*/453 /* be _replaced_ by this function (with newly allocated data). */ 454 /* Typically, you would use (omitting error handling): */ 452 455 /* */ 453 456 /* */ … … 463 466 /* error = FT_Get_Glyph( face->glyph, &glyph ); */ 464 467 /* */ 465 /* // convert to a bitmap (default render mode + destroy old)*/468 /* // convert to a bitmap (default render mode + destroying old) */ 466 469 /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ 467 470 /* { */ 468 471 /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */ 469 472 /* 0, 1 ); */ 470 /* if ( error ) // glyph unchanged*/473 /* if ( error ) // `glyph' unchanged */ 471 474 /* ... */ 472 475 /* } */ … … 483 486 /* */ 484 487 /* */ 485 /* This function does nothing if the glyph format isn't scalable. */ 488 /* Here another example, again without error handling: */ 489 /* */ 490 /* */ 491 /* { */ 492 /* FT_Glyph glyphs[MAX_GLYPHS] */ 493 /* */ 494 /* */ 495 /* ... */ 496 /* */ 497 /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ 498 /* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */ 499 /* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */ 500 /* */ 501 /* ... */ 502 /* */ 503 /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ 504 /* { */ 505 /* FT_Glyph bitmap = glyphs[idx]; */ 506 /* */ 507 /* */ 508 /* ... */ 509 /* */ 510 /* // after this call, `bitmap' no longer points into */ 511 /* // the `glyphs' array (and the old value isn't destroyed) */ 512 /* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */ 513 /* */ 514 /* ... */ 515 /* */ 516 /* FT_Done_Glyph( bitmap ); */ 517 /* } */ 518 /* */ 519 /* ... */ 520 /* */ 521 /* for ( idx = 0; i < MAX_GLYPHS; i++ ) */ 522 /* FT_Done_Glyph( glyphs[idx] ); */ 523 /* } */ 486 524 /* */ 487 525 FT_EXPORT( FT_Error ) -
trunk/poppler/freetype2/include/freetype/ftimage.h
r251 r262 130 130 /* An 8-bit bitmap, generally used to represent anti-aliased glyph */ 131 131 /* images. Each pixel is stored in one byte. Note that the number */ 132 /* of value `gray' levels is stored in the `num_grays' field of*/133 /* the @FT_Bitmap structure (it generally is 256).*/132 /* of `gray' levels is stored in the `num_grays' field of the */ 133 /* @FT_Bitmap structure (it generally is 256). */ 134 134 /* */ 135 135 /* FT_PIXEL_MODE_GRAY2 :: */ 136 /* A 2-bit/pixel bitmap, used to represent embedded anti-aliased */ 136 /* A 2-bit per pixel bitmap, used to represent embedded */ 137 /* anti-aliased bitmaps in font files according to the OpenType */ 138 /* specification. We haven't found a single font using this */ 139 /* format, however. */ 140 /* */ 141 /* FT_PIXEL_MODE_GRAY4 :: */ 142 /* A 4-bit per pixel bitmap, representing embedded anti-aliased */ 137 143 /* bitmaps in font files according to the OpenType specification. */ 138 144 /* We haven't found a single font using this format, however. */ 139 145 /* */ 140 /* FT_PIXEL_MODE_GRAY4 :: */141 /* A 4-bit/pixel bitmap, used to represent embedded anti-aliased */142 /* bitmaps in font files according to the OpenType specification. */143 /* We haven't found a single font using this format, however. */144 /* */145 146 /* FT_PIXEL_MODE_LCD :: */ 146 /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph*/147 /* images used for display on LCD displays; the bitmap is three*/148 /* times wider than the original glyph image. See also*/147 /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ 148 /* used for display on LCD displays; the bitmap is three times */ 149 /* wider than the original glyph image. See also */ 149 150 /* @FT_RENDER_MODE_LCD. */ 150 151 /* */ 151 152 /* FT_PIXEL_MODE_LCD_V :: */ 152 /* An 8-bit bitmap, used to represent RGB or BGR decimated glyph*/153 /* images used for display on rotated LCD displays; the bitmap*/154 /* is three times taller than the original glyph image. See also*/153 /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */ 154 /* used for display on rotated LCD displays; the bitmap is three */ 155 /* times taller than the original glyph image. See also */ 155 156 /* @FT_RENDER_MODE_LCD_V. */ 156 157 /* */ -
trunk/poppler/freetype2/include/freetype/ftlcdfil.h
r251 r262 23 23 #include <ft2build.h> 24 24 #include FT_FREETYPE_H 25 26 #ifdef FREETYPE_H 27 #error "freetype.h of FreeType 1 has been loaded!" 28 #error "Please fix the directory search order for header files" 29 #error "so that freetype.h of FreeType 2 is found first." 30 #endif 25 31 26 32 -
trunk/poppler/freetype2/include/freetype/ftmodapi.h
r251 r262 413 413 * 414 414 * @description: 415 * Return a @FT_TrueTypeEngineType value to indicate which level of415 * Return an @FT_TrueTypeEngineType value to indicate which level of 416 416 * the TrueType virtual machine a given library instance supports. 417 417 * -
trunk/poppler/freetype2/include/freetype/ftoutln.h
r251 r262 93 93 /* outline :: A pointer to the source target. */ 94 94 /* */ 95 /* func_interface :: A table of `emitters', i.e ,.function pointers */95 /* func_interface :: A table of `emitters', i.e., function pointers */ 96 96 /* called during decomposition to indicate path */ 97 97 /* operations. */ … … 333 333 /* situations like acute angles or intersections are sometimes */ 334 334 /* handled incorrectly. */ 335 /* */ 336 /* If you need `better' metrics values you should call */ 337 /* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */ 335 338 /* */ 336 339 /* Example call: */ -
trunk/poppler/freetype2/include/freetype/ftpfr.h
r251 r262 5 5 /* FreeType API for accessing PFR-specific data (specification only). */ 6 6 /* */ 7 /* Copyright 2002, 2003, 2004, 2006 by*/7 /* Copyright 2002, 2003, 2004, 2006, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 74 74 * in metrics units to device sub-pixels. This is equivalent to 75 75 * `face->size->x_scale', but for metrics only. Optional (parameter 76 * can be NULL) 76 * can be NULL). 77 77 * 78 78 * ametrics_y_scale :: 79 79 * Same as `ametrics_x_scale' but for the vertical direction. 80 * optional (parameter can be NULL) 80 * optional (parameter can be NULL). 81 81 * 82 82 * @return: -
trunk/poppler/freetype2/include/freetype/ftstroke.h
r251 r262 250 250 * 251 251 * @note: 252 * The radius is expressed in the same units thatthe outline252 * The radius is expressed in the same units as the outline 253 253 * coordinates. 254 254 */ … … 306 306 * @note: 307 307 * If `opened' is~0 (the default), the outline is treated as a closed 308 * path, and the stroker will generatetwo distinct `border' outlines.308 * path, and the stroker generates two distinct `border' outlines. 309 309 * 310 310 * If `opened' is~1, the outline is processed as an open path, and the 311 * stroker will generatea single `stroke' outline.311 * stroker generates a single `stroke' outline. 312 312 * 313 313 * This function calls @FT_Stroker_Rewind automatically. … … 367 367 * @note: 368 368 * You should call this function after @FT_Stroker_BeginSubPath. 369 * If the subpath was not `opened', this function will `draw' a369 * If the subpath was not `opened', this function `draws' a 370 370 * single line segment to the start position when needed. 371 371 */ … … 477 477 * @description: 478 478 * Call this function once you have finished parsing your paths 479 * with the stroker. It will returnthe number of points and479 * with the stroker. It returns the number of points and 480 480 * contours necessary to export one of the `border' or `stroke' 481 481 * outlines generated by the stroker. … … 526 526 * structure. 527 527 * 528 * Note that this function will appendthe border points and529 * contours to your outline, but willnot try to resize its528 * Note that this function appends the border points and 529 * contours to your outline, but does not try to resize its 530 530 * arrays. 531 531 * … … 601 601 * export the all borders to your own @FT_Outline structure. 602 602 * 603 * Note that this function will appendthe border points and604 * contours to your outline, but willnot try to resize its603 * Note that this function appends the border points and 604 * contours to your outline, but does not try to resize its 605 605 * arrays. 606 606 * -
trunk/poppler/freetype2/include/freetype/ftsynth.h
r150 r262 6 6 /* (specification). */ 7 7 /* */ 8 /* Copyright 2000-2001, 2003, 2006 by*/8 /* Copyright 2000-2001, 2003, 2006, 2008 by */ 9 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 10 /* */ … … 24 24 /*************************************************************************/ 25 25 /********* *********/ 26 /********* WARNING, THIS IS ALPHA CODE , THIS API*********/26 /********* WARNING, THIS IS ALPHA CODE! THIS API *********/ 27 27 /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/ 28 28 /********* FREETYPE DEVELOPMENT TEAM *********/ … … 33 33 /*************************************************************************/ 34 34 /*************************************************************************/ 35 36 37 /* Main reason for not lifting the functions in this module to a */ 38 /* `standard' API is that the used parameters for emboldening and */ 39 /* slanting are not configurable. Consider the functions as a */ 40 /* code resource which should be copied into the application and */ 41 /* adapted to the particular needs. */ 35 42 36 43 … … 51 58 FT_BEGIN_HEADER 52 59 53 /* Make sure slot owns slot->bitmap.*/54 FT_EXPORT( FT_Error )55 FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot );56 57 /* Do not use this function directly! Copy the code to*/58 /* your application and modify it to suit your need.*/60 /* Embolden a glyph by a `reasonable' value (which is highly a matter of */ 61 /* taste). This function is actually a convenience function, providing */ 62 /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */ 63 /* */ 64 /* For emboldened outlines the metrics are estimates only; if you need */ 65 /* precise values you should call @FT_Outline_Get_CBox. */ 59 66 FT_EXPORT( void ) 60 67 FT_GlyphSlot_Embolden( FT_GlyphSlot slot ); 61 68 62 69 /* Slant an outline glyph to the right by about 12 degrees. */ 63 70 FT_EXPORT( void ) 64 71 FT_GlyphSlot_Oblique( FT_GlyphSlot slot ); 65 72 66 /* */73 /* */ 67 74 68 75 FT_END_HEADER -
trunk/poppler/freetype2/include/freetype/internal/ftdebug.h
r251 r262 5 5 /* Debugging and logging component (specification). */ 6 6 /* */ 7 /* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by*/7 /* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008, 2009 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 93 93 #else /* !FT_DEBUG_LEVEL_TRACE */ 94 94 95 #define FT_TRACE( level, varformat ) do ;while ( 0 ) /* nothing */95 #define FT_TRACE( level, varformat ) do { } while ( 0 ) /* nothing */ 96 96 97 97 #endif /* !FT_DEBUG_LEVEL_TRACE */ … … 179 179 #else /* !FT_DEBUG_LEVEL_ERROR */ 180 180 181 #define FT_ERROR( varformat ) do ;while ( 0 ) /* nothing */181 #define FT_ERROR( varformat ) do { } while ( 0 ) /* nothing */ 182 182 183 183 #endif /* !FT_DEBUG_LEVEL_ERROR */ … … 202 202 #else /* !FT_DEBUG_LEVEL_ERROR */ 203 203 204 #define FT_ASSERT( condition ) do ;while ( 0 )204 #define FT_ASSERT( condition ) do { } while ( 0 ) 205 205 206 206 #endif /* !FT_DEBUG_LEVEL_ERROR */ -
trunk/poppler/freetype2/include/freetype/internal/ftdriver.h
r251 r262 92 92 FT_Long charcode ); 93 93 94 94 95 typedef FT_Error 95 96 (*FT_Face_GetKerningFunc)( FT_Face face, … … 105 106 106 107 typedef FT_Error 107 (*FT_Face_GetAdvancesFunc)( FT_Face 108 FT_UInt 109 FT_UInt 110 FT_ Bool vertical,111 FT_ UShort* advances );108 (*FT_Face_GetAdvancesFunc)( FT_Face face, 109 FT_UInt first, 110 FT_UInt count, 111 FT_Int32 flags, 112 FT_Fixed* advances ); 112 113 113 114 -
trunk/poppler/freetype2/include/freetype/internal/psaux.h
r251 r262 6 6 /* (specification). */ 7 7 /* */ 8 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008 by*/8 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008, 2009 by */ 9 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 10 /* */ … … 228 228 /* array */ 229 229 FT_UInt count_offset; /* offset of element count for */ 230 /* arrays */ 230 /* arrays; must not be zero if in */ 231 /* use -- in other words, a */ 232 /* `num_FOO' element must not */ 233 /* start the used structure if we */ 234 /* parse a `FOO' array */ 231 235 FT_UInt dict; /* where we expect it */ 232 236 } T1_FieldRec; -
trunk/poppler/freetype2/include/freetype/internal/services/svttcmap.h
r251 r262 8 8 /* Masatake YAMATO, Redhat K.K. */ 9 9 /* */ 10 /* Copyright 2003 by*/10 /* Copyright 2003, 2008 by */ 11 11 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 12 12 /* */ … … 50 50 /* freetype/ttnameid.h. */ 51 51 /* */ 52 /* format :: */ 53 /* The cmap format. OpenType 1.5 defines the formats 0 (byte */ 54 /* encoding table), 2~(high-byte mapping through table), 4~(segment */ 55 /* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */ 56 /* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */ 57 /* coverage), and 14 (Unicode Variation Sequences). */ 58 /* */ 52 59 typedef struct TT_CMapInfo_ 53 60 { -
trunk/poppler/freetype2/include/freetype/internal/t1types.h
r251 r262 6 6 /* only). */ 7 7 /* */ 8 /* Copyright 1996-2001, 2002, 2003, 2004, 2006 by*/8 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2008 by */ 9 9 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 10 /* */ … … 232 232 void* psaux; 233 233 CID_FaceInfoRec cid; 234 #if 0 234 235 void* afm_data; 236 #endif 235 237 CID_Subrs subrs; 236 238 -
trunk/poppler/freetype2/include/freetype/t1tables.h
r251 r262 79 79 FT_UShort underline_thickness; 80 80 81 /* since 2.3.8 */ 82 83 FT_UShort fs_type; 84 81 85 } PS_FontInfoRec; 82 86 -
trunk/poppler/freetype2/include/freetype/ttnameid.h
r251 r262 836 836 #define TT_NAME_ID_CID_FINDFONT_NAME 20 837 837 838 /* This is new in OpenType 1.5 */ 839 #define TT_NAME_ID_WWS_FAMILY 21 840 #define TT_NAME_ID_WWS_SUBFAMILY 22 841 838 842 839 843 /*************************************************************************/ … … 841 845 /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ 842 846 /* */ 843 /* Updated 02-Jul-2000. */ 844 /* */ 845 846 /* General Scripts Area */ 847 /* Updated 08-Nov-2008. */ 848 /* */ 847 849 848 850 /* Bit 0 Basic Latin */ … … 854 856 /* Bit 3 Latin Extended-B */ 855 857 #define TT_UCR_LATIN_EXTENDED_B (1L << 3) /* U+0180-U+024F */ 856 /* Bit 4 IPA Extensions */ 858 /* Bit 4 IPA Extensions */ 859 /* Phonetic Extensions */ 860 /* Phonetic Extensions Supplement */ 857 861 #define TT_UCR_IPA_EXTENSIONS (1L << 4) /* U+0250-U+02AF */ 862 /* U+1D00-U+1D7F */ 863 /* U+1D80-U+1DBF */ 858 864 /* Bit 5 Spacing Modifier Letters */ 865 /* Modifier Tone Letters */ 859 866 #define TT_UCR_SPACING_MODIFIER (1L << 5) /* U+02B0-U+02FF */ 860 /* Bit 6 Combining Diacritical Marks */ 867 /* U+A700-U+A71F */ 868 /* Bit 6 Combining Diacritical Marks */ 869 /* Combining Diacritical Marks Supplement */ 861 870 #define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ 871 /* U+1DC0-U+1DFF */ 862 872 /* Bit 7 Greek and Coptic */ 863 873 #define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ 864 /* Bit 8 is reserved (was: Greek Symbols and Coptic) */ 865 /* Bit 9 Cyrillic + */ 866 /* Cyrillic Supplementary */ 874 /* Bit 8 Coptic */ 875 #define TT_UCR_COPTIC (1L << 8) /* U+2C80-U+2CFF */ 876 /* Bit 9 Cyrillic */ 877 /* Cyrillic Supplement */ 878 /* Cyrillic Extended-A */ 879 /* Cyrillic Extended-B */ 867 880 #define TT_UCR_CYRILLIC (1L << 9) /* U+0400-U+04FF */ 868 881 /* U+0500-U+052F */ 882 /* U+2DE0-U+2DFF */ 883 /* U+A640-U+A69F */ 869 884 /* Bit 10 Armenian */ 870 885 #define TT_UCR_ARMENIAN (1L << 10) /* U+0530-U+058F */ 871 886 /* Bit 11 Hebrew */ 872 887 #define TT_UCR_HEBREW (1L << 11) /* U+0590-U+05FF */ 873 /* Bit 12 is reserved (was: Hebrew Extended) */ 874 /* Bit 13 Arabic */ 888 /* Bit 12 Vai */ 889 #define TT_UCR_VAI (1L << 12) /* U+A500-U+A63F */ 890 /* Bit 13 Arabic */ 891 /* Arabic Supplement */ 875 892 #define TT_UCR_ARABIC (1L << 13) /* U+0600-U+06FF */ 876 /* Bit 14 is reserved (was: Arabic Extended) */ 893 /* U+0750-U+077F */ 894 /* Bit 14 NKo */ 895 #define TT_UCR_NKO (1L << 14) /* U+07C0-U+07FF */ 877 896 /* Bit 15 Devanagari */ 878 897 #define TT_UCR_DEVANAGARI (1L << 15) /* U+0900-U+097F */ … … 897 916 /* Bit 25 Lao */ 898 917 #define TT_UCR_LAO (1L << 25) /* U+0E80-U+0EFF */ 899 /* Bit 26 Georgian */ 918 /* Bit 26 Georgian */ 919 /* Georgian Supplement */ 900 920 #define TT_UCR_GEORGIAN (1L << 26) /* U+10A0-U+10FF */ 901 /* Bit 27 is reserved (was Georgian Extended) */ 921 /* U+2D00-U+2D2F */ 922 /* Bit 27 Balinese */ 923 #define TT_UCR_BALINESE (1L << 27) /* U+1B00-U+1B7F */ 902 924 /* Bit 28 Hangul Jamo */ 903 925 #define TT_UCR_HANGUL_JAMO (1L << 28) /* U+1100-U+11FF */ 904 926 /* Bit 29 Latin Extended Additional */ 927 /* Latin Extended-C */ 928 /* Latin Extended-D */ 905 929 #define TT_UCR_LATIN_EXTENDED_ADDITIONAL (1L << 29) /* U+1E00-U+1EFF */ 930 /* U+2C60-U+2C7F */ 931 /* U+A720-U+A7FF */ 906 932 /* Bit 30 Greek Extended */ 907 933 #define TT_UCR_GREEK_EXTENDED (1L << 30) /* U+1F00-U+1FFF */ 908 909 /* Symbols Area */ 910 911 /* Bit 31 General Punctuation */ 934 /* Bit 31 General Punctuation */ 935 /* Supplemental Punctuation */ 912 936 #define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ 937 /* U+2E00-U+2E7F */ 913 938 /* Bit 32 Superscripts And Subscripts */ 914 939 #define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ … … 921 946 /* Bit 36 Number Forms */ 922 947 #define TT_UCR_NUMBER_FORMS (1L << 4) /* U+2150-U+218F */ 923 /* Bit 37 Arrows + */ 924 /* Supplemental Arrows-A + */ 925 /* Supplemental Arrows-B */ 948 /* Bit 37 Arrows */ 949 /* Supplemental Arrows-A */ 950 /* Supplemental Arrows-B */ 951 /* Miscellaneous Symbols and Arrows */ 926 952 #define TT_UCR_ARROWS (1L << 5) /* U+2190-U+21FF */ 927 953 /* U+27F0-U+27FF */ 928 954 /* U+2900-U+297F */ 929 /* Bit 38 Mathematical Operators + */ 930 /* Supplemental Mathematical Operators + */ 931 /* Miscellaneous Mathematical Symbols-A + */ 932 /* Miscellaneous Mathematical Symbols-B */ 955 /* U+2B00-U+2BFF */ 956 /* Bit 38 Mathematical Operators */ 957 /* Supplemental Mathematical Operators */ 958 /* Miscellaneous Mathematical Symbols-A */ 959 /* Miscellaneous Mathematical Symbols-B */ 933 960 #define TT_UCR_MATHEMATICAL_OPERATORS (1L << 6) /* U+2200-U+22FF */ 934 961 /* U+2A00-U+2AFF */ … … 953 980 /* Bit 47 Dingbats */ 954 981 #define TT_UCR_DINGBATS (1L << 15) /* U+2700-U+27BF */ 955 956 /* CJK Phonetics and Symbols Area */957 958 982 /* Bit 48 CJK Symbols and Punctuation */ 959 983 #define TT_UCR_CJK_SYMBOLS (1L << 16) /* U+3000-U+303F */ 960 984 /* Bit 49 Hiragana */ 961 985 #define TT_UCR_HIRAGANA (1L << 17) /* U+3040-U+309F */ 962 /* Bit 50 Katakana +*/963 /* Katakana Phonetic Extensions 986 /* Bit 50 Katakana */ 987 /* Katakana Phonetic Extensions */ 964 988 #define TT_UCR_KATAKANA (1L << 18) /* U+30A0-U+30FF */ 965 989 /* U+31F0-U+31FF */ 966 /* Bit 51 Bopomofo +*/967 /* Bopomofo Extended 990 /* Bit 51 Bopomofo */ 991 /* Bopomofo Extended */ 968 992 #define TT_UCR_BOPOMOFO (1L << 19) /* U+3100-U+312F */ 969 993 /* U+31A0-U+31BF */ 970 994 /* Bit 52 Hangul Compatibility Jamo */ 971 995 #define TT_UCR_HANGUL_COMPATIBILITY_JAMO (1L << 20) /* U+3130-U+318F */ 972 /* Bit 53 Kanbun */ 973 #define TT_UCR_CJK_MISC (1L << 21) /* U+3190-U+319F */ 974 #define TT_UCR_KANBUN TT_UCR_CJK_MISC 996 /* Bit 53 Phags-Pa */ 997 #define TT_UCR_CJK_MISC (1L << 21) /* U+A840-U+A87F */ 998 #define TT_UCR_KANBUN TT_UCR_CJK_MISC /* deprecated */ 999 #define TT_UCR_PHAGSPA 975 1000 /* Bit 54 Enclosed CJK Letters and Months */ 976 1001 #define TT_UCR_ENCLOSED_CJK_LETTERS_MONTHS (1L << 22) /* U+3200-U+32FF */ 977 1002 /* Bit 55 CJK Compatibility */ 978 1003 #define TT_UCR_CJK_COMPATIBILITY (1L << 23) /* U+3300-U+33FF */ 979 980 /* Hangul Syllables Area */ 981 982 /* Bit 56 Hangul */ 1004 /* Bit 56 Hangul Syllables */ 983 1005 #define TT_UCR_HANGUL (1L << 24) /* U+AC00-U+D7A3 */ 984 985 /* Surrogates Area */ 986 987 /* Bit 57 High Surrogates + */ 988 /* High Private Use Surrogates + */ 989 /* Low Surrogates */ 1006 /* Bit 57 High Surrogates */ 1007 /* High Private Use Surrogates */ 1008 /* Low Surrogates */ 1009 /* */ 1010 /* According to OpenType specs v.1.3+, */ 1011 /* setting bit 57 implies that there is */ 1012 /* at least one codepoint beyond the */ 1013 /* Basic Multilingual Plane that is */ 1014 /* supported by this font. So it really */ 1015 /* means >= U+10000 */ 990 1016 #define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ 991 1017 /* U+DB80-U+DBFF */ 992 1018 /* U+DC00-U+DFFF */ 993 /* According to OpenType specs v.1.3+, setting bit 57 implies that there */ 994 /* is at least one codepoint beyond the Basic Multilingual Plane that is */ 995 /* supported by this font. So it really means: >= U+10000 */ 996 997 /* Bit 58 is reserved for Unicode SubRanges */ 998 999 /* CJK Ideographs Area */ 1000 1001 /* Bit 59 CJK Unified Ideographs + */ 1002 /* CJK Radicals Supplement + */ 1003 /* Kangxi Radicals + */ 1004 /* Ideographic Description Characters + */ 1005 /* CJK Unified Ideographs Extension A */ 1006 /* CJK Unified Ideographs Extension A + */ 1007 /* CJK Unified Ideographs Extension B + */ 1008 /* Kanbun */ 1019 #define TT_UCR_NON_PLANE_0 TT_UCR_SURROGATES 1020 /* Bit 58 Phoenician */ 1021 #define TT_UCR_PHOENICIAN (1L << 26) /*U+10900-U+1091F*/ 1022 /* Bit 59 CJK Unified Ideographs */ 1023 /* CJK Radicals Supplement */ 1024 /* Kangxi Radicals */ 1025 /* Ideographic Description Characters */ 1026 /* CJK Unified Ideographs Extension A */ 1027 /* CJK Unified Ideographs Extension B */ 1028 /* Kanbun */ 1009 1029 #define TT_UCR_CJK_UNIFIED_IDEOGRAPHS (1L << 27) /* U+4E00-U+9FFF */ 1010 1030 /* U+2E80-U+2EFF */ … … 1014 1034 /*U+20000-U+2A6DF*/ 1015 1035 /* U+3190-U+319F */ 1016 1017 /* Private Use Area */1018 1019 1036 /* Bit 60 Private Use */ 1020 1037 #define TT_UCR_PRIVATE_USE (1L << 28) /* U+E000-U+F8FF */ 1021 1022 /* Compatibility Area and Specials */ 1023 1024 /* Bit 61 CJK Compatibility Ideographs + */ 1025 /* CJK Compatibility Ideographs Supplement */ 1026 #define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+F900-U+FAFF */ 1038 /* Bit 61 CJK Strokes */ 1039 /* CJK Compatibility Ideographs */ 1040 /* CJK Compatibility Ideographs Supplement */ 1041 #define TT_UCR_CJK_COMPATIBILITY_IDEOGRAPHS (1L << 29) /* U+31C0-U+31EF */ 1042 /* U+F900-U+FAFF */ 1027 1043 /*U+2F800-U+2FA1F*/ 1028 1044 /* Bit 62 Alphabetic Presentation Forms */ … … 1032 1048 /* Bit 64 Combining Half Marks */ 1033 1049 #define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ 1034 /* Bit 65 CJK Compatibility Forms */ 1035 #define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE30-U+FE4F */ 1050 /* Bit 65 Vertical forms */ 1051 /* CJK Compatibility Forms */ 1052 #define TT_UCR_CJK_COMPATIBILITY_FORMS (1L << 1) /* U+FE10-U+FE1F */ 1053 /* U+FE30-U+FE4F */ 1036 1054 /* Bit 66 Small Form Variants */ 1037 1055 #define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ … … 1052 1070 /* Bit 74 Myanmar */ 1053 1071 #define TT_UCR_MYANMAR (1L << 10) /* U+1000-U+109F */ 1054 /* Bit 75 Ethiopic */ 1072 /* Bit 75 Ethiopic */ 1073 /* Ethiopic Supplement */ 1074 /* Ethiopic Extended */ 1055 1075 #define TT_UCR_ETHIOPIC (1L << 11) /* U+1200-U+137F */ 1076 /* U+1380-U+139F */ 1077 /* U+2D80-U+2DDF */ 1056 1078 /* Bit 76 Cherokee */ 1057 1079 #define TT_UCR_CHEROKEE (1L << 12) /* U+13A0-U+13FF */ … … 1062 1084 /* Bit 79 Runic */ 1063 1085 #define TT_UCR_RUNIC (1L << 15) /* U+16A0-U+16FF */ 1064 /* Bit 80 Khmer */ 1086 /* Bit 80 Khmer */ 1087 /* Khmer Symbols */ 1065 1088 #define TT_UCR_KHMER (1L << 16) /* U+1780-U+17FF */ 1089 /* U+19E0-U+19FF */ 1066 1090 /* Bit 81 Mongolian */ 1067 1091 #define TT_UCR_MONGOLIAN (1L << 17) /* U+1800-U+18AF */ 1068 1092 /* Bit 82 Braille Patterns */ 1069 1093 #define TT_UCR_BRAILLE (1L << 18) /* U+2800-U+28FF */ 1070 /* Bit 83 Yi Syllables +*/1071 /* Yi Radicals 1094 /* Bit 83 Yi Syllables */ 1095 /* Yi Radicals */ 1072 1096 #define TT_UCR_YI (1L << 19) /* U+A000-U+A48F */ 1073 1097 /* U+A490-U+A4CF */ 1074 /* Bit 84 Tagalog +*/1075 /* Hanunoo +*/1076 /* Buhid +*/1077 /* Tagbanwa 1098 /* Bit 84 Tagalog */ 1099 /* Hanunoo */ 1100 /* Buhid */ 1101 /* Tagbanwa */ 1078 1102 #define TT_UCR_PHILIPPINE (1L << 20) /* U+1700-U+171F */ 1079 1103 /* U+1720-U+173F */ … … 1086 1110 /* Bit 87 Deseret */ 1087 1111 #define TT_UCR_DESERET (1L << 23) /*U+10400-U+1044F*/ 1088 /* Bit 88 Byzantine Musical Symbols + */ 1089 /* Musical Symbols */ 1112 /* Bit 88 Byzantine Musical Symbols */ 1113 /* Musical Symbols */ 1114 /* Ancient Greek Musical Notation */ 1090 1115 #define TT_UCR_MUSICAL_SYMBOLS (1L << 24) /*U+1D000-U+1D0FF*/ 1091 1116 /*U+1D100-U+1D1FF*/ 1117 /*U+1D200-U+1D24F*/ 1092 1118 /* Bit 89 Mathematical Alphanumeric Symbols */ 1093 1119 #define TT_UCR_MATH_ALPHANUMERIC_SYMBOLS (1L << 25) /*U+1D400-U+1D7FF*/ 1094 /* Bit 90 Private Use (plane 15) +*/1095 /* Private Use (plane 16) 1120 /* Bit 90 Private Use (plane 15) */ 1121 /* Private Use (plane 16) */ 1096 1122 #define TT_UCR_PRIVATE_USE_SUPPLEMENTARY (1L << 26) /*U+F0000-U+FFFFD*/ 1097 1123 /*U+100000-U+10FFFD*/ 1098 /* Bit 91 Variation Selectors */ 1124 /* Bit 91 Variation Selectors */ 1125 /* Variation Selectors Supplement */ 1099 1126 #define TT_UCR_VARIATION_SELECTORS (1L << 27) /* U+FE00-U+FE0F */ 1127 /*U+E0100-U+E01EF*/ 1100 1128 /* Bit 92 Tags */ 1101 1129 #define TT_UCR_TAGS (1L << 28) /*U+E0000-U+E007F*/ 1130 /* Bit 93 Limbu */ 1131 #define TT_UCR_LIMBU (1L << 29) /* U+1900-U+194F */ 1132 /* Bit 94 Tai Le */ 1133 #define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ 1134 /* Bit 95 New Tai Lue */ 1135 #define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ 1136 /* Bit 96 Buginese */ 1137 #define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ 1138 /* Bit 97 Glagolitic */ 1139 #define TT_UCR_GLAGOLITIC (1L << 1) /* U+2C00-U+2C5F */ 1140 /* Bit 98 Tifinagh */ 1141 #define TT_UCR_TIFINAGH (1L << 2) /* U+2D30-U+2D7F */ 1142 /* Bit 99 Yijing Hexagram Symbols */ 1143 #define TT_UCR_YIJING (1L << 3) /* U+4DC0-U+4DFF */ 1144 /* Bit 100 Syloti Nagri */ 1145 #define TT_UCR_SYLOTI_NAGRI (1L << 4) /* U+A800-U+A82F */ 1146 /* Bit 101 Linear B Syllabary */ 1147 /* Linear B Ideograms */ 1148 /* Aegean Numbers */ 1149 #define TT_UCR_LINEAR_B (1L << 5) /*U+10000-U+1007F*/ 1150 /*U+10080-U+100FF*/ 1151 /*U+10100-U+1013F*/ 1152 /* Bit 102 Ancient Greek Numbers */ 1153 #define TT_UCR_ANCIENT_GREEK_NUMBERS (1L << 6) /*U+10140-U+1018F*/ 1154 /* Bit 103 Ugaritic */ 1155 #define TT_UCR_UGARITIC (1L << 7) /*U+10380-U+1039F*/ 1156 /* Bit 104 Old Persian */ 1157 #define TT_UCR_OLD_PERSIAN (1L << 8) /*U+103A0-U+103DF*/ 1158 /* Bit 105 Shavian */ 1159 #define TT_UCR_SHAVIAN (1L << 9) /*U+10450-U+1047F*/ 1160 /* Bit 106 Osmanya */ 1161 #define TT_UCR_OSMANYA (1L << 10) /*U+10480-U+104AF*/ 1162 /* Bit 107 Cypriot Syllabary */ 1163 #define TT_UCR_CYPRIOT_SYLLABARY (1L << 11) /*U+10800-U+1083F*/ 1164 /* Bit 108 Kharoshthi */ 1165 #define TT_UCR_KHAROSHTHI (1L << 12) /*U+10A00-U+10A5F*/ 1166 /* Bit 109 Tai Xuan Jing Symbols */ 1167 #define TT_UCR_TAI_XUAN_JING (1L << 13) /*U+1D300-U+1D35F*/ 1168 /* Bit 110 Cuneiform */ 1169 /* Cuneiform Numbers and Punctuation */ 1170 #define TT_UCR_CUNEIFORM (1L << 14) /*U+12000-U+123FF*/ 1171 /*U+12400-U+1247F*/ 1172 /* Bit 111 Counting Rod Numerals */ 1173 #define TT_UCR_COUNTING_ROD_NUMERALS (1L << 15) /*U+1D360-U+1D37F*/ 1174 /* Bit 112 Sundanese */ 1175 #define TT_UCR_SUNDANESE (1L << 16) /* U+1B80-U+1BBF */ 1176 /* Bit 113 Lepcha */ 1177 #define TT_UCR_LEPCHA (1L << 17) /* U+1C00-U+1C4F */ 1178 /* Bit 114 Ol Chiki */ 1179 #define TT_UCR_OL_CHIKI (1L << 18) /* U+1C50-U+1C7F */ 1180 /* Bit 115 Saurashtra */ 1181 #define TT_UCR_SAURASHTRA (1L << 19) /* U+A880-U+A8DF */ 1182 /* Bit 116 Kayah Li */ 1183 #define TT_UCR_KAYAH_LI (1L << 20) /* U+A900-U+A92F */ 1184 /* Bit 117 Rejang */ 1185 #define TT_UCR_REJANG (1L << 21) /* U+A930-U+A95F */ 1186 /* Bit 118 Cham */ 1187 #define TT_UCR_CHAM (1L << 22) /* U+AA00-U+AA5F */ 1188 /* Bit 119 Ancient Symbols */ 1189 #define TT_UCR_ANCIENT_SYMBOLS (1L << 23) /*U+10190-U+101CF*/ 1190 /* Bit 120 Phaistos Disc */ 1191 #define TT_UCR_PHAISTOS_DISC (1L << 24) /*U+101D0-U+101FF*/ 1192 /* Bit 121 Carian */ 1193 /* Lycian */ 1194 /* Lydian */ 1195 #define TT_UCR_OLD_ANATOLIAN (1L << 25) /*U+102A0-U+102DF*/ 1196 /*U+10280-U+1029F*/ 1197 /*U+10920-U+1093F*/ 1198 /* Bit 122 Domino Tiles */ 1199 /* Mahjong Tiles */ 1200 #define TT_UCR_GAME_TILES (1L << 26) /*U+1F030-U+1F09F*/ 1201 /*U+1F000-U+1F02F*/ 1202 /* Bit 123-127 Reserved for process-internal usage */ 1102 1203 1103 1204 -
trunk/poppler/freetype2/include/freetype/tttags.h
r251 r262 5 5 /* Tags for TrueType and OpenType tables (specification only). */ 6 6 /* */ 7 /* Copyright 1996-2001, 2004, 2005, 2007 by*/7 /* Copyright 1996-2001, 2004, 2005, 2007, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 42 42 #define TTAG_bsln FT_MAKE_TAG( 'b', 's', 'l', 'n' ) 43 43 #define TTAG_CFF FT_MAKE_TAG( 'C', 'F', 'F', ' ' ) 44 #define TTAG_CID FT_MAKE_TAG( 'C', 'I', 'D', ' ' ) 44 45 #define TTAG_cmap FT_MAKE_TAG( 'c', 'm', 'a', 'p' ) 45 46 #define TTAG_cvar FT_MAKE_TAG( 'c', 'v', 'a', 'r' ) … … 50 51 #define TTAG_EBSC FT_MAKE_TAG( 'E', 'B', 'S', 'C' ) 51 52 #define TTAG_feat FT_MAKE_TAG( 'f', 'e', 'a', 't' ) 53 #define TTAG_FOND FT_MAKE_TAG( 'F', 'O', 'N', 'D' ) 52 54 #define TTAG_fpgm FT_MAKE_TAG( 'f', 'p', 'g', 'm' ) 53 55 #define TTAG_fvar FT_MAKE_TAG( 'f', 'v', 'a', 'r' ) … … 68 70 #define TTAG_loca FT_MAKE_TAG( 'l', 'o', 'c', 'a' ) 69 71 #define TTAG_LTSH FT_MAKE_TAG( 'L', 'T', 'S', 'H' ) 72 #define TTAG_LWFN FT_MAKE_TAG( 'L', 'W', 'F', 'N' ) 70 73 #define TTAG_MATH FT_MAKE_TAG( 'M', 'A', 'T', 'H' ) 71 74 #define TTAG_maxp FT_MAKE_TAG( 'm', 'a', 'x', 'p' ) … … 80 83 #define TTAG_OTTO FT_MAKE_TAG( 'O', 'T', 'T', 'O' ) 81 84 #define TTAG_PCLT FT_MAKE_TAG( 'P', 'C', 'L', 'T' ) 85 #define TTAG_POST FT_MAKE_TAG( 'P', 'O', 'S', 'T' ) 82 86 #define TTAG_post FT_MAKE_TAG( 'p', 'o', 's', 't' ) 83 87 #define TTAG_prep FT_MAKE_TAG( 'p', 'r', 'e', 'p' ) 84 88 #define TTAG_prop FT_MAKE_TAG( 'p', 'r', 'o', 'p' ) 89 #define TTAG_sfnt FT_MAKE_TAG( 's', 'f', 'n', 't' ) 85 90 #define TTAG_SING FT_MAKE_TAG( 'S', 'I', 'N', 'G' ) 86 91 #define TTAG_trak FT_MAKE_TAG( 't', 'r', 'a', 'k' ) … … 88 93 #define TTAG_ttc FT_MAKE_TAG( 't', 't', 'c', ' ' ) 89 94 #define TTAG_ttcf FT_MAKE_TAG( 't', 't', 'c', 'f' ) 95 #define TTAG_TYP1 FT_MAKE_TAG( 'T', 'Y', 'P', '1' ) 96 #define TTAG_typ1 FT_MAKE_TAG( 't', 'y', 'p', '1' ) 90 97 #define TTAG_VDMX FT_MAKE_TAG( 'V', 'D', 'M', 'X' ) 91 98 #define TTAG_vhea FT_MAKE_TAG( 'v', 'h', 'e', 'a' ) -
trunk/poppler/freetype2/src/autofit/afcjk.c
r251 r262 5 5 /* Auto-fitter hinting routines for CJK script (body). */ 6 6 /* */ 7 /* Copyright 2006, 2007 by*/7 /* Copyright 2006, 2007, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 1254 1254 af_cjk_align_serif_edge( hints, before, edge ); 1255 1255 else 1256 edge->pos = before->pos + 1257 FT_MulDiv( edge->fpos - before->fpos, 1258 after->pos - before->pos, 1259 after->fpos - before->fpos ); 1256 { 1257 if ( after->fpos == before->fpos ) 1258 edge->pos = before->pos; 1259 else 1260 edge->pos = before->pos + 1261 FT_MulDiv( edge->fpos - before->fpos, 1262 after->pos - before->pos, 1263 after->fpos - before->fpos ); 1264 } 1260 1265 } 1261 1266 } … … 1437 1442 { 1438 1443 #if 0 1439 { 0x0100, 0xFFFF}, /* why this? */1444 { 0x0100UL, 0xFFFFUL }, /* why this? */ 1440 1445 #endif 1441 { 0x2E80, 0x2EFF }, /* CJK Radicals Supplement*/1442 { 0x2F00, 0x2FDF }, /* Kangxi Radicals*/1443 { 0x3000, 0x303F }, /* CJK Symbols and Punctuation*/1444 { 0x3040, 0x309F }, /* Hiragana*/1445 { 0x30A0, 0x30FF }, /* Katakana*/1446 { 0x3100, 0x312F }, /* Bopomofo*/1447 { 0x3130, 0x318F }, /* Hangul Compatibility Jamo*/1448 { 0x31A0, 0x31BF }, /* Bopomofo Extended*/1449 { 0x31C0, 0x31EF }, /* CJK Strokes*/1450 { 0x31F0, 0x31FF }, /* Katakana Phonetic Extensions*/1451 { 0x3200, 0x32FF }, /* Enclosed CJK Letters and Months*/1452 { 0x3300, 0x33FF }, /* CJK Compatibility*/1453 { 0x3400, 0x4DBF }, /* CJK Unified Ideographs Extension A*/1454 { 0x4DC0, 0x4DFF }, /* Yijing Hexagram Symbols*/1455 { 0x4E00, 0x9FFF }, /* CJK Unified Ideographs*/1456 { 0xF900, 0xFAFF }, /* CJK Compatibility Ideographs*/1457 { 0xFE30, 0xFE4F }, /* CJK Compatibility Forms*/1458 { 0xFF00, 0xFFEF }, /* Halfwidth and Fullwidth Forms*/1459 { 0x20000 , 0x2A6DF }, /* CJK Unified Ideographs Extension B*/1460 { 0x2F800 , 0x2FA1F },/* CJK Compatibility Ideographs Supplement */1461 { 0, 0}1446 { 0x2E80UL, 0x2EFFUL }, /* CJK Radicals Supplement */ 1447 { 0x2F00UL, 0x2FDFUL }, /* Kangxi Radicals */ 1448 { 0x3000UL, 0x303FUL }, /* CJK Symbols and Punctuation */ 1449 { 0x3040UL, 0x309FUL }, /* Hiragana */ 1450 { 0x30A0UL, 0x30FFUL }, /* Katakana */ 1451 { 0x3100UL, 0x312FUL }, /* Bopomofo */ 1452 { 0x3130UL, 0x318FUL }, /* Hangul Compatibility Jamo */ 1453 { 0x31A0UL, 0x31BFUL }, /* Bopomofo Extended */ 1454 { 0x31C0UL, 0x31EFUL }, /* CJK Strokes */ 1455 { 0x31F0UL, 0x31FFUL }, /* Katakana Phonetic Extensions */ 1456 { 0x3200UL, 0x32FFUL }, /* Enclosed CJK Letters and Months */ 1457 { 0x3300UL, 0x33FFUL }, /* CJK Compatibility */ 1458 { 0x3400UL, 0x4DBFUL }, /* CJK Unified Ideographs Extension A */ 1459 { 0x4DC0UL, 0x4DFFUL }, /* Yijing Hexagram Symbols */ 1460 { 0x4E00UL, 0x9FFFUL }, /* CJK Unified Ideographs */ 1461 { 0xF900UL, 0xFAFFUL }, /* CJK Compatibility Ideographs */ 1462 { 0xFE30UL, 0xFE4FUL }, /* CJK Compatibility Forms */ 1463 { 0xFF00UL, 0xFFEFUL }, /* Halfwidth and Fullwidth Forms */ 1464 { 0x20000UL, 0x2A6DFUL }, /* CJK Unified Ideographs Extension B */ 1465 { 0x2F800UL, 0x2FA1FUL }, /* CJK Compatibility Ideographs Supplement */ 1466 { 0UL, 0UL } 1462 1467 }; 1463 1468 -
trunk/poppler/freetype2/src/autofit/afhints.c
r209 r262 5 5 /* Auto-fitter hinting routines (body). */ 6 6 /* */ 7 /* Copyright 2003, 2004, 2005, 2006, 2007 by*/7 /* Copyright 2003, 2004, 2005, 2006, 2007, 2009 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 128 128 #ifdef AF_DEBUG 129 129 130 #include <stdio.h>130 #include FT_CONFIG_STANDARD_LIBRARY_H 131 131 132 132 static const char* … … 204 204 if ( flags & AF_EDGE_ROUND ) 205 205 { 206 memcpy( temp + pos, "round", 5 );206 ft_memcpy( temp + pos, "round", 5 ); 207 207 pos += 5; 208 208 } … … 211 211 if ( pos > 0 ) 212 212 temp[pos++] = ' '; 213 memcpy( temp + pos, "serif", 5 );213 ft_memcpy( temp + pos, "serif", 5 ); 214 214 pos += 5; 215 215 } -
trunk/poppler/freetype2/src/autofit/aflatin.c
r251 r262 5 5 /* Auto-fitter hinting routines for latin script (body). */ 6 6 /* */ 7 /* Copyright 2003, 2004, 2005, 2006, 2007 by*/7 /* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 2009 2009 after < edge_limit && after > edge ) 2010 2010 { 2011 edge->pos = before->pos + 2011 if ( after->opos == before->opos ) 2012 edge->pos = before->pos; 2013 else 2014 edge->pos = before->pos + 2012 2015 FT_MulDiv( edge->opos - before->opos, 2013 2016 after->pos - before->pos, … … 2125 2128 static const AF_Script_UniRangeRec af_latin_uniranges[] = 2126 2129 { 2127 { 0x0020, 0x007F }, /* Basic Latin (no control characters) */ 2128 { 0x00A0, 0x00FF }, /* Latin-1 Supplement (no control characters) */ 2129 { 0x0100, 0x017F }, /* Latin Extended-A */ 2130 { 0x0180, 0x024F }, /* Latin Extended-B */ 2131 { 0x0250, 0x02AF }, /* IPA Extensions */ 2132 { 0x02B0, 0x02FF }, /* Spacing Modifier Letters */ 2133 { 0x0300, 0x036F }, /* Combining Diacritical Marks */ 2134 { 0x0370, 0x03FF }, /* Greek and Coptic */ 2135 { 0x0400, 0x04FF }, /* Cyrillic */ 2136 { 0x0500, 0x052F }, /* Cyrillic Supplement */ 2137 { 0x1D00, 0x1D7F }, /* Phonetic Extensions */ 2138 { 0x1D80, 0x1DBF }, /* Phonetic Extensions Supplement */ 2139 { 0x1DC0, 0x1DFF }, /* Combining Diacritical Marks Supplement */ 2140 { 0x1E00, 0x1EFF }, /* Latin Extended Additional */ 2141 { 0x1F00, 0x1FFF }, /* Greek Extended */ 2142 { 0x2000, 0x206F }, /* General Punctuation */ 2143 { 0x2070, 0x209F }, /* Superscripts and Subscripts */ 2144 { 0x20A0, 0x20CF }, /* Currency Symbols */ 2145 { 0x2150, 0x218F }, /* Number Forms */ 2146 { 0x2460, 0x24FF }, /* Enclosed Alphanumerics */ 2147 { 0 , 0 } 2130 { 0x0020 , 0x007F }, /* Basic Latin (no control chars) */ 2131 { 0x00A0 , 0x00FF }, /* Latin-1 Supplement (no control chars) */ 2132 { 0x0100 , 0x017F }, /* Latin Extended-A */ 2133 { 0x0180 , 0x024F }, /* Latin Extended-B */ 2134 { 0x0250 , 0x02AF }, /* IPA Extensions */ 2135 { 0x02B0 , 0x02FF }, /* Spacing Modifier Letters */ 2136 { 0x0300 , 0x036F }, /* Combining Diacritical Marks */ 2137 { 0x0370 , 0x03FF }, /* Greek and Coptic */ 2138 { 0x0400 , 0x04FF }, /* Cyrillic */ 2139 { 0x0500 , 0x052F }, /* Cyrillic Supplement */ 2140 { 0x1D00 , 0x1D7F }, /* Phonetic Extensions */ 2141 { 0x1D80 , 0x1DBF }, /* Phonetic Extensions Supplement */ 2142 { 0x1DC0 , 0x1DFF }, /* Combining Diacritical Marks Supplement */ 2143 { 0x1E00 , 0x1EFF }, /* Latin Extended Additional */ 2144 { 0x1F00 , 0x1FFF }, /* Greek Extended */ 2145 { 0x2000 , 0x206F }, /* General Punctuation */ 2146 { 0x2070 , 0x209F }, /* Superscripts and Subscripts */ 2147 { 0x20A0 , 0x20CF }, /* Currency Symbols */ 2148 { 0x2150 , 0x218F }, /* Number Forms */ 2149 { 0x2460 , 0x24FF }, /* Enclosed Alphanumerics */ 2150 { 0x2C60 , 0x2C7F }, /* Latin Extended-C */ 2151 { 0x2DE0 , 0x2DFF }, /* Cyrillic Extended-A */ 2152 { 0xA640U , 0xA69FU }, /* Cyrillic Extended-B */ 2153 { 0xA720U , 0xA7FFU }, /* Latin Extended-D */ 2154 { 0xFB00U , 0xFB06U }, /* Alphab. Present. Forms (Latin Ligs) */ 2155 { 0x1D400UL, 0x1D7FFUL }, /* Mathematical Alphanumeric Symbols */ 2156 { 0 , 0 } 2148 2157 }; 2149 2158 -
trunk/poppler/freetype2/src/autofit/aflatin2.c
r209 r262 5 5 /* Auto-fitter hinting routines for latin script (body). */ 6 6 /* */ 7 /* Copyright 2003, 2004, 2005, 2006, 2007 by*/7 /* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 945 945 } 946 946 } 947 #if 0 948 } 949 #endif 947 950 948 951 /* now, compute the `serif' segments */ … … 2151 2154 after < edge_limit && after > edge ) 2152 2155 { 2153 edge->pos = before->pos + 2156 if ( after->opos == before->opos ) 2157 edge->pos = before->pos; 2158 else 2159 edge->pos = before->pos + 2154 2160 FT_MulDiv( edge->opos - before->opos, 2155 2161 after->pos - before->pos, -
trunk/poppler/freetype2/src/autofit/aftypes.h
r251 r262 5 5 /* Auto-fitter types (specification only). */ 6 6 /* */ 7 /* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by*/7 /* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 59 59 #ifdef AF_DEBUG 60 60 61 #include <stdio.h> 61 #include FT_CONFIG_STANDARD_LIBRARY_H 62 62 63 #define AF_LOG( x ) do { if ( _af_debug ) printf x; } while ( 0 ) 63 64 … … 70 71 #else /* !AF_DEBUG */ 71 72 72 #define AF_LOG( x ) do ;while ( 0 ) /* nothing */73 #define AF_LOG( x ) do { } while ( 0 ) /* nothing */ 73 74 74 75 #endif /* !AF_DEBUG */ -
trunk/poppler/freetype2/src/base/ftbase.c
r251 r262 5 5 /* Single object library component (body only). */ 6 6 /* */ 7 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007 by*/7 /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 21 21 #define FT_MAKE_OPTION_SINGLE_OBJECT 22 22 23 #include "ftadvanc.c" 23 24 #include "ftcalc.c" 24 25 #include "ftdbgmem.c" … … 32 33 #include "ftutil.c" 33 34 34 #if defined( __APPLE__) && !defined ( DARWIN_NO_CARBON )35 #if defined( FT_MACINTOSH ) && !defined ( DARWIN_NO_CARBON ) 35 36 #include "ftmac.c" 36 37 #endif -
trunk/poppler/freetype2/src/base/ftbitmap.c
r251 r262 3 3 /* ftbitmap.c */ 4 4 /* */ 5 /* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */ 6 /* bitmaps into 8bpp format (body). */ 5 /* FreeType utility functions for bitmaps (body). */ 7 6 /* */ 8 /* Copyright 2004, 2005, 2006, 2007 by*/7 /* Copyright 2004, 2005, 2006, 2007, 2008, 2009 by */ 9 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 10 9 /* */ … … 20 19 #include <ft2build.h> 21 20 #include FT_BITMAP_H 21 #include FT_IMAGE_H 22 22 #include FT_INTERNAL_OBJECTS_H 23 23 … … 389 389 case FT_PIXEL_MODE_GRAY2: 390 390 case FT_PIXEL_MODE_GRAY4: 391 case FT_PIXEL_MODE_LCD: 392 case FT_PIXEL_MODE_LCD_V: 391 393 { 392 394 FT_Int pad; … … 483 485 484 486 case FT_PIXEL_MODE_GRAY: 487 case FT_PIXEL_MODE_LCD: 488 case FT_PIXEL_MODE_LCD_V: 485 489 { 486 490 FT_Int width = source->width; … … 607 611 608 612 FT_EXPORT_DEF( FT_Error ) 613 FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ) 614 { 615 if ( slot && slot->format == FT_GLYPH_FORMAT_BITMAP && 616 !( slot->internal->flags & FT_GLYPH_OWN_BITMAP ) ) 617 { 618 FT_Bitmap bitmap; 619 FT_Error error; 620 621 622 FT_Bitmap_New( &bitmap ); 623 error = FT_Bitmap_Copy( slot->library, &slot->bitmap, &bitmap ); 624 if ( error ) 625 return error; 626 627 slot->bitmap = bitmap; 628 slot->internal->flags |= FT_GLYPH_OWN_BITMAP; 629 } 630 631 return FT_Err_Ok; 632 } 633 634 635 /* documentation is in ftbitmap.h */ 636 637 FT_EXPORT_DEF( FT_Error ) 609 638 FT_Bitmap_Done( FT_Library library, 610 639 FT_Bitmap *bitmap ) -
trunk/poppler/freetype2/src/base/ftcalc.c
r251 r262 39 39 #include FT_INTERNAL_OBJECTS_H 40 40 41 #ifdef FT_MULFIX_INLINED 42 #undef FT_MulFix 43 #endif 41 44 42 45 /* we need to define a 64-bits data type here */ … … 194 197 FT_Long b ) 195 198 { 199 #ifdef FT_MULFIX_ASSEMBLER 200 201 return FT_MULFIX_ASSEMBLER( a, b ); 202 203 #else 204 196 205 FT_Int s = 1; 197 206 FT_Long c; 198 207 199 208 200 if ( a < 0 ) { a = -a; s = -1; } 201 if ( b < 0 ) { b = -b; s = -s; } 209 if ( a < 0 ) 210 { 211 a = -a; 212 s = -1; 213 } 214 215 if ( b < 0 ) 216 { 217 b = -b; 218 s = -s; 219 } 202 220 203 221 c = (FT_Long)( ( (FT_Int64)a * b + 0x8000L ) >> 16 ); 204 return ( s > 0 ) ? c : -c ; 222 223 return ( s > 0 ) ? c : -c; 224 225 #endif /* FT_MULFIX_ASSEMBLER */ 205 226 } 206 227 … … 414 435 FT_Long b ) 415 436 { 416 /* use inline assembly to speed up things a bit */ 417 418 #if defined( __GNUC__ ) && defined( i386 ) 419 420 FT_Long result; 421 422 423 __asm__ __volatile__ ( 424 "imul %%edx\n" 425 "movl %%edx, %%ecx\n" 426 "sarl $31, %%ecx\n" 427 "addl $0x8000, %%ecx\n" 428 "addl %%ecx, %%eax\n" 429 "adcl $0, %%edx\n" 430 "shrl $16, %%eax\n" 431 "shll $16, %%edx\n" 432 "addl %%edx, %%eax\n" 433 "mov %%eax, %0\n" 434 : "=a"(result), "+d"(b) 435 : "a"(a) 436 : "%ecx" 437 ); 438 return result; 439 440 #elif 1 437 #ifdef FT_MULFIX_ASSEMBLER 438 439 return FT_MULFIX_ASSEMBLER( a, b ); 440 441 #elif 0 442 443 /* 444 * This code is nonportable. See comment below. 445 * 446 * However, on a platform where right-shift of a signed quantity fills 447 * the leftmost bits by copying the sign bit, it might be faster. 448 */ 441 449 442 450 FT_Long sa, sb; … … 447 455 return a; 448 456 457 /* 458 * This is a clever way of converting a signed number `a' into its 459 * absolute value (stored back into `a') and its sign. The sign is 460 * stored in `sa'; 0 means `a' was positive or zero, and -1 means `a' 461 * was negative. (Similarly for `b' and `sb'). 462 * 463 * Unfortunately, it doesn't work (at least not portably). 464 * 465 * It makes the assumption that right-shift on a negative signed value 466 * fills the leftmost bits by copying the sign bit. This is wrong. 467 * According to K&R 2nd ed, section `A7.8 Shift Operators' on page 206, 468 * the result of right-shift of a negative signed value is 469 * implementation-defined. At least one implementation fills the 470 * leftmost bits with 0s (i.e., it is exactly the same as an unsigned 471 * right shift). This means that when `a' is negative, `sa' ends up 472 * with the value 1 rather than -1. After that, everything else goes 473 * wrong. 474 */ 449 475 sa = ( a >> ( sizeof ( a ) * 8 - 1 ) ); 450 476 a = ( a ^ sa ) - sa; -
trunk/poppler/freetype2/src/base/ftdbgmem.c
r165 r262 5 5 /* Memory debugger (body). */ 6 6 /* */ 7 /* Copyright 2001, 2002, 2003, 2004, 2005, 2006 by*/7 /* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2009 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 34 34 */ 35 35 36 #include <stdio.h> 37 #include <stdlib.h> 36 #include FT_CONFIG_STANDARD_LIBRARY_H 38 37 39 38 FT_BASE_DEF( const char* ) _ft_debug_file = 0; … … 991 990 992 991 /* ANSI C doesn't like empty source files */ 993 const FT_Byte _debug_mem_dummy = 0;992 static const FT_Byte _debug_mem_dummy = 0; 994 993 995 994 #endif /* !FT_DEBUG_MEMORY */ -
trunk/poppler/freetype2/src/base/ftdebug.c
r251 r262 47 47 48 48 49 #if defined( FT_DEBUG_LEVEL_ERROR )49 #ifdef FT_DEBUG_LEVEL_ERROR 50 50 51 51 /* documentation is in ftdebug.h */ -
trunk/poppler/freetype2/src/base/ftinit.c
r251 r262 56 56 #undef FT_USE_MODULE 57 57 #ifdef __cplusplus 58 #define FT_USE_MODULE( x ) extern "C" const FT_Module_Classx;58 #define FT_USE_MODULE( type, x ) extern "C" const type x; 59 59 #else 60 #define FT_USE_MODULE( x ) extern const FT_Module_Classx;60 #define FT_USE_MODULE( type, x ) extern const type x; 61 61 #endif 62 62 … … 66 66 67 67 #undef FT_USE_MODULE 68 #define FT_USE_MODULE( x ) (const FT_Module_Class*)&(x),68 #define FT_USE_MODULE( type, x ) (const FT_Module_Class*)&(x), 69 69 70 70 static -
trunk/poppler/freetype2/src/base/ftlcdfil.c
r251 r262 5 5 /* FreeType API for color filtering of subpixel bitmap glyphs (body). */ 6 6 /* */ 7 /* Copyright 2006, 2008 by*/7 /* Copyright 2006, 2008, 2009 by */ 8 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 9 /* */ … … 267 267 268 268 269 FT_EXPORT ( FT_Error )269 FT_EXPORT_DEF( FT_Error ) 270 270 FT_Library_SetLcdFilter( FT_Library library, 271 271 FT_LcdFilter filter ) … … 297 297 #elif defined( FT_FORCE_LIGHT_LCD_FILTER ) 298 298 299 memcpy( library->lcd_weights, light_filter, 5 );299 ft_memcpy( library->lcd_weights, light_filter, 5 ); 300 300 library->lcd_filter_func = _ft_lcd_filter_fir; 301 301 library->lcd_extra = 2; … … 303 303 #else 304 304 305 memcpy( library->lcd_weights, default_filter, 5 );305 ft_memcpy( library->lcd_weights, default_filter, 5 ); 306 306 library->lcd_filter_func = _ft_lcd_filter_fir; 307 307 library->lcd_extra = 2; … … 312 312 313 313 case FT_LCD_FILTER_LIGHT: 314 memcpy( library->lcd_weights, light_filter, 5 );314 ft_memcpy( library->lcd_weights, light_filter, 5 ); 315 315 library->lcd_filter_func = _ft_lcd_filter_fir; 316 316 library->lcd_extra = 2; … … 336 336 #else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ 337 337 338 FT_EXPORT ( FT_Error )338 FT_EXPORT_DEF( FT_Error ) 339 339 FT_Library_SetLcdFilter( FT_Library library, 340 340 FT_LcdFilter filter ) -
trunk/poppler/freetype2/src/base/ftmac.c
r251 r262 9 9 /* classic platforms built by MPW. */ 10 10 /* */ 11 /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ 11 /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, */ 12 /* 2009 by */ 12 13 /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ 13 14 /* */ … … 68 69 #include <ft2build.h> 69 70 #include FT_FREETYPE_H 71 #include FT_TRUETYPE_TAGS_H 70 72 #include FT_INTERNAL_STREAM_H 73 #include "ftbase.h" 71 74 72 75 /* This is for Mac OS X. Without redefinition, OS_INLINE */ … … 78 81 #endif 79 82 80 /* The ResourceIndex type was available SDKs on 10.5 */ 83 /* `configure' checks the availability of `ResourceIndex' strictly */ 84 /* and sets HAVE_TYPE_RESOURCE_INDEX 1 or 0 always. If it is */ 85 /* not set (e.g., a build without `configure'), the availability */ 86 /* is guessed from the SDK version. */ 81 87 #ifndef HAVE_TYPE_RESOURCE_INDEX 82 typedef short ResourceIndex; 88 #if !defined( MAC_OS_X_VERSION_10_5 ) || \ 89 ( MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 ) 90 #define HAVE_TYPE_RESOURCE_INDEX 0 91 #else 92 #define HAVE_TYPE_RESOURCE_INDEX 1 93 #endif 94 #endif /* !HAVE_TYPE_RESOURCE_INDEX */ 95 96 #if ( HAVE_TYPE_RESOURCE_INDEX == 0 ) 97 typedef short ResourceIndex; 83 98 #endif 84 99 … … 87 102 #include <sys/syslimits.h> /* PATH_MAX */ 88 103 104 /* Don't want warnings about our own use of deprecated functions. */ 89 105 #define FT_DEPRECATED_ATTRIBUTE 90 106 91 107 #include FT_MAC_H 92 93 /* undefine blocking-macros in ftmac.h */94 #undef FT_GetFile_From_Mac_Name( a, b, c )95 #undef FT_GetFile_From_Mac_ATS_Name( a, b, c )96 #undef FT_New_Face_From_FOND( a, b, c, d )97 #undef FT_New_Face_From_FSSpec( a, b, c, d )98 #undef FT_New_Face_From_FSRef( a, b, c, d )99 108 100 109 #ifndef kATSOptionFlagsUnRestrictedScope /* since Mac OS X 10.1 */ … … 590 599 for (;;) 591 600 { 592 post_data = Get1Resource( FT_MAKE_TAG( 'P', 'O', 'S', 'T' ), 593 res_id++ ); 601 post_data = Get1Resource( TTAG_POST, res_id++ ); 594 602 if ( post_data == NULL ) 595 603 break; /* we are done */ … … 630 638 for (;;) 631 639 { 632 post_data = Get1Resource( FT_MAKE_TAG( 'P', 'O', 'S', 'T' ), 633 res_id++ ); 640 post_data = Get1Resource( TTAG_POST, res_id++ ); 634 641 if ( post_data == NULL ) 635 642 break; /* we are done */ … … 683 690 684 691 685 /* Finalizer for a memory stream; gets called by FT_Done_Face(). 686 It frees the memory it uses. */ 687 static void 688 memory_stream_close( FT_Stream stream ) 689 { 690 FT_Memory memory = stream->memory; 691 692 693 FT_FREE( stream->base ); 694 695 stream->size = 0; 696 stream->base = 0; 697 stream->close = 0; 698 } 699 700 701 /* Create a new memory stream from a buffer and a size. */ 702 static FT_Error 703 new_memory_stream( FT_Library library, 704 FT_Byte* base, 705 FT_ULong size, 706 FT_Stream_CloseFunc close, 707 FT_Stream* astream ) 708 { 709 FT_Error error; 710 FT_Memory memory; 711 FT_Stream stream; 712 713 714 if ( !library ) 715 return FT_Err_Invalid_Library_Handle; 716 717 if ( !base ) 718 return FT_Err_Invalid_Argument; 719 720 *astream = 0; 721 memory = library->memory; 722 if ( FT_NEW( stream ) ) 723 goto Exit; 724 725 FT_Stream_OpenMemory( stream, base, size ); 726 727 stream->close = close; 728 729 *astream = stream; 730 731 Exit: 732 return error; 733 } 734 735 736 /* Create a new FT_Face given a buffer and a driver name. */ 737 static FT_Error 738 open_face_from_buffer( FT_Library library, 739 FT_Byte* base, 740 FT_ULong size, 741 FT_Long face_index, 742 const char* driver_name, 743 FT_Face* aface ) 744 { 745 FT_Open_Args args; 746 FT_Error error; 747 FT_Stream stream; 748 FT_Memory memory = library->memory; 749 750 751 error = new_memory_stream( library, 752 base, 753 size, 754 memory_stream_close, 755 &stream ); 756 if ( error ) 757 { 758 FT_FREE( base ); 759 return error; 760 } 761 762 args.flags = FT_OPEN_STREAM; 763 args.stream = stream; 764 if ( driver_name ) 765 { 766 args.flags = args.flags | FT_OPEN_DRIVER; 767 args.driver = FT_Get_Module( library, driver_name ); 768 } 769 770 /* At this point, face_index has served its purpose; */ 771 /* whoever calls this function has already used it to */ 772 /* locate the correct font data. We should not propagate */ 773 /* this index to FT_Open_Face() (unless it is negative). */ 774 775 if ( face_index > 0 ) 776 face_index = 0; 777 778 error = FT_Open_Face( library, &args, face_index, aface ); 779 if ( error == FT_Err_Ok ) 780 (*aface)->face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM; 781 else 782 FT_Stream_Free( stream, 0 ); 783 784 return error; 785 } 786 787 788 /* Create a new FT_Face from a file spec to an LWFN file. */ 692 /* Create a new FT_Face from a file path to an LWFN file. */ 789 693 static FT_Error 790 694 FT_New_Face_From_LWFN( FT_Library library, … … 830 734 FT_Error error = FT_Err_Ok; 831 735 FT_Memory memory = library->memory; 832 int is_cff ;833 834 835 sfnt = GetResource( FT_MAKE_TAG( 's', 'f', 'n', 't' ), sfnt_id );736 int is_cff, is_sfnt_ps; 737 738 739 sfnt = GetResource( TTAG_sfnt, sfnt_id ); 836 740 if ( sfnt == NULL ) 837 741 return FT_Err_Invalid_Handle; … … 847 751 ReleaseResource( sfnt ); 848 752 849 is_cff = sfnt_size > 4 && sfnt_data[0] == 'O' && 850 sfnt_data[1] == 'T' && 851 sfnt_data[2] == 'T' && 852 sfnt_data[3] == 'O'; 853 854 return open_face_from_buffer( library, 855 sfnt_data, 856 sfnt_size, 857 face_index, 858 is_cff ? "cff" : "truetype", 859 aface ); 860 } 861 862 863 /* Create a new FT_Face from a file spec to a suitcase file. */ 753 is_cff = sfnt_size > 4 && !ft_memcmp( sfnt_data, "OTTO", 4 ); 754 is_sfnt_ps = sfnt_size > 4 && !ft_memcmp( sfnt_data, "typ1", 4 ); 755 756 if ( is_sfnt_ps ) 757 { 758 FT_Stream stream; 759 760 761 if ( FT_NEW( stream ) ) 762 goto Try_OpenType; 763 764 FT_Stream_OpenMemory( stream, sfnt_data, sfnt_size ); 765 if ( !open_face_PS_from_sfnt_stream( library, 766 stream, 767 face_index, 768 0, NULL, 769 aface ) ) 770 { 771 FT_Stream_Close( stream ); 772 FT_FREE( stream ); 773 FT_FREE( sfnt_data ); 774 goto Exit; 775 } 776 777 FT_FREE( stream ); 778 } 779 Try_OpenType: 780 error = open_face_from_buffer( library, 781 sfnt_data, 782 sfnt_size, 783 face_index, 784 is_cff ? "cff" : "truetype", 785 aface ); 786 Exit: 787 return error; 788 } 789 790 791 /* Create a new FT_Face from a file path to a suitcase file. */ 864 792 static FT_Error 865 793 FT_New_Face_From_Suitcase( FT_Library library, … … 885 813 for ( res_index = 1; ; ++res_index ) 886 814 { 887 fond = Get1IndResource( FT_MAKE_TAG( 'F', 'O', 'N', 'D' ), 888 res_index ); 815 fond = Get1IndResource( TTAG_FOND, res_index ); 889 816 if ( ResError() ) 890 817 break; … … 925 852 9