summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* * src/sfnt/pngshim.c (premultiply_data): Fix compiler warnings.Werner Lemberg2017-08-162-3/+7
|
* [sfnt] Speed up PNG image loading.Behdad Esfahbod2017-08-162-3/+60
| | | | | | | | This reduces the overhead of `premultiply_data' by 60%. * src/sfnt/pngshim.c (premultiply_data): Provide code which uses gcc's (and clang's) `vector_byte' attribute to process 4 pixels at a time.
* Minor comment fix.Werner Lemberg2017-08-161-4/+5
|
* Harmony CHANGES.Alexei Podtelezhnikov2017-08-131-1/+12
|
* Minor.Werner Lemberg2017-08-131-1/+1
|
* [sfnt, truetype] Improve handling of missing sbits.Werner Lemberg2017-08-114-4/+86
| | | | | | | | | | | | | | | | | | | | Requested by Behdad. Modern bitmap-only SFNTs like `NotoColorEmoji.ttf' don't contain entries in the bitmap strike(s) for empty glyphs. Instead, they rely that a space glyph gets created from the font's metrics data. This commit makes FreeType behave accordingly. * include/freetype/fterrdef.h (FT_Err_Missing_Bitmap): New error code. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_image): Change error codes to make a distinction between a missing bitmap in a composite and a simple missing bitmap. * src/truetype/ttgload.c (TT_Load_Glyph): For a missing bitmap (in a bitmap-only font), synthesize an empty bitmap glyph if metrics are available.
* CHANGES: Minor update.Werner Lemberg2017-08-111-0/+3
|
* [base] Minor API improvement for default variation axis setting.Werner Lemberg2017-08-104-4/+40
| | | | | | | | * src/base/ftmm.c (FT_Set_MM_Design_Coordinates, FT_Set_Var_Design_Coordinates, FT_Set_MM_Blend_Coordinates, FT_Set_Var_Blend_Coordinates): Allow coords==NULL if num_coords==0. * docs/CHANGES: Updated.
* [psnames] Really fix issue #49949.Werner Lemberg2017-08-094-32/+62
| | | | | | | | | | | | | | | We now use a separate preprocessor macro to handle both definition and declaration of the glyph name arrays. * src/psnames/psmodule.c (DEFINE_PS_TABLE_DATA): New macro. * src/tools/glnames.py (StringTable::dump, StringTable::dump_sublist): Use `DEFINE_PS_TABLE_DATA'. (dump_encoding): Ditto. (main): Use `wb' mode for writing the output file, which works on Windows also. * src/psnames/pstables.h: Regenerated.
* [smooth] Harmony LCD rendering.Alexei Podtelezhnikov2017-08-086-75/+148
| | | | | | | | | | | | | | | | | This is a new technology for LCD-optimized rendering. It capitalizes on the fact that each color channel grid is shifted by a third of a pixel. Therefore it is logical to render 3 separate monochrome bitmaps shifting the outline by 1/3 pixel, and then combine them. Importantly, the resulting output does not require additional LCD filtering. * src/smooth/ftsmooth.c (ft_smooth_render_generic) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Implement new LCD-optimized rendering. * include/freetype/ftlcdfil.h, include/freetype/freetype.h, include/freetype/config/ftoption.h, devel/ftoption.h: Updated documentation.
* * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.Alexei Podtelezhnikov2017-08-082-13/+9
|
* * src/sftnt/ttpost.c (format): Use otspec-compliant versions.Alexei Podtelezhnikov2017-08-082-3/+7
|
* CHANGES update suggested by Nikolaus.Werner Lemberg2017-08-061-0/+5
|
* [truetype] Integer overflow.Werner Lemberg2017-08-052-1/+11
| | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2868 * src/truetype/ttinterp.c (Ins_ALIGNRP): Use NEG_LONG.
* [base, truetype] New function `FT_Get_Var_Axis_Flags'.Werner Lemberg2017-08-055-16/+123
| | | | | | | | | | | | | | | | | | The reserved `flags' field got a value in OpenType version 1.8.2; unfortunately, the public `FT_Var_Axis' structure misses the corresponding element. Since we can't add a new field, we add an access function. * src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function. * include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro. Updated. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory of `mmvar' to hold axis flags. Fill the axis flags array. * docs/CHANGES: Updated.
* [truetype] Fix metrics of B/W hinting in v40 mode.Nikolaus Waxweiler2017-08-042-1/+11
| | | | | | | | Phantom points are now saved outside v40 backwards compatibility mode. This fixes the jumping glyphs when switching between v35 and v40 monochrome mode. * src/truetype/ttgload.c (TT_Hint_Glyph): Fix inversed bool logic.
* [truetype] Do not set any ClearType flags in v40 monochrome mode.Nikolaus Waxweiler2017-08-032-1/+17
| | | | | | | | | | This fixes weird behavior of instructions that resulted in rendering differences between v35 and v40 in monochrome mode, e.g., in `timesbi.ttf'. * src/truetype/ttinterp.c (Ins_GETINFO) [TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL]: Check `subpixel_hinting_lean'.
* * src/truetype/ttgxvar.c (TT_Get_MM_Var): Fix thinko.Werner Lemberg2017-08-013-2/+9
|
* Update CHANGES file.Werner Lemberg2017-08-011-0/+18
|
* [truetype] Fix loading of named instances.Behdad Esfahbod2017-08-013-2/+18
| | | | | * src/truetype/ttgxvar.c (TT_Get_MM_Var): Preserve file position while loading the `avar' table.
* [sfnt, truetype] Minor adjustments for OpenType 1.8.2.Werner Lemberg2017-08-013-8/+20
| | | | | | | | | | * src/sfnt/sfobjs.c (sfnt_load_face): The units per EM value has now (tighter) limits. * src/truetype/ttgload.c (load_truetype_glyph): The new OpenType version explicitly allows all negative values for the number of contours if we have a composite glyph (this is for better backwards compatibility I guess), but it still recommends value -1.
* [cff] Integer overflow.Werner Lemberg2017-07-262-4/+17
| | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2738 * src/cff/cf2hints.c (cf2_glyphpath_computeOffset, cf2_glyphpath_curveTo): Use ADD_INT32.
* [truetype] Improve code comment.Werner Lemberg2017-07-131-1/+7
|
* [base] Fix memory leak.Werner Lemberg2017-07-132-2/+16
| | | | | | | | | Reported as https://bugs.chromium.org/p/chromium/issues/detail?id=738362 * src/base/ftglyph.c (FT_Get_Glyph): Do proper deallocation in case of error.
* [base] Integer overflow.Werner Lemberg2017-07-122-10/+21
| | | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2573 * src/base/ftobjs.c (ft_glyphslot_grid_fit_metrics): Use FT_PIX_CEIL_LONG and FT_PIX_ROUND_LONG.
* Document how to scale manually.Werner Lemberg2017-07-121-1/+7
|
* CHANGES: Add information on global metrics rounding.Werner Lemberg2017-07-121-0/+14
| | | | I missed to add this important information.
* * src/truetype/ttpload.c (tt_face_get_location): Off-by-one typo.Werner Lemberg2017-07-122-4/+14
| | | | | | | | Also improve tracing message. Problem reported as https://bugs.chromium.org/p/chromium/issues/detail?id=738919
* Changelog: typo, chromium issue id is 2276 instead of 2278Hin-Tak Leung2017-07-111-1/+1
| | | | Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
* [cff] Integer overflow.Werner Lemberg2017-07-072-4/+15
| | | | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2517 * src/cff/cf2blues.c (cf2_blues_capture): Use SUB_INT32.
* Tweak suggested use of `lsb_delta' and `rsb_delta'.Alexei Podtelezhnikov2017-07-061-2/+2
|
* * 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.