summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove `docwriter' source (now a pip package).GSoC-2018-nikhilNikhil Ramakrishnan2018-08-0420-3340/+0
| | | | | | | | | | | | | | | `docwriter' can now be found at https://github.com/freetype/docwriter The PyPI project is published at https://pypi.org/project/docwriter/ Development will continue on the GitHub repository. * src/tools/docwriter: Remove this folder and its contents from the repository.
* Document `refdoc' usage.Nikhil Ramakrishnan2018-08-041-2/+32
| | | | | | * docs/reference/README: Add information and instructions to use targets `make refdoc' and the new `make refdoc-venv'. Also add troubleshooting tips.
* Modify Jamfile (RefDoc) to run docwriter.Nikhil Ramakrishnan2018-08-041-1/+2
| | | | | * Jamfile (RefDoc): Run docwriter, add `$(FT2_INCLUDE)/freetype/cache/*.h'.
* Minor formatting.Nikhil Ramakrishnan2018-08-036-6/+6
|
* [builds] Add comment for the `BIN' variable.Nikhil Ramakrishnan2018-08-037-6/+21
| | | | | Separate the definition of `BIN' in `*def.mk' files and add a comment stating that it is being used for `make refdoc' and `make refdoc-venv'.
* * builds/unix/configure.raw: Change order of checking for Python.Nikhil Ramakrishnan2018-08-022-16/+16
| | | | | | | Check for Python and pip in the order p3, p2, p so that we use the same version of Python *and* pip at any given point of time. * builds/freetype.mk: Minor formatting.
* [builds] Add checks and targets for `docwriter'.Nikhil Ramakrishnan2018-08-013-32/+68
| | | | | | | | | | | | | | | | | | | | | | | | Add checks for Python, pip and docwriter. Docwriter is now a PyPI package, downloadable from https://pypi.org/project/docwriter/ This package can be installed with the command `pip install docwriter' on any system that has pip. Running `make' on a fresh build will now warn if package `docwriter' is not installed, and also provide information about the `make refdoc-venv' alternative. * builds/freetype.mk: Modify targats `refdoc' and `refdoc-venv' to use detected python version/alias, and run docwriter as a package. * builds/unix/configure.raw: Add rules to check python, pip and docwriter. (code discussed in the dev mailing list). * builds/unix/unix-def.in: Add variables PYTHON and PIP detected by `configure.ac'. This is conditionally assigned (if empty) in `freetype.mk' to the defaults.
* * builds/freetype.mk: Call python scripts with venv.Nikhil Ramakrishnan2018-07-292-7/+16
| | | | | | | | | Call Python scripts with the virtualenv directory created in `DOC_DIR/env'. Also ignore the folder in .gitignore. * builds/freetype.mk (refdoc-venv): Change all calls to local venv. * docs/reference/.gitignore: Add directory `env/'.
* * builds/freetype.mk: Add rule 'refdoc-venv'.Nikhil Ramakrishnan2018-07-288-1/+30
| | | | | | | | | | Add new rule `refdoc-venv' for building documentation in python virtualenv. This is an ongoing discussion at: http://lists.nongnu.org/archive/html/freetype-devel/2018-07/msg00209.html * builds/freetype.mk: Add rule `refdoc-venv' * builds/{os}/*-def.mk: Add variable `BIN' for virtualenv.
* * include/*.*: `Markify' header files.Nikhil Ramakrishnan2018-07-2650-1117/+1117
| | | | | | | Change header file comments to markodwn syntax. Applied `markify' from https://github.com/nikramakrishnan/freetype-docs commit 993cc36ef28600bfb6c5c5612ace4cd2b9138fe8.
* * docs/reference: Prepare folder for docwriter.Nikhil Ramakrishnan2018-07-264-0/+280
| | | | | | | | Add required folders, assets and gitignore rules for docwriter. Static site directory `docs/reference/site/' will be created by MkDocs. * docs/reference/.gitignore: Ignore HTML, markdown and mkdocs.yml file. * docs/reference/markdown: New folder to store generated markdown files.
* * builds/freetype.mk (refdoc): Call docwriter.Nikhil Ramakrishnan2018-07-261-2/+8
| | | | | | | | Change target `refdoc' to call docwriter. Steps: * Install required python modules using `pip'. * Call docwriter with required options. * Change to the docs directory and call `mkdocs'.
* [docwriter] Add docwriter files.Nikhil Ramakrishnan2018-07-2620-0/+3340
| | | | | | | | Files from https://github.com/nikramakrishnan/freetype-docwriter commit de447960c6fd77d29f74951d0d7b7bfba6752d1a.
* Document FT_Module_Class's `module_interface' field.Werner Lemberg2018-07-261-8/+12
|
* [psaux, type1] Trace PostScript dictionaries and other things.Werner Lemberg2018-07-258-6/+182
| | | | | | | | | | | | | | | | | | | | | | | | | The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary right now. * src/psaux/psobjs.c (ps_parser_load_field, ps_parser_load_field_table): Add tracing calls. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing output more compact. * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add tracing messages. * src/type1/t1load.c (parse_blend_axis_types, parse_blend_design_positions, parse_blend_design_map, parse_weight_vector, t1_load_keyword, t1_parse_font_matrix, parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add tracing calls. * src/type1/t1objs.c (T1_Face_Init): Add tracing call. * src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more verbose.
* Fix minor ASAN run-time warnings.Werner Lemberg2018-07-252-3/+11
| | | | | | * src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call `FT_MEM_ZERO' if we actually have a buffer. (ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
* [build] Fortify dllexport/dllimport attributes (#53969,#54330).Alexei Podtelezhnikov2018-07-248-16/+35
| | | | | | | | | | | | | We no longer use predefined _DLL, which can be defined for static builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead, following libtool convention. * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj: Define DLL_EXPORT manually. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in, builds/vms/ftconfig.h, builds/windows/vc2010/index.html, src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
* [type1] Check relationship between number of axes and designs.Werner Lemberg2018-07-242-9/+32
| | | | | | | | | | | | | | For Multiple Masters fonts We don't support intermediate designs; this implies that number_of_designs == 2 ^^ number_of_axes Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557 * src/type1/t1load.c (T1_Open_Face): Ensure above constraint. (T1_Get_MM_Var): Remove now redundant test.
* [truetype] Match ttdebug's naming of instruction mnemonics.Hin-Tak Leung2018-07-242-67/+75
| | | | | | * src/truetype/ttinterp.c: The form used in ttdebug, "MDRP[G,B,W,?]", etc., is slightly more readable than "MDRP[00,01,02,03]".
* * src/pcf/pcfread.c (pcf_get_encodings): Thinko.Werner Lemberg2018-07-242-0/+11
| | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
* * src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.Werner Lemberg2018-07-222-0/+16
| | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
* * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.Werner Lemberg2018-07-222-8/+11
| | | | | | | | This is an oversight of the module change 2018-07-21. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
* [cid] Sanitize `BlueShift' and `BlueFuzz'.Werner Lemberg2018-07-222-11/+49
| | | | | | | | | | | | | This code is taken from the type1 module. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510 * src/cid/cidload.c (parse_fd_array): Set some private dict default values. (cid_face_open): Do the sanitizing. Fix some tracing messages.
* Fix links.Werner Lemberg2018-07-222-2/+2
| | | | Reported by Ankit and Nikhil.
* Minor comment improvement.Werner Lemberg2018-07-211-1/+2
|
* [pcf] Fix handling of the undefined glyph.Werner Lemberg2018-07-214-12/+94
| | | | | | | | | | | | | | | | | | | This change makes the driver use the `defaultChar' property of PCF files. * src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to unsigned. * src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as unsigned. Validate `defaultChar'. If `defaultChar' doesn't point to glyph index zero, swap glyphs with index zero and index `defaultChar' and adjust the encodings accordingly. * src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next, PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced the first character in the font to be the default character.
* Improve stream extraction macro documentation.Werner Lemberg2018-07-212-5/+25
|
* Move the legacy fuzz target to the `freetype-testing' repository.Armin Hasitzka2018-07-206-1010/+11
| | | | | | | | | It can now be found at https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy * src/tools/ftfuzzer: Remove this folder and its contents from the repository.
* [cff] Avoid left-shift of negative numbers (#54322).Werner Lemberg2018-07-202-8/+14
| | | | * src/cff/cffgload.c (cff_slot_load): Use multiplication.
* Allow FT_ENCODING_NONE for `FT_Select_Charmap'.Werner Lemberg2018-07-173-3/+14
| | | | | | | This is a valid encoding tag for BDF, PCF, and Windows FNT, and there is no reason to disallow it for these formats. * src/base/ftobjs.c (FT_Select_Charmap): Implement it.
* * src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'.Werner Lemberg2018-07-172-2/+8
|
* * include/freetype/internal/ftcalc.h: Add macros for handlingArmin Hasitzka2018-07-163-1/+22
| | | | | | | | | | | harmless over-/underflowing `FT_Int' values. * src/sfnt/sfdriver.c (fixed2float): Fix negation of `(int)(-2147483648)'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
* * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.Werner Lemberg2018-07-162-2/+13
| | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
* * src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'.Werner Lemberg2018-07-122-1/+11
| | | | | | | | Taken from patch #9667, written by Steve Langasek <vorlon@debian.org>. This fixes a build failure (most probably a bug in gcc) on ppc64el when building with -O3.
* Fix typo (#54238).Werner Lemberg2018-07-052-1/+11
| | | | | * src/base/ftcolor.c (FT_Palette_Set_Foreground_Color) [!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value.
* Adjust table size comparisons (#54242).Werner Lemberg2018-07-052-1/+13
| | | | * src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it.
* Fix more 32bit issues (#54208)Werner Lemberg2018-07-053-5/+22
| | | | | | | | * src/cff/cffload.c (cff_blend_build_vector): Convert assertion into run-time error. * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against numeric overflow.
* Fix 32bit build warnings (#54239).Werner Lemberg2018-07-043-7/+16
| | | | | | | * src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed vs. unsigned comparisons. * srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto.
* * src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging.Jeff Carey2018-07-022-1/+7
|
* s/xxx specific foo/xxx-specific foo/.Werner Lemberg2018-07-027-34/+26
|
* s/palette_types/palette_flags/.Werner Lemberg2018-07-026-9/+15
| | | | Suggested by Behdad.
* Make `FT_Get_Color_Glyph_Layer' return FT_Bool.Werner Lemberg2018-07-026-42/+71
| | | | | | | | | * include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func), src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer): Updated.
* * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.Werner Lemberg2018-07-012-4/+17
| | | | Reported by Behdad.
* * src/base/fttrigon.c (FT_Tan): Improve accuracy.Alexei Podtelezhnikov2018-06-282-12/+9
| | | | (FT_Vector_Rotate): Simplify.
* * src/base/ftobjs.c (FT_Set_Charmap): Robustify.Alexei Podtelezhnikov2018-06-282-4/+6
|
* [truetype] Fix memory leak.Werner Lemberg2018-06-252-18/+36
| | | | | | | | | * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers. Fix typo in `goto' destination. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
* * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.Werner Lemberg2018-06-252-15/+31
| | | | | | Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
* [truetype] Increase precision while applying VF deltas.Werner Lemberg2018-06-242-63/+140
| | | | | | | | | | | | | | | | | | | | It turned out that we incorrectly round CVT and glyph point deltas before accumulation, leading to severe positioning errors if there are many delta values to sum up. Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed by Behdad. * src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in 16.16 format. (tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16 format array, and add the accumulated values to the CVT at the end of the function. (TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and `points_out' in 16.16 format. Collect deltas in `point_deltas_x' and `point_deltas_y', which are 16.16 format arrays, and add the accumulated values to the glyph coordinates at the end of the function.
* New base function `FT_Matrix_Check' (#54019).Werner Lemberg2018-06-247-17/+140
| | | | | | | | | | | | * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly reject degenerate font matrices. * include/freetype/internal/ftcalc.h: Updated. * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix), src/type42/t42parse.c (t42_parse_font_matrix): Use `FT_Matrix_Check'.
* Fix typo.Werner Lemberg2018-06-232-1/+10
| | | | | | | Reported by Behdad. * src/base/ftcolor.c (FT_Palette_Data_Get) [!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.