1. 18 Jun, 2011 1 commit
  2. 14 Jun, 2011 10 commits
    • suzuki toshiya's avatar
      Fix g++4.6 compiler warnings in module drivers. · e62c876b
      suzuki toshiya authored
      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'.
      e62c876b
    • suzuki toshiya's avatar
    • suzuki toshiya's avatar
      [base] Fix g++4.6 compiler warnings in src/base/*.c. · 65a44988
      suzuki toshiya authored
      Passing uninitialized pointer to the buffer allocator is
      not problematic theoretically (as far as the returned
      pointer is checked before writing), but g++4.6 dislikes
      it and warns by -Wuninitialized.  Initialize them by NULL.
      
      * src/base/ftobjs.c (FT_Stream_New): Init `stream'.
      (new_memory_stream): Ditto.
      (FT_New_GlyphSlot): Init `slot'.
      (FT_CMap_New): Init `cmap'.
      (open_face_PS_from_sfnt_stream): Init `sfnt_ps'.
      (Mac_Read_POST_Resource): Init `pfb_data'.
      (Mac_Read_sfnt_Resource): Init `sfnt_data'.
      * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets):
      Init `offsets_internal' and `ref'.
      (raccess_guess_darwin_hfsplus): Init `newpath'.
      (raccess_guess_darwin_newvfs): Ditto.
      * src/base/ftbitmap.c (ft_bitmap_assure_buffer):
      Init `buffer'.
      * src/base/ftstroke.c (FT_Stroker_New): Init `stroker'.
      65a44988
    • suzuki toshiya's avatar
      [gxvalid] Cleanup. · 75b91a49
      suzuki toshiya authored
      Some invalid, overrunning, unrecommended non-zero values
      are cared in paranoid validation mode only.  There are
      many lines looking like:
      
        if ( valid->root->level >= FT_VALIDATE_PARANOID )
          FT_INVALID_xxx;
      
      To simplify them, GXV_SET_ERR_IF_PARANOID( err ) is
      introduced for more paranoid validation in future.
      
      * src/gxvalid/gxvcommn.h (IS_PARANOID_VALIDATION):
      New macro to assure valid->root->level is more or
      equal to FT_VALIDATE_PARANOID.  (GXV_SET_ERR_IF_PARANOID):
      New macro to raise an error if in paranoid validation.
      * src/gxvalid/gxvcommn.c: Use GXV_SET_ERR_IF_PARANOID().
      * src/gxvalid/gxvfeat.c: Ditto.
      * src/gxvalid/gxvjust.c: Ditto.
      * src/gxvalid/gxvkern.c: Ditto.
      * src/gxvalid/gxvmort.c: Ditto.
      * src/gxvalid/gxvmort0.c: Ditto.
      * src/gxvalid/gxvmort1.c: Ditto.
      * src/gxvalid/gxvmort2.c: Ditto.
      * src/gxvalid/gxvmorx1.c: Ditto.
      * src/gxvalid/gxvmorx2.c: Ditto.
      75b91a49
    • suzuki toshiya's avatar
      [gxvalid] Fix gcc4.6 compiler warnings in gxvtrak.c. · f6f9b667
      suzuki toshiya authored
      * src/gxvalid/gxvtrak.c (gxv_trak_trackTable_validate):
      Check different entries pointing same traking value.
      (gxv_trak_validate): Remove unused variable `table_size'.
      f6f9b667
    • suzuki toshiya's avatar
      [gxvalid] Fix gcc4.6 compiler warnings in gxvmorx*.c. · 05fc72c5
      suzuki toshiya authored
      * src/gxvalid/gxvmorx.c (gxv_morx_subtables_validate):
      Conditionalize unvalidated variable `subFeatureFlags'.
      (gxv_morx_chain_validate): Conditionalize unvalidated
      variable `defaultFlags'.
      
      * src/gxvalid/gxmorx0.c
      (gxv_morx_subtable_type0_entry_validate):
      Conditionalize unvalidated variables; `markFirst',
      `dontAdvance', `markLast', `verb'.
      
      * src/gxvalid/gxmorx1.c
      (gxv_morx_subtable_type1_entry_validate): Conditionalize
      unvalidated variables; `setMark', `dontAdvance'.
      
      * src/gxvalid/gxvmorx2.c
      (gxv_morx_subtable_type2_ligActionOffset_validate):
      Conditionalize unvalidated variables; `last', `store'.
      Checking for overrunning offset is added.
      (gxv_morx_subtable_type2_entry_validate):
      Conditionalize unvalidated variables; `setComponent',
      `dontAdvance', `performAction'.
      (gxv_morx_subtable_type2_ligatureTable_validate):
      Check if the GID for ligature does not exceed the
      max GID in `maxp' table.
      
      * src/gxvalid/gxvmort5.c
      (gxv_morx_subtable_type5_InsertList_validate):
      Conditionalize unvalidated loading of `insert_glyphID'
      array.  (gxv_morx_subtable_type5_entry_validate):
      Conditionalize unvalidated variables; `setMark',
      `dontAdvance', `currentIsKashidaLike',
      `markedIsKashidaLike', `currentInsertBefore',
      `markedInsertBefore'.
      05fc72c5
    • suzuki toshiya's avatar
      [gxvalid] Fix gcc4.6 compiler warnings in gxvmort*.c. · 56be3ac9
      suzuki toshiya authored
      * src/gxvalid/gxvmort.c (gxv_mort_subtables_validate):
      Conditionalize unvalidated variable `subFeatureFlags'.
      (gxv_mort_chain_validate): Conditionalize unvalidated
      variable `defaultFlags'.
      
      * src/gxvalid/gxmort0.c
      (gxv_mort_subtable_type0_entry_validate): Check the
      conflict of the marks for the glyphs.
      
      * src/gxvalid/gxmort1.c
      (gxv_mort_subtable_type1_offset_to_subst_validate):
      Local variables `min_gid', `max_gid' are replaced by
      variables in the validator.
      (gxv_mort_subtable_type1_entry_validate): Conditionalize
      unvalidated variables; `setMark', `dontAdvance'.
      (gxv_mort_subtable_type1_substTable_validate):
      Validate the GID by the min/max GIDs in the validator.
      
      * src/gxvalid/gxvmort2.c
      (gxv_mort_subtable_type2_ligActionOffset_validate):
      Conditionalize unvalidated variables; `last', `store'.
      Checking for overrunning offset is added.
      (gxv_mort_subtable_type2_entry_validate):
      Conditionalize unvalidated variables; `setComponent',
      `dontAdvance'.
      (gxv_mort_subtable_type2_ligatureTable_validate):
      Check if the GID for ligature does not exceed the
      max GID in `maxp' table.
      
      * src/gxvalid/gxvmort5.c
      (gxv_mort_subtable_type5_InsertList_validate):
      Conditionalize unvalidated loading of `insert_glyphID'
      array.  (gxv_mort_subtable_type5_entry_validate):
      Conditionalize unvalidated variables; `setMark',
      `dontAdvance', `currentIsKashidaLike',
      `markedIsKashidaLike', `currentInsertBefore',
      `markedInsertBefore'.
      56be3ac9
    • suzuki toshiya's avatar
      [gxvalid] Fix gcc4.6 compiler warnings in gxvkern.c. · 20c126c1
      suzuki toshiya authored
      * src/gxvalid/gxvkern.c
      (gxv_kern_subtable_fmt0_pairs_validate): Conditionalize
      unvalidated variable `kernValue'.
      (gxv_kern_subtable_fmt1_entry_validate): Conditionalize
      unvalidated variables; `push', `dontAdvance', `kernAction',
      `kernValue'.
      (gxv_kern_coverage_new_apple_validate): Conditionalize
      trace-only variables; `kernVertical', `kernCrossStream',
      `kernVariation'.
      (gxv_kern_coverage_classic_apple_validate): Conditionalize
      trace-only variables; `horizontal', `cross_stream'.
      (gxv_kern_coverage_classic_microsoft_validate):
      Conditionalize trace-only variables; `horizontal',
      `minimum', `cross_stream', `override'.
      (gxv_kern_subtable_validate): Conditionalize trace-only
      variables; `version', `tupleIndex'.
      20c126c1
    • suzuki toshiya's avatar
      [gxvalid] Fix gcc4.6 compiler warnings in gxvjust.c. · ce015ec8
      suzuki toshiya authored
      * src/gxvalid/gxvjust.c (gxv_just_check_max_gid):
      New function to unify the checks of too large GID.
      (gxv_just_wdp_entry_validate): Conditionalize unvalidated
      variables; `beforeGrowLimit', `beforeShrinkGrowLimit',
      `afterGrowLimit', `afterShrinkGrowLimit', `growFlags',
      `shrinkFlags'.  Additional check for non-zero values in
      unused storage `justClass' is added.
      (gxv_just_actSubrecord_type0_validate): Conditionalize
      unvalidated variable `order'.  GID is checked by
      gxv_just_check_max_gid().  Additional check for upside-down
      relationship between `lowerLimit' and `upperLimit' is added.
      (gxv_just_actSubrecord_type1_validate): GID is checked by
      gxv_just_check_max_gid().
      (gxv_just_actSubrecord_type2_validate): Conditionalize
      unvalidated variable `substThreshhold'.  GID is checked by
      gxv_just_check_max_gid().
      (gxv_just_actSubrecord_type5_validate): GID is checked by
      gxv_just_check_max_gid().
      (gxv_just_classTable_entry_validate): Conditionalize
      unvalidated variables; `setMark', `dontAdvance',
      `markClass', `currentClass'.
      ce015ec8
    • suzuki toshiya's avatar
      [gxvalid] Preparation to fix gcc4.6 compiler warnings. · 248aa639
      suzuki toshiya authored
      * src/gxvalid/gxvcommn.h (GXV_LOAD_TRACE_VARS): New macro to
      conditionalize the variable which is only used for trace messages.
      Automatically set by FT_DEBUG_LEVEL_TRACE.
      (GXV_LOAD_UNUSED_VARS): New macro to conditionalize the loading of
      unvalidated variables.  Undefined by default to calm gcc4.6 warning.
      (GXV_ValidatorRec.{min_gid,max_gid}): New variables to hold defined
      GID ranges, for the comparison of GID ranges in different subtables.
      248aa639
  3. 08 Jun, 2011 1 commit
    • Werner Lemberg's avatar
      [autofit] Remove unused structure member. · 58d1a5ee
      Werner Lemberg authored
      * src/autofit/afhints.h (AF_SegmentRec): Remove `contour'.
      * src/autofit/aflatin.c (af_latin_hints_compute_segments),
      src/autofit/aflatin2.c (af_latin2_hints_compute_segments): Updated.
      58d1a5ee
  4. 01 Jun, 2011 1 commit
  5. 30 May, 2011 2 commits
    • Werner Lemberg's avatar
      Fix g++ 4.6 compilation. · 6b19fd5c
      Werner Lemberg authored
      * src/autofit/afhints.c (af_glyph_hints_dump_segments,
      af_glyph_hints_dump_edges): Use cast.
      6b19fd5c
    • Werner Lemberg's avatar
      Fix gcc 4.6 compiler warnings. · 71cc1a83
      Werner Lemberg authored
      * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and
      remove unused variables.
      * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out
      `up_dir'.
      * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org'
      and `width_org' conditionalized.
      71cc1a83
  6. 28 May, 2011 1 commit
    • suzuki toshiya's avatar
      [mac] Conditionalize the inclusion of "AvailabilityMacros.h". · c32d54c9
      suzuki toshiya authored
      The native SDK on earliest Mac OS X (10.0-10.1) did not have
      "AvailabilityMacros.h".  To prevent the inclusion of missing
      header file, ECANCELED (introduced in 10.2) in POSIX header
      file <errno.h> is checked to detect the system version.
      
      * include/freetype/config/ftconfig.h: Conditionalize the
      inclusion of "AvailabilityMacros.h".
      * builds/unix/ftconfig.in: Ditto.
      * builds/vms/ftconfig.h: Ditto.
      c32d54c9
  7. 27 May, 2011 1 commit
  8. 24 May, 2011 1 commit
    • Daniel Zimmermann's avatar
      Reduce warnings for MS Visual Studio 2010. · 3ad8f355
      Daniel Zimmermann authored and Werner Lemberg's avatar Werner Lemberg committed
      * 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.
      3ad8f355
  9. 16 May, 2011 1 commit
  10. 12 May, 2011 1 commit
  11. 08 May, 2011 1 commit
    • suzuki toshiya's avatar
      [autofit] Add bluezones for CJK Ideographs. · 084abf04
      suzuki toshiya authored
      To remove extremas of vertical strokes of CJK Ideographs at
      low resolution and make the top and bottom horizontal stems
      aligned, bluezones for CJK Ideographs are calculated from
      sample glyphs.  At present, vertical bluezones (bluezones
      to align vertical stems) are disabled by default.  For detail, see
      http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00070.html
      http://lists.gnu.org/archive/html/freetype-devel/2011-04/msg00092.html
      http://lists.gnu.org/archive/html/freetype-devel/2011-05/msg00001.html
      
      * include/freetype/internal/fttrace.h: New trace component `afcjk'.
      * src/autofit/afcjk.h (AF_CJK{Blue,Axis,Metric}Rec): Add CJK version
      for AF_Latin{Blue,Axis,Metric}Rec.
      (af_cjk_metrics_check_digits): Ditto, shared with Indic module.
      (af_cjk_metrics_init_widths): Ditto.
      (af_cjk_metrics_init): Take AF_CJKMetric instead of AF_LatinMetric.
      (af_cjk_metrics_scale): Ditto (declaration).
      (af_cjk_hints_init): Ditto (declaration).
      (af_cjk_hints_apply): Ditto (declaration).
      * src/autofit/afcjk.c (af_cjk_metrics_scale): Ditto (body).
      (af_cjk_hints_init): Ditto (body).
      (af_cjk_hints_apply): Ditto (body).
      (af_cjk_metrics_init_widths): Duplicate af_latin_metrics_init_widths.
      (af_cjk_metrics_check_digits): Duplicate af_latin_metrics_check_digits.
      (af_cjk_metrics_init): Call CJK bluezone initializer.
      (af_cjk_metrics_scale_dim): Add code to scale bluezones.
      (af_cjk_hints_compute_blue_edges): New function, CJK version of
      af_latin_hints_compute_blue_edges.
      (af_cjk_metrics_init_blues): New function, CJK version of
      af_latin_metrics_init_blues.
      (af_cjk_hints_edges): Add code to align the edge stems to blue zones.
      
      * src/autofit/afindic.c (af_indic_metrics_init): Take AF_CJKMetric
      instead of AF_LatinMetric, and initialize as af_cjk_metrics_init.
      However bluezones are not initialized.
      (af_indic_metrics_scale): Take AF_CJKMetric instead of AF_LatinMetric.
      (af_indic_hints_init): Ditto.
      (af_indic_hints_apply): Ditto.
      
      * docs/CHANGES: Note about CJK bluezone support.
      084abf04
  12. 06 May, 2011 1 commit
  13. 04 May, 2011 1 commit
  14. 01 May, 2011 2 commits
  15. 30 Apr, 2011 2 commits
  16. 29 Apr, 2011 1 commit
  17. 28 Apr, 2011 1 commit
  18. 25 Apr, 2011 2 commits
  19. 22 Apr, 2011 1 commit
  20. 21 Apr, 2011 3 commits
  21. 18 Apr, 2011 3 commits
    • Werner Lemberg's avatar
      Integrate autofitter debugging stuff. · d503b1bc
      Werner Lemberg authored
      * devel/ftoption.h, include/freetype/config/ftoption.h
      (FT_DEBUG_AUTOFIT): New macro.
      
      * include/freetype/internal/fttrace.h: Add trace components for
      autofitter.
      
      * src/autofit/aftypes.h (AF_LOG): Removed.
      (_af_debug): Removed.
      
      * src/autofit/*: s/AF_DEBUG/FT_DEBUG_AUTOFIT/.
      s/AF_LOG/FT_TRACE5/.
      Define FT_COMPONENT where necessary.
      d503b1bc
    • Werner Lemberg's avatar
      Formatting nits. · 575078d2
      Werner Lemberg authored
      575078d2
    • Werner Lemberg's avatar
      Synchronize config files. · 149f5438
      Werner Lemberg authored
      * builds/unix/ftconfig.in: Copy missing assembler routines from
      include/freetype/config/ftconfig.h.
      149f5438
  22. 13 Apr, 2011 1 commit
    • Werner Lemberg's avatar
      Fix Savannah bug #33047. · 9b008750
      Werner Lemberg authored
      Patch submitted by anonymous reporter.
      
      * src/psaux/psobjs.c (ps_table_add): Use FT_PtrDist for pointer
      difference.
      9b008750
  23. 12 Apr, 2011 1 commit
    • Kan-Ru Chen's avatar
      Fix reading of signed integers from files on 64bit platforms. · 21b1a0de
      Kan-Ru Chen authored and Werner Lemberg's avatar Werner Lemberg committed
      Previously, signed integers were converted to unsigned integers, but
      this can fail because of sign extension.  For example, 0xa344a1eb
      becomes 0xffffffffa344a1eb.
      
      We now do the reverse which is always correct because the integer
      size is the same during the cast from unsigned to signed.
      
      * include/freetype/internal/ftstream.h, src/base/ftstream.c
      (FT_Stream_Get*): Replace with...
      (FT_Stream_GetU*): Functions which read unsigned integers.
      Update all macros accordingly.
      
      * src/gzip/ftgzip.c (ft_gzip_get_uncompressed_size): Updated.
      21b1a0de