summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* ttinterp.c: Improve documentation of engine compensation.Werner Lemberg2019-05-211-5/+11
|
* Rendering considerations.Alexei Podtelezhnikov2019-05-202-3/+20
|
* [truetype] Actually scale varied CVT values.Werner Lemberg2019-05-163-0/+40
| | | | | | | | | Up to now, only the unscaled CVT values were varied; in other words, the `CVAR' data was never used for bytecode hinting. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary function. (tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
* [truetype] Use 26.6 format for storing unscaled CVT values.Werner Lemberg2019-05-165-14/+40
| | | | | | | | | | | | | | | | | If `CVAR' data is applied to variation fonts, fractional values are possible. * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of `cvt' from `FT_Short' to `FT_Int32'. * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro. (tt_face_vary_cvt): Use it to update code to 26.6 format. * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6 format. * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6 format.
* * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'.Werner Lemberg2019-05-162-1/+8
| | | | | This fixes linear advance width values for spacing glyphs. Bug introduced 2019-05-09.
* [truetype] Avoid code duplication.Werner Lemberg2019-05-163-17/+21
| | | | | | | * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this function. (tt_size_ready_bytecode): Updated. * src/truetype/ttgload.c (tt_loader_init): Updated.
* * vms_make.com: Updated. Handle `bzip2' directory, too.Werner Lemberg2019-05-132-7/+58
|
* * src/psaux/psfont.c (cf2_font_setup): Fix compiler warning.Werner Lemberg2019-05-132-3/+7
|
* [truetype] Doh. Fix last commit to make it work.Werner Lemberg2019-05-133-29/+94
| | | | | | | | | | | | | | | | | | | | | | | | Very embarassing :-) Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710 * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add argument; update all callers. (TT_Process_Simple_Glyph): Use it. The `unrounded' array is active for variation fonts only, thus also enclose related code with `#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where necessary. Revert commit a113e5d from 2019-05-09, and don't use `extra_points2' but allocate a temporary array. Speed up the scaling of the `unrounded' array. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type conversions and rounding. The unsigned type must have more or equal bits to the signed type.
* [truetype] Increase precision of font variation (#54371).Werner Lemberg2019-05-115-24/+89
| | | | | | | | | | | | | | | | This patch make FreeType use font units in 26.6 format internally instead of integers. * src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro. (TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font coordinates. * src/truetype/ttgxvar.h: Updated. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use `extra_points2' array to temporarily hold unrounded point coordinates; use them to compute scaled coordinates and linear advance width and height. (load_truetype_code): Adjust similarly.
* * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor.Werner Lemberg2019-05-092-8/+9
|
* [smooth] Faster fractions.Alexei Podtelezhnikov2019-05-082-21/+30
| | | | | | * src/smooth/ftgrays.c (SUBPIXELS): Replace with... (FRACT): A fractional coordinate macro to use in... (gray_render_line, gray_render_scanline): ... here.
* * src/raster/ftraster.c (Draw_Sweep): Unbreak.Alexei Podtelezhnikov2019-05-072-8/+6
|
* * src/raster/ftraster.c: Clean-ups.Alexei Podtelezhnikov2019-05-072-6/+10
|
* * src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'.Werner Lemberg2019-05-072-12/+15
|
* * src/smooth/ftgrays.c (gray_render_line): Small shortcut.Alexei Podtelezhnikov2019-05-042-2/+6
|
* Various clang 8.0 static analyzer fixes.Werner Lemberg2019-05-049-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | | Reported by Sender Ghost <lightside@gmx.com>. * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner case where `edge->first' could be NULL. * src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of `size'. * src/raster/ftraster.c (Draw_Sweep): Catch a corner case where `draw_right' might be NULL. * src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for `aadvance'. Ensure `abearing' always hold a meaningful result. * src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is not NULL before accessing it. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary test of `namedstyle'. * src/type42/t42parse.c (t42_parser_done): Ensure `parser->root.funcs.done' is not NULL before accessing it.
* Miscellaneous macro updates.Alexei Podtelezhnikov2019-05-034-13/+12
| | | | | | | * src/base/ftoutln.c (SCALED): Updated. * src/smooth/ftgrays.c (SCALED): Ditto. (FLOOR, ROUND, CEILING): Removed. * src/psaux/psfixed.h (cf2_fracToFixed): Updated.
* Tweak LCD filtering.Alexei Podtelezhnikov2019-05-024-9/+17
| | | | | | | | * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy): Choose direction from bitmap's pixel_mode. * include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc): Updated. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
* * vms_make.com: Updated (#56253).Werner Lemberg2019-05-022-98/+81
| | | | | | | | Remove no longer existing directories (`autohint', `otlayout'). Update used base extensions. Activate `autofit' module. Add `gxvalid' module. Update copyright notices.
* [smooth] Simplify cubic Bézier flattening.Alexei Podtelezhnikov2019-04-292-42/+25
| | | | | | | | | | | | | | | | The previous implementation is correct but it is too complex. The revised algorithm is based on the fact that each split moves the control points closer to the trisection points on the chord. The corresponding distances are good surrogates for the curve deviation from the straight line. This cubic flattening algorithm is somewhat similar to the conic algorithm based the distance from the control point to the middle of the chord. The cubic distances, however, decrease less predictably but are easy enough to calculate on each step. * src/smooth/ftgrays.c (gray_render_cubic): Replace the split condition.
* [smooth] Bithacks and cosmetics.Alexei Podtelezhnikov2019-04-262-16/+18
| | | | | * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline, gray_render_conic, gray_convert_glyph_inner): Updated.
* Optimize Bézier bisections.Alexei Podtelezhnikov2019-04-255-81/+109
| | | | | | | | * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and refactor. * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto. * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto. * src/base/ftbbox.c (cubic_peak): Use shifts.
* Clarify docs.Alexei Podtelezhnikov2019-04-231-7/+4
|
* * src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code.Werner Lemberg2019-04-232-3/+7
| | | | | Found by clang 8.0's static analyzer and reported by Sender Ghost <lightside@gmx.com>.
* [base] Fix thinko in previous commit.Werner Lemberg2019-04-232-10/+19
| | | | | | | * src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not target pitch. Problem reported by Sender Ghost <lightside@gmx.com>.
* * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.Werner Lemberg2019-04-222-0/+13
| | | | Problem reported by Sender Ghost <lightside@gmx.com>.
* Fix return value of `FT_Set_Named_Instance' (#56186).Werner Lemberg2019-04-223-0/+16
| | | | | * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle internal return value -1 of `TT_Set_Var_Design'.
* Typo.Werner Lemberg2019-04-191-1/+1
|
* [pcf] Fix handling of undefined glyph (#56067).Werner Lemberg2019-04-195-83/+117
| | | | | | | | | | | | | | | | | | This commit fixes the changes from 2018-07-21, which broke charmap iteration. We now add the default character as a new glyph with index 0, thus increasing the number of glyphs by one (as before). * src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial glyph with index 0. Limit number of elements to 65534. (pcf_get_bitmaps): Ditto. Unify two loops into one; this avoids allocation of an intermediate array. (pcf_get_encodings): Don't flip indices but copy glyph metrics of default character to index 0. Also handle invalid default character. * docs/CHANGES: Updated.
* * CMakeLists.txt: Avoid rewriting of unchanged configuration files.Minmin Gong2019-04-152-9/+41
| | | | | | Reported as https://savannah.nongnu.org/patch/index.php?9755
* * src/tools/apinames.c (main): Fix error message.JDG2019-04-152-1/+9
| | | | | | Reported as https://savannah.nongnu.org/patch/?9796
* Minor.Werner Lemberg2019-04-141-1/+1
|
* Split off ChangeLog.29.Werner Lemberg2019-04-122-2336/+2353
|
* [smooth] Fix segfault in direct mode (#56092).Alexei Podtelezhnikov2019-04-113-19/+28
| | | | | | * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for direct mode. * src/smooth/ftgrays.c (gray_raster_render): Use it.
* Minor.Werner Lemberg2019-04-091-4/+4
|
* * src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061).Werner Lemberg2019-04-062-1/+7
| | | | This is for Visual Studio 2019 on ARM.
* For distribution, replace `.tar.bz2' with `.tar.xz' bundles.Werner Lemberg2019-04-065-10/+33
| | | | | | * builds/toplevel.mk (build): Do it. * README, docs/CHANGES, docs/release: Updated.
* Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'.Antony Lee2019-04-069-16/+29
| | | | | | | | | | | * include/freetype/freetype.h (FT_Get_Name_Index), include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc), include/freetype/internal/services/svgldict.h (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index), src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index), src/type42/t42drivr.c (t42_get_name_index): Add `const' to second argument.
* [cff] Fix boundary checks.Armin Hasitzka2019-03-313-47/+144
| | | | | | | | | | | | | | | | | | | | | 642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically allocated memory when parsing CFF files with the "old" engine. Bounds checks have never been updated, however, leading to pointless comparisons of pointers in some cases. This commit presents a solution for bounds checks in the CFF module with an extended logic for the "old" engine while staying as concise as possible for the "new" one. * src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and the additional field `t2_strings' within `CFF_ParserRec'. * src/cff/cffparse.c (cff_parser_within_limits): Move all boundary checks into this new function and update the rest of `cffparse.c' to use it. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137
* Improve link.Werner Lemberg2019-03-211-1/+1
|
* [autofit] Fix Mongolian blue zone characters.Werner Lemberg2019-03-204-53/+61
| | | | | | * src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters to get medial forms for some Mongolian characters. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
* [autofit] Add support for Mongolian script.Werner Lemberg2019-03-197-68/+132
| | | | | | | | | | | | | | As a de-facto standard, layouts using this script are constructed horizontally line by line, then the lines are rotated clockwise for vertical display. * src/autofit/afblue.dat: Add blue zone data for Mongolian. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated. * src/autofit/afscript.h: Add Mongolian standard characters. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian data.
* * Version 2.10.0 released.VER-2-10-0Werner Lemberg2019-03-1520-173/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ========================== Tag sources with `VER-2-10-0'. * docs/VERSION.TXT: Add entry for version 2.10.0. * docs/CHANGES: Updated. * README, Jamfile (RefDoc), src/base/ftver.rc, builds/windows/vc2010/freetype.vcxproj, builds/windows/vc2010/index.html, builds/windows/visualc/freetype.dsp, builds/windows/visualc/freetype.vcproj, builds/windows/visualc/index.html, builds/windows/visualce/freetype.dsp, builds/windows/visualce/freetype.vcproj, builds/windows/visualce/index.html, builds/wince/vc2005-ce/freetype.vcproj, builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/freetype.vcproj, builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 10. (FREETYPE_PATCH): Set to 0. * builds/unix/configure.raw (version_info): Set to 23:0:17. * CMakeLists.txt (VERSION_MINOR): Set to 10. (VERSION_PATCH): Set to 0. * builds/toplevel.mk (version, winversion): Since the minor version number has two digits now, never omit the patch number. We would get ambiguous zip file names otherwise. (dist): Remove remnants of `docmaker' tool. (do-dist): Remove unused intermediate files. * src/cff/cffparse.c (destrict_c2s_item): Guard function with CFF_CONFIG_OPTION_OLD_ENGINE macro.
* CHANGES: Minor fixes.Werner Lemberg2019-03-081-6/+7
|
* Fix invalid function pointer casts.Andrei Alexeyev2019-03-074-16/+38
| | | | | | | | | | | | | | This change should allow Freetype to work on WASM/Emscripten without needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'. * src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature. * src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array, parse_expansion_factor, parse_font_name): Return `void', not `FT_Error'. * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc): Fix signature.
* [base] Handle numeric overflow (#55827).Werner Lemberg2019-03-052-3/+9
| | | | * src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'.
* Fix use of uninitialized memory.Sebastian Rasmussen2019-03-052-3/+15
| | | | | | | | | | * src/psaux/psintrp.c (cf2_interpT2CharString): The call to `cf2_arrstack_setCount' may fail because the allocator ran out of memory. When this happens the stack is still written to before the error condition is checked. This means that FreeType writes outside of allocated memory. This commit moves the error check prior to the stack assignment, hence the function now properly returns with an error condition.
* Minor formatting.Nikhil Ramakrishnan2019-03-021-3/+3
|
* Minor doc fixes.Werner Lemberg2019-02-254-5/+5
|