summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'ksvsk_test' of into kushal_glyph_testkushal_glyph_testKushal K S V S2017-07-0716-0/+1982
|\
| * Put it all in tests folderksvsk_testKushal K S V S2017-07-0716-0/+0
| |
| * Add make_bitmap folderKushal K S V S2017-07-078-0/+0
| |
| * Add make_png folderKushal K S V S2017-07-078-0/+0
| |
| * Use the folder png to generate imagesKushal K S V S2017-06-299-0/+3
| |
| * cleaningKushal K S V S2017-06-295-49/+84
| |
| * fixed warningKushal K S V S2017-06-292-2/+4
| |
| * fixed mono reneringKushal K S V S2017-06-292-3/+26
| |
| * Loop across all glyphsKushal K S V S2017-06-291-38/+39
| |
| * Apply LCD filterKushal K S V S2017-06-291-0/+9
| |
| * Indentation changeKushal K S V S2017-06-294-399/+412
| |
| * code for generating PNGKushal K S V S2017-06-295-8/+433
| |
| * new code for generating hashesKushal K S V S2017-06-287-0/+571
| |
| * Modified LCD_V renderingKushal K S V S2017-06-151-8/+8
| |
| * Removed unnecessary loops and variablesKushal K S V S2017-06-153-42/+38
| |
| * First commitKushal K S V S2017-06-148-0/+904
|
* * src/sfnt/ttcmap.c (tt_cmap_unicode_class_rec): Fix warning.Werner Lemberg2017-07-052-1/+5
|
* * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Fix warning (#51395).Werner Lemberg2017-07-052-4/+9
|
* [truetype] Prevent address overflow (#51365).Werner Lemberg2017-07-042-2/+10
| | | | * src/truetype/ttgxvar.c (FT_Stream_SeekSet): Add guard.
* * src/base/ftlcdfil.c (ft_lcd_filter_fir): Improve code.Alexei Podtelezhnikov2017-07-032-21/+13
|
* [truetype] Integer overflow.Werner Lemberg2017-07-032-1/+11
| | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2455 * src/truetype/ttinterp.c (Ins_SCFS): Use SUB_LONG.
* * src/sfnt/sfobjs.c (sfnt_load_face): Ignore No_Unicode_Glyph_Name.Alexei Podtelezhnikov2017-07-012-1/+6
|
* Avoid Microsoft compiler warnings (#51331).Ben Wagner2017-06-283-3/+15
| | | | | | | | | | While clang's sanitizer recommends a cast to unsigned for safe negation (to handle -INT_MIN), both MSVC and Visualc emit warning C4146 if an unsigned value gets negated. * include/freetype/internal/ftcalc.h (NEG_LONG, NEG_INT32), src/base/ftcalc.c (FT_MOVE_SIGN): Replace negation with a subtraction.
* * src/cff/cffparse.c (do_fixed): Fix typo.Werner Lemberg2017-06-272-1/+7
| | | | Spotted by chris <chris@gcjd.org>.
* [truetype] Integer overflows.Werner Lemberg2017-06-273-10/+24
| | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2384 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2391 * src/base/ftcalc.c (FT_MulDiv, FT_MulDiv_No_Round, FT_DivFix): Use NEG_LONG. * src/truetype/ttinterp.c (Ins_SxVTL): Use NEG_LONG.
* [truetype] Integer overflows.Werner Lemberg2017-06-242-2/+12
| | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2364 * src/truetype/ttinterp.c (Ins_ISECT): Use NEG_LONG.
* [cff, truetype] Integer overflows.Werner Lemberg2017-06-223-16/+31
| | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2323 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2328 * src/cff/cf2blues.c (cf2_blues_capture): Use ADD_INT32 and SUB_INT32. * src/truetype/ttinterp.c (Ins_SDPVTL): Use SUB_LONG and NEG_LONG.
* [sfnt] Synthesize a Unicode charmap if one is missing.Alexei Podtelezhnikov2017-06-216-6/+163
| | | | | | | | | | | | | | | | * src/sfnt/ttcmap.h (tt_cmap_unicode_class_rec): Declare it. * src/sfnt/ttcmap.c (tt_get_glyph_name, tt_cmap_unicode_init, tt_cmap_unicode_done, tt_cmap_unicode_char_index, tt_cmap_unicode_char_next, tt_cmap_unicode_class_rec): Implement synthetic Unicode charmap class. (tt_get_cmap_info): Make sure the callback is available. * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_POSTSCRIPT_NAMES]: If Unicode charmap is missing, synthesize one. * include/freetype/config/ftoption.h: Document it. * devel/ftoption.h: Ditto.
* Remove deprecated comment.Werner Lemberg2017-06-201-1/+0
|
* Fix pkg-config in freetype-config for cross-compiling (#51274).Tony Theodore2017-06-203-10/+21
| | | | | | | * builds/unix/unix-def.in (PKG_CONFIG): New variable. (freetype-config): Use it in sed expression. * builds/unix/freetype-config.in: s/pkg-config/%PKG_CONFIG%/.
* [cff, truetype] Integer overflows.Werner Lemberg2017-06-203-12/+34
| | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2300 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2313 * src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use ADD_INT32. * src/truetype/ttinterp.c (Ins_ABS): Avoid FT_ABS.
* [base, smooth] LCD filtering cleanups.Alexei Podtelezhnikov2017-06-173-125/+104
| | | | | | | * src/base/ftlcdlil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): Clean up, start filtering from the bottom-left origin. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
* [truetype] Integer overflows.Werner Lemberg2017-06-162-11/+28
| | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2270 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2278 * src/truetype/ttinterp.c (Ins_MDRP, _iup_worker_interpolate): Use ADD_LONG and SUB_LONG.
* [bdf, cff] Integer overflows.Werner Lemberg2017-06-153-13/+30
| | | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2244 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2261 * src/bdf/bdfdrivr.c (BDF_Face_Init): Replace calls to FT_ABS with direct code to avoid value negation. * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32 and ADD_INT32.
* * src/winfonts/winfnt.c (FNT_Face_Init): Don't set active encoding.Werner Lemberg2017-06-149-44/+8
| | | | FreeType only sets a default active encoding for Unicode.
* [cff, truetype] Integer overflows.Werner Lemberg2017-06-133-6/+23
| | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2216 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2218 * src/cff/cf2fixed.h (cf2_fixedAbs): Use NEG_INT32. * src/truetype/ttinterp.c (Ins_IP): Use SUB_LONG.
* [cff] Integer overflows.Werner Lemberg2017-06-113-4/+20
| | | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2200 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2210 * src/cff/cf2hints.c (cf2_hintmap_insertHint): Use SUB_INT32 and ADD_INT32. * src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdVMOVETO>: Use ADD_INT32.
* [truetype] Fix TT_Set_Var_Design.Werner Lemberg2017-06-102-2/+11
| | | | | | | Reported by Nikolaus Waxweiler <madigens@gmail.com>. * src/truetype/ttgxvar.c (TT_Set_Var_Design): Correctly handle the case where we have less input coordinates than axes.
* * src/base/ftcalc.c (FT_DivFix): Fix embarrassing typo.Werner Lemberg2017-06-102-1/+7
| | | | Bug introduced 2017-05-28.
* [cff, truetype] Integer overflows.Werner Lemberg2017-06-093-26/+61
| | | | | | | | | | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2144 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2151 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2153 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2173 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2186 * src/cff/cf2blues.c (cf2_blues_init): Use SUB_INT32. * src/truetype/ttinterp.c (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid, Round_Up_To_Grid, Round_To_Double_Grid, Round_Super, Round_Super_45): Use ADD_LONG, SUB_LONG, NEG_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG, FT_PAD_ROUND_LONG (Ins_SxVTL, Ins_MIRP): Use SUB_LONG. (_iup_worker_shift): Use SUB_LONG and ADD_LONG.
* Provide more macros for flooring, ceiling, and rounding.Werner Lemberg2017-06-092-2/+32
| | | | | | | | | | | These versions don't produce run-time errors due to integer overflow. * include/freetype/internal/ftobjs.h: Include FT_INTERNAL_CALC_H. (FT_PAD_ROUND_LONG, FT_PAD_CEIL_LONG, FT_PIX_ROUND_LONG, FT_PIX_CEIL_LONG): New macros. (FT_PAD_ROUND_INT32, FT_PAD_CEIL_INT32, FT_PIX_ROUND_INT32, FT_PIX_CEIL_INT32): New macros.
* Remove unused macros.Werner Lemberg2017-06-092-9/+7
| | | | | * include/freetype/internal/ftcalc.h (ADD_INT, SUB_INT, MUL_INT, NEG_INT): Deleted.
* */*: Remove `OVERFLOW_' prefix.Werner Lemberg2017-06-0917-491/+421
| | | | This increases readability.
* [cff, truetype] Integer overflows.Werner Lemberg2017-06-073-7/+25
| | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2133 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2137 * src/cff/cf2hints.c (cf2_hint_init): Use OVERFLOW_SUB_INT32. * src/truetype/ttinterp.c (PROJECT, DUALPROJ): Use OVERFLOW_SUB_LONG.
* [cff] Integer overflow.Werner Lemberg2017-06-063-3/+20
| | | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2109 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2110 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2122 * src/cff/cf2blues.c (cf2_blues_init): Use OVERFLOW_SUB_INT32. * src/cff/cf2hints.c (cf2_hintmap_map): Synchronize if-else branches.
* [cff] Integer overflow.Werner Lemberg2017-06-052-3/+16
| | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2089 * src/cff/cffload.c (cff_blend_doBlend): User OVERFLOW_ADD_INT32.
* [cff, truetype] Integer overflows.Werner Lemberg2017-06-043-23/+41
| | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2075 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2088 * src/cff/cf2font.c (cf2_font_setup): Use OVERFLOW_MUL_INT32. * src/truetype/ttinterp.c (Ins_ISECT): Use OVERFLOW_MUL_LONG, OVERFLOW_ADD_LONG, and OVERFLOW_SUB_LONG.
* [base, cff, truetype] Integer overflows.Werner Lemberg2017-06-036-36/+93
| | | | | | | | | | | | | | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2060 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2062 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2063 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2068 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG. * src/cff/cf2blues.c (cf2_blues_capture), src/cff/cf2hints.c (cf2_hintmap_adjustHints): Use OVERFLOW_SUB_INT32. * src/truetype/ttgload.c (compute_glyph_metrics): User OVERFLOW_SUB_LONG. * src/truetype/ttinterp.c (Direct_Move, Direct_Move_Orig, Direct_Move_X, Direct_Move_Y, Direct_Move_Orig_X, Direct_Move_Orig_Y, Move_Zp2_Point, Ins_MSIRP): Use OVERFLOW_ADD_LONG and OVERFLOW_SUB_LONG.
* * builds/unix/freetype-config.in: Fix pkg-config test (#51162).Werner Lemberg2017-06-032-1/+7
| | | | Patch directly taken from bug report.
* [bdf] Synchronize sanity checks with pcf driver.Werner Lemberg2017-06-032-10/+111
| | | | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2054 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2058 * src/bdf/bdfdrivr.c (BDF_Face_Init): Check font ascent and descent. Check AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE, RESOLUTION_X, and RESOLUTION_Y properties.