src/truetype


Log

Author Commit Date CI Message
Werner Lemberg 18931a5a 2011-02-01T07:08:43 [truetype] FT_LOAD_PEDANTIC now affects `prep' and `fpgm' also. * src/truetype/ttgload.c (tt_loader_init): Handle `FT_LOAD_PEDANTIC'. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep, tt_size_init_bytecode, tt_size_ready_bytecode): New argument to handle pedantic mode. * src/truetype/ttobjs.h: Updated.
Werner Lemberg f1a981b5 2011-01-31T22:26:53 [truetype] Protect jump instructions against endless loops. * src/truetype/interp.c (DO_JROT, DO_JMPR, DO_JROF): Exit with error if offset is zero.
Werner Lemberg d6a213f8 2011-01-31T18:51:07 [truetype] Improve handling of invalid references. * src/truetype/interp.c: Set even more TT_Err_Invalid_Reference error codes only if pedantic hinting is active. At the same time, try to provide sane values which hopefully allow useful continuation. Exception to this is CALL and LOOPCALL – due to possible stack corruption it is necessary to bail out.
Werner Lemberg 96f04564 2011-01-31T10:24:32 [truetype] Improve handling of stack underflow. * src/truetype/ttinterp.c (TT_RunIns, Ins_FLIPPT, Ins_DELTAP, Ins_DELTAC): Exit with error only if `pedantic_hinting' is set. Otherwise, try to do something sane.
Werner Lemberg 91a97164 2011-01-30T20:12:54 Whitespace.
Werner Lemberg 0682251e 2011-01-30T16:38:09 * src/sfnt/ttmtx.c (tt_face_load_hmtx): Fix tracing message.
LIU Sun-Liang c61b3596 2011-01-30T16:29:45 [truetype]: Fix behaviour of MIAP for invalid arguments. * src/truetype/ttinterp.c (Ins_MIAP): Set reference points even in case of error.
Werner Lemberg dcdb3167 2011-01-18T07:35:26 [truetype] Fix handling of MIRP instruction. Thanks to Greg Hitchcock who explained the issue. * src/truetype/ttinterp.c (Ins_MIRP): Replace a `>=' operator with `>' since the description in the specification is incorrect. This fixes, for example, glyph `two' in font `Helvetica Neue LT Com 65 medium' at 15ppem.
Werner Lemberg f3ce2370 2011-01-03T07:11:54 */rules.mk: Handle `*pic.c' files.
Johnson Y. Yan 9073e7ce 2010-11-26T11:58:08 [truetype] Better multi-threading support. * src/truetype/ttinterp.c (TT_Load_Context): Reset glyph zone references.
Werner Lemberg 9871b849 2010-11-22T19:30:41 Some formatting and improvements of comments.
suzuki toshiya 9f5dd61b 2010-11-23T02:47:10 [truetype] Identify the tricky fonts by cvt/fpgm/prep checksums. Some Latin TrueType fonts are still expected to be unhinted. Fix Savannah bug #31645. * src/truetype/ttobjs.c (tt_check_trickyness): Divided to... (tt_check_trickyness_family): this checking family name, and (tt_check_trickyness_sfnt_ids): this checking cvt/fpgm/prep. (tt_get_sfnt_checksum): Function to retrieve the sfnt checksum for specified subtable even if cleared by lazy PDF generators. (tt_synth_sfnt_checksum): Function to calculate the checksum.
Werner Lemberg ec4372f5 2010-11-18T20:34:22 [truetype] Fix `loca' handling for inconsistent number of glyphs. Reported by Johnson Y. Yan <yinsen_yan@foxitsoftware.com>. * src/truetype/ttpload.c (tt_face_load_loca): While sanitizing, handle case where `loca' is the last table in the font.
suzuki toshiya 46c371c2 2010-10-25T00:14:13 Replace "%lx" for memory address by "%p", LLP64 platforms. On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover the memory address (64-bit). Also the casts from the pointer type to long int should be removed to preserve the address correctly. * src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p". (End_Profile) Ditto. * src/truetype/ttinterp.c (Init_Context): Ditto.
Werner Lemberg 59eb9f8c 2010-10-12T07:49:17 Fix Savannah bug #31310. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against invalid `runcnt' values.
Werner Lemberg 0edf0986 2010-10-06T11:52:27 [truetype] Improve error handling of `SHZ' bytecode instruction. Problem reported by Chris Evans <scarybeasts@gmail.com>. * src/truetype/ttinterp.c (Ins_SHZ): Check `last_point'.
suzuki toshiya 5edc2f33 2010-10-01T08:15:55 Fix Savannah bug #31040. * src/truetype/ttinterp.c (free_buffer_in_size): Remove. (TT_RunIns): Updated.
suzuki toshiya 643d49df 2010-09-20T01:07:57 [truetype] Sanitize the broken offsets in `loca'. * src/truetype/ttpload.c (tt_face_get_location): If `pos1', the offset to the requested entry in `glyf' exceeds the end of the table, return offset=0, length=0. If `pos2', the offset to the next entry in `glyf' exceeds the end of the table, truncate the entry length at the end of `glyf' table. See Savannah bug #31040.
suzuki toshiya db053ec9 2010-09-17T23:20:00 [truetype] Don't duplicate size->twilight structure to be freed. * src/truetype/ttinterp.c (free_buffer_in_size): Don't duplicate FT_GlyphZoneRec size->twilight to be freed. If duplicated, FT_FREE() erases the duplicated pointers only and leave original pointers. They can cause the double-free crash when the burst errors occur in TrueType interpreter and free_buffer_in_size() is invoked repeatedly. See Savannah bug #31040 for detail.
Werner Lemberg afd89d30 2010-09-15T13:02:35 Make bytecode debugging with FontForge work again. * src/truetype/ttinterp.c (TT_RunIns): Don't call `free_buffer_in_size' in case of error if a debugger is active.
Werner Lemberg 6abb9232 2010-09-14T09:02:10 Improve tracing messages. * src/truetype/ttinterp.c (TT_RunIns): Improve wording of tracing message. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Add tracing message. * src/truetype/ttgload.c (tt_loader_init): Add tracing message. * src/cache/ftcsbits.c (ftc_snode_load): Emit tracing message if glyph doesn't fit into a small bitmap container.
Werner Lemberg 5220ef58 2010-09-13T07:32:22 Fix minor issues reported by <muktha.narayan@wipro.com>. * src/autofit/aflatin.c (af_latin_compute_stem_width): Remove redundant conditional check. * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Ditto. * src/cff/cffload.c (cff_encoding_load): Remove conditional check which always evaluates to `true'. * src/pshinter/pshalgo.c (ps_glyph_interpolate_strong_points): Ditto. * src/truetype/ttinterp.c (Ins_IUP): Ditto. * src/cid/cidgload.c (cid_slot_load_glyph): Don't check for NULL if value is already dereferenced. * src/winfonts/winfnt.c (FNT_Load_Glyph): Fix check of `face'.
suzuki toshiya 0eb657b0 2010-08-31T13:29:05 [truetype] Decrease the trace level catching the interpreter error. * src/truetype/ttinterp.c (TT_RunIns): Decrease the trace level showing the error when the interpreter returns with an error, from FT_TRACE7() to FT_TRACE1().
suzuki toshiya 29e044a4 2010-08-31T01:23:30 [truetype] Prevent bytecode reuse after the interpretation error. * src/truetype/ttinterp.c (free_buffer_in_size): New function to free the buffer allocated during the interpretation of this glyph. (TT_RunIns): Unset FT_Face->size->{cvt_ready,bytecode_ready} if an error occurs in the bytecode interpretation. The interpretation of invalid bytecode may break the function definitions and referring them in later interpretation is danger. By unsetting these flags, `fpgm' and `prep' tables are executed again in next interpretation. Fix Savannah bug #30798, reported by Robert Swiecki.
suzuki toshiya 0eb9b1f5 2010-08-28T21:41:16 Force hinting when the font lacks its familyname. In Type42 or Type11 font embedded in PostScript & PDF, TrueType sfnt stream may lack `name' table because they are not required. Hinting for nameless fonts is safer for PDFs including embedded Chinese fonts. Written by David Bevan, see: http://lists.gnu.org/archive/html/freetype-devel/2010-08/msg00021.html http://lists.freedesktop.org/archives/poppler/2010-August/006310.html * src/truetype/ttobjs.c (tt_check_trickyness): If a NULL pointer by nameless font is given, TRUE is returned to enable hinting.
suzuki toshiya 8b05b5d8 2010-08-28T21:16:26 Register yet another tricky TrueType font. * src/truetype/ttobjs.c (tt_check_trickyness): Add `HuaTianKaiTi?', a Kaishu typeface paired with `HuaTianSongTi?' by Huatian Information Industry.
Werner Lemberg 346f1867 2010-08-06T00:47:57 Fix Savannah bug #30657. * src/truetype/ttinterp.c (BOUNDSL): New macro. Change `BOUNDS' to `BOUNDSL' where appropriate. * src/truetype/ttinterp.h (TT_ExecContextRec): Fix type of `cvtSize'.
Werner Lemberg c8f5b98b 2010-07-12T21:13:22 Remove C++ warnings. */*: Initialize pointers where necessary to make g++ happy.
Werner Lemberg 888cd184 2010-07-08T07:29:42 Fix Savannah bug #30361. * src/truetype/ttinterp.c (Ins_IUP): Fix bounds check.
Werner Lemberg a2d225e3 2010-07-01T11:37:09 [truetype] Protect against code range underflow. * src/truetype/ttinterp.c (DO_JROT, DO_JMPR, DO_JROF): Don't allow negative IP values.
Werner Lemberg 462ddb40 2010-07-01T11:28:43 [truetype] Add rudimentary tracing for bytecode instructions. * src/truetype/ttinterp.c (opcode_name) [FT_DEBUG_LEVEL_TRACE]: New array. (TT_RunIns): Trace opcodes.
Werner Lemberg ae425e51 2010-06-29T12:31:08 Fix minor tracing issues. * src/cff/cffgload.c, src/truetype/ttgload.c: Adjust tracing levels.
Werner Lemberg f765e440 2010-06-24T10:34:29 */*: Use module specific error names where appropriate.
Werner Lemberg 370aea80 2010-06-08T08:37:11 Formatting.
Werner Lemberg 6da023d1 2010-05-20T15:38:00 TrueType: Make FreeType ignore maxSizeOfInstructions in `maxp'. Acroread does the same. * src/truetype/ttgload.c (TT_Process_Composite_Glyph): Call `Update_Max' to adjust size of instructions array if necessary and add a rough safety check. (load_truetype_glyph): Save `loader->byte_len' before recursive call. * src/truetype/ttinterp.h, src/truetype/ttinterp.c (Update_Max): Declare it as FT_LOCAL.
Jonathan Kew 25e742c5 2010-04-06T16:42:56 Add overflow check to `fvar' table. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Check axis and instance count.
John Tytgat 8c4cce52 2010-04-05T08:22:22 Fix Savannah bug #29404. * src/truetype/ttgload.c: Revert change 2752bd1a (check on bit 1 of `head' table of TrueType fonts).
Chris Liddell 10cf3887 2010-02-18T17:09:30 Fix Savannah bug #28905. Initialize phantom points before calling the incremental interface to update glyph metrics. * src/truetype/ttgload.c (tt_get_metrics_incr_overrides) [FT_CONFIG_OPTION_INCREMENTAL]: New function, split off from... (tt_get_metrics): This. Updated. (load_truetype_glyph): Use tt_get_metrics_incr_overrides.
Ken Sharp 980b76ea 2010-02-10T07:02:43 Really fix Savannah bug #28678 (part 1). After long discussion, we now consider the character width vector (wx,wy) returned by the `sbw' Type 1 operator as being part of *one* direction only. For example, if you are using the horizontal writing direction, you get the horizontal and vertical components of the advance width for this direction. Note that OpenType and CFF fonts don't have such a vertical component; instead, the GPOS table can be used to generate two-dimensional advance widths (but this isn't handled by FreeType). * include/freetype/ftincrem.h (FT_Incremental_MetricsRec): Add `advance_v' field to hold the vertical component of the advance value. * src/truetype/ttgload.c (tt_get_metrics), src/cff/cffgload.c (cff_slot_load), src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String), src/cid/cidgload.c (cid_load_glyph): Use it.
suzuki toshiya d9145241 2010-02-05T02:58:24 Prevent NULL pointer dereference passed to FT_Module_Requester.
Werner Lemberg 2a33275e 2010-01-05T10:27:15 Fix Savannah bug #28395. * src/truetype/ttdriver.c (Load_Glyph), src/type1/t1gload.c (T1_Loada_Glyph): Don't check `num_glyphs' if incremental interface is used.
Werner Lemberg fe6da50d 2010-01-05T10:10:15 Thinkos.
Werner Lemberg 3445e4f9 2010-01-04T15:53:27 Make incremental interface work with TrueType fonts. * src/truetype/ttgload.c (load_truetype_glyph): Don't check `glyf_offset' if incremental interface is used.
Werner Lemberg 7da7ad94 2009-12-16T18:13:55 Really fix compiler warnings. Reported by Sean. * src/truetype/ttgxvar.c (GX_PT_POINTS_ARE_WORDS, GX_PT_POINT_RUN_COUNT_MASK): Convert enum values to macros.
Werner Lemberg 481324cd 2009-12-15T08:58:37 Fix compiler warnings. Reported by Sean. * src/truetype/ttgxvar.c (ft_var_readpackeddeltas): Fix counter data type.
Werner Lemberg 9045f5bd 2009-12-03T05:57:30 Fix compiler warnings. * src/truetype/ttgload.c (tt_get_metrics): Put `Exit' label into the proper preprocessor conditional. * src/pfr/pfrobjs.c (pfr_slot_load): Pacify gcc.
Werner Lemberg c4b22144 2009-11-15T10:10:00 Add tracing messages for advance values. * src/base/ftobjs.c (FT_Load_Glyph), src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics): Do it.
Werner Lemberg c0aeef45 2009-11-08T07:58:05 Fix compiler warning. Reported by Jeremy Manson <jeremy.manson@gmail.com>. * src/truetype/ttgload.c (load_truetype_glyph): Initialize `error'.
Werner Lemberg f186ba68 2009-11-03T15:46:35 Return correct `linearHoriAdvance' value for embedded TT bitmaps too. Reported by Jeremy Manson <jeremy.manson@gmail.com>. src/truetype/ttgload.c (load_truetype_glyph): Add parameter to quickly load the glyph header only. Update all callers. (tt_loader_init): Add parameter to quickly load the `glyf' table only. Update all callers. (TT_Load_Glyph): Compute linear advance values for embedded bitmap glyphs too.
Werner Lemberg 422210be 2009-11-03T08:11:02 Improve code readability. * src/ttgload.c (load_truetype_glyph): Move metrics calculation to... (tt_get_metrics): This new function.
Werner Lemberg ac0d52d8 2009-11-02T08:35:24 Whitespace.
bram tassyns 06ba4597 2009-10-26T22:26:31 Fix Savannah bug #27811. * src/truetype/ttxgvar.c (ft_var_readpackeddeltas): Fix signed/unsigned mismatch.
Werner Lemberg d30062d2 2009-09-08T07:06:54 Whitespace.
Bram Tassyns 4694ea2b 2009-09-02T13:06:33 Improve vertical metrics calculation (Savannah bug #27364). The calculation of `vertBearingX' is not defined in the OTF font spec so FreeType does a `best effort' attempt. However, this value is defined in the PDF and PostScript specs, and that algorithm is better than the one FreeType currently uses: FreeType: Use the middle of the bounding box as the X coordinate of the vertical origin. Adobe PDF spec: Use the middle of the horizontal advance vector as the X coordinate of the vertical origin. FreeType's algorithm goes wrong if you have a really small glyph (like the full-width, circle-like dot at the end of the sentence, as used in CJK scripts) with large bearings. With the FreeType algorithm this dot gets centered on the baseline; with the PDF algorithm it gets the correct location (in the top right). Note that this is a serious issue, it's like printing the dot at the end of a Roman sentence at the center of the textline instead of on the baseline like it should. So i believe the PDF spec's algorithm should be used in FreeType as well. The `vertBearingY' value for such small glyphs is also very strange if no `vmtx' information is present, since the height of the bbox is not representable for the height of the glyph visually (the whitespace up to the baseline is part of the glyph). The fix also includes some code for a better estimate of `vertBearingY'. * src/base/ftobjs.c (ft_synthesize_vertical_metrics): `vertBearingX' is now calculated as described by the Adobe PDF Spec. Estimate for `vertBearingY' now works better for small glyphs completely above or below the baseline into account. * src/cff/cffgload.c (cff_slot_load): `vertBearingX' is now calculated as described by the Adobe PDF Spec. Vertical metrics information was always ignored when FT_CONFIG_OPTION_OLD_INTERNALS was not defined. * src/truetype/ttgload.c (compute_glyph_metrics): `vertBearingX' is now calculated as described by the Adobe PDF Spec.
suzuki toshiya ec7bc863 2009-08-01T00:32:19 truetype: Extend TrueType GX packed deltas to FT_Offset.
suzuki toshiya 5668181b 2009-08-01T00:32:18 truetype: Extend mmvar_len to hold size_t values.
suzuki toshiya a1151420 2009-08-01T00:32:18 truetype: Check invalid function number in IDEF instruction.
suzuki toshiya d1c23082 2009-08-01T00:32:17 truetype: Check invalid function number in FDEF instruction.
suzuki toshiya 9206eba2 2009-08-01T00:32:17 truetype: Truncate the deltas of composite glyph at 16-bit values.
suzuki toshiya 1b6f1d20 2009-08-01T00:32:16 truetype: Truncate the instructions upto 16-bit per a glyph.
suzuki toshiya 6dc27526 2009-08-01T00:32:15 truetype: Cast the numerical operands to 32-bit for LP64 systems.
suzuki toshiya 3b56c4d3 2009-08-01T00:32:15 truetype: Cast the project vector to 32-bit for LP64 system.
suzuki toshiya 9fc40943 2009-08-01T00:32:14 truetype: Cast the scaling params to 32-bit for LP64 system.
suzuki toshiya 25dba9cf 2009-08-01T00:32:09 truetype: Extend TT_Face->num_locations for broken TTFs.
Werner Lemberg 46e05c44 2009-07-17T22:49:34 Fix Savannah bug #23786. * src/truetype/ttobjs.c (tt_size_init_bytecode): Don't reset x_ppem and y_ppem. Otherwise the `*_CVT_Stretched' functions in ttinterp.c get never called. An anonymous guy suggested this change on Savannah, and it seems to be the right solution.
Werner Lemberg 610cddca 2009-06-26T07:39:08 [truetype] Remove TT_SubGlyphRec. * src/truetype/ttobjs.h (TT_SubGlyphRec): Removed, unused.
Werner Lemberg 858abbed 2009-06-26T06:15:41 For warning messages, replace FT_ERROR with FT_TRACE0. FT_ERROR is now used only if a function produces a non-zero `error' value. Formatting, improving and harmonizing debug strings.
Werner Lemberg 72271140 2009-06-18T15:42:52 Fix B/W rasterization of subglyphs with different drop-out modes. Normally, the SCANMODE instruction (if present) to set the drop-out mode in a TrueType font is located in the `prep' table only and thus valid for all glyphs. However, there are fonts like `pala.ttf' which additionally contain this instruction in the hinting code of some glyphs (but not all). As a result it can happen that a composite glyph needs multiple drop-out modes for its subglyphs since the rendering state gets reset for each subglyph. FreeType collects the hinted outlines from all subglyphs, then it sends the data to the rasterizer. It also sends the drop-out mode -- after hinting has been applied -- and here is the error: It sends the drop-out mode of the last subglyph only; drop-out modes of all other subglyphs are lost. This patch fixes the problem; it adds a second, alternative mechanism to pass the drop-out mode: For each contour, the rasterizer now checks the first `tags' array element. If bit 2 is set, bits 5-7 contain the contour's drop-out mode, overriding the global drop-out mode. * include/freetype/ftimage.h (FT_CURVE_TAG_HAS_SCANMODE): New macro. * src/truetype/ttgload.c (TT_Hint_Glyph): Store drop-out mode in `tags[0]'. * src/raster/ftraster.c (Flow_Up, Overshoot_Top, Overshoot_Bottom): Use bits 3-5 instead of 0-2. (New_Profile): Set the drop-out mode in the profile's `flags' field. (Decompose_Curve): Check `tags[0]' and set `dropOutControl' if necessary. (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop, Draw_Sweep): Use the profile's drop-out mode.
Werner Lemberg 780d7e05 2009-06-17T06:45:20 Minor simplification.
Werner Lemberg 38e40767 2009-06-16T22:41:46 Typo.
Werner Lemberg c6788a38 2009-06-07T13:09:21 Fix some potential out-of-memory crashes. * src/base/ftobjs.c (ft_glyphslot_done): Check `slot->internal'. * src/base/ftstream.c (FT_Stream_ReleaseFrame): Check `stream'. * src/truetype/ttinterp.c (TT_New_Context): Avoid double-free of `exec' in case of failure.
Oran Agra 2e7a4e9b 2009-04-05T18:03:02 Position Independent Code (PIC) support in truetype driver. * include/freetype/internal/services/svmm.h add macros to init instances of FT_Service_MultiMastersRec. * include/freetype/internal/services/svttglyf.h add macros to init instances of FT_Service_TTGlyfRec. * src/truetype/ttdriver.h declare tt_driver_class using macros from ftdriver.h, when FT_CONFIG_OPTION_PIC is defined create and destroy functions will be declared. * src/truetype/ttdriver.c when FT_CONFIG_OPTION_PIC is defined the following structs: tt_service_gx_multi_masters, tt_service_truetype_glyf, tt_driver_class and tt_services array, will have functions to init or create and destroy them instead of being allocated in the global scope. And macros will be used from ttpic.h in order to access them from the pic_container. * src/truetype/ttobjs.c change trick_names array to be PIC-compatible by being a two dimentional array rather than array of pointers. New Files: * src/truetype/ttpic.h declare struct to hold PIC globals for truetype driver and macros to access them. * src/truetype/ttpic.c implement functions to allocate, destroy and initialize PIC globals for truetype driver. * src/truetype/truetype.c add new file to build: ttpic.c. * src/truetype/jamfile add new files to FT2_MULTI build: ttpic.c.
Werner Lemberg b47b97db 2009-04-04T07:51:45 Fix comment. OpenType 1.6 now mentions that data in the `loca' table must be ordered.
Werner Lemberg b3e6df69 2009-03-21T10:45:18 Really fix Ghostscript Coverity issue #3904.
Werner Lemberg 4d1a34ce 2009-03-21T10:42:56 Another redundant header inclusion. * src/truetype/ttgxvar.c: Fix Ghostscript Coverity issue #4041.
Werner Lemberg 86e041b5 2009-03-21T08:51:44 Remove redundant header inclusions. This covers many Ghostscript Coverity issues. * src/*: Do it.
Werner Lemberg 16bd51c8 2009-03-21T07:48:34 Fix Ghostscript Coverity issue #3904. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Protect against zero value of `runcnt'.
Werner Lemberg 0552a496 2009-02-11T22:59:40 * src/truetype/ttobjs.c (tt_check_trickyness): Add `DFKaiShu'. Reported by David Bevan <dbevan@emtex.com>.
Werner Lemberg 1e5e7aa0 2009-01-25T16:27:04 Fix SCANCTRL handling in TTFs. Problem reported by Alexey Kryukov <anagnost@yandex.ru>. * src/truetype/ttinterp.c (Ins_SCANCTRL): Fix threshold handling.
Suzuki, Toshiya (鈴木俊哉) 759c07d1 2009-01-09T11:11:53 load_flags of FT_Get_Advance(), FT_Get_Advances() and backends are declared as FT_Int32 to match the flags of FT_Load_Glyph()
Suzuki, Toshiya (鈴木俊哉) a7c00b79 2009-01-09T07:21:16 load_flags of FT_Get_Advance(), FT_Get_Advances() and backends are declared as FT_UInt32 for 16-bit platforms
Werner Lemberg ce33a312 2008-12-21T10:29:30 FT_USE_MODULE declares things as: extern const FT_Module_Class (or similar for C++). However, the actual types of the variables being declared are often different, e.g., FT_Driver_ClassRec or FT_Renderer_Class. (Some are, indeed, FT_Module_Class.) This works with most C compilers (since those structs begin with an FT_Module_Class struct), but technically it's undefined behavior. To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7 paragraph 2: All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined. (And they are not compatible types.) Most C compilers don't reject (or even detect!) code which has this issue, but the GCC LTO development branch compiler does. (It outputs the types of the objects while generating .o files, along with a bunch of other information, then compares them when doing the final link-time code generation pass.) Patch from Savannah bug #25133. * src/base/ftinit.c (FT_USE_MODULE): Include variable type. * builds/amiga/include/freetype/config/ftmodule.h, include/freetype/config/ftmodule.h, */module.mk: Updated to declare pass correct types to FT_USE_MODULE.
Werner Lemberg b972a2a2 2008-12-11T08:55:48 Generalize the concept of `tricky' fonts by introducing FT_FACE_FLAG_TRICKY to indicate that the font format's hinting engine is necessary for correct rendering. At the same time, slightly modify the behaviour of tricky fonts: FT_LOAD_NO_HINTING is now ignored. To really force raw loading of tricky fonts (without hinting), both FT_LOAD_NO_HINTING and FT_LOAD_NO_AUTOHINT must be used. Finally, tricky TrueType fonts always use the bytecode interpreter even if the patented code is used. * include/freetype/freetype.h (FT_FACE_FLAG_TRICKY, FT_IS_TRICKY): New macros. * src/truetype/ttdriver.c (Load_Glyph): Handle new load flags semantics as described above. * src/truetype/ttobjs.c (tt_check_trickyness): New function, using code of ... (tt_face_init): This function, now simplified and updated to new semantics. * src/base/ftobjs.c (FT_Load_Glyph): Don't use autohinter for tricky fonts. * docs/CHANGES: Document it.
Werner Lemberg 1474f439 2008-12-09T06:51:56 Really fix Savannah bug #25010: An SFNT font with neither outlines nor bitmaps can be considered as containing space `glyphs' only. * src/truetype/ttpload.c (tt_face_load_loca): Handle the case where a `glyf' table is missing. * src/truetype/ttgload.c (load_truetype_glyph): Abort if we have no `glyf' table but a non-zero `loca' entry. (tt_loader_init): Handle missing `glyf' table. * src/base/ftobjs.c (FT_Load_Glyph): Undo change 2008-12-05. * src/sfnt/sfobjs.c (sfnt_load_face): A font with neither outlines nor bitmaps is scalable.
Werner Lemberg 1a5d561d 2008-11-29T22:50:24 * src/autofit/afcjk.c, src/base/ftoutln.c, src/base/ftrfork.c, src/bdf/bdfdrivr.c, src/gxvalid/gxvmorx.c, src/otvalid/otvmath.c, src/pcf/pcfdrivr.c, src/psnames/pstables.h, src/smooth/ftgrays.c, src/tools/glnames.py, src/truetype/ttinterp.c, src/type1/t1load.c, src/type42/t42objs.c, src/winfonts/winfnt.c: Fix compiler warnings (Atari PureC).
Werner Lemberg 105721a5 2008-11-15T10:35:51 * src/truetype/ttinterp.c (tt_default_graphics_state): The default value for `scan_type' is zero, as confirmed by Greg Hitchcock from Microsoft. Problem reported by Michal Nowakowski <miszka@limes.com.pl>.
Suzuki, Toshiya (鈴木俊哉) 6922266b 2008-10-15T15:22:39 * src/truetype/ttgxvar.c (TT_Set_MM_Blend): Disambiguate
Werner Lemberg 0192230e 2008-10-11T06:00:15 (important) formatting
Werner Lemberg 35ae574a 2008-10-02T10:40:52 Add casts for stupid compilers. Reported by Graham.
Werner Lemberg d03d856d 2008-10-01T22:39:05 * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c (cff_face_done), src/pfr/pfrobjs.c (pfr_face_done), src/pcf/pcfdrivr.c (PCF_Face_Done), src/cid/cidobjs.c (cid_face_done), src/bdf/bdfdrivr. (BDF_Face_Done), src/sfnt/sfobjs.c (sfnt_face_done): Protect against face == 0. Reported by Graham Asher.
Werner Lemberg b211651a 2008-09-12T16:27:48 * autogen.sh, builds/unix/configure.raw, include/freetype/config/ftconfig.h, builds/unix/ftconfig.in: Minor beautifying. * include/freetype/ftadvanc.h, include/freetype/ftgasp.h, include/freetype/ftlcdfil.h: Protect against FreeType 1. Some other minor fixes. * devel/ftoption.h: Synchronize with include/freetype/config/ftoption.h. Formatting, documentation improvements.
David Turner 28534d61 2008-09-01T21:35:21 * include/freetype/ftadvanc.h, src/base/ftadvanc.c, include/freetype/config/ftheader.h, include/freetype/freetype.h, src/base/Jamfile, src/base/rules.mk, src/cff/cffdrivr.c, src/cff/cffgload.c, src/cff/cffgload.h, src/truetype/ttdriver.c, src/truetype/ttgload.h, src/truetype/ttgload.c, src/type1/t1driver.c, src/type1/t1gload.h, src/type1/t1gload.c: Add a new header named FT_ADVANCES_H declaring some new APIs to extract the advances of one or more glyphs without necessarily loading their outlines. Also provide 'fast loaders' for the TrueType, Type1 and CFF font drivers (more to come later) * autogen.sh: add checks for minimum version of the 'autotools' stuff.
Werner Lemberg 6b19e095 2008-07-09T06:20:12 * src/truetype/ttpload.c (tt_face_load_loca): Handle buggy fonts where num_locations < num_glyphs. Problem reported by Ding Li.
Werner Lemberg ce8853af 2008-06-24T11:19:03 * src/truetype/ttinterp. (Ins_SCANTYPE): Don't check rendering mode. * src/raster/ftraster.c (Render_Glyph, Render_Gray_Glyph, Draw_Sweep): No-dropout mode is value 2, not value 0. (Draw_Sweep): Really skip dropout handling for no-dropout mode.
Werner Lemberg 745a4f42 2008-06-22T22:41:24 * src/truetype/ttgload.c (TT_Load_Glyph): Protect bytecode stuff with IS_HINTED. * docs/CHANGES: Updated.
Werner Lemberg 5df5dbb7 2008-06-22T13:40:08 Enable access to the various dropout rules of the B&W rasterizer. Pass dropout rules from the TT bytecode interpreter to the rasterizer; temporarily this is enabled only if `USE_SCAN_CONVERSION_RULES' is defined. * include/freetype/ftimage.h (FT_OUTLINE_SMART_DROPOUTS, FT_OUTLINE_EXCLUDE_STUBS): New flags for for FT_Outline. * src/raster/ftraster.c (Vertical_Sweep_Drop, Horizontal_Sweep_Drop, Horizontal_Gray_Sweep_Drop): Use same mode numbers as given in the OpenType specification. Fix mode 4 computation. (Render_Glyph, Render_Gray_Glyph): Handle new outline flags. * src/truetype/ttgload.c (TT_Load_Glyph) [USE_SCAN_CONVERSION_RULES]: Convert scan conversion mode to FT_OUTLINE_XXX flags. * src/truetype/ttinterp.c (Ins_SCANCTRL): Enable ppem check.
Werner Lemberg 7cb9ec0f 2008-06-09T20:49:29 * src/type1/t1parse.h (T1_ParserRec): Make `base_len' and `private_len' unsigned. * src/type1/t1parse.c (read_pfb_tag): Make `asize' unsigned and read it as such. (T1_New_Parser, T1_Get_Private_Dict): Make `size' unsigned. * src/base/ftstream.c (FT_Stream_Skip): Reject negative values. * src/type1/t1load.c (parse_blend_design_positions): Check `n_axis' for sane value. Fix typo. * src/psaux/psobjs.c (ps_table_add): Check `idx' correctly. * src/truetype/ttinterp (Ins_SHC): Use BOUNDS() to check `last_point'. * src/sfnt/ttload.c (tt_face_load_max_profile): Limit `maxTwilightPoints'.
Werner Lemberg d77e7229 2008-06-05T22:07:19 * src/truetype/ttinterp.c (Ins_IP): Handle case `org_dist == 0' correctly. This fixes glyphs `t' and `h' of Arial Narrow at 12ppem.
Werner Lemberg 2b0b4221 2008-05-28T22:17:28 Cosmetic code changes.
Werner Lemberg c94fa669 2008-05-27T23:24:07 * src/truetype/ttinterp.c (Ins_MD): The MD instruction also uses original, unscaled input values. Confirmed by Greg Hitchcock from Microsoft.