src/truetype


Log

Author Commit Date CI Message
Werner Lemberg 930e9bf8 2011-11-26T13:38:26 Add new error code FT_Err_Missing_Module. Previously, FreeType misleadingly returned FT_Err_Unknown_File_Format if a module was missing (or a test was missing completely). * include/freetype/fterrdef.h (FT_Err_Missing_Module): Define. * src/cff/cffobjs.c (cff_face_init), src/cid/cidobjs.c (cid_face_init), src/sfnt/sfobjs.c (sfnt_init_face), src/truetype/ttobjs.c (tt_face_init), src/type1/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init, T42_Driver_Init): Updated. * src/type1/t1afm.c (T1_Read_Metrics), src/type/t1objs.c (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Remove now redundant test for `psaux'.
Werner Lemberg f4ec60fd 2011-10-25T20:25:32 [truetype] Fix MD instruction for twilight zone. * src/truetype/ttinterp.c (Ins_MD): Without this fix, the MD instruction applied to original coordinates of twilight points always returns zero.
Werner Lemberg 9c98fbf6 2011-10-01T09:25:55 Handle some border cases. * include/freetype/config/ftstdlib.h (FT_USHORT_MAX): New macro. * src/base/ftbitmap.c (FT_Bitmap_Convert): Protect against invalid value of `target->rows'. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Add check for flex start. * src/raster/ftrend1.c (ft_raster1_render): Check `width' and `height'. * src/truetype/ttgxvar.c (TT_Vary_Get_Glyph_Deltas): Protect against invalid values in `localpoints' array.
Werner Lemberg bad0160c 2011-08-12T19:50:13 [truetype] Fix degenerate case in S{P,F,DP}VTL opcodes. * src/truetype/ttinterp.c (Ins_SxVTL): Handle p1 == p2 specially. (Ins_SDPVTL): Handle v1 == v2 specially.
Werner Lemberg 22e44e06 2011-08-05T09:57:17 [truetype] Remove incorrect comments.
Werner Lemberg f2573a06 2011-08-05T09:07:21 [truetype] Fix some comments in the bytecode interpreter. Thanks to Greg Hitchcock!
Steven Chu b0962ac3 2011-07-16T09:12:42 [truetype] Fix metrics on size request for scalable fonts. * src/truetype/ttdriver.c (tt_size_request): Fix copying metrics from TT_Size to FT_Size if scalable font.
Werner Lemberg f4b63326 2011-07-03T11:24:46 Fix previous commit. We want to unset FT_FACE_FLAG_SCALABLE only if there are bitmap strikes in the font. * src/truetype/ttobjs.c (tt_face_init): Implement it. * docs/CHANGES: Updated.
Just Fill Bugs 07598339 2011-07-02T18:41:36 Fix Savannah bug #33246. * src/truetype/ttobjs.c (tt_check_single_notdef): New function. (tt_face_init): Use it to test FT_FACE_FLAG_SCALABLE.
suzuki toshiya e62c876b 2011-06-15T02:48:33 Fix g++4.6 compiler warnings in module drivers. The background is same with previous commit. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Init `points'. (TT_Vary_Get_Glyph_Deltas): Init `delta_xy'. (TT_Get_MM_Var): Init `mmvar'. * src/type1/t1load.c (T1_Get_MM_Var): Ditto. * src/cff/cffdrivr.c (cff_ps_get_font_info): Init `font_info'. * src/cff/cffload.c (cff_index_get_pointers): Init `t'. (cff_font_load): Init `sub'. * src/cff/cffobjs.c (cff_size_init): Init `internal'. (cff_face_init): Init `cff'. * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps): Init `snaps'. * src/pcf/pcfread.c (pcf_get_properties): Init `properties'. (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings): Init `tmpEncoding'. * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'. * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'. * src/cache/ftcmru.c (FTC_MruList_New): Init `node'. * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and `zip_buff'. * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
Daniel Zimmermann 3ad8f355 2011-05-24T06:22:32 Reduce warnings for MS Visual Studio 2010. * src/autofit/afhints.c (af_glyph_hints_get_num_segments, af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide return value. * src/cff/cffgload.c (cff_slot_load): Add cast. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper loop variable type.
suzuki toshiya 58cb3593 2011-05-01T00:47:43 [truetype] Recalculate the sfnt table checksum always. * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Recalculate the sfnt table checksum even if non-zero value is writte in the TrueType font header. Some bad PDF generators write wrong values. For detail, see examples and benchmark tests of the latency by recalculation: http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00091.html http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00096.html
suzuki toshiya 1e89d15a 2011-04-30T17:55:57 [truetype] Register a set of tricky fonts, NEC FA family. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Add 8 checksum sets for NEC FA family. For the tricky fonts without some tables (e.g. NEC FA fonts lack cvt table), extra check is added to assure that 0-length table in the registry is not included in the font.
suzuki toshiya 10385e37 2011-04-30T17:49:45 Remove unrequired `else' from ttobjs.c::tt_get_sfnt_checksum().
suzuki toshiya 89208861 2011-04-30T00:11:07 [truetype] Fix a bug in the sfnt table checksum getter. * src/truetype/ttobjs.c (tt_get_sfnt_checksum): Check the return value of face->goto_table() correctly.
suzuki toshiya 86b7b2f6 2011-04-26T03:46:12 [truetype] Revert the reordering of trickyness checking. Trickyness check by the family name is faster than that by the checksum.
suzuki toshiya abc47aa1 2011-04-25T23:51:04 [truetype] Always check the checksum to identify tricky fonts. Some PDF generators mangle the family name badly, prioritize the check by the sfnt table checksums than the check by the family name. For sample PDF, see http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00073.html * src/truetype/ttobjs.c (tt_check_trickyness): Exchange the order of tt_check_trickyness_family() and tt_check_trickyness_sfnt_ids().
Behdad Esfahbod 8c82ec5b 2011-04-21T08:21:37 Always ignore global advance. This makes FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH redundant, deprecated, and ignored. The new behavior is what every major user of FreeType has been requesting. Global advance is broken in many CJK fonts. Just ignoring it by default makes most sense. * src/truetype/ttdriver.c (tt_get_advances), src/truetype/ttgload.c (TT_Get_HMetrics, TT_Get_VMetrics, tt_get_metrics, compute_glyph_metrics, TT_Load_Glyph), src/truetype/ttgload.h: Implement it. * docs/CHANGES: Updated.
Werner Lemberg 01caf4a7 2011-03-23T05:19:59 * src/truetype/ttpload.c(tt_face_load_loca): Fix mismatch warning.
Werner Lemberg 6e3fee0b 2011-03-21T09:28:52 Typo.
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()