🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7815 lines
241 KiB

  1. 2021-07-18 Werner Lemberg <wl@gnu.org>
  2. * Version 2.11.0 released.
  3. ==========================
  4. Tag sources with `VER-2-11-0'.
  5. * docs/VERSION.TXT: Add entry for version 2.11.0.
  6. * docs/CHANGES: Updated.
  7. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  8. builds/windows/visualc/index.html,
  9. builds/windows/visualce/index.html,
  10. builds/wince/vc2005-ce/index.html,
  11. builds/wince/vc2008-ce/index.html, docs/freetype-config.1:
  12. s/2.10.4/2.11.0/, s/2104/2110/.
  13. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 11.
  14. (FREETYPE_PATCH): Set to 0.
  15. * builds/unix/configure.raw (version_info): Set to 24:0:18.
  16. * CMakeLists.txt (VERSION_MINOR): Set to 11.
  17. (VERSION_PATCH): Set to 0.
  18. * builds/toplevel.mk (dist): Ignore more git-related files.
  19. 2021-07-17 David Turner <david@freetype.org>
  20. * src/smooth/ftgrays.c: Fix compilation if `FT_LONG64` is undefined.
  21. The code assumed that if `__SSE2__` is defined, then 64-bit integer
  22. types are available. This is not the case apparently for certain
  23. multilib compiler targets like 'x86_32.x86' used by Gentoo.
  24. This patch fixes the issue by disabling the special code path when
  25. 64-bit integer types are not available.
  26. Fixes #1071.
  27. 2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
  28. [tests] Allow arbitrary build directories.
  29. * tests/issue-1063/main.c (main): I am building with a build
  30. directory that is not directly inside the source tree, so the path
  31. `../tests/data/As.I.Lay.Dying.ttf` does not resolve to the test
  32. input file. This change passes the test data directory as an
  33. environment variable to allow arbitrary build directories.
  34. * tests/meson.build: Updated.
  35. 2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
  36. * tests/issue-1063/main.c (main): Fix uninitialized variable.
  37. I tried running `meson test` but the test just crashed and gdb
  38. reported that the face argument to `FT_Get_Char_Index` was nonsense.
  39. With this change the test prints 'Could not open file: ' as it
  40. should.
  41. 2021-07-16 Werner Lemberg <wl@gnu.org>
  42. [smooth] Minor fixes.
  43. * src/smooth/ftgrays.c (gray_render_conic): Move variable and
  44. structure declarations to beginning of function. Inspite of C99
  45. compliance we still do this for the sake of backward compatibility.
  46. This also avoids a shadowing declaration of `count`.
  47. (gray_convert_glyph_inner): Fix typo.
  48. 2021-07-15 Ben Wagner <bungeman@chromium.org>
  49. * src/smooth/ftgrays.c: Guard inclusion of `emmintrin.h`.
  50. Guard inclusion of `emmintrin.h` with `#ifdef __SSE2__`. The gcc
  51. version of this header, `xmmintrin.h`, and `mmintrin.h` check that
  52. the appropriate defines are set before defining anything (are
  53. internally guarded). However, the clang versions of these includes
  54. are not internally guarded. As a result of this, externally guard
  55. the inclusion of these headers.
  56. 2021-07-15 David Turner <david@freetype.org>
  57. [smooth] Implement Bézier quadratic arc flattening with DDA.
  58. Benchmarking shows that this provides a very slighty performance
  59. boost when rendering fonts with lots of quadratic Bézier arcs,
  60. compared to the recursive arc splitting, but only when SSE2 is
  61. available, or on 64-bit CPUs.
  62. On a 2017 Core i5-7300U CPU on Linux/x86_64:
  63. ftbench -p -s10 -t5 -cb DroidSansFallbackFull.ttf
  64. Before: 4.033 us/op (best of 5 runs for all numbers)
  65. After: 3.876 us/op
  66. ftbench -p -s60 -t5 -cb DroidSansFallbackFull.ttf
  67. Before: 13.467 us/op
  68. After: 13.385 us/op
  69. * src/smooth/ftgrays.c (gray_render_conic): New implementation
  70. based on DDA and optionally SSE2.
  71. 2021-07-15 David Turner <david@freetype.org>
  72. [smooth] Minor speedup to smooth rasterizer.
  73. This speeds up the smooth rasterizer by avoiding conditional
  74. branches in the hot path.
  75. - Define a fixed 'null cell', which will be pointed to whenever the
  76. current cell is outside of the current target region. This avoids
  77. a `ras.cell != NULL` check in the `FT_INTEGRATE` macro.
  78. - Also use the null cell as a sentinel at the end of all `ycells`
  79. linked-lists, by setting its x coordinate to `INT_MAX`. This
  80. avoids a `if (!cell)` check in `gray_set_cell` as well.
  81. - Slightly change the worker struct fields to perform a little less
  82. operations during rendering.
  83. Example results (on a 2013 Corei5-3337U CPU)
  84. out/ftbench -p -s10 -t5 -bc DroidSansFallbackFull.ttf
  85. Before: 5.472 us/op
  86. After: 5.275 us/op
  87. out/ftbench -p -s60 -t5 -bc DroidSansFallbackFull.ttf
  88. Before: 17.988 us/op
  89. After: 17.389 us/op
  90. * src/smooth/ftgrays.c (grat_TWorker): Replace `num_cells` field with
  91. `cell_free` and `cell_limit`.
  92. (NULL_CELL_PTR, CELL_MAX_X_VALUE, CELL_IS_NULL): New macros.
  93. (gray_dump_cells, gray_set_cell, gray_sweep, gray_sweep_direct,
  94. gray_convert_glyph_inner, gray_convert_glyph): Updated.
  95. 2021-07-15 David Turner <david@freetype.org>
  96. [tests] Rewrite download script in Python3.
  97. This commit replaces the bash script with a Python script that does
  98. the same work, plus avoiding to download anything if the files are
  99. already installed with the right content.
  100. We now use the first 8 bytes of each file's sha256 hash for the
  101. digest.
  102. * tests/scripts/download-test-fonts.sh: Removed.
  103. * tests/scripts/download-test-fonts.py: New script.
  104. * tests/README.md: Updated.
  105. 2021-07-15 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
  106. Support architectures where `long` is smaller than pointers.
  107. I am currently trying to compile FreeType for CHERI-extended ISAs
  108. (CHERI-RISC-V and Arm's Morello), but I am getting compiler warnings
  109. from the `FT_UINT_TO_POINTER` macro. When compiling with the CHERI
  110. Clang compiler, not using `uinptr_t` for casts between integers an
  111. pointers results in the following `-Werror` build failures:
  112. ```
  113. In file included from .../src/truetype/truetype.c:22:
  114. .../src/truetype/ttgload.c:1925:22: error:
  115. cast from provenance-free integer type to pointer type will
  116. give pointer that can not be dereferenced
  117. [-Werror,-Wcheri-capability-misuse]
  118. node->data = FT_UINT_TO_POINTER( glyph_index );
  119. ^
  120. .../include/freetype/internal/compiler-macros.h:79:34: note:
  121. expanded from macro 'FT_UINT_TO_POINTER'
  122. ```
  123. * include/freetype/internal/compiler-macros.h (FT_UINT_TO_POINTER):
  124. The ISO C standard compliant fix for this would be to use
  125. `uintptr_t` from `stdint.h`, but I am not sure if this is supported
  126. by the minimum compiler version. Therefore, use the
  127. compiler-defined `__UINTPTR_TYPE__` macro (supported in GCC 4.6+ and
  128. Clang since about 3.0) before checking for `_WIN64` and falling back
  129. to `unsigned long`.
  130. 2021-07-13 Oleg Oshmyan <chortos@inbox.lv>
  131. [base] Fix `FT_Open_Face`'s handling of user-supplied streams.
  132. This was already true (though undocumented) most of the time, but
  133. not if `FT_NEW` inside `FT_Stream_New` failed or if the
  134. `FT_OPEN_XXX` flags were bad.
  135. Normally, `FT_Open_Face` calls `FT_Stream_New`, which returns the
  136. user-supplied stream unchanged, and in case of any subsequent error
  137. in `FT_Open_Face`, the stream is closed via `FT_Stream_Free`.
  138. Up to now, however, `FT_Stream_New` allocates a new stream even if
  139. it is already given one by the user. If this allocation fails, the
  140. user-supplied stream is not returned to `FT_Open_Face` and never
  141. closed. Moreover, the user cannot detect this situation: all they
  142. see is that `FT_Open_Face` returns `FT_Err_Out_Of_Memory`, but that
  143. can also happen after a different allocation fails within the main
  144. body of `FT_Open_Face`, when the user's stream has already been
  145. closed by `FT_Open_Face`. It is plausible that the user stream's
  146. `close` method frees memory allocated for the stream object itself,
  147. so the user cannot defensively free it upon `FT_Open_Face` failure
  148. lest it ends up doubly freed. All in all, this ends up leaking the
  149. memory/resources used by user's stream.
  150. Furthermore, `FT_Stream_New` simply returns an error if the
  151. `FT_OPEN_XXX` flags are unsupported, which can mean either an
  152. invalid combination of flags or a perfectly innocent
  153. `FT_OPEN_STREAM` on a FreeType build that lacks stream support.
  154. With this patch, the user-supplied stream is closed even in these
  155. cases, so the user can be sure that if `FT_Open_Face` failed, the
  156. stream is definitely closed.
  157. * src/base/ftobjs.c (FT_Stream_New): Don't allocate a buffer
  158. unnecessarily.
  159. Move error-handling code to make the control flow more obvious.
  160. Close user-supplied stream if the flags are unsupported.
  161. `FT_Stream_Open` always sets `pathname.pointer`, so remove the
  162. redundant (re)assignment. None of the `FT_Stream_Open...` functions
  163. uses `stream->memory`, so keep just one assignment at the end,
  164. shared among all possible control flow paths.
  165. ('Unsupported flags' that may need a stream closure can be either an
  166. invalid combination of multiple `FT_OPEN_XXX` mode flags or a clean
  167. `FT_OPEN_STREAM` flag on a FreeType build that lacks stream
  168. support.)
  169. 2021-07-13 Oleg Oshmyan <chortos@inbox.lv>
  170. [base] Reject combinations of incompatible `FT_OPEN_XXX` flags.
  171. The three modes are mutually exclusive, and the documentation of the
  172. `FT_OPEN_XXX` constants notes this. However, there was no check to
  173. validate this in the code, and the documentation on `FT_Open_Args`
  174. claimed that the corresponding bits were checked in a well-defined
  175. order, implying it was valid (if useless) to specify more than one.
  176. Ironically, this documented order did not agree with the actual
  177. code, so it could not be relied upon; hopefully, nobody did this and
  178. nobody will be hurt by the new validation.
  179. Even if multiple mode bits were allowed, they could cause memory
  180. leaks: if both `FT_OPEN_STREAM` and `stream` are set along with
  181. either `FT_OPEN_MEMORY` or `FT_OPEN_PATHNAME`, then `FT_Stream_New`
  182. allocated a new stream but `FT_Open_Face` marked it as an 'external'
  183. stream, so the stream object was never released.
  184. * src/base/ftobjs.c (FT_Stream_New): Reject incompatible
  185. `FT_OPEN_XXX` flags.
  186. 2021-07-12 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
  187. * meson.build: Fix build for other UNIX systems (e.g., FreeBSD).
  188. Without this change the build of `unix/ftsystem.c` fails because the
  189. `ftconfig.h` header that defines macros such as `HAVE_UNISTD_H` and
  190. `HAVE_FCNTL_H` is only being generated for Linux, macOS, and Cygwin
  191. systems:
  192. ```
  193. .../builds/unix/ftsystem.c:258:32: error:
  194. use of undeclared identifier 'O_RDONLY'
  195. file = open( filepathname, O_RDONLY );
  196. ```
  197. Instead of hardcoding a list of operating systems for this check,
  198. update the logic that decides whether to build the file and set a
  199. boolean flag that can be checked instead.
  200. 2021-07-12 Werner Lemberg <wl@gnu.org>
  201. [autofit] More clean-ups.
  202. * src/autofit/afhints.h (AF_GlyphHintsRec): Remove the no longer
  203. needed fields `xmin_delta` and `xmax_delta`.
  204. * src/autofit/afhints.c (af_glyph_hints_reload),
  205. src/autofit/afloader.c (af_loader_load_glyph): Updated.
  206. 2021-07-12 Werner Lemberg <wl@gnu.org>
  207. Small clean-ups for the last few commits.
  208. * include/freetype/fttrace.h (afwarp): Removed.
  209. 2021-07-12 David Turner <david@freetype.org>
  210. Remove obsolete `AF_Angle` type and related sources.
  211. * src/autofit/afangles.c: File removed. Functions related to
  212. sorting moved to...
  213. * src/autofit/afhints.c (af_sort_pos, af_sort_and_quantize_widths):
  214. This file.
  215. * src/autofit/afangles.h: File removed.
  216. * src/autofit/aftypes.h: Updated.
  217. * src/autofit/autofit.c: Updated.
  218. * src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.
  219. 2021-07-12 David Turner <david@freetype.org>
  220. Remove experimental auto-hinting 'warp' mode.
  221. This feature was always experimental, and probably never worked
  222. properly. This patch completely removes it from the source code,
  223. except for a documentation block describing it for historical
  224. purposes.
  225. * devel/ftoption.h, include/freetype/config/ftoption.h: Remove
  226. `AF_CONFIG_OPTION_USE_WARPER`.
  227. * include/freetype/ftdriver.h: Document 'warping' property as
  228. obsolete.
  229. * src/autofit/afwarp.c, src/autofit/afwarp.h: Files removed.
  230. * src/autofit/*: Remove any code related to warp mode.
  231. 2021-07-12 David Turner <david@freetype.org>
  232. Remove experimental 'Latin2' writing system (`FT_OPTION_AUTOFIT2`).
  233. This code has always been experimental and was never compiled anyway
  234. (`FT_OPTION_AUTOFIT2` does not appear in `ftoption.h` or even any of
  235. our build files).
  236. * include/freetype/internal/fttrace.h (aflatin2): Removed.
  237. * src/autofit/aflatin2.h, src/autofit/aflatin2.c: Files removed.
  238. * src/autofit/afloader.c: Remove undocumented hook to activate
  239. Latin2 system.
  240. * src/autofit/afstyles.h: Remove `ltn2_dflt` style definition.
  241. * src/autofit/afwrtsys.h: Remove `LATIN2` writing system definition.
  242. * src/autofit/autofit.c: Updated.
  243. 2021-07-05 Werner Lemberg <wl@gnu.org>
  244. * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix argument.
  245. Reported by Hin-Tak.
  246. 2021-07-03 Werner Lemberg <wl@gnu.org>
  247. * meson_options.txt: Sort alphabetically; no final full stops.
  248. 2021-07-01 Ben Wagner <bungeman@chromium.org>
  249. * src/truetype/ttgxvar.c (tt_set_mm_blend): Test `coords`.
  250. It is undefined behavior to pass `NULL` to `memcpy`. `coords' is
  251. passed to `memcpy` but `TT_Get_MM_Blend` and `TT_Get_Var_Design`
  252. explictly call `tt_set_mm_blend` with `coords` as `NULL`. In
  253. addition, `TT_Set_MM_Blend` has a similar possible issue.
  254. 2021-06-30 Dominik Röttsches <drott@chromium.org>
  255. [sfnt] Support PaintScale in 'COLR' v1 parsing.
  256. * include/freetype/ftcolor.h (FT_PaintFormat): Renumber values, add
  257. `FT_COLR_PAINTFORMAT_SCALE`.
  258. (FT_PaintScale): New structure to represent 'PaintScale*' tables.
  259. (FT_COLR_Paint): Updated.
  260. * src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration.
  261. (read_paint): Parse 'PaintScale' and friends.
  262. 2021-06-30 Dominik Röttsches <drott@chromium.org>
  263. [sfnt] Handle fonts without layer list in 'COLR' v1.
  264. 'COLR' v1 fonts do not necessarily need to have a layer list; for
  265. this reason, 'fontTools' recently started generating fonts in a way
  266. that drops the layer list if there are no layers in it. This
  267. results in the layer list offset becoming zero, which FreeType
  268. treated as an invalid table. Fix that and handle the case for layer
  269. list offset being 0. This slightly changes how we need to calculate
  270. the starting offset for paints.
  271. * src/sfnt/ttcolr.c (tt_face_load_colr): Handle case of layer list
  272. offset being zero without outright rejecting table.
  273. 2021-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  274. * src/raster/ftraster.c (Render_Single_Pass): Simplify `band_stack'.
  275. 2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
  276. [raster] Do not skip the second pass without dropout control.
  277. The second pass also fixes horizontal lines through the pixel centers.
  278. * src/raster/ftraster.c (black_TWorker): Do not use `second_pass'.
  279. (Render_Glyph): Skip the second pass only with the appropriate flag.
  280. 2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
  281. [raster] Handle sub-band stack locally.
  282. * src/raster/ftraster.c (black_TWorker): Move `band_stack' from here..
  283. (Render_Single_Pass): ... to here and accept limit arguments.
  284. (Render_Glyph): Updated.
  285. 2021-06-25 Anurag Thakur <anuthadev@gmail.com>
  286. [CI] Introduce linux CI and refactor job names.
  287. * .gitlab-ci.yml: Added jobs for building freetype on linux.
  288. 2021-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  289. [raster] Handle Bézier stack locally.
  290. * src/raster/ftraster.c (black_TWorker): Move `arcs' from here...
  291. (Conic_To, Cubic_To): ... to here to tighten their scope.
  292. (Bezier_Up, Bezier_Down): ... Take the current `arc' argument.
  293. 2021-06-28 Dominik Röttsches <drott@chromium.org>
  294. [sfnt] Improve paint limit checks
  295. Paint tables can appear before the `base_glyphs_v1` offset if the
  296. font is produced with the layer list before the base glyph list. In
  297. this case paint tables can occur after the layer list but before the
  298. base glyph list. Checks in the 'COLR' v1 code were rejecting fonts
  299. with this layout. Improve these checks by calculating a minimum
  300. offset after which paint tables can occur and use that in safety
  301. checks.
  302. * src/sfnt/ttcolr.c (Colr, tt_face_load_colr): Declare
  303. `paint_start_v1` and calculate that as the minimum of the end of
  304. layer list and base glyph list.
  305. (get_child_table_pointer, read_paint, tt_face_get_paint_layers):
  306. Use that in safety checks.
  307. 2021-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  308. [raster] Clean up vertical sweep.
  309. * src/raster/ftraster.c (black_TWorker): Replace the current line
  310. offset with the pointer and drop the increment.
  311. (Function_Sweep_Init): Take values as arguments instead of pointers.
  312. (Vertical_Sweep_*, Horizontal_Sweep_Init, Draw_Sweep): Updated.
  313. 2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  314. [raster] Make `band_top' local variable.
  315. * src/raster/ftraster.c (black_TWorker): Move `band_top' from here...
  316. (Render_Single_Pass): ... to here, and refactor.
  317. (Render_Glyph): Updated.
  318. 2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  319. [raster] Adjust sub-band bisecting limits.
  320. We can bisect a band until it is just a single scan line. This might
  321. be slow and cause time-outs but if we need to impose limits it should
  322. be elsewhere.
  323. * src/raster/ftraster.c (Render_Single_Pass): Tweak sub-banding.
  324. 2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  325. * src/raster/ftraster.c (Render_Single_Pass): Remove dead code.
  326. 2021-06-25 Werner Lemberg <wl@gnu.org>
  327. [base] Add trace level to logging output.
  328. Some practical debugging work has shown that displaying level X of
  329. an `FT_TRACEX` macro in the output of `FT2_DEBUG="... -v"` would be
  330. very helpful to find out which trace level should be selected. As
  331. an example, we now get output like
  332. ```
  333. [ttobjs:2] TTF driver
  334. [ttobjs:2] SFNT driver
  335. [sfobjs:2] not a font using the SFNT container format
  336. [t1objs:2] Type 1 driver
  337. [stream:7] FT_Stream_EnterFrame: 14 bytes
  338. ```
  339. * include/freetype/internal/ftdebug.h (FT_LOGGING_TAGX): New macro.
  340. (FT_LOG): Use it to add the trace level to the logging tag.
  341. * include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH):
  342. Adjust.
  343. * docs/DEBUG: Updated.
  344. 2021-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
  345. [smooth, raster] Fix up and align error codes.
  346. FT_Render_Glyph picked up FAILURE or 1 returned from the raster
  347. function, which became a confusing error code. Instead, return
  348. Raster_Overflow in the unlikely event that banding does not help or
  349. another meaningful error.
  350. * src/smooth/ftgrays.c (gray_convert_glyph_inner, gray_convert_glyph):
  351. Use Raster_Overflow when the rendering pool is exhausted and return it
  352. if banding does not help.
  353. (gray_raster_render): Use Smooth_Err_Ok.
  354. * src/raster/ftraster.c (Render_Single_Pass): Return Raster_Overflow
  355. if banding does not help or another error code.
  356. 2021-06-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  357. [smooth, raster] Remove synonymous error macros.
  358. * src/smooth/ftgays.c [STANDALONE_]: s/ErrRaster_/Smooth_Err_/.
  359. (gray_convert_glyph_inner): Updated accordingly.
  360. * src/raster/ftraster.c [STANDALONE_]: Do not abbreviate error macros.
  361. (New_Profile, End_Profile, Insert_Y_Turn, Line_Up, Bezier_Up,
  362. Decompose_Curve, Draw_Sweep, Render_Single_Pass, ft_black_render):
  363. Updated accordingly.
  364. 2021-06-22 Dominik Röttsches <drott@chromium.org>
  365. [sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/.
  366. * include/freetype/ftcolor.h (FT_PaintTransformed, FT_PaintFormat,
  367. FT_COLR_Paint): Do it to make it harmonize with other names such as
  368. 'PaintTranslate'.
  369. * src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Ditto.
  370. 2021-06-22 Dominik Röttsches <drott@chromium.org>
  371. Move 'COLR' API to `ftcolor.h`.
  372. * include/freetype/freetype.h: Cut section layer managament
  373. containing 'COLR' v0 and v1 API and move it to `ftcolor.h` as
  374. requested by Werner on freetype-devel.
  375. * include/freetype/ftcolor.h: Paste that section.
  376. 2021-06-19 Werner Lemberg <david@freetype.org>
  377. [truetype] Fix integer overflow.
  378. Reported as
  379. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35312
  380. * src/truetype/ttinterp.c (Ins_JMPR): Use `ADD_LONG`.
  381. 2021-06-19 Werner Lemberg <david@freetype.org>
  382. [autofit] Prevent hinting if there are too many segments.
  383. This speeds up handling of broken glyphs.
  384. Reported as
  385. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35309
  386. * src/autofit/aflatin.c (af_latin_hints_compute_segments): Implement
  387. it.
  388. 2021-06-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  389. * src/sdf/ftsdfrend.c (ft_(b)sdf_render): Do not FT_ERROR routinely.
  390. 2021-06-16 David Turner <david@freetype.org>
  391. [autofit] Fix return value of `FT_Load_Glyph`.
  392. * src/autofit/afglobal.c (af_face_globals_get_metrics): The issue is
  393. that `style_metrics_init` sometimes returns -1 without clearing
  394. `error`. While looping to `Again`, the next operation is
  395. successful, but -1 is still returned by the function. The fix is to
  396. set `error` to 0 appropriately.
  397. Fixes #1063.
  398. 2021-06-15 David Turner <david@freetype.org>
  399. [meson] Add first regression test to FreeType.
  400. * tests/README.md: New file that explains how to build and run the
  401. tests with the Meson build.
  402. * tests/scripts/download-test-fonts.sh: New bash script to download
  403. test font files to the `tests/data` folder.
  404. * meson.build, meson_options.txt: Add 'tests' option to enable
  405. building and running the test programs (disabled by default).
  406. * tests/meson.build: New file.
  407. * tests/issue-1063/main.c: Simple regression test to exhibit issue
  408. 1063.
  409. * .gitignore: Ignore the content of the `tests/data` folder for
  410. now.
  411. 2021-06-12 Alexei Podtelezhnikov <apodtele@gmail.com>
  412. [type42] Fix new memory leak.
  413. We need to inverse inheritance of FT_GlyphSlot_Internal so that we
  414. have a chance to free the rendered bitmap from the parent slot.
  415. * src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts
  416. of the child `ttslot' and replace it with the parent structure.
  417. (T42_GlyphSlot_Done): Updated accordingly.
  418. 2021-06-12 Werner Lemberg <wl@gnu.org>
  419. [psaux] Fix another assertion.
  420. * src/psaux/psintrp.c (cf2_interpT2CharString)
  421. <cf2_escCALLOTHERSUBR>: Convert assertion into error, since the
  422. problem can happen with invalid user input.
  423. Test case is file
  424. fuzzing/corpora/legacy/oss-fuzz/5754332360212480-unknown-read
  425. in the `freetype2-testing` repository.
  426. 2021-06-12 Werner Lemberg <wl@gnu.org>
  427. [psaux] Fix assertions.
  428. * src/psaux/pshints.c (cf2_hintmap_adjustHints): Check for overflow
  429. before emitting an assertion error.
  430. Test case is file
  431. fuzzing/corpora/legacy/oss-fuzz/4594115297673216-integer-overflow
  432. in the `freetype2-testing` repository.
  433. 2021-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
  434. * src/truetype/ttinterp.c (TT_RunIns): Optimize tracing.
  435. 2021-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
  436. [sdf] Fix SDF positioning.
  437. * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Add padding to
  438. `bitmap_top' and `bitmap_left'.
  439. * sdf/sdf/ftsdf.c (sdf_generate_with_overlaps): Fix VC++ warning.
  440. 2021-06-08 Werner Lemberg <wl@gnu.org>
  441. Fix 'devel' build for 'COLR' v1.
  442. * devel/ftoption.h: Synchronize with
  443. `include/freetype/config/ftoption.h`.
  444. 2021-06-08 Werner Lemberg <wl@gnu.org>
  445. [sfnt] Sanitize cmap4 table better.
  446. Fixes #1062.
  447. * src/sfnt/ttcmap.c (tt_cmap4_validate): Handle a too-small value of
  448. `length` gracefully.
  449. 2021-06-08 Dominik Röttsches <drott@chromium.org>
  450. [sfnt] Pointer validity check when reading 'COLR' v1 layers
  451. * src/sfnt/ttcolr.c (tt_face_get_paint_layers): In addition to the
  452. existing sanity checks, ensure that the pointer to the layer to be
  453. read is within the 'COLR' v1 table.
  454. 2021-06-08 Werner Lemberg <wl@gnu.org>
  455. * src/sdf/ftsdfcommon.c: Fix inclusion of header files.
  456. 2021-06-08 Werner Lemberg <wl@gnu.org>
  457. [sdf] Make `make multi` work.
  458. * src/sdf/ftsdf.c: Include `ftbitmap.h`.
  459. * src/sdf/ftsdfcommon.h: Move function bodies to `ftsdfcommon.c`.
  460. Include `ftobjs.h` to get definitions of `FT_LOCAL` and friends.
  461. * src/sdf/ftsdfcommon.c: New file.
  462. * src/sdf/rules.mk, src/sdf/sdf.c: Updated.
  463. 2021-06-08 Anuj Verma <anujv@iitbhilai.ac.in>
  464. [sdf] Use 8 bits for final SDF output instead of 16bits.
  465. Since 8-bits is enough to represent SDF data we no longer require
  466. 16-bits for this purpose. Also, we now normalize the output data
  467. to use the entire 8-bit range efficiently. For example: if we use
  468. 3.5 format with a spread of 1 we basically only use the starting
  469. 5-bits. By normalizing we can use the entire 8-bit range.
  470. * include/freetype/freetype.h (FT_Render_Mode): Updated description
  471. for `FT_RENDER_MODE_SDF` regarding this change.
  472. * include/freetype/ftimage.h (FT_Pixel_Mode): Removed
  473. `FT_PIXEL_MODE_GRAY16` since no longer required.
  474. * include/freetype/fttypes.h (FT_F6Dot10): Removed since no longer
  475. required.
  476. * src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Allocate 8-bit
  477. bitmap instead of 16-bit buffer.
  478. * src/sdf/ftsdfcommon.h (map_fixed_to_sdf): Added function to convert
  479. 16.16 distance value to our desired format.
  480. * src/sdf/ftsdf.c (sdf_generate_with_overlaps,
  481. sdf_generate_bounding_box): Use the new `map_fixed_to_sdf` function
  482. and also use 8-bit output buffer.
  483. * src/sdf/ftbsdf.c (finalize_sdf): Output to a 8-bit buffer instead
  484. of 16-bit buffer.
  485. 2021-06-02 Ben Wagner <bungeman@chromium.org>
  486. Werner Lemberg <wl@gnu.org>
  487. [sfnt] Fix fallout from 2021-05-29 change.
  488. * src/sfnt/ttcolr.c (find_base_glyph_record,
  489. find_base_glyph_v1_record): Adjust binary search.
  490. Needs to be updated with change to unsigned.
  491. 2021-06-02 Werner Lemberg <wl@gnu.org>
  492. * src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix tracing.
  493. Problem reported by Alexei.
  494. 2021-06-02 Werner Lemberg <wl@gnu.org>
  495. [psaux] Fix MSVC compiler warnings.
  496. * src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
  497. Add cast.
  498. 2021-05-29 Werner Lemberg <wl@gnu.org>
  499. Fix compilation errors and (some) warnings for clang++.
  500. * src/autofit/afmodule.c (AF_GlyphHintsRec): Make it static.
  501. * src/cache/ftcache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c
  502. (ftc_snode_compare): Remove semicolon.
  503. * src/cff/cffparse.c (cff_parser_run): Add `break` statement.
  504. * src/cid/cidload.c (cid_hex_to_binary): Add cast.
  505. * src/sdf/ftbsdf.c (CHECK_NEIGHBOR): Use `do {} while(0)` loop.
  506. (bsdf_init_distance_map, finalize_sdf, bsdf_raster_render): Add
  507. casts.
  508. * src/sdf/ftsdf.c (sdf_generate_bounding_box,
  509. sdf_generate_with_overlaps): Ditto.
  510. * src/sdf/ftsdfcommon.h (square_root): Ditto.
  511. * src/sdf/ftsdfrend.c (sdf_property_get, ft_sdf_render,
  512. ft_bsdf_render): Ditto.
  513. * src/sfnt/ttcolr.c (find_base_glyph_record,
  514. find_base_glyph_v1_record): Fix variable signedness.
  515. (read_color_line): Add cast.
  516. (read_paint): Add casts.
  517. Fix signedness issue.
  518. (tt_face_get_colorline_stops) Fix signedness issues.
  519. * src/sfnt/ttpost.c (load_format_20): Add casts.
  520. * src/truetype/ttsubpix.c (TWEAK_RULES, TWEAK_RULES_EXCEPTIONS):
  521. Remove final semicolons.
  522. 2021-05-29 Werner Lemberg <wl@gnu.org>
  523. [build] Allow overriding of `ANSIFLAGS` for GNU make build.
  524. * builds/*: Implement it.
  525. 2021-05-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  526. [type42] Fix auto-hinting.
  527. The autohinter could not access the base (unscaled) outline in the
  528. child TrueType glyph slot. We now share the internal parts between
  529. the parent and child glyph slots. Fixes #1057.
  530. * src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts
  531. of `T42_GlyphSlot' and replace it with the child TrueType structure.
  532. (T42_GlyphSlot_Done): Updated accordingly.
  533. 2021-05-25 Werner Lemberg <wl@gnu.org>
  534. [psaux] Guard and trace AFM kern data allocation.
  535. Reported as
  536. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31543
  537. * include/freetype/internal/fttrace.h: Add 'afmparse' trace
  538. component.
  539. * src/psaux/afmparse.c (FT_COMPONENT): Define.
  540. (afm_parse_track_kern, afm_parse_kern_pairs): Protect against
  541. allocations bombs.
  542. Add tracing.
  543. (afm_parse_kern_data): Don't allow multiple kern data sections.
  544. 2021-05-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  545. * meson.build (ft2_public_headers): Add missing `ftcid.h'.
  546. Fixes #1058.
  547. 2021-05-20 Alexei Podtelezhnikov <apodtele@gmail.com>
  548. [type42] Avoid some memory zeroing.
  549. * src/type42/t42objs.c (T42_Open_Face): Tweak allocation macro.
  550. * src/type42/t42parse.c (t42_parse_sfnts): Ditto.
  551. 2021-05-19 Nikolaus Waxweiler <madigens@gmail.com>
  552. [CMake] Update dependency finders.
  553. 1. Fixes CMake using any found HarfBuzz version lower than the minimum
  554. required. This is based on HALX99's merge request at
  555. https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/31
  556. 2. Update FindHarfBuzz.cmake from
  557. https://github.com/WebKit/WebKit/blob/1ce32454/Source/cmake/FindHarfBuzz.cmake
  558. and guard post-CMake-3.1 features to keep the minimum version unchanged
  559. 3. Update FindBrotliDec.cmake to stop the warnings, based on what
  560. https://github.com/google/woff2/blob/a0d0ed7d/cmake/FindBrotliDec.cmake
  561. is doing
  562. * CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Implement 1 and 2.
  563. * builds/cmake/FindBrotliDec.cmake: Implement 3.
  564. 2021-05-19 Ben Wagner <bungeman@chromium.org>
  565. [gzip] Use exact type for `ft_gzip_alloc` and `ft_gzip_free`.
  566. While a function pointer may be cast to another function pointer
  567. type, it is required to cast the function pointer back to the
  568. original function pointer type before calling it. If a parameter is
  569. a pointer the exact pointer type is required. Using a pointer to a
  570. different underlying type is technically undefined behavior. The
  571. wrapper functions `ft_gzip_alloc` and `ft_gzip_free` took
  572. `FT_Memory` (a `FT_MemoryRec_*`) instead of `voidpf` (`void*`), so
  573. when gzip calls these callbacks through `alloc_func` or `free_func`
  574. it invokes undefined behavior. On most platforms this works out as
  575. expected, but newer undefined behavior detectors and targets like
  576. wasm can detect this and will produce an error.
  577. * src/gzip/ftgzip.c (ft_gzip_alloc, ft_gzip_free): Update signatures
  578. to exactly match `alloc_func` and `free_func`, respectively.
  579. Internally, cast the `void*` opaque pointer to `FT_Memory`.
  580. 2021-05-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  581. Prioritize the anti-aliasing renderer module.
  582. * modules.cfg: Reorder the renderers.
  583. * include/freetype/config/ftmodule.h: Ditto.
  584. 2021-05-16 Alexei Podtelezhnikov <apodtele@gmail.com>
  585. [sfnt] Additional guards on the POST table.
  586. Fixes timeout (#1055) analyzed by Ben Wagner, reported as
  587. https://crbug.com/1194092
  588. * src/sfnt/ttload.c (tt_face_load_post): Check POST format.
  589. * src/sfnt/sfobjs.c (sfnt_load_face): Synthesize the missing unicode
  590. charmap only if the glyph names exist.
  591. * src/psnames/psmodule.c (ps_unicode_value): Short cut ".notdef" and
  592. ".null".
  593. 2021-05-13 Daniel McArdle <dmcardle@chromium.org>
  594. [psaux] Use doubling allocation strategy for CF2_ArrStack.
  595. Fixes timeout reported as
  596. https://crbug.com/1206181
  597. * src/psaux/psarrst.c (cf2_arrstack_{push,init}): Implement it.
  598. * src/psaux/psarrst.h (CF2_ArrStackiRec): Drop `chunk'.
  599. 2021-05-12 Alexei Podtelezhnikov <apodtele@gmail.com>
  600. * src/smooth/ftgrays.c (FT_MAX_GRAY_SPANS): Increase from 10 to 16.
  601. Ten was barely enough for two slanted stems. Sixteen can actually fit
  602. a bit more complicated scanlines.
  603. 2021-05-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  604. * src/smooth/ftgrays.c (FT_GRAY_SET): Adjust for better code.
  605. 2021-05-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  606. [smooth] Faster bitmap sweeping.
  607. Selecting the fill rule or checking the direct mode each time we call
  608. `gray_hline' is sub-optimal. This effectively splits the direct mode
  609. into a separate code path while inlining `gray_hline' and saving 5-7%
  610. of rendering time.
  611. * src/smooth/ftgrays.c (gray_hline): Eliminated in favor of...
  612. (FT_FILL_RULE, FT_GRAY_SET): ... these new macros...
  613. (gray_sweep): ... inlined here.
  614. (gray_sweep_direct): New function that handles the direct span buffer.
  615. (gray_TWorker): Remove the span buffer.
  616. (gray_raster_render, gray_convert_glyph): Updated.
  617. 2021-05-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  618. * src/smooth/ftgrays.c (gray_hline): Simplify even-odd computations.
  619. It is too bad the even-odd rule is not used much.
  620. 2021-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  621. [type1] Avoid MM memory zeroing.
  622. * src/type1/t1load.c (t1_allocate_blend, parse_blend_design_map):
  623. Tweak allocation macros.
  624. * src/type1/t1objs.c (T1_Face_Done): Minor.
  625. 2021-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  626. * src/bdf/bdflib.c (_bdf_list_ensure): Tweak allocation macro.
  627. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  628. * src/psaux/psobjs.c (ps_parser_load_field): Tweak allocation macro.
  629. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  630. * src/sfnt/sfobjs.c (sfnt_load_face): Tweak allocation macro.
  631. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  632. * src/cid/cidload.c (cid_read_subrs): Tweak allocation macro.
  633. 2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  634. * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Tweak allocation.
  635. 2021-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
  636. [cff,psaux] Avoid memory zeroing (contd.).
  637. * src/cff/cffload.c (cff_blend_doBlend, cff_blend_build_vector): Tweak
  638. allocation macros.
  639. * src/psaux/psarrst.c (cf2_arrstack_setNumElements): Ditto.
  640. * src/psaux/psstack.c (cf2_stack_init): Ditto.
  641. 2021-05-04 Ben Wagner <bungeman@chromium.org>
  642. * src/cid/cidload.c (cid_hex_to_binary): Improve return value.
  643. Add argument to return the actual number of bytes that were decoded.
  644. The actual number of bytes decoded can be quite variable depending
  645. on the number of ignored 'whitespace' bytes or early termination
  646. with `>`.
  647. (cid_face_open): Updated to use this calculated value. This avoids
  648. trusting `parser->binary_length` is always be correct and reading
  649. uninitialized bits if fewer are actually decoded.
  650. First reported as
  651. https://crbug.com/1203240
  652. 2021-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  653. [sfnt] Streamline POST format 2.0 handing.
  654. To reduce memory allocations, we read an entire Pascal-string buffer
  655. and convert it to a C-string buffer. We also reject tables with
  656. Postscript glyph names exceeding 63 bytes.
  657. * src/sfnt/ttpost.c (load_format20): Implement it.
  658. (load_post_names): Check the minimal POST table size.
  659. (load_format25, tt_face_free_ps_names): Updated accordingly.
  660. 2021-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  661. [bdf,pcf] Avoid memory zeroing (contd.).
  662. * src/bdf/bdflib.c (bdf_create_property, _bdf_add_comment,
  663. _bdf_add_property, bdf_load_font): Tweak allocation macros.
  664. * src/pcf/pcfread.c (pcf_get_properties, pcf_get_metrics): Ditto.
  665. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  666. * src/cid/cidload.c (cid_read_subrs): Tweak allocaton macro.
  667. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  668. [sfnt] Avoid some memory zeroing.
  669. * src/sfnt/sfobjs.c (sfnt_open_font, sfnt_init_face,
  670. tt_name_ascii_from_{utf16,other}): Tweak allocaton macros.
  671. * src/sfnt/ttload.c (tt_face_load_name): Ditto.
  672. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  673. * src/sfnt/ttpost.c (load_format_{20,25}): Tweak allocaton macros.
  674. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  675. * src/sfnt/pngshim.c (Load_SBit_Png): Tweak allocaton macro.
  676. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  677. [truetype] Avoid some memory zeroing.
  678. * src/truetype/ttinterp.c (Init_Context): Tweak allocation macro.
  679. * src/truetype/ttpload.c (tt_face_load_cvt): Ditto.
  680. 2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  681. [woff2] Avoid some memory zeroing.
  682. * src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros.
  683. 2021-04-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  684. * src/gzip/ftgzip.c (ft_gzip_alloc): Zero out memory again.
  685. 2021-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  686. [lzw] Preserve decompression stack when relocating to heap.
  687. * src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Copy stack when
  688. relocating to heap.
  689. 2021-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  690. * src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check.
  691. 2021-04-27 Werner Lemberg <wl@gnu.org>
  692. * src/psmodule.c (ps_unicodes_init): Ignore empty glyph names.
  693. Reported as
  694. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33637
  695. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  696. * src/sfnt/sfobjs.c (sfnt_init_face): Revert macro change.
  697. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  698. [cff] Avoid some memory zeroing.
  699. * src/cff/cffparse.c (cff_parser_init): Tweak memory macro.
  700. * src/cff/cffload.c (cff_index_load_offsets, cff_index_get_pointers,
  701. cff_charset_load, cff_vstore_load): Ditto.
  702. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  703. [pfr] Avoid some memory zeroing.
  704. * src/pfr/pfrobjs.c (pfr_face_init) : Tweak memory macro.
  705. * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps,
  706. pfr_phy_font_load): Ditto.
  707. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  708. * src/winfonts/winfnt.c (FNT_Face_Init): Tweak memory macro.
  709. 2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  710. [psaux,psnames] Avoid some memory zeroing.
  711. * src/psaux/psstack.c (cf2_stack_init): Tweak memory macro.
  712. * src/psnames/psmodule.c (ps_unicodes_init): Ditto.
  713. 2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  714. [base] Avoid some memory zeroing.
  715. * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Use FT_QNEW_ARRAY.
  716. * src/base/ftsnames.c (FT_Get_Sfnt_{Name,LangTag}): Ditto.
  717. 2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  718. [bdf,pcf] Avoid some memory zeroing.
  719. * src/pcf/pcfread.c (pcf_read_TOC, pcf_get_properties, pcf_load_font):
  720. Tweak memory macros.
  721. * src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto.
  722. * src/bdf/bdflib.c (_bdf_readstreami, bdf_create_property,
  723. _bdf_parse_glyphs, _bdf_parse_start): Ditto.
  724. (_bdf_add_property): Do not handle zero size.
  725. 2021-04-25 Issam E. Maghni <issam.e.maghni@mailbox.org>
  726. * builds/meson/process_ftoption_h.py: Add LF at EOF.
  727. This fixes
  728. .../ftoption.h:1030:10: error:
  729. no newline at end of file [-Werror,-Wnewline-eof]
  730. for the generated `ftoption.h` file.
  731. 2021-04-24 Alexei Podtelezhnikov <apodtele@gmail.com>
  732. * src/cff/cffload.c (cff_index_get_pointers): s/FT_QALLOC/FT_ALLOC/.
  733. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  734. * src/base/ftobjs.c (Mac_Read_POST_Resource): s/FT_ALLOC/FT_QALLOC/.
  735. * builds/mac/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto.
  736. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  737. * src/sdf/ftsdf.c (sdf_{edge,contour,shape}_new): Use FT_QALLOC.
  738. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  739. [sfnt] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  740. * src/sfnt/sfdriver.c (get_win_string, get_apple_string,
  741. sfnt_get_var_ps_name): Do not zero out the buffer.
  742. * src/sfnt/sfobjs.c (sfnt_init_face): Ditto.
  743. * src/sfnt/sfwoff.c (woff_open_font): Ditto.
  744. * src/sfnt/sfwoff2.c (woff2_open_font): Ditto.
  745. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  746. [cff,type1,type42] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  747. * src/cff/cffload.c (cff_index_get_pointers, cff_index_get_name):
  748. Do not zero out the buffer.
  749. * src/cff/cffdrivr.c (cff_ps_get_font_info): Ditto.
  750. * src/type1/t1load.c (parse_subrs, parse_charstrings,
  751. parse_blend_axis_types): Ditto.
  752. * src/type1/t1parse.c (T1_New_Parser, T1_Get_Private_Dict): Ditto.
  753. * src/type42/t42parse.c (t42_parser_init): Ditto.
  754. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  755. [cid] s/FT_ALLOC/FT_QALLOC/ and clean up.
  756. * src/cid/cidgload.c (cid_load_glyph): Do not zero out the buffer.
  757. * src/cid/cidload.c (cid_face_open, cid_read_subrs): Ditto.
  758. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  759. [pfr] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  760. * src/pfr/pfrload.c (pfr_extra_item_load_font_id, pfr_aux_name_load):
  761. Do not zero out the buffer.
  762. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  763. [bzip2,gzip] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  764. * src/bzip2/ftbzip2.c (ft_bzip2_alloc): Do not zero out the buffer.
  765. * src/gzip/ftgzip.c (ft_gzip_alloc, FT_Stream_OpenGzip): Ditto.
  766. 2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  767. [pcf,bdf,winfonts] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  768. * src/pcf/pcfread.c (pcf_interpret_style): Do not zero out the buffer.
  769. * src/bdf/bdfdrivr.c (bdf_interpret_style): Ditto.
  770. * src/winfonts/winfnt.c (FNT_Face_Init, FNT_Load_Glyph): Ditto.
  771. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  772. [cache] Optimize SBit copying.
  773. * src/cache/ftcsbits.c (ftc_snode_load): Do not initialize the buffer.
  774. (ftc_sbit_copy_bitmap): Accept zero size, s/FT_ALLOC/FT_QALLOC/.
  775. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  776. [gxvalid,otvalid] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  777. * src/gxvalid/gxvmod.c (gxv_load_table): Do not zero out the buffer.
  778. * src/otvalid/otvmod.c (otv_load_table): Ditto.
  779. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  780. [psaux] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  781. * src/psaux/psobjs.c (ps_table_done, ps_parser_load_field): Do not
  782. zero out the buffer.
  783. 2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  784. [base] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
  785. * src/base/ftobjs.c (open_face_PS_from_sfnt_stream,
  786. Mac_Read_sfnt_Resource): Do not zero out the buffer.
  787. * src/base/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto.
  788. * src/base/ftrfork.c (raccess_make_file_name,
  789. raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Ditto.
  790. 2021-04-20 Alexei Podtelezhnikov <apodtele@gmail.com>
  791. [cache] Restore SBit copying for unowned (BDF) bitmaps.
  792. * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Restore.
  793. (ftc_snode_load): Check ownership and copy unowned bitmaps.
  794. 2021-04-19 Dominik Röttsches <drott@chromium.org>
  795. [sfnt] Return in 'COLR' v1 when layer pointer outside table
  796. * src/sfnt/ttcolr.c (tt_face_get_paint_layers): Add missing return
  797. when paint pointer outside table.
  798. (read_paint): Add missing return when paint pointer outside table.
  799. 2021-04-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  800. [cache] Switch to lazy SBit setting.
  801. * src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Removed.
  802. (ftc_snode_load): Take the bitmap ownership instead of copying.
  803. 2021-04-16 Daniel Welty <@danielwelty>
  804. * src/cache/ftcsbits.c (ftc_snode_load): Properly handle short pitch.
  805. 2021-04-16 Werner Lemberg <wl@gnu.org>
  806. * builds/unix/freetype2.m4: Fix help string formatting.
  807. The indented `dnl` macros inserted unwanted horizontal space.
  808. Problem reported by Ozkan Sezer <sezeroz@gmail.com>.
  809. 2021-04-16 Dominik Röttsches <drott@chromium.org>
  810. [sfnt] Safeguard 'COLR' v1 layer extraction
  811. * src/sfnt/ttcolr.c (tt_face_get_paint_layers): Do not output
  812. layer pointer to iterator if it is outside the 'COLR' table.
  813. (read_paint): Do not attempt to read layers that are outside the
  814. table.
  815. 2021-04-02 Ben Wagner <bungeman@chromium.org>
  816. [base] Complete `ft_glyphslot_clear`.
  817. * src/base/ftobjs.c (ft_glyphslot_clear): This function is intended
  818. to reset all the values of a glyph slot. However, it was not
  819. resetting the values of the advances and `glyph_index`. Reset the
  820. advances and `glyph_index` to zero.
  821. 2021-04-02 Ben Wagner <bungeman@chromium.org>
  822. [truetype] Prevent glyph program state from persisting.
  823. `FDEF` instructions are specified as allowed only in 'prep' or
  824. 'fpgm'. FreeType has attempted to prevent their use in the glyph
  825. program, but they were still allowed in glyph programs if defined in
  826. a function defined in 'prep' or 'fpgm' and called from the glyph
  827. program.
  828. Similarly, `IDEF` instructions are specified not to be able to
  829. modify any existing instruction. FreeType has attempted to prevent
  830. their use in the glyph program, but they can still be used like
  831. `FDEF`.
  832. This change stores the initial bytecode range type and disallows the
  833. use of `FDEF` and `IDEF` while running the glyph program.
  834. Most other state is copied from the `TT_Size` into the execution
  835. context. However, it is possible for a glyph program to use `WS` to
  836. write to the storage area or `WCVTP`, `WCVTF`, and `DELTAC[123]` to
  837. write to the control value table.
  838. Allowing any change to the global state from the glyph program is
  839. problematic as the outlines of any given glyph may change based on
  840. the order the glyphs are loaded or even how many times they are
  841. loaded. There exist fonts that write to the storage area or the
  842. control value table in the glyph program, so their use should not be
  843. an error.
  844. Possible solutions to using these in the glyph program are
  845. * ignore the writes;
  846. * value-level copy on write, discard modified values when finished;
  847. * array-level copy on write, discard the copy when finished;
  848. * array-level copy up-front.
  849. Ignoring the writes may break otherwise good uses. A full copy
  850. up-front was implemented, but was quite heavy as even well behaved
  851. fonts required a full copy and the memory management that goes along
  852. with it. Value-level copy on write could use less memory but
  853. requires a great deal more record keeping and complexity. This
  854. change implements array-level copy on write. If any attempt is made
  855. to write to the control value table or the storage area when the
  856. initial bytecode range was in a glyph program, the relevant array
  857. will be copied to a designated storage area and the copy used for
  858. the rest of the glyph program's execution.
  859. * src/truetype/ttinterp.h (TT_ExecContextRec): New fields
  860. `iniRange`, `glyfCvtSize`, `glyfCvt`, `origCvt`, `glyfStoreSize`,
  861. `glyfStorage`, and `origStorage`.
  862. * src/truetype/ttinterp.c (Modify_CVT_Check): New function to handle
  863. `exc->glyfCvt`.
  864. (Write_CVT, Write_CVT_Stretched, Move_CVT, Move_CVT_Stretched): Use
  865. it.
  866. (Ins_WS): Handle `exc->glyfStorage`.
  867. (Ins_FDEF, Ins_IDEF): Updated.
  868. (TT_RunIns): Updated.
  869. (TT_Done_Context): Free 'glyf' CVT working and storage area.
  870. (TT_Load_Context): Fix/add casts.
  871. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix cast.
  872. 2021-03-30 Dominik Röttsches <drott@chromium.org>
  873. [sfnt] Check validity of pointer location of `read_color_line`.
  874. * src/sfnt/ttcolr.c (get_child_table_pointer): New function to fetch
  875. child table pointer early for all paint formats that compute a child
  876. table pointer.
  877. (read_color_line, read_paint): Updated.
  878. (tt_face_get_colorline_stops): Check `colr->table`.
  879. 2021-03-28 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  880. [docs] Update docwriter stylesheet for 1.3.1.
  881. This change is required to support docwriter 1.3.1.
  882. See
  883. https://gitlab.freedesktop.org/freetype/docwriter/-/merge_requests/101
  884. for more information.
  885. * docs/markdown/stylesheets/extra.css:
  886. (.wy-nav-content, .md-sidebar--secondary): Remove.
  887. 2021-03-16 Alexei Podtelezhnikov <apodtele@gmail.com>
  888. * src/sfnt/pngshim.c (Load_SBit_Png): Free `rows` once later.
  889. 2021-03-16 Ben Wagner <bungeman@google.com>
  890. [sfnt] Fix memory leak in png loading.
  891. Reported as
  892. https://bugs.chromium.org/p/chromium/issues/detail?id=1182552
  893. Memory is allocated and the pointer assigned to `rows` inside a
  894. 'setjmp' scope. This memory must be freed outside the 'setjmp'
  895. scope after a 'longjmp'. Since `rows` is a local and modified
  896. inside the 'setjmp' scope it must be marked volatile or it will have
  897. an indeterminate value after the 'longjmp'.
  898. * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak of `rows`.
  899. 2021-03-16 Christopher Degawa <ccom@randomderp.com>
  900. * CMakeLists.txt: Don't limit generation of 'pkg-config' file to UNIX.
  901. mingw-w64 uses the 'pkg-config' files but does not set UNIX.
  902. 2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  903. * src/smooth/ftgrays.c (gray_set_cell): Refactor to fix VC++ warning.
  904. 2021-03-13 Werner Lemberg <wl@gnu.org>
  905. Handle various VC++ compiler warnings.
  906. Fixes #1039.
  907. * src/base/ftstroke.c (ft_stroker_inside, ft_stroker_outside):
  908. Initialize `sigma`.
  909. * src/sdf/ftsdf.c (sdf_generate_with_overlaps): Exit immediately if
  910. function arguments are invalid.
  911. * src/sdf/ftsdfrend.c (sdf_property_set) <"overlaps">: Fix cast.
  912. * src/sfnt/sfwoff2.c (woff2_decompress)
  913. [!FT_CONFIG_OPTION_USE_BROTLI]: Use `FT_UNUSED`.
  914. * src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `fvar_head`.
  915. 2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  916. [smooth] Reduce copying during integration phase.
  917. We now record `cover' and `area' directly into the linked list. This
  918. makes rendering faster by 10% or even more at larger sizes.
  919. * src/smooth/ftgrays.c (FT_INTEGRATE): Write directly.
  920. (gray_TWorker): Add direct cell reference and remove unused fields.
  921. (gray_set_cell): Consolidate the linked list management and pointers.
  922. (gray_convert_glyph, gray_convert_glyph_inner): Updated.
  923. 2021-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  924. * src/smooth/ftgrays.c (FT_INTEGRATE): New convenience macro.
  925. (gray_render_line, gray_render_scanline): Use it.
  926. 2021-03-09 Alexei Podtelezhnikov <apodtele@gmail.com>
  927. * src/smooth/ftgrays.c (gray_render_line): Rearrange conditionals.
  928. These produce faster or more optimizable code.
  929. 2021-03-08 Tim-Philipp Müller <tim@centricular.com>
  930. [meson] Fix 'mmap' handling on Windows.
  931. * meson.build (ft2_sources): Always use `windows/ftsystem.c` on
  932. Windows unless mmap has been disabled.
  933. https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/5#note_829289
  934. 2021-03-07 Tim-Philipp Müller <tim@centricular.com>
  935. [ci] Add basic support for Meson builds with MSVC on Windows.
  936. This adds meson jobs for VS2017 (x86 and x86_64).
  937. * .gitlab-ci.yml: New file.
  938. 2021-03-07 Tim-Philipp Müller <tim@centricular.com>
  939. [meson] Add subproject fallbacks for 'libpng' and 'zlib'.
  940. * subprojects/libpng.wrap, subprojects/zlib.wrap: New files.
  941. * meson.build: Updated.
  942. 2021-03-07 Xavier Claessens <xavier.claessens@collabora.com>
  943. [meson] Make it work with Windows.
  944. * meson.build: Do not process `ftconfig.h` when not using
  945. `ftconfig.h.in`.
  946. Fixes #1029.
  947. 2021-02-25 Werner Lemberg <wl@gnu.org>
  948. [woff2] Fix memory leak.
  949. Reported as
  950. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28148
  951. * src/sfnt/sfwoff2.c (woff2_open_font): Reject fonts that have
  952. multiple tables with the same tag. While not explicitly forbidden
  953. in the OpenType specification, it is implicitly forbidden by
  954. describing a binary search algorithm for tables that only works
  955. reliably if table tags are unique.
  956. 2021-02-22 Werner Lemberg <wl@gnu.org>
  957. * CMakeLists.txt: Update location of `LICENSE.TXT`.
  958. Fixes #1035.
  959. 2021-02-19 Werner Lemberg <wl@gnu.org>
  960. * builds/unix/ax_pthread.m4: Update from 'autoconf-archive'.
  961. A bunch of fixes were added recently to its git repository.
  962. 2021-02-17 Werner Lemberg <wl@gnu.org>
  963. [unix] Updates for autoconf 2.71.
  964. This fixes warnings reported by autoupdate.
  965. * builds/unix/ax_pthread.m4: Replace `as_echo` with `AS_ECHO`.
  966. * builds/unix/configure.raw: Remove obsolete `AC_HEADER_STDC`.
  967. Don't escape back quotes in messages for `AC_MSG_WARN`.
  968. 2021-02-16 Werner Lemberg <wl@gnu.org>
  969. * builds/toplevel.mk: Fix previous commit.
  970. <top_level>: Use `TOP_DIR` in `wildcard` function.
  971. (check_out_submodule, copy_submodule): Move down to come after
  972. definition of `all` rule.
  973. Call `mkdir` conditionally.
  974. 2021-02-16 Werner Lemberg <wl@gnu.org>
  975. * builds/toplevel.mk: Use rules for handling 'dlg'.
  976. Suggested by Alexei.
  977. (check_out_submodule, copy_submodule): New targets.
  978. <top-level>: Replace calls to `shell` with rules.
  979. 2021-02-16 Werner Lemberg <wl@gnu.org>
  980. * builds/toplevel.mk: Avoid side effects of `shell`.
  981. We use a dummy variable to catch its output. Otherwise the `make`
  982. program is going to interpret the return value of `shell`; this can
  983. cause obscure warning or error messages or even be harmful.
  984. 2021-02-16 Werner Lemberg <wl@gnu.org>
  985. Move 'dlg' submodule to `subprojects` directory.
  986. This is for future changes with Meson, which doesn't allow a
  987. different name for its `subprojects` directory. Having both a
  988. `submodules` and a `subprojects` directory is confusing.
  989. * .gitmodules, autogen.sh (copy_submodule_files, DLG_INC_DIR,
  990. DLG_SRC_DIR): Updated.
  991. * builds/toplevel.mk (<top-level>, do-dist),
  992. builds/windows/vc2010/script.bat: Updated.
  993. * src/tools/no-copyright: Updated.
  994. 2021-02-16 Dominik Röttsches <drott@chromium.org>
  995. [sfnt] Update paint format values to support non-variable paints.
  996. * freetype.h (FT_PaintFormat): Update paint format identifiers after
  997. a specification change. The specification was updated to have
  998. sibling formats, variable and non-variable variants for each.
  999. Reflect that here.
  1000. * sfnt/ttcolr.c (read_paint): Remove parsing of variable indices as
  1001. the non-variable formats no longer have them.
  1002. 2021-02-15 Daniel E <daniel.engberg.lists@pyret.net>
  1003. * CMakeLists.txt: Improve 'bz2' support.
  1004. Not all distributions such as FreeBSD provide a `.pc` file for
  1005. '(lib)bz2' so follow autotools and add it to `Libs.private` instead.
  1006. 2021-02-13 Werner Lemberg <wl@gnu.org>
  1007. * src/tools/update-copyright-year: Fix single-year entry handling.
  1008. The fix from 2021-01-17 didn't cover the case where the year to be
  1009. updated is identical to the current year.
  1010. 2021-02-13 Werner Lemberg <wl@gnu.org>
  1011. Add new function `FT_Get_Transform`.
  1012. See
  1013. https://github.com/harfbuzz/harfbuzz/issues/2428
  1014. for some reasons to introduce this function.
  1015. * include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Transform):
  1016. Implement it.
  1017. 2021-02-12 Alexei Podtelezhnikov <apodtele@gmail.com>
  1018. Decorate `qsort` callbacks with `cdecl`.
  1019. * include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
  1020. Add new macro.
  1021. * src/base/ftrfork.c, src/bdf/bdflib.c, src/gxvalid/gxvcommn.c,
  1022. src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c,
  1023. src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update `qsort` callbacks.
  1024. Fixes #1026 when compiling FreeType with an unusual calling
  1025. convention while the C library function `qsort` still expects
  1026. `cdecl`.
  1027. 2021-02-10 Dominik Röttsches <drott@chromium.org>
  1028. [sfnt] Implement 'COLR' v1 sweep gradients.
  1029. * freetype.h (FT_PaintSweepGradient): Add `FT_PaintSweepGradient` to
  1030. represent a 'COLR' v1 sweep gradient.
  1031. Update format.
  1032. (FT_PaintFormat): Update shifted paint formats.
  1033. Sync with spec.
  1034. * sfnt/ttcolr.c (read_paint): Logic to parse sweep gradients.
  1035. Fix struct access in radial gradient implementation.
  1036. 2021-02-09 Dominik Röttsches <drott@chromium.org>
  1037. [sfnt] Provide optional root transform for 'COLR' v1 glyph graph.
  1038. * include/freetype/freetype.h (FT_Get_Color_Glyph_Paint):
  1039. Additional function argument `root_transform` to control whether
  1040. root transform should be returned.
  1041. (FT_OpaquePaint): Additional tracking field to denote whether
  1042. root transform is to be returned.
  1043. * include/freetype/internal/sfnt.h
  1044. (TT_Get_Color_Glyph_Paint_Func): Propagate additional argument.
  1045. * src/base/ftobjs.c (FT_Get_Color_Glyph_Paint): Ditto.
  1046. * src/sfnt/ttcolr.c (tt_face_get_colr_glyph_paint): Return root
  1047. transform reflecting the size and tranform configured on
  1048. `FT_Face`.
  1049. (read_paint): Initialize and track status of insert_root_transform
  1050. flag.
  1051. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1052. * meson.build: s/freetype2_dep/freetype_dep/.
  1053. Many projects (e.g., fontconfig, cairo) hardcode the `freetype_dep`
  1054. variable name to use FreeType as subproject because that was the
  1055. variable name in Centricular's Meson port of FreeType. While they
  1056. should stop hardcoding that variable name, it does not cost us
  1057. anything to keep using that name to ease transition.
  1058. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1059. [meson] Fix handling of HarfBuzz library.
  1060. * meson.build (harfbuzz_dep): Do not fall back to HarfBuzz by
  1061. default.
  1062. Otherwise it causes a dependency cycle:
  1063. cairo => fontconfig => freetype2 => harfbuzz => cairo
  1064. Meson will still fall back to HarfBuzz subprojects if the `harfbuzz`
  1065. option is set to `enabled` instead of `auto` and a
  1066. `subprojects/harfbuzz.wrap` file is present. In that case it is the
  1067. responsibility of the main project to set the proper options on each
  1068. subproject to break the dependency cycle.
  1069. Fixes: #1028.
  1070. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1071. [meson] Fix dependency lookup and generate `ftconfig.h`.
  1072. - zlib: If not found on the system, meson can build it as a
  1073. subproject. We thus never use the (outdated) zlib support that
  1074. comes with FreeType. Doing so has the additional advantage that
  1075. the zlib code can be shared with other projects like GLib if both
  1076. are subprojects of an application.
  1077. - harfbuzz: Build as a subproject if not found on the system.
  1078. - 'QUESTION: What if the compiler doesn't support `-D` but uses `/D`
  1079. instead as on Windows?' Answer: Meson translate arguments for us.
  1080. - visibility: Replace self-made code with meson-specific solution.
  1081. * meson.build (ft2_defines): Rewrite logic to set and handle it.
  1082. (process_header_command): New variable, previously called
  1083. `ftoption_command`.
  1084. (ftoption_command, ftconfig_command): New variables.
  1085. (zlib_option): Removed.
  1086. (zlib_dep): New variable.
  1087. (ft2_deps): Updated.
  1088. (harfbuzz_dep): Updated.
  1089. (ftconfig_h_in, ftconfig_h): New variables.
  1090. (ft2_sources): Updated.
  1091. (ft2_lib): Updated, handle visibility.
  1092. (summary): Updted.
  1093. * meson_options.txt (zlib): Updated.
  1094. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1095. * meson.build: Fix resource compilation on Windows.
  1096. This is copied from GStreamer's meson port of FreeType.
  1097. (ft2_sources): Add both debug and resource file (the latter for
  1098. Windows only).
  1099. (ft2_debug_src): Removed.
  1100. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1101. * meson.build: s/ft2_libtool_version/ft2_pkgconfig_version/.
  1102. (freetype2_dep): Use it.
  1103. `ft2_libtool_version` would be the shared library version, not the
  1104. one we should use in file `freetype2.pc`.
  1105. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1106. * meson.build: Use `meson.override_dependency`.
  1107. This is a new meson mechanism to avoid other projects to hard-code
  1108. the `freetype2_dep` variable name in their build definition. It
  1109. also ensures that meson does not mix system and subproject versions
  1110. of FreeType inside of the same project.
  1111. Also remove outdated TODO because `declare_dependency` was already
  1112. there.
  1113. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1114. * meson.build (bzip2_dep): Simplify.
  1115. We remove `static:false` from `find_library('bz2')`.
  1116. I don't know whether the previous code was a workaround for an old
  1117. meson bug, but at least with version >=0.55.0 (which FreeType uses)
  1118. it picks the shared library when both are available.
  1119. File `freetype2.pc` still contains the full path to file `libbz2.so`
  1120. instead of `-lbz2` – that we need to do this is a meson bug even
  1121. present in the current version (0.57.0).
  1122. 2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
  1123. * meson.build: Set project version.
  1124. 2021-02-04 Werner Lemberg <wl@gnu.org>
  1125. [base] Fix Netpbm tracing message.
  1126. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Don't emit Netpbm
  1127. warning if there is nothing to output.
  1128. 2021-02-04 Werner Lemberg <wl@gnu.org>
  1129. * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
  1130. This ensures good logging output, with all lines having a proper
  1131. prefix (if requested).
  1132. This is a continuation of a similar patch from 2020-12-02, which
  1133. missed some locations.
  1134. 2021-02-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  1135. * builds/unix/configure.raw [mmap]: Restore default path.
  1136. Fixes #1023.
  1137. 2021-02-03 Werner Lemberg <wl@gnu.org>
  1138. [psaux] Fix integer overflow.
  1139. Reported as
  1140. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30154
  1141. * src/psaux/psblues.c (cf2_blues_capture): Use `SUB_INT32`.
  1142. 2021-02-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  1143. * builds/unix/configure.raw [mmap support]: Explicitly handle Windows.
  1144. Fixes #1024.
  1145. 2021-01-31 Werner Lemberg <wl@gnu.org>
  1146. * builds/unix/configure.raw [mmap support]: Correctly handle Windows.
  1147. Fixes #1024.
  1148. 2021-01-31 Werner Lemberg <wl@gnu.org>
  1149. * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
  1150. 2021-01-31 Werner Lemberg <wl@gnu.org>
  1151. Always provide logging API.
  1152. It's easier to have stubs if FT_DEBUG_LOGGING is undefined than to
  1153. modify `ftexport.sym` conditionally.
  1154. Problem reported by Alexei.
  1155. * src/base/ftdebug.c: Include `ftlogging.h`.
  1156. (FT_Trace_Set_Level, FT_Trace_Set_Default_Level, FT_Set_Log_Handler,
  1157. FT_Set_Default_Log_Handler) [!FT_DEBUG_LOGGING]: Provide stubs.
  1158. 2021-01-31 Werner Lemberg <wl@gnu.org>
  1159. * builds/unix/configure.raw: Fix typo.
  1160. Bug introduced in Vincent's last commit bb33f03.
  1161. Fixes issue #1021.
  1162. 2021-01-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  1163. * src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps.
  1164. Fixes bug #1020.
  1165. 2021-01-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  1166. [stroker] Minor clean-up.
  1167. * src/base/ftstroke.c (FT_Stroker_{ConicTo,CubicTo}): Reset the last
  1168. line length.
  1169. (FT_Stroker_EndSubPath): Call `ft_stroker_process_corner'.
  1170. 2021-01-27 Vincent Torri <vincent.torri@gmail.com>
  1171. * builds/windows/ftsystem.c: Add shared memory support on Windows.
  1172. * CMakeLists.txt (BASE_SRCS), builds/unix/configure.raw (FTSYS_SRC),
  1173. builds/windows/vc2010/freetype.vcxproj,
  1174. builds/windows/visualc/freetype.vcproj, meson.build (ft2_sources):
  1175. Add it (conditionally).
  1176. 2021-01-23 Werner Lemberg <wl@gnu.org>
  1177. Require HarfBuzz 2.0.0.
  1178. This is needed to make commit f1f9705f9 work.
  1179. * CMakeLists.txt (HARFBUZZ_MIN_VERSION), builds/unix/configure.raw
  1180. (harfbuzz_pkg), meson.build (harfbuzz_dep): Updated.
  1181. 2021-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  1182. * autogen.sh: Absorb `version.sed'.
  1183. * version.sed: Removed.
  1184. 2021-01-19 Alexei Podtelezhnikov <apodtele@gmail.com>
  1185. * srd/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix return value.
  1186. 2021-01-15 Nikolaus Waxweiler <madigens@gmail.com>
  1187. [afshaper] Fix hb_ot_tags_from_script deprecation warning.
  1188. * autofit/afshaper.c (af_shaper_get_coverage): Copy the source code
  1189. of the function as suggested in
  1190. https://github.com/harfbuzz/harfbuzz/issues/2737 and adjust to handle
  1191. at most three tags.
  1192. 2021-01-17 Werner Lemberg <wl@gnu.org>
  1193. * src/tools/update-copyright-year: Fix single-year entry handling.
  1194. 2021-01-16 Alexei Podtelezhnikov <apodtele@gmail.com>
  1195. * builds/unix/unixddef.mk: Remove the second DEVEL_DIR definition.
  1196. 2021-01-14 Dominik Röttsches <drott@chromium.org>
  1197. [sfnt] Additional checks for 'colr' table presence.
  1198. * sfnt/ttcolr.c (tt_face_get_colr_glyph_paint,
  1199. tt_face_get_colorline_stops, tt_face_get_paint): Additional checks
  1200. for whether colr table is present. Prevents crashes when these
  1201. methods are called on non-COLR fonts.
  1202. 2021-01-13 Dominik Röttsches <drott@chromium.org>
  1203. Add config option to test for 'COLR' v1 support in headers.
  1204. * include/freetype/config/ftoption.h (TT_SUPPORT_COLRV1): New macro
  1205. so that clients can test whether the FreeType checkout that they are
  1206. building against supports the 'COLR' v1 API. This is intended to be
  1207. a temporary solution until 'COLR' v1 support is released in a
  1208. FreeType version and such a check can be made by using the version
  1209. number instead.
  1210. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1211. [base] Fill 'COLR' v1 API templates to make them work (#59703).
  1212. * src/base/ftobjs.c (FT_Get_Color_Glyph_Paint, FT_Get_Paint_Layers,
  1213. FT_Get_Paint, FT_Get_Colorline_Stops): Add basic sanity checks,
  1214. check for existence of `FT_Face`, check arguments and delegate calls
  1215. for the respective 'COLR' v1 API to the SFNT driver.
  1216. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1217. [sfnt] Register 'COLR' v1 API in driver (#59703).
  1218. * include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_Paint_Func,
  1219. TT_Get_Paint_Layers_Func, TT_Get_Colorline_Stops_Func,
  1220. TT_Get_Paint_Func): New function pointer types.
  1221. (SFNT_Interface): Add them.
  1222. (FT_DEFINE_SFNT_INTERFACE): Updated.
  1223. * src/sfnt/sfdriver.c (PUT_COLOR_LAYERS_V1): New macro.
  1224. (sfnt_interface): Add new function pointers.
  1225. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1226. [sfnt] Add 'COLR' v1 API to retrieve color layers (#59703).
  1227. * src/sfnt/ttcolr.c (tt_face_get_paint_layers): New function to get
  1228. the layers of a `PaintColrLayers` table in the font, using an
  1229. `FT_LayerIterator` from an `FT_PaintColrLayers` object retrieved via
  1230. `tt_face_get_paint`.
  1231. * src/sfnt/ttcolr.h: Updated.
  1232. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1233. [sfnt] Add 'COLR' v1 API to iterate color stops (#59703).
  1234. * src/sfnt/ttcolr.c (tt_face_get_colorline_stops): New function to
  1235. return the current `FT_ColorStop` object from `FT_ColorStopIterator`.
  1236. Also increment the iterator.
  1237. * src/sfnt/ttcolr.h: Updated.
  1238. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1239. [sfnt] Add API to get actual paint from `FT_OpaquePaint` (#59703).
  1240. * src/sfnt/ttcolr.c (tt_face_get_paint): New function to resolve an
  1241. `FT_OpaquePaint` paint reference into an `FT_COLR_Paint` object of a
  1242. certain format, which contains the detailed information stored in a
  1243. paint of the respective format.
  1244. (read_paint): New function to provide the format specific parsing
  1245. and to populate the data members of each specific `FT_COLR_Paint`
  1246. subtype.
  1247. (read_color_line): New function to parse retrieved color line
  1248. information into an `FT_ColorLine` object, which has information
  1249. about the color line extend mode as well as an
  1250. `FT_ColorStopIterator` object.
  1251. * src/sfnt/ttcolr.h: Updated.
  1252. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1253. [sfnt] Add API to retrieve 'COLR' v1 root paint (#59703).
  1254. * src/sfnt/ttcolr.c (BaseGlyphV1Record): New structure.
  1255. (tt_face_load_colr): Handle version 1 table header.
  1256. (find_base_glyph_v1_record): New auxiliary function.
  1257. (tt_face_get_colr_glyph_paint): New function to find the root
  1258. `FT_OpaquePaint` object for a given glyph ID.
  1259. * src/sfnt/ttcolr.h: Updated.
  1260. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1261. Add new methods required for 'COLR' v1 to public API (#59703).
  1262. * include/freetype/freetype.h (FT_Get_Color_Glyph_Paint): New method
  1263. for retrieving the root paint object for a color glyph by specifying
  1264. a glyph ID.
  1265. (FT_Get_Paint_Layers): New method for retrieving the layers of a
  1266. `PaintColorGlyph`.
  1267. (FT_Get_ColorLine_Stops): New method for retrieving the stops of a
  1268. color.
  1269. (FT_Get_Paint): New method for resolving an `FT_OpaquePaint` into an
  1270. `FT_COLR_Paint` object.
  1271. 2020-12-16 Dominik Röttsches <drott@chromium.org>
  1272. Add types required for 'COLR' v1 to public API (#59703).
  1273. * include/freetype/freetype.h (FT_PaintFormat, FT_ColorStopIterator,
  1274. FT_ColorIndex, FT_ColorStop, FT_PaintExtend, FT_ColorLine,
  1275. FT_Affine23, FT_CompositeMode, FT_OpaquePaint, FT_PaintColrLayers,
  1276. FT_PaintSolid, FT_PaintLinearGradient, FT_PaintRadialGradient,
  1277. FT_PaintGlyph, FT_PaintColrGlyph, FT_PaintTransformed,
  1278. FT_PaintTranslate, FT_PaintRotate, FT_PaintSkew, FT_PaintComposite,
  1279. FT_COLR_Paint): Adding structs and enum to represent paint format,
  1280. color stop information, gradient extend information, structs to
  1281. reference paint offsets, and to define transforms and compositions.
  1282. Adding a union type to represent the union of the structs,
  1283. distinguished by `FT_PaintFormat`.
  1284. 2021-01-10 Werner Lemberg <wl@gnu.org>
  1285. * builds/*: s/BUILD_DIR/PLATFORM_DIR/.
  1286. The old variable name caused confusion.
  1287. 2021-01-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  1288. [builds] Revert `FTMODULE_H' changes.
  1289. * builds/toplevel.mk, builds/freetype.mk: Revert changes.
  1290. 2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  1291. [builds/windows] Fix up DLG build with VC++.
  1292. * builds/windows/vc2010/script.bat: Copy headers to include/.
  1293. * builds/windows/vc2010/freetype.vcxproj: Remove DLG paths.
  1294. 2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  1295. [builds] Relocate `FTMODULE_H'.
  1296. * builds/toplevel.mk: Place `FTMODULE_H' in include/.
  1297. * builds/freetype.mk: Simplify included path.
  1298. 2021-01-07 Werner Lemberg <wl@gnu.org>
  1299. Fix ABI incompatibility.
  1300. * include/freetype/ftimage.h (FT_Pixel_Mode): Don't insert
  1301. `FT_PIXEL_MODE_GRAY16' but append it.
  1302. * src/base/ftobjs.c (pixel_modes): Updated.
  1303. 2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  1304. [dlg] Move the headers to include/dlg to simplify their use.
  1305. * autogen.sh, builds/toplevel.mk: Copy headers to include/dlg.
  1306. * builds/freetype.mk, builds/windows/vc2010/freetype.vcxproj:
  1307. Simplify included path.
  1308. * include/freetype/internal/ftdebug.h: Simplify #include.
  1309. * src/dlg/rules.mk, .gitignore: Updated.
  1310. 2021-01-06 Werner Lemberg <wl@gnu.org>
  1311. * meson.build: Add summary.
  1312. Based on a patch from Vincent Torri <vincent.torri@gmail.com>.
  1313. 2021-01-06 Torsten Hilbrich <emacs.nolkaf@hilbrich.tk>
  1314. * meson.build: Fix 'png' build option (#59458).
  1315. Without this patch, 'png' is always required.
  1316. 2021-01-04 Alexei Podtelezhnikov <apodtele@gmail.com>
  1317. [builds/windows] Add SDF to VC2010 project.
  1318. * builds/windows/vc2010/freetype.vcxproj: Updated;
  1319. AfterBuild conveniences.
  1320. 2020-12-26 Werner Lemberg <wl@gnu.org>
  1321. [sdf] Use 'counter-clockwise', not 'anti-clockwise'.
  1322. We prefer US nomenclature.
  1323. * src/sdf/ftsdf.c (SDF_Contour_Orientation):
  1324. s/SDF_ORIENTATION-ACW/SDF_ORIENTATION_CCW/.
  1325. Update all users.
  1326. 2020-12-26 Werner Lemberg <wl@gnu.org>
  1327. * src/base/ftobjs.c (pixel_modes): Updated.
  1328. 2020-12-26 Anuj Verma <anujv@iitbhilai.ac.in>
  1329. [sdf] Remove custom memory tracker.
  1330. The internal FreeType memory tracker is sufficient.
  1331. * src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER, SDF_MemoryUser,
  1332. sdf_alloc, sdf_free, SDF_ALLOC, SDF_FREE,
  1333. SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP,
  1334. SDF_MEMORY_TRACKER_DONE): Removed.
  1335. s/SDF_ALLOC/FT_ALLOC/.
  1336. s/SDF_FREE/FT_FREE/.
  1337. Other updates.
  1338. 2020-12-24 Werner Lemberg <wl@gnu.org>
  1339. [sdf] Fix `make multi`.
  1340. * src/sdf/ftsdf.c: Include `ftoutln.h`.
  1341. 2020-12-24 Werner Lemberg <wl@gnu.org>
  1342. [sdf] Fix tracing.
  1343. * include/freetype/internal.fttrace.h: Add 'bsdf' component.
  1344. * src/sdf/ftbsdf.c, src/sdf/ftsdf.c (FT_COMPONENT): Define.
  1345. 2020-08-21 Anuj Verma <anujv@iitbhilai.ac.in>
  1346. [sdf] Add debugging function.
  1347. * src/sdf/ftsdf.c (sdf_shape_dump): New function.
  1348. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1349. [sdf] Add 'bsdf' renderer to 'sdf' module.
  1350. * src/sdf/ftsdfrend.c (ft_bsdf_render): New function.
  1351. (ft_bitmap_sdf_renderer_class): New structure.
  1352. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1353. [sdf] Add interface functions for the 'bsdf' rasterizer.
  1354. * src/sdf/ftsdf.c (bsdf_raster_new, bsdf_raster_reset,
  1355. bsdf_raster_set_mode, bsdf_raster_render, bsdf_raster_done): New
  1356. functions.
  1357. (ft_bitmap_sdf_raster): New variable.
  1358. * src/sdf/ftsdf.h: Updated.
  1359. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1360. [sdf] Add function to copy SDF data into output bitmap.
  1361. * src/sdf/ftbsdf.c (finalize_sdf): New function.
  1362. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1363. [sdf] Add '8-point sequential Euclidean distance mapping' algorithm.
  1364. * src/sdf/ftbsdf.c (compare_neighbor, first_pass, second_pass,
  1365. edt8): New functions.
  1366. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1367. [sdf] Add function to copy source bitmap to distance map.
  1368. * src/sdf/ftbsdf.c (bsdf_init_distance_map): New function.
  1369. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1370. [sdf] Add functions to compute pixel edge distances.
  1371. * src/sdf/ftbsdf.c (compute_edge_distance, bsdf_approximate_edge):
  1372. New functions.
  1373. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1374. [sdf] Add function to find edge pixels in a grid of alpha values.
  1375. * src/sdf/ftbsdf.c (bsdf_is_edge): New function.
  1376. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1377. [sdf] Add essential structures for the 'bsdf' rasterizer.
  1378. * src/sdf/ftbsdf.c (ONE): New macro.
  1379. (BSDF_TRaster, ED, BSDF_Worker): New structures.
  1380. (zero_ed): New constant.
  1381. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1382. [sdf] Add 'sdf' module to non-gnumake build systems.
  1383. * include/freetype/config/ftmodule.h: Add both the 'sdf' and 'bsdf'
  1384. renderers to the list of modules.
  1385. * CMakeLists.txt (BASE_SRCS): Add 'sdf' single-object module.
  1386. 2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
  1387. [sdf] Added basic overlapping contour support.
  1388. * src/sdf/ftsdf.c (sdf_generate_with_overlaps): New function.
  1389. (sdf_raster_render): Enable it.
  1390. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
  1391. [sdf] Add build infrastructure.
  1392. * src/sdf/module.mk, src/sdf/rules.mk: New files.
  1393. * src/sdf/ftsdf.h (ft_sdf_raster): New forward declaration.
  1394. * include/freetype/ftmoderr.h (FT_MODERRDEF): Add error definition
  1395. for the 'sdf' module.
  1396. * include/freetype/internal/fttrace.h (FT_TRACE_DEF): Add trace
  1397. definition for the `sdf' module.
  1398. * modules.cfg (RASTER_MODULES): Add the `sdf' module to the list of
  1399. rasterizers.
  1400. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
  1401. [sdf] Add interface functions for the 'sdf' rasterizer.
  1402. * src/sdf/ftsdf.c (sdf_raster_new, sdf_raster_reset,
  1403. sdf_raster_set_mode, sdf_raster_render, sdf_raster_done): New
  1404. functions.
  1405. (ft_sdf_raster): New structure.
  1406. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
  1407. [sdf] Add subdivision and bounding box optimization.
  1408. * src/sdf/ftsdf.c (sdf_generate_bounding_box): New function, which
  1409. is an optimized version of `sdf_generate`.
  1410. (sdf_generate_subdivision): New function.
  1411. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
  1412. [sdf] Add function to generate SDF.
  1413. * src/sdf/ftsdf.c (sdf_generate): New function, currently disabled.
  1414. This is a proof-of-concept implementation: It doesn't use any
  1415. optimization, it simply checks all grid points against all contours.
  1416. 2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
  1417. [sdf] Add functions to get shortest distance from any edge/contour.
  1418. * src/sdf/ftsdf.c (sdf_edge_get_min_distance): New function.
  1419. (sdf_contour_get_min_distance): New function, currently disabled.
  1420. 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
  1421. [sdf] Add shortest distance finding functions.
  1422. * src/sdf/ftsdf.c (get_min_distance_line, get_min_distance_conic,
  1423. get_min_distance_cubic): New functions. Note that
  1424. `get_min_distance_conic` comes with two implementations (using an
  1425. analytical and an iterative method, to be controlled with the
  1426. `USE_NEWTON_FOR_CONIC` macro).
  1427. 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
  1428. [sdf] Add function to resolve corner distances.
  1429. * src/sdf/ftsdf.c (resolve_corner): New function.
  1430. 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
  1431. [sdf] Add essential math functions.
  1432. * src/sdf/ftsdf.c (cube_root, arc_cos) [!USE_NEWTON_FOR_CONIC]: New
  1433. auxiliary functions.
  1434. * src/sdf/ftsdf.c (solve_quadratic_equation, solve_cubic_equation)
  1435. [!USE_NEWTON_FOR_CONIC]: New functions.
  1436. 2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
  1437. [sdf] Add utility functions for contours.
  1438. * src/sdf/ftsdf.c (get_control_box, get_contour_orientation): New
  1439. functions.
  1440. (split_conic, split_cubic, split_sdf_conic, split_sdf_cubic,
  1441. split_sdf_shape): New functions.
  1442. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
  1443. [sdf] Add functions to decompose `FT_Outline`.
  1444. * src/sdf/ftsdf.c (sdf_move_to, sdf_line_to, sdf_conic_to,
  1445. sdf_cubic_to): New auxiliary decomposition functions.
  1446. (sdf_compose_funcs): New structure.
  1447. (sdf_outline_decompose): New function.
  1448. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
  1449. [sdf] Structs, enums, macros, and functions for 'sdf' rasterizer.
  1450. * src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER)
  1451. [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New macros.
  1452. (SDF_MemoryUser) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New
  1453. struct for memory usage tracing.
  1454. (sdf_alloc, sdf_free) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New
  1455. functions for memory usage tracing.
  1456. (SDF_ALLOC, SDF_FREE): New macros for memory management.
  1457. (SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP,
  1458. SDF_MEMORY_TRACKER_DONE): New macros to set up memory usage tracing.
  1459. (USE_NEWTON_FOR_CONIC, MAX_NEWTON_DIVISIONS, MAX_NEWTON_STEPS,
  1460. CORNER_CHECK_EPSILON, CG_DIMEN): New configuration macros for
  1461. controlling the process of finding the shortest distance.
  1462. (MUL_26D6, VEC_26D6_DOT): New auxiliary macros.
  1463. (SDF_TRaster, SDF_Edge, SDF_Contour, SDF_Shape, SDF_Signed_Distance,
  1464. SDF_Params): New structs for setting up SDF data.
  1465. (SDF_Edge_Type, SDF_Contour_Orientation): New enums for SDF data.
  1466. (zero_vector, null_edge, null_contour, null_shape, max_sdf): Useful
  1467. constants.
  1468. (sdf_edge_new, sdf_edge_done, sdf_contour_new, sdf_contour_done,
  1469. sdf_shape_new, sdf_shape_done): New constructors and destructors.
  1470. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
  1471. [sdf] Add raster parameters structure.
  1472. * src/sdf/ftsdf.h (SDF_Raster_Params): New structure.
  1473. * src/sdf/sdf.c: Include source files in order to make a single
  1474. object of the module.
  1475. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
  1476. [sdf] Add 'sdf' renderer.
  1477. * src/sdf/ftsdf.c: Add 'sdf' renderer along with its interface
  1478. functions.
  1479. Also add functions to set and get properties.
  1480. 2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
  1481. [sdf] Add common elements for 'sdf' and 'bsdf' renderers.
  1482. * src/sdf/ftsdfrend.h (SDF_Rendere_Module, ft_sdf_renderer_class,
  1483. ft_bitmap_sdf_renderer_class): New structures.
  1484. * src/sdf/ftsdfcommon.h (DEFAULT_SPREAD, MIN_SPREAD_MAX_SPREAD,
  1485. USE_SQUARED_DISTANCES): New macros.
  1486. (FT_INT_26D6, FT_INT_16D16, FT_26D6_16D16): New macros.
  1487. (FT_CALL, VECTOR_LENGTH_16D16): New macros.
  1488. (FT_26D6_Vec, FT_16D16_Vec, FT_16D16, FT_26D6, FT_6D10, FT_CBox):
  1489. New typedefs.
  1490. (square_root): New macro.
  1491. * src/sdf/ftsdferrs.h: Add module error setup.
  1492. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
  1493. [sdf] Add files for new 'sdf' module.
  1494. Here is a breakdown of what the files will contain.
  1495. * src/sdf/ftsdfrend.c, src/sdf/ftsdfrend.h: The 'sdf' and 'bsdf'
  1496. renderers.
  1497. * src/sdf/ftsdf.c, src/sdf/ftsdf.h: The rasterizer for the 'sdf'
  1498. renderer.
  1499. * src/sdf/ftbsdf.c, src/sdf/ftbsdf.h: The rasterizer for the 'bsdf'
  1500. renderer.
  1501. * src/sdf/ftsdfcommon.h: Commmon properties and functions for both
  1502. rasterizers.
  1503. * src/sdf/ftsdferrs.h: Common error defines.
  1504. * src/sdf/sdf.c: For building a single object of the entire module.
  1505. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
  1506. [base] Allow renderers of different formats.
  1507. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the
  1508. glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming
  1509. 'bsdf' renderer will require bitmaps for processing.
  1510. * src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove
  1511. renderer's glyph format check before adding and removing them. The
  1512. 'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`.
  1513. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
  1514. Add data types required for the forthcoming 'sdf' module.
  1515. * include/freetype/freetype.h (FT_Render_Mode): Add new render mode
  1516. `FT_RENDER_MODE_SDF`, which will be used to generate SDF.
  1517. * include/freetype/ftimage.h (FT_Pixel_Mode): Add new pixel mode
  1518. `FT_PIXEL_MODE_GRAY16`, which will be the output of the 'sdf'
  1519. module.
  1520. (FT_RASTER_FLAG_SDF): New raster flag to be used internally by the
  1521. 'sdf' module.
  1522. * include/freetype/fttypes.h (FT_F6Dot10): New data type.
  1523. 2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
  1524. [base] Allow renderers of different formats.
  1525. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the
  1526. glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming
  1527. 'bsdf' renderer will require bitmaps for processing.
  1528. * src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove
  1529. renderer's glyph format check before adding and removing them. The
  1530. 'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`.
  1531. 2020-12-23 Werner Lemberg <wl@gnu.org>
  1532. * builds/windows/detect.mk (COPY): Make it work with `shell`.
  1533. Without this patch, we get the error
  1534. builds/toplevel.mk:127: *** missing separator. Stop.
  1535. Reported by Anuj, with a solution from Alexei.
  1536. 2020-12-23 Ignacio Casal Quinteiro <qignacio@amazon.com>
  1537. * meson.build (ft2_defines): Fix builds on Windows.
  1538. 2020-12-18 Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
  1539. [autofit] Fix double division in stem darkening.
  1540. The old code used to divide the darkening amount by em_ratio twice,
  1541. leading to unnecessarily bold stems on certain fonts with higher
  1542. units per em (e.g. Inter). This patch fixes it.
  1543. The return value of af_loader_compute_darkening was also changed to
  1544. use 16.16 fixed point to get rid of a redundant truncation operation.
  1545. This should slightly improve the precision, although it's still
  1546. bottlenecked by the emboldening function, which uses 26.6 fixed point.
  1547. * src/autofit/afloader.[ch]
  1548. (af_loader_compute_darkening): Return FT_Fixed.
  1549. (af_loader_embolden_glyph_in_slot): Revise calculations.
  1550. 2020-12-17 Alexei Podtelezhnikov <apodtele@gmail.com>
  1551. * include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): New public macro.
  1552. The driver name is needed for `FT_Property_Set' and `FT_Property_Get'.
  1553. 2020-12-16 Chris Liddell <chris.liddell@artifex.com>
  1554. [truetype] Fix incremental metrics (#59503).
  1555. * src/truetype/ttgload.c (tt_get_metrics, load_truetype_glyph):
  1556. Previously, the code would populate the phantom points before
  1557. calling the `get_glyph_metrics` callback. For formats like PCL XL
  1558. format 1, class 2 downloaded fonts (where metrics are removed from
  1559. the TTF header), this causes problems when the hinting program uses
  1560. the phantom points (misplaced and distorted glyphs) due to the
  1561. metrics being unset (all zeros).
  1562. (tt_get_metrics_incr_overrides): Renamed to...
  1563. (tt_get_metrics_incremental): ... this. Updated caller
  1564. * include/freetype/ftincrem.h: Update the documentation to make it
  1565. clearer that `get_glyph_metrics` is to retrieve metrics from a
  1566. non-standard source, but *not* for the purpose of imposing custom
  1567. metrics.
  1568. 2020-12-14 Werner Lemberg <wl@gnu.org>
  1569. [type42] Pacify static analysis tools (#59682).
  1570. * src/type42/t42objs.c (T42_Size_Init, T42_GlyphSlot_Init): Avoid
  1571. warnings about uninitialized variables.
  1572. 2020-12-07 Werner Lemberg <wl@gnu.org>
  1573. * builds/unix/configure.raw: Don't set `FT_DEBUG_LOGGING`.
  1574. All debug options are handled exclusively in `ftoption.h`.
  1575. 2020-12-07 Werner Lemberg <wl@gnu.org>
  1576. * src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`.
  1577. 2020-12-07 Werner Lemberg <wl@gnu.org>
  1578. */*: s/FT_LOGGING/FT_DEBUG_LOGGING/.
  1579. 2020-12-05 Werner Lemberg <wl@gnu.org>
  1580. * builds/toplevel.mk (do-dist): Remove `submodules` directory.
  1581. 2020-12-02 Werner Lemberg <wl@gnu.org>
  1582. * src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
  1583. This ensures good logging output, with all lines having a proper
  1584. prefix (if requested).
  1585. 2020-12-02 Werner Lemberg <wl@gnu.org>
  1586. [base] Don't close 'stderr' after logging.
  1587. * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_logging_deinit):
  1588. Fix it.
  1589. 2020-12-02 Werner Lemberg <wl@gnu.org>
  1590. * submodules/dlg: Updated to commit 9f0c8b22.
  1591. 2020-12-02 Werner Lemberg <wl@gnu.org>
  1592. * src/bdf/bdflib.c: Fix `-Wformat` warning.
  1593. 2020-12-02 Werner Lemberg <wl@gnu.org>
  1594. Improve setup for 'dlg' library.
  1595. * autogen.sh (copy_submodule_file), builds/toplevel.mk: Redirect
  1596. stderr to `/dev/null`.
  1597. * builds/toplevel.mk: Move code block to handle 'dlg' stuff into
  1598. `check_platform` conditional.
  1599. Also fix wildcard expressions for guarding `git submodule` commands.
  1600. Also make file copying work with non-Unix platforms (untested).
  1601. 2020-12-01 Werner Lemberg <wl@gnu.org>
  1602. [build] Use gcc (and clang) in C99 mode.
  1603. Other compilers are unchanged.
  1604. * builds/compiler/gcc-dev.mk, builds/compiler/gcc.mk (ANSIFLAGS):
  1605. s/-ansi/-std=c99/.
  1606. * builds/freetype.mk (FT_CFLAGS): Remove `-std=c99`.
  1607. * builds/unix/configure.raw: Handle C99.
  1608. Remove no longer needed test for gcc 4.6 and earlier.
  1609. 2020-12-01 Werner Lemberg <wl@gnu.org>
  1610. [dlg] Fix compiler warnings.
  1611. * src/dlg/dlgwrap.c: Duplicate some feature test macros from
  1612. `dlg.c`, which must come first before loading standard headers. For
  1613. example, `freetype.h` loads `stdio.h` if compiled in debug mode.
  1614. 2020-12-01 Werner Lemberg <wl@gnu.org>
  1615. * src/type42/t42parse.c: Fix `-Wformat` warnings.
  1616. 2020-12-01 Priyesh Kumar <priyeshkkumar@gmail.com>
  1617. [builds/unix] Check for 'pthread' library.
  1618. * builds/unix/ax_pthread.m4: New file, taken from 'autoconf-archive'
  1619. git repository.
  1620. * builds/unix/configure.raw: Check for 'pthread'; also check whether
  1621. it works.
  1622. 2020-12-01 Werner Lemberg <wl@gnu.org>
  1623. [base] Implement vertical alignment of log printing.
  1624. Based on a patch by Priyesh.
  1625. * include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH):
  1626. New macro.
  1627. * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_log_handler):
  1628. Print logs after a fixed width to handle different lengths of
  1629. `FT_COMPONENT` entries.
  1630. Use `ft_strrchr` to check for final newline character.
  1631. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
  1632. Update logging related documentation.
  1633. * docs/DEBUG: Updates related to `FT_LOGGING`.
  1634. * README.git: Updates related to logging.
  1635. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
  1636. * src/*: Fix `-Wformat` warnings.
  1637. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
  1638. [builds/windows] Changes to build 'dlg' with FreeType on Windows.
  1639. We only support Visual C++ 2010 and newer.
  1640. * builds/windows/vc2010/script.bat: New windows batch file to copy
  1641. necessary 'dlg' files from `submodules/dlg` to `src/dlg`. This file
  1642. is used as a pre-built event in Visual C++.
  1643. * builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
  1644. * builds/windows/vc2010/freetype.vcxproj.filters: Add
  1645. `src/dlgwrap.c`.
  1646. * builds/windows/vc2010/freetype.vcxproj
  1647. (AdditionalIncludeDirectories): Add include files of dlg for 'Debug'
  1648. and 'Debug Static' configurations on both 'x64' and 'win32'
  1649. platforms.
  1650. (PreprocessorDefinitions): Add `FT_LOGGING` for 'Debug' and 'Debug
  1651. Static' configurations on both 'x64' and 'win32' platforms.
  1652. Add `DLG_STATIC' for 'Debug' configuration on 'x64' and 'win32'
  1653. platforms.
  1654. (DisableLanguageExtensions): We need to disable the `/Za` option
  1655. when building 'dlg' with FreeType as 'dlg' strictly follows the C99
  1656. standard. Visual C++ produces behaves unexpectedly when
  1657. compiling a C99 file with `/Za` option enabled.
  1658. 2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
  1659. [base] Add public API to change log handling function.
  1660. * include/freetype/ftlogging.h (FT_Custom_Log_Handler): New function
  1661. typedef to store the custom callback logging function.
  1662. (FT_Set_Log_Handler, FT_Set_Default_Log_Handler): New functions to
  1663. set and reset custom log handler.
  1664. * include/freetype/internal/ftdebug.h (custom_output_handler): New
  1665. variable to support a custom callback logging function.
  1666. (FT_Logging_Callback): A new function typedef to print log using
  1667. custom callback logging function, which is set using
  1668. `FT_Set_Log_Handler`.
  1669. (FT_Log): Use it.
  1670. * src/base/ftdebug.c (FT_Set_Log_Handler,
  1671. FT_Set_Default_Log_Handler, FT_Logging_Callback): Add function
  1672. definitions.
  1673. 2020-11-28 Priyesh Kumar <priyeshkkumar@gmail.com>
  1674. [base] Add public API to change the levels of tracing components.
  1675. * include/freetype/ftlogging.h: New header file.
  1676. * include/freetype/internal/ftdebug.h [FT_LOGGING]: Include
  1677. `ftlogging.h`.
  1678. * src/base/ftdebug.c (ft_custom_trace_level): New variable.
  1679. (ft_debug_init): Update to support change of levels of tracing
  1680. components of FreeType at run-time.
  1681. (FT_Trace_Set_Level): New function to change the levels of tracing
  1682. components at run-time.
  1683. (FT_Trace_Set_Default_Level): New function to reset the levels of
  1684. tracing components back to default.
  1685. 2020-11-28 Priyesh Kumar <priyeshkkumar@gmail.com>
  1686. [base] Updates to print timestamp and name of `FT_COMPONENT` in logs.
  1687. * include/freetype/internal/ftdebug.h (FT_LOGGING_TAG,
  1688. FT_LOGGING_TAG_): New macros to resolve the value of `FT_COMPONENT'
  1689. into a string.
  1690. (ft_add_tag, ft_remove_tag): New functions to add and remove dlg tags.
  1691. * src/base/ftdebug.c: Add new variables to control the logging of
  1692. timestamp and name of `FT_COMPONENT` along with actual logs.
  1693. (ft_add_tag, ft_remove_tag): Add function definitions.
  1694. (ft_log_handler): Updates to print timestamp and name of
  1695. `FT_COMPONENT`.
  1696. (ft_debug_init) [FT_LOGGING]: Users can now control the logging of
  1697. timestamp and name of `FT_COMPONENT` by adding tags in the
  1698. `FT2_DEBUG` environment variable.
  1699. 2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com>
  1700. [base] Add functions and variables to print logs to a file.
  1701. * include/freetype/internal/ftdebug.h: Added dlg's header files.
  1702. (FT_LOG): New macro to redirect trace logs to dlg's API's whenever
  1703. `FT_LOGGING' is defined.
  1704. (ft_logging_init, ft_logging_deinit): New functions to handle
  1705. initialization and uninitialization of logging related variables.
  1706. (ft_log_handler): New function to handle logs of FreeType.
  1707. * src/base/ftdebug.c: Add necessary logging related variables.
  1708. (ft_logging_init, ft_logging_deinit, ft_log_handler): Add function
  1709. definitions.
  1710. * src/base/ftinit.c (FT_Init_FreeType) [FT_LOGGING]: Call
  1711. `ft_logging_init`.
  1712. (FT_Done_FreeType) [FT_LOGGING]: Call `ft_logging_deinit`.
  1713. * src/base/ftobjs.c (FT_New_Library): Call `ft_debug_init` only if
  1714. `FT_LOGGING` is not defined.
  1715. 2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com>
  1716. [builds] Necessary changes to make 'dlg' compile.
  1717. * autogen.sh (copy_submodule_files): New script to copy all the
  1718. necessary source and include files from `submodules/dlg` to
  1719. `src/dlg`.
  1720. * src/dlg/dlgwrap.c: New wrapper file for `src/dlg.c`. It enables
  1721. the build of 'dlg' if the `FT_LOGGING` macro is defined.
  1722. * src/dlg/rules.mk: New sub-Makefile.
  1723. * builds/freetype.mk (DLG_DIR): New variable to include the
  1724. header files of the 'dlg' library.
  1725. (INCLUDES): Add `DLG_DIR`.
  1726. (FT_CFLAGS): Add `-std=c99' flag.
  1727. Include `src/dlg/rules.mk` file to build 'dlg' library.
  1728. (OBJ_S, OBJ_M): Add `DLG_OBJS_M` and `DLG_OBJS_S`.
  1729. * builds/toplevel.mk: For builds directly from the git repository
  1730. we need to copy files from `submodule/dlg` to `src/dlg`.
  1731. * include/freetype/config/ftoption.h, devel/ftoption.h (FT_LOGGING):
  1732. New macro to enable or disable the logging facility in FreeType.
  1733. 2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com>
  1734. * .gitmodules: Add 'dlg' library's git repository as submodule.
  1735. 2020-12-01 Werner Lemberg <wl@gnu.org>
  1736. * src/tools/chktrcmp.py (trace_use_pat): Update to current use.
  1737. 2020-11-20 Alexei Podtelezhnikov <apodtele@gmail.com>
  1738. [cff,cid,type1] Demote old engine for lack of CFF2.
  1739. * src/cff/cffobjs.c (cff_driver_init): Always default to Adobe engine.
  1740. * src/cid/cidobjs.c (cid_driver_init): Ditto.
  1741. * src/type1/t1objs.c (T1_Driver_Init): Ditto.
  1742. 2020-11-09 Werner Lemberg <wl@gnu.org>
  1743. * src/type42/t42parse.c (t42_parse_sfnts): More tracing messages.
  1744. 2020-11-04 Werner Lemberg <wl@gnu.org>
  1745. * meson.build: Fix .pc file generation.
  1746. For backwards compatibility we need the libtool version, not the .so
  1747. number.
  1748. Reported by Nikolaus.
  1749. 2020-10-28 Werner Lemberg <wl@gnu.org>
  1750. [truetype] Minor update to forthcoming OpenType 1.8.4 standard.
  1751. * src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Limit
  1752. size of `regionCount`.
  1753. 2020-10-26 Werner Lemberg <wl@gnu.org>
  1754. * meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347).
  1755. Without this patch, 'harfbuzz' and 'brotli' are always required.
  1756. Patch submitted anonymously in Savannah bug report.
  1757. 2020-10-23 Ben Wagner <bungeman@google.com>
  1758. * src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak (#59322).
  1759. The issue is that `rows` is allocated but will not be freed in the
  1760. event that the call to `png_read_image` fails and calls `longjmp`.
  1761. 2020-10-20 Werner Lemberg <wl@gnu.org>
  1762. * Version 2.10.4 released.
  1763. ==========================
  1764. Tag sources with `VER-2-10-4'.
  1765. * docs/VERSION.TXT: Add entry for version 2.10.4.
  1766. * docs/CHANGES: Updated.
  1767. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  1768. builds/windows/visualc/index.html,
  1769. builds/windows/visualce/index.html,
  1770. builds/wince/vc2005-ce/index.html,
  1771. builds/wince/vc2008-ce/index.html, docs/freetype-config.1:
  1772. s/2.10.3/2.10.4/, s/2103/2104/.
  1773. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
  1774. * builds/unix/configure.raw (version_info): Set to 23:4:17.
  1775. * CMakeLists.txt (VERSION_PATCH): Set to 4.
  1776. 2020-10-19 Werner Lemberg <wl@gnu.org>
  1777. [sfnt] Fix heap buffer overflow (#59308).
  1778. This is CVE-2020-15999.
  1779. * src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier.
  1780. 2020-10-17 Alexei Podtelezhnikov <apodtele@gmail.com>
  1781. * src/sfnt/tt{colr,cpal}.c: Fix signedness warnings from VC++.
  1782. 2020-10-17 Alexei Podtelezhnikov <apodtele@gmail.com>
  1783. * src/sfnt/sfwoff2.c (Read255UShort): Tweak types to please VC++.
  1784. 2020-10-10 Werner Lemberg <wl@gnu.org>
  1785. * Version 2.10.3 released.
  1786. ==========================
  1787. Tag sources with `VER-2-10-3'.
  1788. * docs/VERSION.TXT: Add entry for version 2.10.3.
  1789. * README, src/base/ftver.rc, builds/windows/vc2010/index.html,
  1790. builds/windows/visualc/index.html,
  1791. builds/windows/visualce/index.html,
  1792. builds/wince/vc2005-ce/index.html,
  1793. builds/wince/vc2008-ce/index.html, docs/freetype-config.1:
  1794. s/2.10.2/2.10.3/, s/2102/2103/.
  1795. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 3.
  1796. * builds/unix/configure.raw (version_info): Set to 23:3:17.
  1797. * CMakeLists.txt (VERSION_PATCH): Set to 3.
  1798. 2020-09-25 Werner Lemberg <wl@gnu.org>
  1799. [autofit] Synchronize with ttfautohint.
  1800. This corresponds to the following commits in the ttfautohint git
  1801. repository:
  1802. bb6842bd3bd437b7b4a7921b0376c860f5e73d18 Typo, formatting.
  1803. d5c91ddb1cb310257a3dfe9a8e20e1fc51335faa Add Medefaidrin script.
  1804. * src/autofit/afblue.dat: Add blue zone data for Medefaidrin.
  1805. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
  1806. * src/autofit/afscript.h: Add Medefaidrin standard characters.
  1807. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Medefaidrin
  1808. data.
  1809. 2020-09-25 Werner Lemberg <wl@gnu.org>
  1810. Move `scripts/make_distribution_archives.py` to `src/tools`.
  1811. * scr/tools/scripts/make_distribution_archives.py: (_TOP_DIR,
  1812. _SCRIPT_DIR): Updated to new location.
  1813. (main): s/shutils.copyfile/shutils.copy/ to preserve file
  1814. permissions.
  1815. (main): Prefix source file paths with `git_dir` while copying files
  1816. to allow calls of the script from other places than the top-level
  1817. directory.
  1818. 2020-09-24 Werner Lemberg <wl@gnu.org>
  1819. * src/cff/cffgload.c (cff_slot_load): Scale `vertBearingY`.
  1820. Towards the end of the the function there is a call to
  1821. `FT_Outline_Get_CBox` that retrieves the glyph bbox in scaled units.
  1822. That sets `horiBearing{X,Y}` and `vertBearingX` but `vertBearingY`
  1823. is left alone, and is not scaled.
  1824. Patch from Eric Muller <emuller@amazon.com>.
  1825. 2020-09-24 Werner Lemberg <wl@gnu.org>
  1826. * src/base/ftobjs.c (FT_Load_Glyph): Trace glyph metrics.
  1827. 2020-09-22 Werner Lemberg <wl@gnu.org>
  1828. [meson] Move auxiliary scripts to `builds/meson`.
  1829. Suggested by Alexei.
  1830. * scripts/*.py: Move meson scripts to...
  1831. * builds/meson/*.py: ... this new location.
  1832. * meson.build: Updated.
  1833. 2020-09-21 David Turner <david@freetype.org>
  1834. Add python script for building tarballs.
  1835. * scripts/make_distribution_archives.py: New file.
  1836. This standalone Python script should be equivalent to running `make
  1837. dist` with the Make-based build system, with the following minor
  1838. differences:
  1839. - Since `make distclean` doesn't always clean up `objs/` properly,
  1840. `make dist` archives may contain some stale binaries like
  1841. `objs/.libs/libfreetype.so.6` or others.
  1842. - `config.guess` and `config.sub` are not updated unless option
  1843. `--gnu-config-dir=DIR` is used to specify the location of these
  1844. files.
  1845. - Some bits of the auto-generated reference documentation may
  1846. appear in slightly different order, probably due to issues related
  1847. to mkdocs and docwriter.
  1848. As an example, the call
  1849. scripts/make_distribution_archives.py /tmp/freetype2-dist
  1850. creates the following files under `/tmp/freetype2-dist`:
  1851. freetype-<version>.tar.gz
  1852. freetype-<version>.tar.xz
  1853. ft<winversion>.zip
  1854. 2020-09-21 Werner Lemberg <wl@gnu.org>
  1855. * scripts/extract_freetype_version.py: Fix regex typos.
  1856. 2020-09-21 David Turner <david@freetype.org>
  1857. Add Meson build project file.
  1858. Example usage:
  1859. # Configure Meson build in directory `build-meson` to generate
  1860. # release binaries comparable to to the ones from the
  1861. # autotools/make build system.
  1862. meson setup build-meson \
  1863. --prefix=/usr/local \
  1864. --buildtype=debugoptimized \
  1865. --strip \
  1866. -Db_ndebug=true
  1867. # After configuring the Meson build with the above command,
  1868. # compile and install to `/usr/local/`; this includes a pkg-config
  1869. # file.
  1870. ninja -C build-meson install
  1871. # Alternatively, compile and install to `/tmp/aa/usr/local/...`
  1872. # for packaging.
  1873. DESTDIR=/tmp/aa ninja -C build-meson install
  1874. # Generate documentation under `build-meson/docs`.
  1875. ninja -C build-meson docs
  1876. Library size comparison for stripped `libfreetype.so` generated by
  1877. all three build systems:
  1878. - Default build (autotools + libtool): 712 KiB
  1879. - CMake build (RelWithDebInfo): 712 KiB
  1880. - Meson build: 712 KiB
  1881. * meson.build: New top-level Meson build file for the library.
  1882. * meson_options.txt: New file. It holds user-selectable options for
  1883. the build, which can be printed with `meson configure`, and selected
  1884. at `meson setup` or `meson --reconfigure` time with
  1885. `-D<option>=<value>`.
  1886. * scripts/parse_modules_cfg.py: A script invoked by `meson.build` to
  1887. parse `modules.cfg` and extract important information out of it
  1888. (i.e., the list of modules).
  1889. * scripts/process_ftoption_h.py: New script invoked by `meson.build`
  1890. to process the original `ftoption.h` file. It enables or disables
  1891. configuration macro variables based on the available dependencies.
  1892. This is similar to what other build systems are using (i.e., Meson's
  1893. `configure_file()` command is not used here).
  1894. * scripts/extract_freetype_version.py: New script invoked by
  1895. `meson.build` to extract the FreeType version number from
  1896. `<freetype/freetype.h>`.
  1897. * scripts/extract_libtool_version.py: New script invoked by
  1898. `meson.build` to extract the libtool `revision_info` data from
  1899. `builds/unix/configure.raw`, and to generate the corresponding
  1900. shared library suffix.
  1901. * scripts/generate_reference_docs.py: New script invoked by
  1902. `meson.build` to generate the FreeType 2 reference documentation
  1903. (using the `docwriter` and `mkdocs` packages, which must be already
  1904. installed).
  1905. 2020-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  1906. [raster] Improve the second pass (#58373).
  1907. Besides dropout control the second horizontal sweep is supposed to
  1908. clean up straight horizontal edges that are mishandled by the first
  1909. vertical sweep when a line passes through pixel centers. This line
  1910. would present as perfectly aligned span edges in the second sweep.
  1911. * src/raster/ftraster.c (Horizontal_Sweep_Span): Replace the old
  1912. implementation with a better one focusing on aligned span edges only.
  1913. 2020-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  1914. [raster] Tune SMART macro (#58352).
  1915. Windows seems to perform smart dropout control at 26.6 precision.
  1916. To mimick Windows independent of increased precision, we need to tweak
  1917. the macro so that some close calls break down rather than up.
  1918. * src/raster/ftraster.c (SMART): Tweak the macro.
  1919. 2020-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  1920. [raster] Introduce SMART macro.
  1921. * src/raster/ftraster.c (SMART): New macro for smart dropout rounding.
  1922. (Verstical_Sweep_Drop, Horizontal_Sweep_Drop): Use it.
  1923. 2020-09-03 Boris Dalstein <dalboris@gmail.com>
  1924. [build] Make CMake install basic version information.
  1925. * CMakeLists.txt: Do it.
  1926. 2020-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  1927. [truetype] Reduce Infinality footprint (cont'd).
  1928. * src/truetype/ttinterp.c (Ins_DELTAP): Shrink variable scope.
  1929. (Ins_SHPIX, Ins_MIRP): Revise if-logic.
  1930. 2020-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  1931. [truetype] Reduce Infinality footprint.
  1932. * src/truetype/ttinterp.c (Ins_SHPIX, Ins_MSIRP, Ins_MIAP, Ins_MDRP,
  1933. Ins_MIRP): Shrink variable scopes and consolidate ifdefs.
  1934. 2020-09-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  1935. [truetype] Refactor compensation color.
  1936. * src/truetype/ttinterp.h (TT_Round_Func): Change the last argument.
  1937. * src/truetype/ttinterp.c (Ins_ROUND, Ins_NROUND, Ins_MDAP, Ins_MIAP,
  1938. Ins_MDRP, Ins_MIRP): Move compensation retrieval from here...
  1939. (Round_*): ... to here.
  1940. * src/truetype/ttobjs.c (tt_size_init_bytecode): Reserve zero
  1941. compensation at color index 3.
  1942. 2020-08-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  1943. [smooth] Don't set target in direct mode.
  1944. * src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Remove assignment.
  1945. (ft_smooth_raster_lcd) [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Ditto.
  1946. 2020-08-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  1947. * src/smooth/ftsmooth.c (ft_smooth_raster_overlap): Limit width.
  1948. Segmentation fault reported as
  1949. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24729
  1950. 2020-08-22 Werner Lemberg <wl@gnu.org>
  1951. * src/truetype/ttgload.c (TT_Get_VMetrics): Add tracing message.
  1952. 2020-08-05 Alexei Podtelezhnikov <apodtele@gmail.com>
  1953. [truetype] Retain OVERLAP_SIMPLE and OVERLAP_COMPOUND.
  1954. For glyphs with OVERLAP_SIMPLE or OVERLAP_COMPOUND, set
  1955. FT_OUTLINE_OVERLAP to render them with direct oversampling, which
  1956. mitigates artifacts (see 3bb512bc9f62).
  1957. * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): Redefine to rhyme
  1958. with OVERLAP_SIMPLE.
  1959. * src/base/ftgloadr.c (FT_GlyphLoader_Rewind): Reset outline flags.
  1960. * src/truetype/ttgload.c
  1961. (TT_Load_Simple_Glyph): Retain OVERLAP_SIMPLE.
  1962. (load_truetype_glyph): Retain OVERLAP_COMPOUND.
  1963. 2020-08-04 Alexei Podtelezhnikov <apodtele@gmail.com>
  1964. * src/truetype/ttgload.c (TT_Load_Glyph): More tracing.
  1965. 2020-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  1966. Hide internal functions with SunPro.
  1967. * include/freetype/internal/compiler-macros.h
  1968. (FT_INTERNAL_FUNCTION_ATTRIBUTE) <__SUNPRO_C>: Define as __hidden.
  1969. 2020-07-28 Anuj Verma <anujv@iitbhilai.ac.in>
  1970. Fix static compilation with Visual C.
  1971. * include/freetype/internal/compiler-macros.h
  1972. (FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty.
  1973. 2020-07-28 Priyesh Kumar <priyeshkkumar@gmail.com>
  1974. Fix `-Wformat' compiler warnings.
  1975. * src/*: Fix format specifiers.
  1976. * builds/unix/ftsystem.c (FT_Stream_Open): Ditto.
  1977. 2020-07-25 Werner Lemberg <wl@gnu.org>
  1978. Fix `-Wformat' compiler warnings.
  1979. Problem reported by Priyesh kumar <priyeshkkumar@gmail.com>
  1980. * src/base/ftoutln.c (FT_Outline_Decompose): Fix number of arguments
  1981. to tracing macro.
  1982. * src/bdf/bdfdrivr.c (bdf_cmap_char_next, bdf_get_bdf_property):
  1983. Ditto.
  1984. * src/cache/ftcbasic.c (ftc_basic_family_get_count): Ditto.
  1985. Reformulate message.
  1986. * src/pcf/pcfdrivr.c (pcf_get_bdf_property): Ditto.
  1987. * src/sfnt/sfwoff2.c (woff2_open_font): Ditto.
  1988. Trace table offset, too.
  1989. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Ditto.
  1990. 2020-07-23 Werner Lemberg <wl@gnu.org>
  1991. * src/sfnt/sfwoff2.c (woff2_decompress): Fix compiler warning.
  1992. Reported by Hin-Tak.
  1993. 2020-07-12 Werner Lemberg <wl@gnu.org>
  1994. * builds/unix/configure.raw: Fix inclusion of `ftoption.h'.
  1995. 2020-07-07 Werner Lemberg <wl@gnu.org>
  1996. Fix clang warnings.
  1997. * include/freetype/internal/autohint.h
  1998. (FT_DECLARE_AUTOHINTER_INTERFACE): New macro.
  1999. * src/autofit/afmodule.h: Use it to declare
  2000. `af_autofitter_interface'.
  2001. * include/freetype/internal/ftobjs.h (FT_DECLARE_GLYPH): New macro.
  2002. * src/base/ftbase.h: Use it to declare `ft_bitmap_glyph_class' and
  2003. `ft_outline_glyph_class'.
  2004. * src/base/ftglyph.c: Include `ftbase.h'.
  2005. * src/cff/cffparse.c (cff_parser_run): Fix type of `t2_size'.
  2006. * src/pcf/pcfdrivr.c (pcf_cmap_char_next): Fix type of `result'.
  2007. * src/psaux/psauxmod.c (psaux_module_class): Use `FT_DEFINE_MODULE'.
  2008. * src/psaux/psauxmod.h: Declare `afm_parser_funcs',
  2009. `t1_cmap_classes', `cff_decoder_funcs', and `psaux_module_class'.
  2010. * src/pshinter/pshmod.c: Include `pshmod.h'.
  2011. * src/sfnt/sfwoff2.c (ROUND4, WRITE_SHORT): Fix implicit sign
  2012. conversion.
  2013. (compute_ULong_sum): Fix return type.
  2014. Fix implicit sign conversion.
  2015. (store_points): Fix type of `last_flag', `repeat_count', and `flag'.
  2016. Use casts to avoid warnings.
  2017. (reconstruct_glyf): Fix implicit sign conversion.
  2018. Use cast to avoid warning.
  2019. (get_x_mins): Fix implicit sign conversion.
  2020. * src/sfnt/ttcmap.c: Undef `TTCMAPCITEM'.
  2021. * src/sfnt/ttcmap.h: Define `TTCMAPCITEM' and include `ttcmapc.h' to
  2022. declare cmap classes.
  2023. * src/smooth/ftsmooth.c (ft_smooth_overlap_spans): Use cast.
  2024. * src/truetype/ttinterp.c (Ins_MIAP): Fix typo.
  2025. 2020-07-07 David Turner <david@freetype.org>
  2026. [build] Really fix multi and C++ builds.
  2027. The following builds were still failing due to previous changes:
  2028. make multi
  2029. make multi CC="c++"
  2030. make CC="c++"
  2031. This patch fixes the issues, which were missing includes to get the
  2032. right macro definitions in multi-build mode.
  2033. Also, `FT_UNUSED' is actually used by third-party code, so move it
  2034. back to `public-macros.h' to avoid breaking it.
  2035. * include/freetype/config/public-macros.h (FT_EXPORT): Remove
  2036. special definition for C++.
  2037. (FT_UNUSED): Define here instead of...
  2038. * include/freetype/config/compiler-macros.h: ... here.
  2039. (FT_FUNCTION_DECLARATION): Remove special definition for C++.
  2040. (FT_LOCAL_ARRAY_DEF): Fix definition.
  2041. * src/cache/ftccback.h, src/lzw/ftzopen.h, src/gxvalid/gxvmort.h,
  2042. src/gxvalid/gxvmorx.h: Add `FT_BEGIN_HEADER' and `FT_END_HEADER'.
  2043. 2020-07-06 David Turner <david@freetype.org>
  2044. [build] Fix multi and C++ builds.
  2045. The following builds were failing due to previous changes:
  2046. make multi
  2047. make multi CC="c++"
  2048. * include/freetype/config/ftconfig.h: Remove `FT_END_HEADER'.
  2049. * include/freetype/config/ftheader.h (FT_BEGIN_HEADER,
  2050. FT_END_HEADER): Protect against redefinition.
  2051. * src/cache/ftccache.h, src/cache/ftcmru.h, src/pcf/pcfutil.h,
  2052. src/psaux/pserror.h, src/psaux/psft.h, src/psaux/psstack.h,
  2053. src/sfnt/woff2tags.h: Include `compiler-macros.h'.
  2054. * src/sfnt/woff2tags.c: Include `woff2tags.h'.
  2055. 2020-07-06 Werner Lemberg <wl@gnu.org>
  2056. [psaux] Improve `t1_decoder_parse_metrics' (#58646).
  2057. * src/psaux/t1decode.c (t1_decoder_parse_metrics): Copy
  2058. corresponding code from old engine's `t1_decoder_parse_charstrings'
  2059. function to handle `op_callsubr' and `op_return'.
  2060. 2020-07-05 David Turner <david@freetype.org>
  2061. [build] Improve visibility support of library function names.
  2062. * include/freetype/config/public-macros.h
  2063. (FT_PUBLIC_FUNCTION_ATTRIBUTE): New macro to tag functions as
  2064. public (and thus exportable).
  2065. (FT_EXPORT): Use it.
  2066. * include/freetype/config/compiler-macros.h
  2067. (FT_INTERNAL_FUNCTION_ATTRIBUTE): New macro to tag functions as
  2068. internal to the library (and thus hidden). Note that on ELF
  2069. systems, all internal functions have hidden visibility, which avoids
  2070. the need to enforce this when invoking the compiler (e.g., with an
  2071. option like `-fvisibility=hidden').
  2072. (FT_FUNCTION_DECLARATION, FT_FUNCTION_DEFINITION): New base macros
  2073. to deal with C and C++ linkage issues at the same time.
  2074. (FT_LOCAL, FT_LOCAL_DEF, FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF,
  2075. FT_BASE, FT_BASE_DEF, FT_EXPORT_VAR, FT_BASE_CALLBACK,
  2076. FT_BASE_CALLBACK_DEF): Redefined using new macros.
  2077. 2020-07-05 David Turner <david@freetype.org>
  2078. [build] Split off more stuff from `ftconfig.h'.
  2079. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
  2080. include/freetype/config/ftconfig.h: Split off macro definitions
  2081. required by the FreeType API headers to...
  2082. * include/freetype/config/public-macros.h: ...this new file.
  2083. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
  2084. include/freetype/config/ftconfig.h: Split off macro definitions used
  2085. by the library but not to be exposed to clients to...
  2086. * include/freetype/config/compiler-macros.h: ...this new file.
  2087. * include/freetype/internal/*.h, src/raster/ftraster.h: Include
  2088. `compiler-macros.h' where needed.
  2089. 2020-07-05 David Turner <david@freetype.org>
  2090. [build] Move mac support code to `mac-support.h'.
  2091. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
  2092. include/freetype/config/ftconfig.h: Split off mac-specific stuff
  2093. to...
  2094. * include/freetype/config/mac-support.h: ...this new file.
  2095. * CMakeLists.txt, builds/unix/configure.raw: Remove `/undef ->
  2096. #undef' string replacement; the affected code is no longer part of
  2097. the `ftconfig.h' template.
  2098. 2020-07-05 David Turner <david@freetype.org>
  2099. [build] Put integer type definitions into `integer-types.h'.
  2100. Refactor some of the `ftconfig.h' headers and template to move the
  2101. definition of the FreeType integer types (e.g., `FT_Int16') to a
  2102. common header file `freetype/config/integer-types.h'.
  2103. * builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
  2104. include/freetype/config/ftconfig.h: Split off integer type
  2105. definition stuff to...
  2106. * include/freetype/config/integer-types.h: ...this new file.
  2107. * builds/unix/ftconfig.h.in: Control the definition of
  2108. `FT_SIZEOF_INT' and `FT_SIZEOF_LONG' with macro
  2109. `FT_USE_AUTOCONF_SIZEOF_TYPES'. If these are not defined, auto
  2110. detection happens in `integer-types.h' as usual based on `INTXX_MAX'
  2111. values. Otherwise the autoconf-detected values are used.
  2112. * builds/unix/configure.raw (CPPFLAGS): Don't include path to
  2113. `config' directory. Instead, ...
  2114. (FT_CONFIG_STANDARD_LIBRARY_H): Use complete path.
  2115. 2020-07-05 David Turner <david@freetype.org>
  2116. [build] Rename `build/unix/ftconfig.in' to `ftconfig.h.in'.
  2117. Since we are no longer limited to 8.3 file names, it is simpler to
  2118. follow the usual conventions for template files.
  2119. * builds/unix/ftconfig.in: Renamed to...
  2120. * builds/unix/ftconfig.h.in: ...this.
  2121. * CMakeLists.txt, builds/unix/configure.raw: Updated.
  2122. 2020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  2123. [smooth] Introduce direct oversampling for overlaps.
  2124. This implements oversampling to mitigate artifacts in pixels partially
  2125. covered by overlapping contours. It turns out that the 4x4
  2126. oversampling is sufficient but, at least, quadruples the rendering
  2127. time. The outline has to set FT_OUTLINE_OVERLAP to use this method.
  2128. * include/freetype/ftimage.h (FT_OUTLINE_OVERLAP): New flag.
  2129. * src/smooth/ftsmooth.c (ft_smooth_render): Check it to...
  2130. (ft_smooth_raster_overlap): ... inflate outline and set up direct
  2131. rendering for oversampling with...
  2132. (ft_smooth_overlap_spans): ... new span function that integrates them.
  2133. 2020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  2134. [smooth] Use direct rendering mode in Harmony.
  2135. Instead of rendering 3 bitmaps side by side and reshuffling, we use
  2136. direct rendering to deliver the bitmaps on each third byte.
  2137. * src/smooth/ftsmooth.c (ft_smooth_raster_lcd)
  2138. [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Set up direct mode with...
  2139. (ft_smooth_lcd_spans): ... new span function.
  2140. 2020-07-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  2141. [smooth] Separate LCD paths from gray rendering.
  2142. This makes `ft_smooth_render' a lot smaller and easier to follow. It
  2143. also cleanly separates Harmony and ClearType-style LCD rendering
  2144. algorithms. Now I only wish to move LCD filtering and geometry from
  2145. FT_Library to FT_Renderer.
  2146. * src/smooth/ftsmooth.c (ft_smooth_render): Move LCD code from here...
  2147. (ft_smooth_raster_lcd, ft_smooth_raster_lcdv): ... to here.
  2148. [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Reorganize #ifdef's.
  2149. 2020-06-20 Sebastian Rasmussen <sebras@gmail.com>
  2150. [cff] Fix handling of `style_name == NULL' (#58630).
  2151. * src/cff/cffobjs.c (cff_face_init): If a call to `cff_strcpy' fails
  2152. by returning NULL in `cff_face_init', `remove_style' is still
  2153. called. This means that the NULL pointer is dereferenced, causing a
  2154. crash.
  2155. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
  2156. [cff] Fix another two memory leaks (#58629).
  2157. * src/cff/cffobjs.c (cff_size_init): If a call to `funcs->create'
  2158. fails to allocate one of the `internal->subfont' variables, make
  2159. sure to free `internal->topfont' and any successfully allocated
  2160. subfonts.
  2161. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
  2162. [psaux] Fix memory leak (#58626).
  2163. * src/psaux/psstack.c (cf2_stack_init): If `cf2_stack_init' fails to
  2164. allocate the stack, return error early.
  2165. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
  2166. [base] Fix memory leak (#58624).
  2167. * src/base/ftobjs.c (FT_New_Size): Avoid trying to free
  2168. `size->internal' unless `size' has been allocated. This mistake
  2169. appeared in the fix for issue #58611.
  2170. 2020-06-19 Alexei Podtelezhnikov <apodtele@gmail.com>
  2171. [base] Rework d1180b5f9598 until further notice.
  2172. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Reject large
  2173. outlines.
  2174. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
  2175. [cff, cid] Fix segfaults in case of error (#58621).
  2176. * src/cff/cffobjs.c (cff_slot_done), src/cid/cidobjs.c
  2177. (cid_slot_done): If `ft_glyphslot_init' fails to allocate
  2178. `internal', then the class' `done_slot' callback (called by
  2179. `ft_glyphslot_done') must not dereference the pointer to `internal'.
  2180. 2020-06-19 Werner Lemberg <wl@gnu.org>
  2181. [base] Fix UBSAN error.
  2182. Reported as
  2183. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23166
  2184. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Avoid values
  2185. larger than 32 bits.
  2186. 2020-06-19 Werner Lemberg <wl@gnu.org>
  2187. [woff2] Fix segfault.
  2188. Reported as
  2189. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23402
  2190. * src/sfnt/sfwoff2.c (get_x_mins): Check whether `loca' table
  2191. exists.
  2192. 2020-06-19 Stephen McDowell <svenevs.dev@gmail.com>
  2193. [sfnt] Support Intel compilers.
  2194. * src/sfnt/pngshim.c (premultiply_data): Intel compilers do not
  2195. currently support `__builtin_shuffle'.
  2196. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
  2197. [base] Fix memory leak (#58611).
  2198. * src/base/ftobjs.c (FT_New_Size): When the call to `clazz->init_size'
  2199. fails, make sure to free `size->internal'.
  2200. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
  2201. [cff] Fix memory leak (#58610).
  2202. * src/cff/cffobjs.c (cff_size_init): When the call to
  2203. `funcs->create' fails, make sure to free `internal'.
  2204. 2020-06-19 Werner Lemberg <wl@gnu.org>
  2205. * src/cff/cffload.c (cff_index_get_pointers): Rename `t' to `tbl'.
  2206. 2020-06-19 Sebastian Rasmussen <sebras@gmail.com>
  2207. [cff] Free table upon error allocating other data (#58609).
  2208. * src/cff/cffload.c (cff_index_get_pointers): When new_bytes fails
  2209. to allocate, make sure to free the table. Do the same for both
  2210. allocations if there is a later error.
  2211. 2020-06-13 Werner Lemberg <wl@gnu.org>
  2212. Remove redundant inclusion of `ft2build.h'.
  2213. * */*: Remove `#include <ft2build.h>' where possible.
  2214. * include/freetype/freetype.h: Remove cpp error about missing
  2215. inclusion of `ft2build.h'.
  2216. 2020-06-08 David Turner <david@freetype.org>
  2217. Make macros for header file names optional.
  2218. We no longer have to take care of the 8.3 file name limit; this
  2219. allows us (a) to introduce longer, meaningful file names, and (b) to
  2220. avoid macro names in `#include' lines altogether since some
  2221. compilers (most notably Visual C++) doesn't support this properly.
  2222. */*: Replace
  2223. #include FOO_H
  2224. with
  2225. #include <freetype/foo.h>
  2226. or something similar. Also update the documentation.
  2227. 2020-06-02 Werner Lemberg <wl@gnu.org>
  2228. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Trace number of cmaps.
  2229. 2020-05-18 David Turner <david@freetype.org>
  2230. Remove obsolete HAVE_STDINT_H probing macro.
  2231. This macro was updated by the unix configure script and the
  2232. `CMakeLists.txt' one, but is never used in the source tree (nor is
  2233. <stdint.h> included anywhere).
  2234. * CMakeLists.txt, builds/unix/ftconfig.in: Don't handle
  2235. `HAVE_STDINT_H'.
  2236. 2020-05-18 David Turner <david@freetype.org>
  2237. Remove Jamfile files from the tree.
  2238. These have not been used in a very, very long time, so better remove
  2239. them. A corresponding patch will be submitted to the
  2240. `freetype2-demos' repository.
  2241. * src/Jamfile, src/*/Jamfile, Jamrules: Delete.
  2242. 2020-05-12 Alexei Podtelezhnikov <apodtele@gmail.com>
  2243. [smooth] Turn on LCD filtering during FreeType initialization.
  2244. * src/smooth/ftsmooth.c (ft_smooth_init): Enable LCD filtering.
  2245. * include/freetype/ftlcdfil.h: Document it, remove patent warnings.
  2246. * include/freetype/freetype.h (FT_Render_Mode): Updated.
  2247. * include/freetype/config/ftoption.h, devel/ftoption.h
  2248. [FT_CONFIG_OPTION_SUBPIXEL_RENDERING]: Do not mention patents.
  2249. 2020-05-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  2250. [smooth] Stop using dedicated LCD modules and classes.
  2251. The LCD modules were never truly independent. They mostly served as
  2252. a way to disable patented LCD rendering, which is no longer necessary.
  2253. The `smooth' module now handles LCD modes as well.
  2254. * src/smooth/ftsmooth.c (ft_smooth_lcd_renderer_class.
  2255. ft_smooth_lcdv_renderer_class): Deleted.
  2256. (ft_render_smooth): Reworked from `ft_render_smooth_generic'.
  2257. * src/smooth/ftsmooth.h: Remove dedicated LCD classes.
  2258. * src/smooth/module.mk: Remove dedicated LCD modules.
  2259. * include/freetype/config/ftmodule.h: Ditto.
  2260. * builds/amiga/include/config/ftmodule.h: Ditto.
  2261. * include/freetype/ftmodapi.h: Do not mention LCD modules.
  2262. 2020-05-09 Werner Lemberg <wl@gnu.org>
  2263. * Version 2.10.2 released.
  2264. ==========================
  2265. Tag sources with `VER-2-10-2'.
  2266. * docs/VERSION.TXT: Add entry for version 2.10.2.
  2267. * README, Jamfile (RefDoc), src/base/ftver.rc,
  2268. builds/windows/vc2010/index.html, builds/windows/visualc/index.html,
  2269. builds/windows/visualce/index.html,
  2270. builds/wince/vc2005-ce/index.html,
  2271. builds/wince/vc2008-ce/index.html, docs/freetype-config.1:
  2272. s/2.10.1/2.10.2/, s/2101/2102/.
  2273. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 2.
  2274. * builds/unix/configure.raw (version_info): Set to 23:2:17.
  2275. * CMakeLists.txt (VERSION_PATCH): Set to 2.
  2276. * docs/CHANGES: Updated.
  2277. 2020-05-08 Jakub Alba <jalba@vewd.com>
  2278. * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#58319).
  2279. The font that exceeds the old limit is Icono Regular, version
  2280. 1.00000.
  2281. 2020-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  2282. * builds/freetype.mk: Refactor for readability.
  2283. 2020-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  2284. [builds] Clean up Windows CE project files.
  2285. Remove version from filenames that caused a lot of polution in the
  2286. release process. Use VERSIONINFO resource instead.
  2287. * builds/wince/vc2005-ce/freetype.vcproj,
  2288. builds/wince/vc2008-ce/freetype.vcproj,
  2289. builds/windows/visualce/freetype.vcproj,
  2290. builds/windows/visualce/freetype.dsp: s/2101//g, but add `ftver.rc'.
  2291. * builds/wince/vc2008-ce/index.html,
  2292. builds/wince/vc2005-ce/index.html,
  2293. builds/windows/visualce/index.html: s/2101//g.
  2294. 2020-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  2295. * devel/ft2build.h: Override FT_CONFIG_MODULES_H here as well.
  2296. 2020-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  2297. [builds/unix] Consolidate marco overrides (for the demos to see them).
  2298. * builds/unix/unix-cc.in (FT_CONFIG_MODULES_H, FT_CONFIG_OPTIONS_H):
  2299. Override them here...
  2300. * builds/freetype.mk: ... instead of here.
  2301. 2020-04-08 Werner Lemberg <wl@gnu.org>
  2302. Allow setting `CC' in Unix build (#58051).
  2303. * builds/unix/unix-cc.in (CC): Use `override'. The command line
  2304. value of `CC' (if any) is stored already in `CCraw'.
  2305. 2020-04-04 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2306. [woff2] Return if single stream operation fails.
  2307. * src/sfnt/sfwoff2.c (get_x_mins): Do it.
  2308. * src/sfnt/woff2tags.c: Remove unused include.
  2309. 2020-03-22 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2310. [docs] Fix building docs if `srcdir' != `builddir'.
  2311. `docs/reference/*' was moved one directory up in commit 237fed6.
  2312. * builds/unix/unix-def.in (PIP): Remove variable.
  2313. * configure: Create `docs' directory and copy assets from
  2314. `docs/markdown'.
  2315. * docs/README: Output directory is `reference'.
  2316. 2020-03-21 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2317. [docwriter] Drop support for Python < 3.5.
  2318. Python versions < 3.5 have reached end-of-life and as such, no
  2319. security or bug fixes will be provided for those versions. See
  2320. https://devguide.python.org/#status-of-python-branches
  2321. for more information.
  2322. * Jamfile (RefDoc): Add `site' parameter.
  2323. * builds/detect.mk (std_setup): Update Python version requirement.
  2324. * builds/freetype.mk (refdoc-venv): Use pip as `python -m pip'.
  2325. * builds/unix/ax_compare_version.m4,
  2326. builds/unix/ax_prog_python_version.m4: Macros to detect Python
  2327. version. New files.
  2328. * builds/unix/configure.raw: Check for Python >= 3.5 and remove
  2329. check for `pip'.
  2330. * docs/CHANGES, docs/INSTALL.GNU, docs/README: Updated.
  2331. 2020-03-02 Moazin Khatti <moazinkhatri@gmail.com>
  2332. [gzip] Support `gzip' encoded header conditionally.
  2333. In order to support `gzip' encoded header the call to
  2334. `inflateInit2' was modified in commit 6a92b1fadde26477a9179.
  2335. However, this code breaks with the outdated internal version
  2336. of zlib. This is a temporary fix to conditionally support
  2337. `gzip' encoded header whenever a system installation of zlib
  2338. is being used.
  2339. Problem report in
  2340. https://lists.nongnu.org/archive/html/freetype-devel/2020-02/msg00023.html
  2341. * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Change the the call to
  2342. `inflateInit2' depending on whether the system installation is
  2343. being used or the internal copy.
  2344. 2020-02-29 Ben Wagner <bungeman@google.com>
  2345. [truetype] Fix state of `FT_Face' for buggy `gvar' tables (#57923).
  2346. By resetting the blend as implemented with this commit fonts with
  2347. invalid `gvar' tables may keep calling into `ft_var_load_gvar' from
  2348. `tt_set_mm_blend' and failing, but the font was invalid anyway and
  2349. we want to keep seeing the failure in `tt_set_mm_blend'.
  2350. * src/truetype/ttgxvar.c (ft_var_load_gvar): Calculate length of
  2351. offset array once.
  2352. Allocate arrays after `FT_FRAME_ENTER' (extra check before
  2353. allocating and avoid needing to free array later if error entering
  2354. frame).
  2355. Always call `FT_FRAME_EXIT'.
  2356. Consistently set counts immediately after array initialized.
  2357. Reset the blend (particularly `blend->glyphoffsets') on failure.
  2358. 2020-03-01 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2359. [docs] Update docwriter stylesheet.
  2360. This change is required to support docwriter 1.2.1.
  2361. See
  2362. https://github.com/freetype/docwriter/issues/36
  2363. for more information.
  2364. * docs/markdown/stylesheets/extra.css:
  2365. (.md-typeset code) -> (.md-typeset pre>code)
  2366. (pre) -> (pre>code)
  2367. (p, .md-typeset p, h4): Remove commented styles.
  2368. (table.index): Remove unused styles.
  2369. 2020-02-28 Ben Wagner <bungeman@google.com>
  2370. [truetype] Add better checks for loading `gvar' table (#57905).
  2371. * src/truetype/ttgxvar.c (ft_var_load_gvar): Delay settings of any
  2372. `blend->xxxcount' values until the corresponding data has been
  2373. checked.
  2374. Also do some sanitizing to avoid a too early exit.
  2375. (TT_Vary_Apply_Glyph_Deltas): Improve tracing message.
  2376. 2020-02-27 Werner Lemberg <wl@gnu.org>
  2377. Make `FT_HAS_*' and `FT_IS_*' really return true (#57906).
  2378. * include/freetype/freetype.h (FT_HAS_*, FT_IS_*): Implement it.
  2379. 2020-02-25 Dominik Röttsches <drott@chromium.org>
  2380. Fix for CFF space glyph regression (#57541).
  2381. * src/psaux/psft.c (cf2_decoder_parse_substrings): Replace early-out
  2382. with FT_OFFSET.
  2383. 2020-02-22 Werner Lemberg <wl@gnu.org>
  2384. [woff2] Fix font table access.
  2385. Reported as
  2386. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20778
  2387. * src/sfnt/sfwoff2.c (get_x_mins): Explicitly check for presence of
  2388. `head' table, which might not have been processed yet.
  2389. 2020-02-21 Werner Lemberg <wl@gnu.org>
  2390. [psaux] Make `t1_decoder_parse_metrics' handle `op_div' (#57519).
  2391. * src/psaux/t1decode.c (t1_decoder_parse_metrics): Copy
  2392. corresponding code from old engine's `t1_decoder_parse_charstrings'
  2393. function.
  2394. 2020-02-19 Nikolaus Waxweiler <nikolaus.waxweiler@daltonmaag.com>
  2395. [autofit] Add support for Hanifi Rohingya script.
  2396. * src/autofit/afblue.dat: Add blue zone data for Hanifi Rohingya.
  2397. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
  2398. * src/autofit/afscript.h: Add Hanifi Rohingya standard character.
  2399. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Hanifi
  2400. Rohingya data.
  2401. 2020-02-19 Werner Lemberg <wl@gnu.org>
  2402. Require HarfBuzz 1.8.
  2403. * builds/unix/configure.raw, CMakeLists.txt: Request HarfBuzz 1.8.0
  2404. or newer.
  2405. We are going to add auto-hinter support for Hanifi Rohingya, which
  2406. was introduced in Unicode 11.0.
  2407. 2020-02-12 Werner Lemberg <wl@gnu.org>
  2408. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Ignore version (#57708).
  2409. 2020-02-04 Werner Lemberg <wl@gnu.org>
  2410. * src/truetype/ttinterp.c (TT_RunIns): Adjust loop counter (#57732).
  2411. The font that exceeds the old limit is Constantine, version 1.001.
  2412. 2020-01-04 Werner Lemberg <wl@gnu.org>
  2413. [base] Fix `FREETYPE_PROPERTIES=type1:hinting-engine=adobe`.
  2414. * src/base/ftpsprop.c (ps_property_set) [hinting-engine]: Avoid an
  2415. incorrect return value that caused a warning. The function did the
  2416. right thing, though.
  2417. 2020-01-03 Werner Lemberg <wl@gnu.org>
  2418. [woff2] Fix memory leaks and a runtime warning.
  2419. Reported as
  2420. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19773
  2421. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18101
  2422. * src/sfnt/sfwoff2.c (compute_ULong_sum): Add missing cast.
  2423. (reconstruct_hmtx): Add missing deallocation calls.
  2424. 2020-01-02 Dominik Röttsches <drott@chromium.org>
  2425. [truetype] Fix UBSan warning on offset to nullptr (#57501).
  2426. * src/truetype/ttinterp.c (Ins_CALL): Fail if `exc->FDefs' is null.
  2427. 2019-12-31 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2428. [woff2] Allow bitmap-only fonts (#57394).
  2429. * src/sfnt/sfwoff2.c (reconstruct_font): Fix test for `glyf' and
  2430. `loca' tables.
  2431. 2019-12-21 Hugh McMaster <hugh.mcmaster@outlook.com>
  2432. [docs] (2/2) Fix generation of API documentation (#56745).
  2433. Creating the API Reference in the (new) `reference' sub-directory is
  2434. consistent with other documentation sub-topics, such as `design',
  2435. `glyphs' and `tutorial'.
  2436. This patch fixes broken hyperlinks in the documentation pointing to
  2437. and from the API Reference. It also allows web assets to load from
  2438. their relative paths.
  2439. * builds/freetype.mk (DOC_DIR): Adjust.
  2440. (refdoc, refdoc-venv): Add `--site' argument.
  2441. * builds/toplevel.mk (do-dist): Updated.
  2442. 2019-12-21 Hugh McMaster <hugh.mcmaster@outlook.com>
  2443. [docs] (1/2) Move static web assets (#56745).
  2444. * docs/reference/*: Move ...
  2445. * docs: ... one directory up.
  2446. 2019-12-21 Dominik Röttsches <drott@chromium.org>
  2447. Fix more UBSan warnings on adding offset to nullptr (#57432).
  2448. * src/truetype/ttinterp.c (Ins_LOOPCALL), src/psaux/psft.c
  2449. (cf2_initLocalRegionBuffer): Use `FT_OFFSET'.
  2450. 2019-12-16 Werner Lemberg <wl@gnu.org>
  2451. [truetype] Fix UBSan warnings on adding offsets to nullptr.
  2452. Reported as
  2453. https://bugs.chromium.org/p/chromium/issues/detail?id=1032152
  2454. * src/truetype/ttinterp.c (Ins_FDEF, Ins_IDEF): Use `FT_OFFSET'.
  2455. 2019-12-14 Werner Lemberg <wl@gnu.org>
  2456. [truetype] Fix integer overflow.
  2457. Reported as
  2458. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19305
  2459. * src/truetype/ttinterp.c (Ins_MIRP): Use `ADD_LONG'.
  2460. 2019-12-13 Werner Lemberg <wl@gnu.org>
  2461. Another bunch of UBSan warnings on adding offsets to nullptr.
  2462. Reported as
  2463. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19427
  2464. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19433
  2465. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19441
  2466. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19451
  2467. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19452
  2468. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19457
  2469. * src/autofit/aflatin.c (af_latin_hints_compute_segments,
  2470. af_latin_hints_compute_edges): Use `FT_OFFSET'.
  2471. * src/base/ftstream.c (FT_Stream_EnterFrame): Use `FT_OFFSET'.
  2472. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Exit early
  2473. if there is no charstring.
  2474. * src/psaux/psobjs.c (t1_decrypt): Use `FT_OFFSET'.
  2475. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Exit early for
  2476. zero bitmap dimensions.
  2477. 2019-12-09 Dominik Röttsches <drott@chromium.org>
  2478. Fix more UBSan warnings on adding offset to nullptr (#57384).
  2479. * src/smooth/ftsmooth.c (ft_smooth_render_generic),
  2480. src/psaux/psobjs.c (ps_table_add): Use `FT_OFFSET'.
  2481. 2019-12-05 Werner Lemberg <wl@gnu.org>
  2482. * src/truetype/ttinterp.c (TT_RunIns): Use `FT_OFFSET'.
  2483. Reported as
  2484. https://bugs.chromium.org/p/chromium/issues/detail?id=1030614
  2485. 2019-12-03 Werner Lemberg <wl@gnu.org>
  2486. More nullptr offset UBSan warnings (#57331, #57347).
  2487. * src/autofit/afcjk.c (af_cjk_hints_compute_segments),
  2488. src/psaux/psft.c (cf2_getSeacComponent), src/truetype/ttinterp.c
  2489. (Ins_UNKNOWN): Use `FT_OFFSET'.
  2490. 2019-11-29 Dominik Röttsches <drott@chromium.org>
  2491. Avoid more nullptr offset UBSan warnings (#57316).
  2492. * src/base/ftoutln.c (FT_Outline_Transform): Bail on empty points.
  2493. * src/cff/cffload.c (cff_subfont_load): Use `FT_OFFSET'.
  2494. * src/psaux/psft.c (cf2_decoder_parse_substrings): Early out if
  2495. `charstring_base' or `charstring_len' are null.
  2496. * src/sfnt/ttload.c (tt_face_load_name): Use `FT_OFFSET'.
  2497. 2019-11-23 John Stracke <jstracke@Google.com>
  2498. [base] Really fix #57194.
  2499. Apply accidentally missed second part of patch.
  2500. * src/base/ftgloadr.c (FT_GlyphLoader_CheckPoints): Call
  2501. `FT_GlyphLoader_CreateExtra'.
  2502. 2019-11-23 Werner Lemberg <wl@gnu.org>
  2503. [truetype] Avoid sanitizer warning (#57289).
  2504. * src/truetype/ttpload.c (tt_face_get_device_metrics): Use
  2505. `FT_OFFSET'.
  2506. 2019-11-23 Armin Hasitzka <prince.cherusker@gmail.com>
  2507. [truetype] Fix integer overflow (#57287).
  2508. * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
  2509. 2019-11-23 Ben Wagner <bungeman@google.com>
  2510. [sfnt] Avoid sanitizer warning (#57286).
  2511. * src/sfnt/ttcmap.c (tt_face_build_cmaps): Avoid possible `NULL +
  2512. offset' computation.
  2513. Tag `table' as `const'.
  2514. 2019-11-23 John Stracke <jstracke@Google.com>
  2515. Werner Lemberg <wl@gnu.org>
  2516. [base] Fix `NULL + offset' sanitizer warnings (#57194).
  2517. * src/base/ftgloadr.c (FT_GlyphLoader_Adjust_Points,
  2518. FT_GlyphLoader_Adjust_Subglyphs): Use `FT_OFFSET'.
  2519. (FT_GlyphLoader_CreateExtra): Add short cut if some values are zero.
  2520. 2019-11-23 Werner Lemberg <wl@gnu.org>
  2521. * include/freetype/internal/ftmemory.h (FT_OFFSET): New macro.
  2522. Use this for `base + offset' pointer calculations where `base' can
  2523. be NULL (triggering a sanitizer warning even if the resulting
  2524. pointer gets never dereferenced since it is undefined behaviour
  2525. in C).
  2526. Suggested by Ben Wagner.
  2527. 2019-11-23 Ben Wagner <bungeman@google.com>
  2528. [sfnt] Ensure OTTO fonts have tables (#57285).
  2529. * src/sfnt/ttload.c (tt_face_load_font_dir): Add test.
  2530. 2019-11-23 Behdad Esfahbod <behdad@behdad.org>
  2531. Minor fixes for recent compilers.
  2532. * src/gzip/infutil.h (inflate_mask): Add `const'.
  2533. * src/autofit/aflatin2.c: Include `ft2build.h'.
  2534. 2019-11-07 Nikolaus Waxweiler <madigens@gmail.com>
  2535. * CMakeLists.txt: Minor additions to the notes, compile
  2536. builds/unix/ftsystem.c instead of src/base/ftsystem.c on UNIX.
  2537. The latter change is based on the code proposed by rim in #55235.
  2538. 2019-10-25 Werner Lemberg <wl@gnu.org>
  2539. * src/sfnt/sfwoff2.c (woff2_open_font): Check `num_fonts' for TTCs.
  2540. Reported as
  2541. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18494
  2542. 2019-10-22 Werner Lemberg <wl@gnu.org>
  2543. * src/sfnt/sfwoff2.c (woff2_open_font): Avoid undefined shift.
  2544. Also improve tracing.
  2545. Reported as
  2546. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18390
  2547. 2019-10-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  2548. * src/sfnt/pngshim.c (premultiply_data): Optimize for __SSE__ only.
  2549. 2019-10-10 Werner Lemberg <wl@gnu.org>
  2550. * src/sfnt/sfwoff2.c (reconstruct_glyf): Check `triplet_size'.
  2551. Reported as
  2552. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18108
  2553. 2019-10-09 John Tytgat <John.Tytgat@esko.com>
  2554. [cff] Fix FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts (#57023).
  2555. * src/cff/cffobjs.c (cff_face_init): Don't set
  2556. FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts.
  2557. 2019-10-08 Werner Lemberg <wl@gnu.org>
  2558. [woff2] Fix SFNT table checks.
  2559. Also reduce number of SFNT table lookups.
  2560. Reported as
  2561. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18065
  2562. * include/freetype/internal/wofftypes.h (WOFF2_InfoRec): Add fields
  2563. `glyf_table', `loca_table', and `head_table'.
  2564. * src/sfnt/sfwoff2.c (reconstruct_glyf): Update signature.
  2565. Use table pointers in `info' parameter.
  2566. (get_x_mins): Check `maxp_table'
  2567. Use table pointers in `info' parameter.
  2568. (reconstruct_font): Use and set table pointers in `info' parameter.
  2569. Fix check for `glyf' and `loca' tables.
  2570. Update call to `reconstruct_glyf'.
  2571. (woff2_open_font): Updated.
  2572. 2019-10-06 Werner Lemberg <wl@gnu.org>
  2573. * src/sfnt/sfwoff2.c (reconstruct_glyf): Fix reallocation.
  2574. Reported as
  2575. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18046
  2576. 2019-10-06 Werner Lemberg <wl@gnu.org>
  2577. Improve memory debugging.
  2578. * include/freetype/internal/ftmemory.h (FT_MEM_FREE): Use
  2579. `FT_DEBUG_INNER' to set source code file name and line.
  2580. * src/base/ftdbgmem.c (ft_mem_table_remove): Better formatting of
  2581. tracing message.
  2582. 2019-10-03 Werner Lemberg <wl@gnu.org>
  2583. * src/sfnt/sfwoff2 (reconstruct_font): Fix reallocation.
  2584. Reported as
  2585. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17966
  2586. 2019-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
  2587. * src/base/ftstroke.c (ft_stroker_inside): Speed up.
  2588. 2019-10-01 Werner Lemberg <wl@gnu.org>
  2589. * src/sfnt/sfwoff2 (woff2_open_font): Initialize `woff2.ttc_fonts'.
  2590. Reported as
  2591. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17804
  2592. 2019-09-30 Werner Lemberg <wl@gnu.org>
  2593. * src/sfnt/sfwoff2.c (reconstruct_font): Fix memory leak.
  2594. Reported as
  2595. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17812
  2596. 2019-09-30 Werner Lemberg <wl@gnu.org>
  2597. [woff2] Reject fonts without `head' table.
  2598. Also fix memory deallocation in case of error.
  2599. `head' problem reported as
  2600. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17820
  2601. * src/sfnt/sfwoff2.c (reconstruct_glyf): Don't use `stream_close'.
  2602. Abort if `head_table' is NULL.
  2603. Don't free `transformed_buf' in case of error.
  2604. (woff2_open_font): Don't set `uncompressed_buf' to NULL.
  2605. 2019-09-29 Werner Lemberg <wl@gnu.org>
  2606. [woff2] Fix compiler warnings.
  2607. Problem reported by Alexei.
  2608. * src/sfnt/sfwoff2.c (reconstruct_glyf): Initialize `x_min'.
  2609. (reconstruct_font): Initialize `num_hmetrics'.
  2610. (woff2_open_font): Initialize `info'.
  2611. 2019-09-28 Werner Lemberg <wl@gnu.org>
  2612. * src/sfnt/sfwoff2.c (woff2_open_font): Fix sanity check.
  2613. Correct thinkos in patch from 2019-09-01.
  2614. 2019-09-28 Werner Lemberg <wl@gnu.org>
  2615. [woff2] Fix memory leaks.
  2616. One of them reported as
  2617. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17766
  2618. * src/sfnt/sfwoff2.c (woff2_open_font): Free `info->x_mins' and
  2619. `woff2->ttc_fonts'.
  2620. (reconstruct_glyf): Initialize `info->x_mins'.
  2621. 2019-09-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  2622. * src/base/ftstroke.c (ft_stroker_cap): Speed up caps.
  2623. 2019-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  2624. * src/base/ftstroke.c (ft_stroker_outside): Speed up clipped miter.
  2625. * include/freetype/ftstroke.h: Wordsmith miter docs.
  2626. 2019-09-25 Werner Lemberg <wl@gnu.org>
  2627. * src/sfnt/sfwoff2.c (woff2_open_font): Check (sum of) table sizes.
  2628. Reported as
  2629. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17684
  2630. 2019-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  2631. * src/base/ftstroke.c (ft_stroke_border_arcto): Speed up calculations.
  2632. 2019-09-20 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2633. [woff2] Fix memory leaks.
  2634. Reported as
  2635. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16896
  2636. * src/sfnt/sfwoff2.c (woff2_open_font): Fix error handling.
  2637. Free `uncompressed_buf'.
  2638. (reconstruct_font): Free `transformed_buf'.
  2639. 2019-09-17 Werner Lemberg <wl@gnu.org>
  2640. * src/otvalid/otvcommon.c (otv_Coverage_get_last): Guard `count'.
  2641. Problem reported by Marc Schönefeld <marc.schoenefeld@gmx.org>.
  2642. 2019-09-17 Werner Lemberg <wl@gnu.org>
  2643. * src/sfnt/sfwoff2.c (woff2_open_font): Check table index.
  2644. Reported as
  2645. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17100
  2646. 2019-09-15 Avi Halachmi (:avih) <avihpit@yahoo.com>
  2647. [cmake] Don't fail if brotli is missing (#56894).
  2648. The libs which cmake controls are commented out at
  2649. include/freetype/config/ftoption.h
  2650. and cmake un-comment each enabled library, but the brotli option was
  2651. not commented out, therefore `FT_CONFIG_OPTION_USE_BROTLI' remained
  2652. defined even if brotli was missing/disabled/etc.
  2653. Comment it such that cmake can control it, which means leaving it
  2654. undefined if brotli is missing.
  2655. * include/freetype/config/ftoption.h: Fix typo.
  2656. 2019-09-05 Werner Lemberg <wl@gnu.org>
  2657. [cmake] Add brotli support.
  2658. * CMakeLists.txt (FT_WITH_BROTLI): New option.
  2659. * builds/cmake/FindBrotliDec.cmake: New file.
  2660. 2019-09-05 Werner Lemberg <wl@gnu.org>
  2661. Fix handling of `AF_CONFIG_OPTION_INDIC'.
  2662. * devel/ftoption.h, include/freetype/config/ftoption.h:
  2663. `AF_CONFIG_OPTION_INDIC' needs `AF_CONFIG_OPTION_CJK'.
  2664. 2019-09-05 Werner Lemberg <wl@gnu.org>
  2665. CMakeLists.txt: Fix generation of DLL related stuff (#56852).
  2666. Extract `version_info' variable from `builds/unix/configure.raw' and
  2667. use the data to correctly set `LIBRARY_VERSION' and
  2668. `LIBRARY_SOVERSION'.
  2669. Also use the data to set `ft_version' field in `freetype2.pc'.
  2670. Also fix the needed minimum version of HarfBuzz in `freetype2.pc'.
  2671. 2019-09-03 Werner Lemberg <wl@gnu.org>
  2672. * src/sfnt/sfwoff2.c (compute_ULong_sum): Fix undefined shift.
  2673. Reported as
  2674. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16933
  2675. 2019-09-01 Werner Lemberg <wl@gnu.org>
  2676. * src/sfnt/sfwoff2.c (woff2_open_font): Add sanity check.
  2677. Don't trust `totalSfntSize' unconditionally.
  2678. Reported as
  2679. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16893
  2680. 2019-08-27 Dominik Röttsches <drott@chromium.org>
  2681. [woff2] Don't use `FT_UInt64' (#56815).
  2682. * src/sfnt/sfwoff2.c (woff2_open_font): Use `FT_UInt32' for
  2683. `file_offset'. This fixes builds on platforms where `FT_LONG64' is
  2684. not defined while still being sufficient to store a file offset.
  2685. 2019-08-27 Werner Lemberg <wl@gnu.org>
  2686. [truetype] Prevent crash in `TT_Set_Named_Instance' (#56813).
  2687. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Fix error
  2688. handling.
  2689. 2019-08-27 Werner Lemberg <wl@gnu.org>
  2690. [woff2] Fix compiler warnings.
  2691. * src/sfnt/sfwoff2.c (read_num_hmetrics): Remove unused argument
  2692. `table_len'.
  2693. Update caller.
  2694. (triplet_decode, compute_bbox, store_loca, reconstruct_glyf): Make
  2695. `i' variable unsigned.
  2696. (reconstruct_glyph): Remove condition which is always false.
  2697. (reconstruct_html): Removed unused argument `transformed_size'.
  2698. Update caller.
  2699. * src/sfnt/woff2tags.c (woff2_known_tags): Remove condition which is
  2700. always false.
  2701. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2702. [woff2] Check whether known tag is in array bounds.
  2703. If table tag is not 0x3f, we expect a value between 0 and 62. If
  2704. this is not the case, exit with errors.
  2705. * src/sfnt/sfwoff2/c: Check whether table tag makes sense.
  2706. * src/sfnt/woff2tags.c: Return 0 if tag is out of bounds.
  2707. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2708. * src/sfnt/sfwoff2.c: Improve trace comments.
  2709. Adjust tracing levels for comments, and more formatting.
  2710. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2711. [woff2] Support `hmtx' reconstruction when `glyf' is untransformed.
  2712. `reconstruct_hmtx' requires `info->x_mins' and `info->num_glyphs' to
  2713. reconstruct the hmtx table. In case glyf is not transformed, we
  2714. call `get_x_mins' which does the necessary work.
  2715. * src/sfnt/sfwoff2.c (get_x_mins): New function.
  2716. (reconstruct_font): Call get_x_mins.
  2717. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2718. [sfnt] Support `face->num_faces' for WOFF2 fonts.
  2719. Set correct value of `face->num_faces' for WOFF2 fonts. This is
  2720. being handled separately because we only load the tables for the
  2721. requested font face in `woff2_open_font' and create a single-face
  2722. sfnt stream.
  2723. The full discussion is at:
  2724. https://lists.gnu.org/archive/html/freetype-devel/2019-08/msg00000.html
  2725. * src/sfnt/sfobjs.c (sfnt_open_font): Add parameter
  2726. `woff2_num_faces'.
  2727. (sfnt_init_face): Introduce variable `woff2_num_faces', and change
  2728. `face->root.num_faces' if `woff2_num_faces' is set.
  2729. * src/sfnt/sfwoff2.c (woff2_open_font): Validate requested face
  2730. index and handle negative face indices.
  2731. * src/sfnt/sfwoff2.h (woff2_open_font): Add parameter `num_faces' to
  2732. declaration.
  2733. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2734. [woff2] Improve memory and error handling.
  2735. Free up memory after use, and improve error handling.
  2736. * src/sfnt/sfwoff2.c (reconstruct_font, woff2_open_font): Implement
  2737. changes.
  2738. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2739. [woff2] Avoid too many calls to `FT_REALLOC'.
  2740. We do this by using `totalSfntSize' as an initial reference, and
  2741. extending the buffer when required. This reduces rendering time
  2742. considerably.
  2743. * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec): Add
  2744. `totalSfntSize', rename `total_sfnt_size' to `actual_sfnt_size'.
  2745. * src/sfnt/sfwoff2.c (write_buf): Add parameter `dst_size' to keep
  2746. track of and update total size of stream.
  2747. (WRITE_SFNT_BUF, WRITE_SFNT_BUF_AT): Modify macros accordingly.
  2748. (pad4, store_loca, reconstruct_glyf, reconstruct_hmtx,
  2749. reconstruct_font): Update parameters to accept `sfnt_size'.
  2750. (woff2_open_font): Add variable `sfnt_size'. Use WOFF2 header field
  2751. `totalSfntSize' as initial reference (if value makes sense) and
  2752. allocate `totalSfntSize' bytes for the sfnt stream. `write_buf'
  2753. handles reallocation if and when required. Also resize the stream
  2754. to `actual_sfnt_size' after reconstruction.
  2755. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2756. [woff2] Reconstruct `loca', `hmtx', and swap out stream.
  2757. Add necessary functions to reconstruct loca and hmtx tables (the two
  2758. remaining tables that can have a transform). `woff2_open_font' is
  2759. now capable of loading a woff2 font face. This code may still need
  2760. more refining and better memory management.
  2761. * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec): Add total
  2762. (final) size of sfnt stream.
  2763. (WOFF2_InfoRec): Add header checksum value.
  2764. * src/sfnt/sfobjs.c (sfnt_open_font): Change `face_instance_index'
  2765. parameter to its pointer so its value can be modified by
  2766. `woff2_open_font'.
  2767. * src/sfnt/sfwoff2.c: (WRITE_SFNT_BUF_AT): New macro to write into
  2768. sfnt buffer at given position.
  2769. (write_buf): Add parameter `extend_buf' which allows caller to
  2770. specify whether buffer should be reallocated before copying data.
  2771. (WRITE_SFNT_BUF): Updated.
  2772. (pad4, store_loca, reconstruct_htmx): New functions.
  2773. (reconstruct_glyf): Calculate loca values and store them.
  2774. (reconstruct_font): Call `reconstruct_hmtx', write table record
  2775. entries, and calculate table checksums. Also calculate font
  2776. checksum and update `checksumAdjustment' entry in head table.
  2777. (woff2_open_font): Open stream for sfnt buffer, swap out input
  2778. stream and return.
  2779. * src/sfnt/sfwoff2.h (woff2_open_font): Modify parameter to accept
  2780. pointer to `face_index'.
  2781. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2782. [woff2] Reconstruct transformed `glyf' table.
  2783. Reconstruct `glyf' table if it is transformed in the uncompressed
  2784. table stream. Also add necessary structures, macros and functions.
  2785. * include/freetype/internal/wofftypes.h (WOFF2_InfoRec,
  2786. WOFF2_SubstreamRec, WOFF2_PointRec): New structures.
  2787. (WOFF2_TableRec): s/OrigLength/dst_length/.
  2788. * src/sfnt/sfwoff2.c (READ_255USHORT, READ_BASE128): Use
  2789. `FT_SET_ERROR' to set implicit `error' variable.
  2790. (WRITE_SHORT): New macro.
  2791. (N_CONTOUR_STREAM, N_POINTS_STREAM, FLAG_STREAM, GLYPH_STREAM,
  2792. COMPOSITE_STREAM, BBOX_STREAM, INSTRUCTION_STREAM): New macros to
  2793. refer to substreams of the transformed `glyf' tables.
  2794. (Read255UShort, ReadBase128): Return errors set by `FT_READ_XXX'
  2795. macros.
  2796. (with_sign, safe_int_addition): New functions to add sign to values
  2797. based on a flag and perform safe addition respectively.
  2798. (triplet_decode): Decode variable-length (flag, xCoordinate,
  2799. yCoordinate) triplet for a simple glyph. See
  2800. https://www.w3.org/TR/WOFF2/#triplet_decoding
  2801. (store_points, compute_bbox, composteGlyph_size, reconstruct_glyf):
  2802. New functions.
  2803. (reconstruct_font): Call `reconstruct_glyf'.
  2804. * src/sfnt/sfwoff2.h: Add required constants.
  2805. * src/sfnt/woff2tags.h: Move out constants to `sfwoff2.h'.
  2806. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2807. [woff2] Copy un-transformed tables to sfnt stream.
  2808. Copy un-transformed tables to the sfnt stream.
  2809. * src/sfnt/sfwoff2.c: (WRITE_SFNT_BUF): New macro.
  2810. (write_buf): New function. Extend memory of `dst' buffer and copy
  2811. bytes from `src'.
  2812. (compute_ULong_sum): New function. Calculate checksum of table.
  2813. (reconstruct_font): Change `FT_Byte* sfnt' to `FT_Byte**
  2814. sfnt_bytes'. This has been done because we reallocate memory to
  2815. `sfnt' multiple times, which may change the pointer value of `sfnt'.
  2816. This new pointer must be propogated back to the caller. Same reason
  2817. for using a double pointer in `write_buf'.
  2818. * src/sfnt/woff2tags.h (WOFF2_DEFAULT_MAX_SIZE): New macro used for
  2819. overflow checking.
  2820. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2821. [woff2] Create stream for uncompressed buffer.
  2822. Uncompressed buffer is now an `FT_Stream'.
  2823. Perform basic checks and start iterating over tables.
  2824. * src/sfnt/sfwoff2.c (stream_close, find_table, read_num_hmetrics):
  2825. New functions.
  2826. (reconstruct_font): Modify parameters and iterate over tables.
  2827. (woff2_open_font): Updated.
  2828. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2829. [woff2] Handle TTCs and start reconstructing font.
  2830. We `handle' TTCs by modifying the `indices' array to point to only
  2831. those tables that are part of the requested `face_index'.
  2832. Set and use `num_tables' in `WOFF2_TtcFont'.
  2833. * src/sfnt/sfwoff2.c (reconstruct_font): New function.
  2834. (woff2_open_font): Start reconstruction of font.
  2835. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2836. [woff2] Get known tags from function.
  2837. Change `KnownTags' to a function (`woff2_known_tags'). This avoids
  2838. introducing a global constant array. This function returns the
  2839. specified index without *any* checks. The caller must ensure that
  2840. `index' is within array limits.
  2841. * src/sfnt/sfwoff2.c (woff2_open_font): Change `KnownTags[...]'
  2842. notation to `woff2_known_tags( ... )'.
  2843. * src/sfnt/woff2tags.c: Perform changes.
  2844. * src/sfnt/woff2tags.h: Update definitions.
  2845. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2846. [woff2] Minor.
  2847. * src/sfnt/sfwoff2.c (woff2_uncompress): Add error message
  2848. (woff2_open_font): Free `uncompressed_buf'.
  2849. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2850. [woff2] Uncompress Brotli streams and `face_index' support.
  2851. WOFF2 compressed stream is now uncompressed if Brotli is available.
  2852. This data is stored in a separate buffer (uncompressed_buf) because
  2853. it does not contain direct table data. Certain tables have
  2854. transformations applied to them, and they must be reconstructed
  2855. before we can write those tables to the SFNT stream.
  2856. `face_index' is now being passed as a parameter to
  2857. `woff2_open_font'.
  2858. * src/sfnt/sfobjs.c (sfnt_open_font): Add parameter
  2859. `face_instance_index'.
  2860. * src/sfnt/sfwoff2.c (woff2_uncompress): New function.
  2861. (woff2_open_font): Call `woff2_uncompress'.
  2862. (compute_first_table_offset): Fix return type.
  2863. * src/sfnt/sfwoff2.h (woff2_open_font): Modify declaration.
  2864. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2865. * builds/unix/configure.raw: Change argument name to `brotli'.
  2866. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2867. Add Brotli dependency and required checks.
  2868. Brotli is required for decompressing WOFF2 font directory streams.
  2869. The library is thus being added as an optional dependency for
  2870. FreeType.
  2871. * builds/unix/configure.raw: Add checks for `libbrotlidec'.
  2872. (REQUIRES_PRIVATE, LIBS_PRIVATE, LIBSSTATIC_CONFIG): Updated.
  2873. * devel/ftoption.h, include/freetype/config/ftoption.h
  2874. (FT_CONFIG_OPTION_USE_BROTLI): New macro.
  2875. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2876. [woff2] Write SFNT Offset table.
  2877. * src/sfnt/sfwoff2.c (WRITE_USHORT, WRITE_ULONG): New macros.
  2878. (compare_tags): New function.
  2879. (woff2_open_font): Implement it.
  2880. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2881. * src/sfnt/sfwoff2.c: #undef macros.
  2882. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2883. [woff2] Read table and collection directory.
  2884. * include/freetype/internal/wofftypes.h (WOFF2_TtcFontRec): New
  2885. structure.
  2886. (WOFF2_HeaderRec): Add more fields.
  2887. * src/sfnt/sfwoff2.c (READ_255USHORT, READ_BASE128, ROUND4): New
  2888. macros.
  2889. (Read255UShort, CollectionHeaderSize, compute_first_table_offset):
  2890. New functions.
  2891. (ReadBase128): Use `FT_READ_BYTE'.
  2892. (woff2_open_font): Add functionality to read table directory and
  2893. collection directory (if present).
  2894. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2895. [sfnt] Include `woff2tags.c' for building.
  2896. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `woff2tags.c'.
  2897. * src/sfnt/sfnt.c: Include `woff2tags.c'.
  2898. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2899. [sfnt] Add WOFF2 constants.
  2900. Add constants required for WOFF2, and known table tags as defined in
  2901. the specification. See
  2902. https://www.w3.org/TR/WOFF2/#table_dir_format
  2903. for details.
  2904. * src/sfnt/woff2tags.c, src/sfnt/woff2tags.h: New files.
  2905. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2906. [sfnt] Read WOFF 2 header.
  2907. Check for WOFF2 tag, call `woff2_open_font', and implement it to read
  2908. header according to specification.
  2909. * include/freetype/internal/fttrace.h: Add `sfwoff2.c'.
  2910. * src/sfnt/rules.mk (SFNT_DRV_SRC): Add `sfwoff2.c'.
  2911. * src/sfnt/sfnt.c: Include `sfwoff2.c'.
  2912. * src/sfnt/sfobjs.c (sfnt_open_font): Check for `wOF2' tag and call
  2913. `woff2_open_font'.
  2914. * src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h: New files.
  2915. 2019-08-27 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  2916. Add structures for WOFF2.
  2917. Add structures and macro for WOFF 2 header and table directory.
  2918. * include/freetype/internal/wofftypes.h (WOFF2_HeaderRec,
  2919. WOFF2_TableRec_): New structures.
  2920. * include/freetype/tttags.h (TTAG_wOF2): New macro.
  2921. 2019-08-26 Werner Lemberg <wl@gnu.org>
  2922. * src/psaux/cffdecode.c (cff_operator_seac): Fix numeric overflow.
  2923. Reported as
  2924. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16470
  2925. 2019-08-26 Werner Lemberg <wl@gnu.org>
  2926. [type1] Fix `FT_Get_Var_Axis_Flags' (#56804).
  2927. * src/type1/t1load.c (T1_Get_MM_Var): Allocate space for axis flags.
  2928. Also remove redundant assignment.
  2929. 2019-07-24 Alexei Podtelezhnikov <apodtele@gmail.com>
  2930. * src/base/ftbbox.c (cubic_peak): Sanitize left shift (#56586).
  2931. 2019-07-22 Weiyi Wu <w1w2y3@gmail.com>
  2932. * src/cid/cidload.c (cid_hex_to_binary): Fix typo (#56653).
  2933. 2019-07-12 Werner Lemberg <wl@gnu.org>
  2934. [sfnt, winfonts] Avoid memory leaks in case of error (#56587).
  2935. * src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case
  2936. of error.
  2937. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto.
  2938. 2019-07-12 Ben Wagner <bungeman@google.com>
  2939. Properly handle phantom points for variation fonts (#56601).
  2940. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Scale phantom
  2941. points if HVAR and/or VVAR is present.
  2942. 2019-07-04 Werner Lemberg <wl@gnu.org>
  2943. [psaux] (2/2) Handle fonts that use SEAC for ligatures (#56580).
  2944. The same as previous commit but for the old engine.
  2945. * src/psaux/t1decode.c (t1operator_seac): Implement it.
  2946. 2019-07-04 Chris Liddell <chris.liddell@artifex.com>
  2947. [psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580).
  2948. As originally intended, a Type 1 SEAC charstring would be used for
  2949. an accented glyph (like `acaron' or `uumlaut'), where the advance
  2950. width of the SEAC glyph is the same as that of the `base' glyph
  2951. (like `a' or `u'). In this case it is not uncommon for the SEAC
  2952. glyph to not use an (H)SBW opcode of its own but to rely on the
  2953. value from the base glyph.
  2954. However, out-of-spec fonts also use SEAC glyphs for ligatures (like
  2955. `oe' or `fi'), and in those cases the overall advance width is
  2956. greater than that of the `base' glyph. For this reason we have to
  2957. allow that the SEAC glyph can have an (H)SBW value of its own, and
  2958. if it has, retain this value, rather than the one from the base
  2959. glyph.
  2960. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_escSEAC>:
  2961. Implement it.
  2962. 2019-07-01 Werner Lemberg <wl@gnu.org>
  2963. * Version 2.10.1 released.
  2964. ==========================
  2965. Tag sources with `VER-2-10-1'.
  2966. * docs/VERSION.TXT: Add entry for version 2.10.1.
  2967. * README, Jamfile (RefDoc), src/base/ftver.rc,
  2968. builds/windows/vc2010/freetype.vcxproj,
  2969. builds/windows/vc2010/index.html,
  2970. builds/windows/visualc/freetype.dsp,
  2971. builds/windows/visualc/freetype.vcproj,
  2972. builds/windows/visualc/index.html,
  2973. builds/windows/visualce/freetype.dsp,
  2974. builds/windows/visualce/freetype.vcproj,
  2975. builds/windows/visualce/index.html,
  2976. builds/wince/vc2005-ce/freetype.vcproj,
  2977. builds/wince/vc2005-ce/index.html,
  2978. builds/wince/vc2008-ce/freetype.vcproj,
  2979. builds/wince/vc2008-ce/index.html: s/2.10.0/2.10.1/, s/2100/2101/.
  2980. * include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
  2981. * builds/unix/configure.raw (version_info): Set to 23:1:17.
  2982. * CMakeLists.txt (VERSION_PATCH): Set to 1.
  2983. * include/freetype/fterrors.h (FT_Error_String): Fix C++ compilation.
  2984. 2019-06-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  2985. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Fix inequality.
  2986. Reported by Armin Hasitzka.
  2987. 2019-06-16 Werner Lemberg <wl@gnu.org>
  2988. * src/tools/apinames.c: Formatting, minor edits.
  2989. 2019-06-16 Werner Lemberg <wl@gnu.org>
  2990. [autofit] Disable hinting if no blue zones are available (#56450).
  2991. * src/autofit/afglobal.c (af_face_global_get_metrics): Start again
  2992. (with dummy hinter module) if no blue zones are present.
  2993. * src/autofit/aflatin.c (af_latin_metrics_init_blues): Change
  2994. signature to return error code.
  2995. If no blue zones are found, update `glyph_styles' array to hold
  2996. AF_STYLE_NONE_DFLT instead of the current style.
  2997. (af_latin_metrics_init): Return internal error code if no blue zones
  2998. are found.
  2999. 2019-06-16 Werner Lemberg <wl@gnu.org>
  3000. Towards better VMS support.
  3001. More to come.
  3002. * builds/vms/LIBS.OPT_IA64, builds/vms/_LINK.OPT_IA64,
  3003. builds/vms/vmslib.dat: New files provided by Jouk Jansen
  3004. <joukj@hrem.nano.tudelft.nl>.
  3005. * builds/vms/ftconfig.h: Update, also from Jouk.
  3006. 2019-06-13 Werner Lemberg <wl@gnu.org>
  3007. * src/autofit/aflatin.c (af_latin_metrics_init_widths): Minor.
  3008. 2019-06-13 Alexei Podtelezhnikov <apodtele@gmail.com>
  3009. [smooth] Restore the span buffering for direct mode only.
  3010. The buffer size FT_MAX_GRAY_SPANS is set to 10 spans, which should be
  3011. enough to cover the entire scanline for simple glyphs in most cases:
  3012. each slightly slanted edge needs up to two spans, plus a filling span
  3013. in-between. This is not new, we used to do it before cb4388783cecc.
  3014. * src/smooth/ftgrays.c (gray_TWorker): Add `spans' and `num_spans'.
  3015. (gray_hline, gray_sweep): Implement the span buffering.
  3016. (gray_raster_render): Use negative `num_spans' to avoid the direct
  3017. mode.
  3018. 2019-06-12 Alexei Podtelezhnikov <apodtele@gmail.com>
  3019. * include/freetype/ftmodapi.h (FT_DebugHook_Func): Return error.
  3020. Fix a warning by adding a return value as in `TT_RunIns',
  3021. which should not be a compatibility issue.
  3022. 2019-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  3023. * src/truetype/ttobjs.c (tt_check_trickyness_family): Add `const'.
  3024. 2019-06-11 Moazin Khatti <moazinkhatri@gmail.com>
  3025. [gzip] Add support for `gzip' encoded header.
  3026. * src/gzip/ftgzip.c (FT_Gzip_Uncompress): Modify the the call to
  3027. `inflateInit2' to enable support for `gzip' encoded headers.
  3028. 2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  3029. [type1,type42] Use `const' for string literals.
  3030. * include/freetype/internal/psaux.h (PS_Table_FuncsRec): Updated.
  3031. * include/freetype/internal/t1types.h (T1_EncodingRec): Updated.
  3032. * src/psaux/psobjs.[ch] (ps_table_add): Updated.
  3033. * src/type1/t1load.c (T1_Open_Face, parse_encoding): Updated.
  3034. * src/type42/t42objs.c (T42_Open_Face): Updated.
  3035. * src/type42/t42parse.c (t42_parse_encoding): Updated.
  3036. * src/cff/cffobjs.c (cff_face_init): Minor.
  3037. 2019-06-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  3038. [bdf,pcf] Use `const' for string literals.
  3039. * src/bdf/bdf.h (bdf_property_t): Updated `name'.
  3040. * src/bdf/bdflib.c (_bdf_list_split,bdf_create_property,
  3041. _bdf_add_property,_bdf_ato*): Updated.
  3042. * src/bdf/bdfdrivr.c (bdf_interpret_style): Updated.
  3043. * src/pcf/pcfread.c (pcf_intrpret_style): Ditto.
  3044. 2019-06-07 Philip Race <philip.race@oracle.com>
  3045. * src/base/ftinit.c (FT_Set_Default_Properties): Fix crash.
  3046. Terminate loop at end of environment.
  3047. 2019-05-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  3048. Solidify VC2005 builds.
  3049. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Explicitly
  3050. declare `_BitScanReverse' intrinsic.
  3051. * builds/windows/visualc/freetype.vcproj [Debug]: Disable intrinsics.
  3052. 2019-05-30 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  3053. [sfnt] Separate WOFF sources and headers.
  3054. Move WOFF sources and headers to separate files.
  3055. * include/freetype/internal/wofftypes.h, src/sfnt/sfwoff.c,
  3056. src/sfnt/sfwoff.h: New files.
  3057. * include/freetype/internal/fttrace.h: Register `sfwoff.c'.
  3058. * include/freetype/internal/internal.h: Define
  3059. FT_INTERNAL_WOFF_TYPES_H.
  3060. * include/freetype/internal/sfnt.h: Include FT_INTERNAL_WOFF_TYPES_H.
  3061. * include/freetype/internal/tttypes.h: Move out WOFF structures.
  3062. * src/sfnt/rules.mk: Add `sfwoff.c'.
  3063. * src/sfnt/sfnt.c: Include `sfwoff.c'.
  3064. * src/sfnt/sfobjs.c: Include `sfwoff.h', move out WOFF sources.
  3065. 2019-05-30 Werner Lemberg <wl@gnu.org>
  3066. [base] Fix `make multi'.
  3067. Reported by Nikhil.
  3068. * src/base/fterrors.c: Include FT_INTERNAL_DEBUG_H.
  3069. 2019-05-29 Ben Wagner <bungeman@google.com>
  3070. [truetype] Fix copy-and-paste error (#56409).
  3071. * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices
  3072. into `unrounded' array for phantom points.
  3073. 2019-05-29 Werner Lemberg <wl@gnu.org>
  3074. [truetype] Fix 32bit builds (#56404).
  3075. Patch suggested by Ben Wagner <bungeman@google.com>.
  3076. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_fixedToFdot6): Remove
  3077. harmful cast to unsigned type.
  3078. 2019-05-26 Ben Wagner <bungeman@google.com>
  3079. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.
  3080. 2019-05-23 Werner Lemberg <wl@gnu.org>
  3081. [truetype] Draw glyphs without deltas in variation font (#56374).
  3082. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill
  3083. `unrounded' array.
  3084. 2019-05-21 Werner Lemberg <wl@gnu.org>
  3085. * src/truetype/ttinterp.c (opcode_name): Improve mnemonics.
  3086. 2019-05-16 Werner Lemberg <wl@gnu.org>
  3087. [truetype] Actually scale varied CVT values.
  3088. Up to now, only the unscaled CVT values were varied; in other words,
  3089. the `CVAR' data was never used for bytecode hinting.
  3090. * src/truetype/ttgxvar.c (tt_cvt_ready_iterator): New auxiliary
  3091. function.
  3092. (tt_face_vary_cvt): Use it to trigger rescaling of CVT values.
  3093. 2019-05-16 Werner Lemberg <wl@gnu.org>
  3094. [truetype] Use 26.6 format for storing unscaled CVT values.
  3095. If `CVAR' data is applied to variation fonts, fractional values are
  3096. possible.
  3097. * include/freetype/internal/tttypes.h (TT_FaceRec): Change type of
  3098. `cvt' from `FT_Short' to `FT_Int32'.
  3099. * src/truetype/ttgxvar.c (FT_fdot6ToFixed): New macro.
  3100. (tt_face_vary_cvt): Use it to update code to 26.6 format.
  3101. * src/truetype/ttobjs.c (tt_size_run_prep): Update code to 26.6
  3102. format.
  3103. * src/truetype/ttpload.c (tt_face_load_cvt): Stora data in 26.6
  3104. format.
  3105. 2019-05-16 Werner Lemberg <wl@gnu.org>
  3106. * src/truetype/ttgload.c (load_truetype_glyph): Init `unrounded'.
  3107. This fixes linear advance width values for spacing glyphs. Bug
  3108. introduced 2019-05-09.
  3109. 2019-05-16 Werner Lemberg <wl@gnu.org>
  3110. [truetype] Avoid code duplication.
  3111. * src/truetype/ttobjs.c (tt_size_run_prep): Scale CVT values in this
  3112. function.
  3113. (tt_size_ready_bytecode): Updated.
  3114. * src/truetype/ttgload.c (tt_loader_init): Updated.
  3115. 2019-05-13 Jouk Jansen <joukj@hrem.nano.tudelft.nl>
  3116. * vms_make.com: Updated. Handle `bzip2' directory, too.
  3117. 2019-05-13 Werner Lemberg <wl@gnu.org>
  3118. * src/psaux/psfont.c (cf2_font_setup): Fix compiler warning.
  3119. 2019-05-12 Werner Lemberg <wl@gnu.org>
  3120. [truetype] Doh. Fix last commit to make it work.
  3121. Very embarassing :-)
  3122. Reported as
  3123. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14701
  3124. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14705
  3125. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14710
  3126. * src/truetype/ttgload.c (IS_DEFAULT_INSTANCE): Move up and add
  3127. argument; update all callers.
  3128. (TT_Process_Simple_Glyph): Use it. The `unrounded' array is active
  3129. for variation fonts only, thus also enclose related code with
  3130. `#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT ... #endif' where
  3131. necessary.
  3132. Revert commit a113e5d from 2019-05-09, and don't use `extra_points2'
  3133. but allocate a temporary array.
  3134. Speed up the scaling of the `unrounded' array.
  3135. * src/truetype/ttgxvar.c (FT_fixedToInt, FT_FixedToFdot6): Fix type
  3136. conversions and rounding. The unsigned type must have more or equal
  3137. bits to the signed type.
  3138. 2019-05-09 Werner Lemberg <wl@gnu.org>
  3139. [truetype] Increase precision of font variation (#54371).
  3140. This patch makes FreeType use font units in 26.6 format internally
  3141. instead of integers.
  3142. * src/truetype/ttgxvar.c (FT_fixedToFdot6): New macro.
  3143. (TT_Vary_Apply_Glyph_Deltas): Add argument to output unrounded font
  3144. coordinates.
  3145. * src/truetype/ttgxvar.h: Updated.
  3146. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Use
  3147. `extra_points2' array to temporarily hold unrounded point
  3148. coordinates; use them to compute scaled coordinates and linear
  3149. advance width and height.
  3150. (load_truetype_code): Adjust similarly.
  3151. 2019-05-09 Werner Lemberg <wl@gnu.org>
  3152. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Minor.
  3153. 2019-05-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  3154. [smooth] Faster fractions.
  3155. * src/smooth/ftgrays.c (SUBPIXELS): Replace with...
  3156. (FRACT): A fractional coordinate macro to use in...
  3157. (gray_render_line, gray_render_scanline): ... here.
  3158. 2019-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  3159. * src/raster/ftraster.c (Draw_Sweep): Unbreak.
  3160. 2019-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
  3161. * src/raster/ftraster.c: Clean-ups.
  3162. 2019-05-05 Werner Lemberg <wl@gnu.org>
  3163. * src/truetype/ttgxvar.c: More use of `FT_fdot14ToFixed'.
  3164. 2019-05-04 Alexei Podtelezhnikov <apodtele@gmail.com>
  3165. * src/smooth/ftgrays.c (gray_render_line): Small shortcut.
  3166. 2019-05-04 Werner Lemberg <wl@gnu.org>
  3167. Various clang 8.0 static analyzer fixes.
  3168. Reported by Sender Ghost <lightside@gmx.com>.
  3169. * src/autofit/afcjk.c (af_cjk_hints_compute_edges): Catch a corner
  3170. case where `edge->first' could be NULL.
  3171. * src/pfr/pfrobjs.c (pfr_slot_load): Remove unnecessary test of
  3172. `size'.
  3173. * src/raster/ftraster.c (Draw_Sweep): Catch a corner case where
  3174. `draw_right' might be NULL.
  3175. * src/sfnt/ttmtx.c (tt_face_get_metrics): Fix limit test for
  3176. `aadvance'.
  3177. Ensure `abearing' always hold a meaningful result.
  3178. * src/truetype/ttgload.c (load_truetype_glyph): Ensure `subglyph' is
  3179. not NULL before accessing it.
  3180. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Remove unnecessary
  3181. test of `namedstyle'.
  3182. * src/type42/t42parse.c (t42_parser_done): Ensure
  3183. `parser->root.funcs.done' is not NULL before accessing it.
  3184. 2019-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  3185. Miscellaneous macro updates.
  3186. * src/base/ftoutln.c (SCALED): Updated.
  3187. * src/smooth/ftgrays.c (SCALED): Ditto.
  3188. (FLOOR, ROUND, CEILING): Removed.
  3189. * src/psaux/psfixed.h (cf2_fracToFixed): Updated.
  3190. 2019-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  3191. Tweak LCD filtering.
  3192. * src/base/ftlcdfil.c (ft_lcd_filter_fir, _ft_lcd_filter_legacy):
  3193. Choose direction from bitmap's pixel_mode.
  3194. * include/freetype/internal/ftobjs.c (FT_Bitmap_LcdFilterFunc):
  3195. Updated.
  3196. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Updated.
  3197. 2019-05-02 Werner Lemberg <wl@gnu.org>
  3198. * vms_make.com: Updated (#56253).
  3199. Remove no longer existing directories (`autohint', `otlayout').
  3200. Update used base extensions.
  3201. Activate `autofit' module.
  3202. Add `gxvalid' module.
  3203. Update copyright notices.
  3204. 2019-04-29 Alexei Podtelezhnikov <apodtele@gmail.com>
  3205. [smooth] Simplify cubic Bézier flattening.
  3206. The previous implementation is correct but it is too complex.
  3207. The revised algorithm is based on the fact that each split moves
  3208. the control points closer to the trisection points on the chord.
  3209. The corresponding distances are good surrogates for the curve
  3210. deviation from the straight line.
  3211. This cubic flattening algorithm is somewhat similar to the conic
  3212. algorithm based the distance from the control point to the middle of
  3213. the chord. The cubic distances, however, decrease less predictably
  3214. but are easy enough to calculate on each step.
  3215. The new algorithm produces slightly larger number of splits, which is
  3216. compensated by its simplicity. The overall rendering performance is
  3217. improved by 1-2%. The larger number of splits does not necessarily
  3218. result in higher quality, which stays comparable.
  3219. * src/smooth/ftgrays.c (gray_render_cubic): Replace the split
  3220. condition.
  3221. 2019-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
  3222. [smooth] Bithacks and cosmetics.
  3223. * src/smooth/ftgrays.c (gray_record_cell, gray_set_cell, gray_hline,
  3224. gray_render_conic, gray_convert_glyph_inner): Updated.
  3225. 2019-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  3226. Optimize Bézier bisections.
  3227. This change makes bisections faster by 20-30%. When inlined into
  3228. `gray_render_cubic', this makes the function faster by 10% and is
  3229. noticeable in the overall rendering performance.
  3230. * src/raster/ftraster.c (Split_Conic, Split_Cubic): Use shifts and
  3231. refactor.
  3232. * src/smooth/ftgrays.c (gray_split_conic, gray_split_cubic): Ditto.
  3233. * src/base/ftstroke.c (ft_conic_split, ft_cubic_split): Ditto.
  3234. * src/base/ftbbox.c (cubic_peak): Use shifts.
  3235. 2019-04-23 Werner Lemberg <wl@gnu.org>
  3236. * src/sfnt/ttcmap.c (tt_cmap12_next): Remove dead code.
  3237. Found by clang 8.0's static analyzer and reported by Sender Ghost
  3238. <lightside@gmx.com>.
  3239. 2019-04-23 Werner Lemberg <wl@gnu.org>
  3240. [base] Fix thinko in previous commit.
  3241. * src/base/ftbitmap.c (FT_Bitmap_Blend): Check final width, not
  3242. target pitch.
  3243. Problem reported by Sender Ghost <lightside@gmx.com>.
  3244. 2019-04-22 Werner Lemberg <wl@gnu.org>
  3245. * src/base/ftbitmap.c (FT_Bitmap_Blend): Check target pitch.
  3246. Problem reported by Sender Ghost <lightside@gmx.com>.
  3247. 2019-04-22 Werner Lemberg <wl@gnu.org>
  3248. Fix return value of `FT_Set_Named_Instance' (#56186).
  3249. * src/truetype/ttgxvar.c (TT_Set_Named_Instance): Correctly handle
  3250. internal return value -1 of `TT_Set_Var_Design'.
  3251. 2019-04-18 Werner Lemberg <wl@gnu.org>
  3252. [pcf] Fix handling of undefined glyph (#56067).
  3253. This commit fixes the changes from 2018-07-21, which broke charmap
  3254. iteration. We now add the default character as a new glyph with
  3255. index 0, thus increasing the number of glyphs by one (as before).
  3256. * src/pcf/pcfread.c (pcf_get_metrics): Adjust to new artificial
  3257. glyph with index 0.
  3258. Limit number of elements to 65534.
  3259. (pcf_get_bitmaps): Ditto.
  3260. Unify two loops into one; this avoids allocation of an intermediate
  3261. array.
  3262. (pcf_get_encodings): Don't flip indices but copy glyph metrics of
  3263. default character to index 0.
  3264. Also handle invalid default character.
  3265. * docs/CHANGES: Updated.
  3266. 2019-04-15 Minmin Gong <gongminmin@msn.com>
  3267. * CMakeLists.txt: Avoid rewriting of unchanged configuration files.
  3268. Reported as
  3269. https://savannah.nongnu.org/patch/index.php?9755
  3270. 2019-04-15 JDG <JonathanG@iQmetrix.com>
  3271. * src/tools/apinames.c (main): Fix error message.
  3272. Reported as
  3273. https://savannah.nongnu.org/patch/?9796
  3274. 2019-04-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  3275. [smooth] Fix segfault in direct mode (#56092).
  3276. * src/base/ftoutln.c (FT_Outline_Render): Set missing clip_box for
  3277. direct mode.
  3278. * src/smooth/ftgrays.c (gray_raster_render): Use it.
  3279. 2019-04-06 Werner Lemberg <wl@gnu.org>
  3280. * src/sfnt/ttcmap.c (tt_get_glyph_name): Pacify compiler (#56061).
  3281. This is for Visual Studio 2019 on ARM.
  3282. 2019-04-06 Werner Lemberg <wl@gnu.org>
  3283. For distribution, replace `.tar.bz2' with `.tar.xz' bundles.
  3284. * builds/toplevel.mk (build): Do it.
  3285. * README, docs/CHANGES, docs/release: Updated.
  3286. 2019-04-06 Antony Lee <anntzer.lee@gmail.com>
  3287. Make `glyph_name' parameter to `FT_Get_Name_Index' a `const'.
  3288. * include/freetype/freetype.h (FT_Get_Name_Index),
  3289. include/freetype/internal/ftobjs.h (FT_Face_GetGlyphNameIndexFunc),
  3290. include/freetype/internal/services/svgldict.h
  3291. (FT_GlyphDict_NameIndexFunc), src/base/ftobjs.c (FT_Get_Name_Index),
  3292. src/cff/cffdrivr.c (cff_get_name_index), src/sfnt/sfdriver.c
  3293. (sfnt_get_name_index), src/type1/t1driver.c (t1_get_name_index),
  3294. src/type42/t42drivr.c (t42_get_name_index): Add `const' to second
  3295. argument.
  3296. 2019-03-31 Armin Hasitzka <prince.cherusker@gmail.com>
  3297. [cff] Fix boundary checks.
  3298. 642bc7590c701c8cd35a9f60fa899cfa518b17ff introduced dynamically
  3299. allocated memory when parsing CFF files with the "old" engine. Bounds
  3300. checks have never been updated, however, leading to pointless
  3301. comparisons of pointers in some cases. This commit presents a
  3302. solution for bounds checks in the CFF module with an extended logic
  3303. for the "old" engine while staying as concise as possible for the
  3304. "new" one.
  3305. * src/cff/cffparse.h: Introduce the struct `CFF_T2_StringRec' and
  3306. the additional field `t2_strings' within `CFF_ParserRec'.
  3307. * src/cff/cffparse.c (cff_parser_within_limits): Move all boundary
  3308. checks into this new function and update the rest of `cffparse.c' to
  3309. use it.
  3310. Reported as
  3311. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12137
  3312. 2019-03-20 Werner Lemberg <wl@gnu.org>
  3313. [autofit] Fix Mongolian blue zone characters.
  3314. * src/autofit/afblue.dat: Use U+200D (ZERO-WIDTH JOINER) characters
  3315. to get medial forms for some Mongolian characters.
  3316. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
  3317. 2019-03-19 Werner Lemberg <wl@gnu.org>
  3318. [autofit] Add support for Mongolian script.
  3319. As a de-facto standard, layouts using this script are constructed
  3320. horizontally line by line, then the lines are rotated clockwise for
  3321. vertical display.
  3322. * src/autofit/afblue.dat: Add blue zone data for Mongolian.
  3323. * src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
  3324. * src/autofit/afscript.h: Add Mongolian standard characters.
  3325. * src/autofit/afranges.c, src/autofit/afstyles.h: Add Mongolian
  3326. data.
  3327. 2019-03-15 Werner Lemberg <wl@gnu.org>
  3328. * Version 2.10.0 released.
  3329. ==========================
  3330. Tag sources with `VER-2-10-0'.
  3331. * docs/VERSION.TXT: Add entry for version 2.10.0.
  3332. * docs/CHANGES: Updated.
  3333. * README, Jamfile (RefDoc), src/base/ftver.rc,
  3334. builds/windows/vc2010/freetype.vcxproj,
  3335. builds/windows/vc2010/index.html,
  3336. builds/windows/visualc/freetype.dsp,
  3337. builds/windows/visualc/freetype.vcproj,
  3338. builds/windows/visualc/index.html,
  3339. builds/windows/visualce/freetype.dsp,
  3340. builds/windows/visualce/freetype.vcproj,
  3341. builds/windows/visualce/index.html,
  3342. builds/wince/vc2005-ce/freetype.vcproj,
  3343. builds/wince/vc2005-ce/index.html,
  3344. builds/wince/vc2008-ce/freetype.vcproj,
  3345. builds/wince/vc2008-ce/index.html: s/2.9.1/2.10.0/, s/291/2100/.
  3346. * include/freetype/freetype.h (FREETYPE_MINOR): Set to 10.
  3347. (FREETYPE_PATCH): Set to 0.
  3348. * builds/unix/configure.raw (version_info): Set to 23:0:17.
  3349. * CMakeLists.txt (VERSION_MINOR): Set to 10.
  3350. (VERSION_PATCH): Set to 0.
  3351. * builds/toplevel.mk (version, winversion): Since the minor version
  3352. number has two digits now, never omit the patch number. We would
  3353. get ambiguous zip file names otherwise.
  3354. (dist): Remove remnants of `docmaker' tool.
  3355. (do-dist): Remove unused intermediate files.
  3356. * src/cff/cffparse.c (destrict_c2s_item): Guard function with
  3357. CFF_CONFIG_OPTION_OLD_ENGINE macro.
  3358. 2019-03-07 Andrei Alexeyev <0x416b617269@gmail.com>
  3359. Werner Lemberg <wl@gnu.org>
  3360. Fix invalid function pointer casts.
  3361. This change should allow Freetype to work on WASM/Emscripten without
  3362. needing `-s EMULATE_FUNCTION_POINTER_CASTS=1'.
  3363. * src/autofit/afdummy.c (af_dummy_hints_apply): Fix signature.
  3364. * src/cid/cidload.c (cid_parse_font_matrix, parse_fd_array,
  3365. parse_expansion_factor, parse_font_name): Return `void', not
  3366. `FT_Error'.
  3367. * include/freetype/internal/ftobjs.h (FT_CMap_CharVarIsDefaultFunc):
  3368. Fix signature.
  3369. 2019-03-05 Werner Lemberg <wl@gnu.org>
  3370. [base] Handle numeric overflow (#55827).
  3371. * src/base/ftglyph.c (FT_Glyph_Get_CBox): Use `FT_PIX_CEIL_LONG'.
  3372. 2019-03-05 Sebastian Rasmussen <sebras@gmail.com>
  3373. [psaux] Fix use of uninitialized memory (#55832).
  3374. * src/psaux/psintrp.c (cf2_interpT2CharString): The call to
  3375. `cf2_arrstack_setCount' may fail because the allocator ran out of
  3376. memory. When this happens the stack is still written to before the
  3377. error condition is checked. This means that FreeType writes outside
  3378. of allocated memory. This commit moves the error check prior to the
  3379. stack assignment, hence the function now properly returns with an
  3380. error condition.
  3381. 2019-02-23 Werner Lemberg <wl@gnu.org>
  3382. * src/base/ftbitmap.c (FT_Bitmap_Blend): No fractional offsets.
  3383. The function only provided a framework without an actual
  3384. implementation, which this commit removes.
  3385. 2019-02-23 Werner Lemberg <wl@gnu.org>
  3386. * src/tools/update-copyright-year: Insert `(C)'.
  3387. 2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
  3388. [truetype] Mask numeric overflows.
  3389. * src/truetype/ttinterp.c (Move_CVT, Move_CVT_Stretched, Ins_MIRP):
  3390. Mask numeric overflows.
  3391. Reported as
  3392. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11681
  3393. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11734
  3394. 2019-02-21 Armin Hasitzka <prince.cherusker@gmail.com>
  3395. [psaux] Mask numeric overflow.
  3396. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Mask numeric
  3397. overflow.
  3398. Reported as
  3399. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13041
  3400. 2019-02-16 Wink Saville <wink@saville.com>
  3401. * src/autofit/afwarp.h (af_warper_compute): Fix declaration.
  3402. 2019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
  3403. [truetype] Apply MVAR hasc, hdsc and hlgp metrics to current FT_Face metrics.
  3404. Instead of setting typo or win metrics as the new `FT_Face' metrics
  3405. indiscriminately, apply only typo deltas to the currently active
  3406. `FT_Face' metrics. This prevents line height differences when the
  3407. default outlines were used as the regular face and instances for
  3408. everything else, for example.
  3409. * src/truetype/ttgxvar.c (tt_apply_mvar): Implement.
  3410. 2019-02-02 Nikolaus Waxweiler <madigens@gmail.com>
  3411. [sfnt] Use typo metrics if OS/2 fsSelection USE_TYPO_METRICS bit is set.
  3412. If the `OS/2' table exists and `fsSelection' bit 7
  3413. (USE_TYPO_METRICS) is set, use the `sTypo*' set of values to compute
  3414. the `FT_Face's ascender, descender, and height. Otherwise, fall
  3415. back to old behavior.
  3416. * src/sfnt/sfobjs.c (sfnt_load_face): Implement.
  3417. 2019-01-18 John Tytgat <John.Tytgat@esko.com>
  3418. [sfnt] Handle TT fonts having two PostScript font names (#55471).
  3419. * src/sfnt/sfdriver.c (sfnt_get_name_id): Prefer English over any
  3420. other language found for PostScript font names.
  3421. 2019-01-08 Chris Liddell <chris.liddell@artifex.com>
  3422. [psaux] Fix closepath (#55414).
  3423. All of the Type 1 path building is done with code common to the
  3424. revised CFF engine, with the exception of closepath, which was still
  3425. calling ps_builder_close_contour(), thus previously cached segments
  3426. were not always written to the path, and glyph corruption, or even
  3427. invalid outlines were possible.
  3428. * src/psauc/psinterp.c (cf2_interpT2CharString) <cf2_cmdCLOSEPATH>:
  3429. Switch to calling `cf2_glyphpath_closeOpenPath'.
  3430. 2018-12-29 Werner Lemberg <wl@gnu.org>
  3431. * src/autofit/aflatin2.c: Some fixes from `aflatin.c' (#55310).
  3432. 2018-12-25 Werner Lemberg <wl@gnu.org>
  3433. * src/psaux/cffdecode.c (cff_operaor_seac): Fix numeric overflow.
  3434. Reported as
  3435. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11915
  3436. 2018-12-12 Werner Lemberg <wl@gnu.org>
  3437. [gxvalid] Fix compiler warnings.
  3438. * src/gxvalid/gxvjust.c (gxv_just_check_max_gid),
  3439. src/gxvalid/gxvmort.c (gxv_mort_coverage_validate): Use `FT_UNUSED'.
  3440. 2018-12-11 Werner Lemberg <wl@gnu.org>
  3441. * src/truetype/ttgload.c (TT_Hint_Glyph): Remove useless test.
  3442. `control_len' only gets its value from `n_ins' (and vice versa),
  3443. which is always read as `unsigned short' and thus can't be larger
  3444. than 0xFFFF.
  3445. 2018-12-04 Werner Lemberg <wl@gnu.org>
  3446. [bdf] Ignore data after `ENDFONT'.
  3447. Reported as
  3448. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10798
  3449. * src/bdf/bdflib.c (_bdf_parse_end): New function.
  3450. (_bdf_parse_glyphs): Switch to `_bdf_parse_end' after `ENDFONT' has
  3451. been encountered.
  3452. 2018-12-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  3453. * builds/windows/visualc/freetype.dsp: Dust off.
  3454. 2018-11-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  3455. * builds/windows/vc2010/freetype.vcxproj: Simplify.
  3456. 2018-11-27 Chris Liddell <chris.liddell@artifex.com>
  3457. [type1,cff] Add FT_{Set,Get}_MM_WeightVector API calls.
  3458. For multiple master fonts, common usage (in Postscript) is to modify
  3459. the WeightVector of an existing font instance, this addition
  3460. supports that use.
  3461. * include/freetype/ftmm.h, src/base/ftmm.c (FT_Set_MM_WeightVector,
  3462. FT_Get_MM_WeightVector): New API functions.
  3463. * include/freetype/internalservices/svmm.h
  3464. (FT_Set_MM_WeightVector_Func, FT_Get_MM_WeightVector_Func): New
  3465. function types.
  3466. (MultiMasters): Add `set_mm_weightvector' and `get_mm_weightvector'
  3467. members.
  3468. (FT_DEFINE_SERVICE_MULTIMASTERSREC): Updated.
  3469. * src/cffcffdrivr.c (cff_set_mm_weightvector,
  3470. cff_get_mm_weightvector): New functions.
  3471. (cff_service_multi_masters): Register them.
  3472. * src/truetype/ttdriver.c (tt_service_gx_multi_masters): Updated.
  3473. This driver doesn't use the new interface.
  3474. * src/type1/t1load.c (T1_Set_MM_WeightVector,
  3475. T1_Get_MM_WeightVector): New functions.
  3476. * src/type1/t1driver.c (t1_service_multi_masters): Register them.
  3477. * src/type1/t1load.h: Updated.
  3478. 2018-11-27 Ben Wagner <bungeman@google.com>
  3479. [cff] Fix compiler warning (#55105).
  3480. * src/cff/cffparse.c (cff_parser_run): Guard label only used if
  3481. CFF_CONFIG_OPTION_OLD_ENGINE is active.
  3482. 2018-11-27 Ben Wagner <bungeman@google.com>
  3483. [truetype] Fix numeric overflow (#55103).
  3484. * src/truetype/ttgload.c (compute_glyph_metrics): Use `SUB_LONG'.
  3485. 2018-11-25 Alexei Podtelezhnikov <apodtele@gmail.com>
  3486. [builds] Belated DLL support with vc2002-vc2008.
  3487. The solution and project files should be automatically upgraded for
  3488. the approriate Visual C++ version.
  3489. * builds/windows/visualc/freetype.{sln,vcproj}: Major upgrades.
  3490. * builds/windows/visualc/index.html: Document the change.
  3491. * builds/windows/vc2005, builds/windows/vc2008: Removed as redundant.
  3492. 2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
  3493. * src/cff/cffparse.c: Please the compiler.
  3494. 2018-11-22 Armin Hasitzka <prince.cherusker@gmail.com>
  3495. [cff] Fix memory overflow.
  3496. Reported as
  3497. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9869
  3498. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10869
  3499. * src/cff/cffparse.c (destruct_t2s_item, cff_parser_run): Store
  3500. evaluated T2 charstrings in separately allocated memory.
  3501. 2018-11-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  3502. * builds/windows/{visualc,vc2005,vc2008}/freetype.vcproj: Fix it.
  3503. 2018-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  3504. [smooth] Placeholder only for library-enabled LCD filtering.
  3505. * src/smooth/ftsmooth.c (ft_smooth_init): Add disabled
  3506. `FT_Library_SetLcdFilter' call.
  3507. 2018-11-09 Young Xiao <yangx92@hotmail.com>
  3508. [psaux] Add safety guard (#54985).
  3509. * src/psaux/psobjs.c (cff_builder_close_contour): Do it.
  3510. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  3511. * builds/unix/configure.raw: Require `windows.h' for windres.
  3512. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  3513. [ftstroke] Fix unpredictable failures (#54986).
  3514. * src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
  3515. 2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  3516. [ftstroke] Fix unpredictable failures (#54976).
  3517. * src/base/ftstroke.c (ft_sroke_border_close): Set the start tags.
  3518. 2018-11-07 Ben Wagner <bungeman@google.com>
  3519. [truetype] Fix VF check from 2018-09-12 (#54973).
  3520. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use correct
  3521. offsets for estimates.
  3522. 2018-11-06 Werner Lemberg <wl@gnu.org>
  3523. [pshinter] Fix numeric overflow.
  3524. Reported as
  3525. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11242
  3526. * src/pshinter/pshrec.c (ps_dimension_add_t1stem): Implement it.
  3527. 2018-11-06 Werner Lemberg <wl@gnu.org>
  3528. [psaux] Fix timeout in old CFF engine.
  3529. Reported as
  3530. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260
  3531. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  3532. <cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless
  3533. loop.
  3534. 2018-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
  3535. * src/truetype/ttgxvar.c: Use enum definitions.
  3536. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  3537. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Adjust condition.
  3538. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  3539. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Tracing tweaks.
  3540. 2018-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
  3541. Revert due to specs: [truetype] Speed up variation IUP.
  3542. 2018-11-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  3543. * src/truetype/ttgxvar.c (ft_var_get_item_delta): Fixed logic.
  3544. Reported and tested by Behdad.
  3545. 2018-11-02 Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
  3546. [autofit] Prevent SEGV.
  3547. See
  3548. https://bugs.ghostscript.com/show_bug.cgi?id=697545
  3549. for more details on how the bug was found.
  3550. * src/autofit/afloader.c (af_loader_load_glyph): Propagate error
  3551. code.
  3552. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  3553. [truetype] Speed up variation IUP.
  3554. * src/truetype/ttgxvar.c (tt_delta_interpolate): Separate trivial
  3555. snapping to the same position from true interpolation.
  3556. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  3557. * src/type1/t1load.c (t1_set_mm_blend): Optimized.
  3558. 2018-10-31 Alexei Podtelezhnikov <apodtele@gmail.com>
  3559. * src/truetype/ttgxvar.c (ft_var_get_item_delta): Optimized.
  3560. 2018-10-29 Werner Lemberg <wl@gnu.org>
  3561. [base] Fix numeric overflow.
  3562. Reported as
  3563. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11080
  3564. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Use `MUL_LONG'.
  3565. 2018-10-29 Werner Lemberg <wl@gnu.org>
  3566. [cff] Fix numeric overflow.
  3567. Reported as
  3568. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10988
  3569. * src/cff/cffparse.c (cff_parser_run)
  3570. [CFF_CONFIG_OPTION_OLD_ENGINE]: Use `NEG_LONG'.
  3571. 2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  3572. [sfnt] Make `head' timestamps unsigned.
  3573. It's been more than 2^31 seconds since 1904.
  3574. * include/freetype/tttables.h (TT_Header): Change field types.
  3575. * src/sfnt/ttload.c (tt_face_load_generic_header): Updated.
  3576. 2018-10-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  3577. Revert: Align FreeType with standard C memory management.
  3578. 2018-10-27 Werner Lemberg <wl@gnu.org>
  3579. [psaux] Fix numeric overflow.
  3580. Triggered by
  3581. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11157
  3582. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_blend>
  3583. [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix integer overflow.
  3584. 2018-10-20 Werner Lemberg <wl@gnu.org>
  3585. Avoid endless loop while tracing (#54858).
  3586. * src/type1/t1load.c (parse_buildchar): Guard tracing stuff with
  3587. FT_DEBUG_LEVEL_TRACE.
  3588. 2018-10-17 David Demelier <markand@malikania.fr>
  3589. * CMakeLists.txt: Specify `RUNTIME DESTINATION'.
  3590. This is needed for DLL builds.
  3591. 2018-10-07 Werner Lemberg <wl@gnu.org>
  3592. A missing Unicode cmap is not a fatal error.
  3593. This is a follow-up to the previous commit.
  3594. * src/cff/cffobjs.c (cff_face_init), src/sfnt/sfobjs.c
  3595. (sfnt_load_face), src/type1/t1objs.c (T1_Face_Init),
  3596. src/type42/t42objs.c (T42_Face_Init): Implement it.
  3597. 2018-10-07 Werner Lemberg <wl@gnu.org>
  3598. Fix handling of FT_CONFIG_OPTION_ADOBE_GLYPH_LIST (#54794).
  3599. * src/cff/cffcmap.c (cff_cmap_unicode_init), src/psaux/t1cmap.c
  3600. (t1_cmap_unicode_init), src/sfnt/ttcmap.c (tt_cmap_unicode_init):
  3601. Check `unicodes_init' field.
  3602. 2018-10-03 Werner Lemberg <wl@gnu.org>
  3603. [ftgrays] Fix typo in stand-alone mode (#54771).
  3604. * src/smooth/ftgrays.c (FT_THROW) [STANDALONE_ &&
  3605. FT_DEBUG_LEVEL_TRACE]: Fix call to `FT_ERR_CAT'.
  3606. 2018-10-02 Werner Lemberg <wl@gnu.org>
  3607. [psaux] Fix segfault.
  3608. Reported as
  3609. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10768
  3610. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  3611. <cff_op_callothersubr> [CFF_CONFIG_OPTION_OLD_ENGINE]: Check
  3612. argument.
  3613. 2018-10-02 Werner Lemberg <wl@gnu.org>
  3614. [psaux] Fix numeric overflow.
  3615. Reported as
  3616. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10740
  3617. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
  3618. [CFF_CONFIG_OPTION_OLD_ENGINE]: Use NEG_INT.
  3619. 2018-10-02 Werner Lemberg <wl@gnu.org>
  3620. [pshinter] Handle numeric overflow.
  3621. Reported as
  3622. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10550
  3623. * src/pshinter/pshglob.c (psh_blues_snap_stem): Mask numeric
  3624. overflow.
  3625. 2018-09-27 Alexei Podtelezhnikov <apodtele@gmail.com>
  3626. Align FreeType with standard C memory management.
  3627. * include/freetype/ftsystem.h: Include FT_TYPES_H.
  3628. (*FT_Alloc_Func, *FT_Realloc_Func): Use size_t for the size arguments.
  3629. * src/raster/ftmisc.h: Ditto.
  3630. * builds/amiga/src/base/ftsystem.c, builds/unix/ftsystem.c,
  3631. * builds/vms/ftsystem.c, src/base/ftsystem.c (ft_alloc, ft_realloc):
  3632. Use size_t for the size arguments.
  3633. * src/base/ftdbgmem.c (ft_mem_debug_alloc, ft_mem_debug_realloc): Use
  3634. FT_Offset, aka size_t, for the size arguments.
  3635. 2018-09-25 Werner Lemberg <wl@gnu.org>
  3636. Fix handling of `FT_Bool'.
  3637. Before this commit we had code like
  3638. (FT_Bool)( globals->glyph_styles[gindex] & 0x8000)
  3639. Since `FT_Bool' is defined to be an `unsigned char', the code
  3640. evaluated to something like
  3641. (unsigned char)( 0x8532 & 0x8000)
  3642. which in turn expanded to
  3643. (unsigned char)( 0x8000)
  3644. and finally yielded 0x00 – i.e., false – not as expected.
  3645. Problem reported and analyzed by Tony Smith <tony.smith@macro4.com>.
  3646. * include/freetype/fttypes.h (FT_BOOL): Add a comparison against
  3647. zero so that we always have a Boolean expression.
  3648. */*: Replace castings to `FT_Bool' with calls to `FT_BOOL' where
  3649. possible.
  3650. 2018-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
  3651. [bdf] Speed up charmap access.
  3652. This makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times faster.
  3653. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Help binary search
  3654. with continuous prediction.
  3655. 2018-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
  3656. * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Another tweak.
  3657. This one should be clearer. When the rounded monochrome bbox collapses
  3658. we add a pixel that covers most if not all original cbox.
  3659. 2018-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
  3660. * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Further tweak.
  3661. 2018-09-21 Ben Wagner <bungeman@google.com>
  3662. Improve auto-hinter handling of bitmap fonts (#54681).
  3663. For bitmap fonts, `FT_Load_Glyph' should either return an error or
  3664. not set the format to `FT_GLYPH_FORMAT_OUTLINE'. However, in this
  3665. case `FT_Load_Glyph' calls into the auto-hinter which calls back
  3666. into `FT_Load_Glyph' with `FT_LOAD_NO_SCALE' in the flags, which
  3667. marks the glyph as `FT_GLYPH_FORMAT_OUTLINE' with an empty path
  3668. (even though it doesn't have any path). It appears that the
  3669. auto-hinter should not be called when the face doesn't have
  3670. outlines. The current test for using the auto-hinter in
  3671. `FT_Load_Glyph' checks whether the driver supports scalable
  3672. outlines, but not if the face supports scalable outlines.
  3673. * src/base/ftobjs.c (FT_Load_Glyph): Directly check whether we have
  3674. scalable outlines.
  3675. 2018-09-21 Werner Lemberg <wl@gnu.org>
  3676. [raster] Fix disappearing vertical lines (#54589).
  3677. * src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case
  3678. where both left and right outline exactly pass pixel centers.
  3679. 2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
  3680. * src/base/ftobjs.c (ft_glyphslot_preset_bimap): Tiny rounding tweak.
  3681. This adds pixels in case a contour goes through the center
  3682. and they need to be turned on in the b/w rasterizer.
  3683. 2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
  3684. [pcf] Replace charmap implementation.
  3685. PCF comes with charmap lookup table, aka PCF encodings. Using it
  3686. directly makes FT_Get_Char_Index and FT_Get_Next_Char 4-5 times
  3687. faster than the original BDF-like binary searches.
  3688. * src/pcf/pcf.h (PCF_EncodingRec): Removed.
  3689. (PCF_FaceRec): Remove `nencodings' and `encodings'.
  3690. * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Replaced.
  3691. * src/pcf/pcfread.c (pcf_get_encodings): Store data differently.
  3692. 2018-09-20 Werner Lemberg <wl@gnu.org>
  3693. [base] Remove unused function `FT_GlyphLoader_CopyPoints'.
  3694. * include/freetype/internal/ftgloadr.h, src/base/ftgloadr.c
  3695. (FT_GlyphLoader_CopyPoints): Do it.
  3696. 2018-09-19 Alexei Podtelezhnikov <apodtele@gmail.com>
  3697. [pcf] Prepare to replace charmap implementation.
  3698. * src/pcf/pcf.h (PCF_FaceRec): Updated to include...
  3699. (PCF_EncRec): ... this new structure to store charmap geometry.
  3700. * src/pcf/pcfread.c (pcf_get_encodings): Store charmap geometry.
  3701. 2018-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  3702. Remove unused fields.
  3703. * src/pcf.h (PCF_FaceRec): Remove `charmap' and `charmap_handle'.
  3704. * src/bdfdrvr.h (BDF_FaceRec): Ditto.
  3705. * src/winfonts/winfnt.h (FNT_FaceRec): Ditto.
  3706. 2018-09-17 Werner Lemberg <wl@gnu.org>
  3707. [pshinter] Handle numeric overflow.
  3708. Reported as
  3709. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10396
  3710. * src/pshinter/pshglob.c: Include FT_INTERNAL_CALC_H.
  3711. (psh_blues_snap_stem): Mask numeric overflow.
  3712. 2018-09-13 Werner Lemberg <wl@gnu.org>
  3713. [truetype] Some fixes for VF checks.
  3714. Reported as
  3715. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10317
  3716. * src/truetype/ttgxvar.c (ft_var_load_gvar): Properly exit memory
  3717. frame if we have invalid glyph variation data offsets.
  3718. (tt_face_vary_cvt): Protect against missing `tuplecoords' array.
  3719. Fix typo.
  3720. 2018-09-13 Werner Lemberg <wl@gnu.org>
  3721. * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Fix last commit.
  3722. 2018-09-13 Werner Lemberg <wl@gnu.org>
  3723. * src/sfnt/sfdriver.c (sfnt_get_var_ps_name): Check `result'.
  3724. Reported as
  3725. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10316
  3726. 2018-09-12 John Tytgat <John.Tytgat@esko.com>
  3727. [sfnt] Better PS name handling (#54629).
  3728. * src/sfnt/sfdriver (IS_WIN, IS_APPLE): Omit language ID checks.
  3729. (get_win_string, get_apple_string): Return NULL when the PostScript
  3730. font name characters is not according to specification.
  3731. (get_win_string): Make trace output work if the high byte if
  3732. non-zero.
  3733. (sfnt_get_var_ps_name, sfnt_get_ps_name): Previously we preferred
  3734. Win PS name (when there is also an Apple PS name); change this into
  3735. a fallback to Apple PS name in case the Win PS name is invalid.
  3736. 2018-09-12 Werner Lemberg <wl@gnu.org>
  3737. [truetype] Improve VF check.
  3738. Triggered by
  3739. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10255
  3740. * src/truetype/ttgxvar.c (ft_var_load_gvar): Use better limit check
  3741. for `tupleCount'.
  3742. 2018-09-12 Werner Lemberg <wl@gnu.org>
  3743. * src/truetype/ttgxvar.c (ft_var_load_gvar): Check `glyphoffsets'.
  3744. 2018-09-10 Armin Hasitzka <prince.cherusker@gmail.com>
  3745. * src/pshinter/pshrec.c (t2_hints_stems): Mask numeric overflow.
  3746. Reported as
  3747. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10215
  3748. 2018-09-09 Ben Wagner <bungeman@google.com>
  3749. * builds/freetype.mk (refdoc-venv): Ensure python version (#54631).
  3750. 2018-09-07 Werner Lemberg <wl@gnu.org>
  3751. [truetype] Fix assertion failure.
  3752. Triggered by
  3753. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10212
  3754. * src/truetype/ttgload.c (load_truetype_glyph): Reintroduce
  3755. `opened_frame' (removed in a change from 2018-08-26) to handle
  3756. deallocation of the second frame.
  3757. 2018-09-05 Werner Lemberg <wl@gnu.org>
  3758. Synchronize `ftdebug.c' files.
  3759. * builds/amiga/src/base/ftdebug.c, builds/wince/ftdebug.c,
  3760. builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c'.
  3761. 2018-09-05 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  3762. Add documentation guidelines file.
  3763. * docs/DOCGUIDE: New file.
  3764. 2018-09-04 Werner Lemberg <wl@gnu.org>
  3765. * devel/ftoption.h: Synchronize with master `ftoption.h'.
  3766. 2018-09-03 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  3767. [docwriter] Don't break code snippets accross lines.
  3768. Reported as
  3769. https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00124.html
  3770. * docs/reference/markdown/stylesheets/extra.css (.md-typeset code):
  3771. Add rule `white-space'.
  3772. 2018-09-03 Werner Lemberg <wl@gnu.org>
  3773. */*: s/PSNames/psnames/.
  3774. Only tracing messages are affected.
  3775. 2018-09-03 Werner Lemberg <wl@gnu.org>
  3776. [sfnt] Fix heap buffer overflow in CPAL handling.
  3777. * src/sfnt/ttcpal.c (tt_face_palette_set): Fix boundary test.
  3778. (tt_face_load_cpal): Updated.
  3779. 2018-09-01 Werner Lemberg <wl@gnu.org>
  3780. Remove `FT_Outline_{New,Done}_Internal'.
  3781. These public API functions(!) were always undocumented and have
  3782. escaped all clean-up efforts until now.
  3783. * include/freetype/ftoutln.h (FT_Outline_New_Internal,
  3784. FT_Outline_Done_Internal): Removed.
  3785. * src/base/ftoutln.h (FT_Outline_New_Internal,
  3786. FT_Outline_Done_Internal): Merge into...
  3787. (FT_Outline_New, FT_Outline_Done): ... these functions.
  3788. * docs/README: Updated.
  3789. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  3790. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Check glyph format.
  3791. 2018-08-31 Armin Hasitzka <prince.cherusker@gmail.com>
  3792. [errors] Refine the macro logic surrounding `FT_Error_String'.
  3793. * include/freetype/fterrors.h (FT_INCLUDE_ERR_PROTOS,
  3794. FT_ERR_PROTOS_DEFINED): Undefine `FT_INCLUDE_ERR_PROTOS' after
  3795. checking it and introduce a new macro that takes proper care of
  3796. multiple-inclusion protection.
  3797. 2018-08-31 Werner Lemberg <wl@gnu.org>
  3798. * src/base/ftdebug.c (FT_Throw): Restore missing `FT_UNUSED' calls.
  3799. 2018-08-31 Werner Lemberg <wl@gnu.org>
  3800. * src/base/ftdebug.c (FT_Throw): Reduce chattiness.
  3801. 2018-08-31 Werner Lemberg <wl@gnu.org>
  3802. * src/autofit/afhints.c (af_glyph_hints_reload): Add initialization.
  3803. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  3804. Consolidate bitmap presetting and size assessment.
  3805. * include/freetype/internal/ftobjs.h (ft_glyphslot_preset_bitmap):
  3806. Change return type.
  3807. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Return the bitmap
  3808. size assessment.
  3809. * src/raster/ftrend1.c (ft_raster1_render): Use it to refuse the
  3810. rendering of enourmous or far-fetched outlines.
  3811. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
  3812. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  3813. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Correct mono.
  3814. 2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
  3815. [errors] Introduce a macro to control `FT_Error_String'.
  3816. * devel/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS),
  3817. include/freetype/config/ftoption.h (FT_CONFIG_OPTION_ERROR_STRINGS):
  3818. New macro.
  3819. 2018-08-30 Armin Hasitzka <prince.cherusker@gmail.com>
  3820. [errors] Introduce `FT_Error_String'.
  3821. * include/freetype/fterrors.h (FT_Error_String),
  3822. src/base/fterrors.c (FT_Error_String): Implement `FT_Error_String'.
  3823. * src/base/ftbase.c, src/base/Jamfile (_source),
  3824. src/base/rules.mk (BASE_SRC): Add `fterrors.c' to the build logic.
  3825. * src/base/ftdebug.c (FT_Throw): Use `FT_Error_String'.
  3826. 2018-08-30 Werner Lemberg <wl@gnu.org>
  3827. [autofit] Trace `before' and `after' edges of strong points.
  3828. * src/autofit/afhints.h (AF_PointRec) [FT_DEBUG_AUTOFIT]: New arrays
  3829. `before' and `after'.
  3830. * src/autofit/afhints.c (af_get_strong_edge_index): New auxiliary
  3831. function.
  3832. (af_glyph_hints_dump_points): Trace `before' and `after' edges.
  3833. (af_glyph_hints_align_strong_points) [FT_DEBUG_AUTOFIT]: Set
  3834. `before' and `after' information.
  3835. 2018-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
  3836. [base] Overflow-resistant bitmap presetting.
  3837. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Implement it.
  3838. 2018-08-29 Armin Hasitzka <prince.cherusker@gmail.com>
  3839. Fix numeric overflows.
  3840. * src/pshint/pshalgo.c (psh_hint_align, psh_hint_align_light,
  3841. psh_hint_table_find_strong_points): Fix numeric overflows.
  3842. Reported as
  3843. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10083
  3844. 2018-08-29 Werner Lemberg <wl@gnu.org>
  3845. [cff] Fix handling of `roll' op in old engine.
  3846. Reported as
  3847. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10080
  3848. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_roll>
  3849. [CFF_CONFIG_OPTION_OLD_ENGINE]: Use modulo for loop count, as
  3850. documented in the specification.
  3851. 2018-08-26 Werner Lemberg <wl@gnu.org>
  3852. * src/truetype/ttobjs.c (tt_size_read_bytecode): Trace CVT values.
  3853. 2018-08-26 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  3854. * configure: Copy assets required by docwriter.
  3855. Copy directory `docs/reference/markdown' when FreeType is compiled in a
  3856. different directory.
  3857. Fixes `make refdoc' if builddir != srcdir.
  3858. Reported as
  3859. https://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00083.html
  3860. 2018-08-26 Werner Lemberg <wl@gnu.org>
  3861. * src/pshint/pshalgo.c (psh_hint_overlap): Fix numeric overflow.
  3862. Reported as
  3863. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10057
  3864. 2018-08-26 Werner Lemberg <wl@gnu.org>
  3865. Minor tracing adjustments.
  3866. * src/base/ftstream.c (FT_Stream_EnterFrame, FT_Stream_ExitFrame):
  3867. Trace.
  3868. * src/truetype/ttgload.c (TT_Access_Glyph_Frame): Remove tracing.
  3869. 2018-08-26 Werner Lemberg <wl@gnu.org>
  3870. [truetype] Avoid nested frames.
  3871. Triggered by
  3872. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10054
  3873. * src/truetype/ttgload.c (load_truetype_glyph): Don't use variable
  3874. `opened_frame' to trace whether a frame must be closed at the end of
  3875. function: This fails because `TT_Vary_Apply_Glyph_Deltas' (which
  3876. gets called for space glyphs) uses a frame by itself. Instead,
  3877. close the frame after loading the header, then use another frame for
  3878. the remaining part of the glyph later on.
  3879. Also avoid calling `tt_get_metrics' twice under some circumstances.
  3880. 2018-08-26 Werner Lemberg <wl@gnu.org>
  3881. Various minor clean-ups.
  3882. * src/base/ftapi.c: Remove. Unused.
  3883. * src/base/Jamfile (_sources): Updated.
  3884. * src/base/ftstream.c (FT_Stream_ReleaseFrame): Remove redundant
  3885. code.
  3886. 2018-08-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  3887. Convert documentation markup to Markdown.
  3888. It is the result of a GSoC 2018 project; this separate ChangeLog
  3889. commit covers the last four commits
  3890. ae5d1a4cec37557f31aec270332cfe886a62f9a0
  3891. 53c69ce04faed3dcc68ca0f54cb8d703d8babf69
  3892. 195728d5ba38f34fb2c2c20807c01656f2f59b66
  3893. c962db28ea59225f0105c03d907d4a9b71765687
  3894. * docs/reference/markdown/images/favico.ico,
  3895. docs/reference/markdown/javascripts/extra.js,
  3896. docs/reference/markdown/stylesheets/extra.css: New files.
  3897. * docs/reference/.gitignore, docs/reference/README: Updated.
  3898. * src/tools/docmaker/*: Removed. It has been replaced with
  3899. `docwriter', a python package available at
  3900. https://pypi.org/project/docwriter/
  3901. * Jamfile: Updated.
  3902. * builds/ansi/ansi-def.mk, builds/beos/beos-def.mk,
  3903. builds/dos/dos-def.mk, builds/os2/os2-def.mk (BIN),
  3904. builds/unix/unixddef.mk, builds/windows/win32-def.mk: New variable.
  3905. * builds/unix/configure.raw: Check for `python' and `pip'.
  3906. If not present, warn that `make refdoc' will fail.
  3907. * builds/unix/unix-def.in (PYTHON, PIP, BIN): New variables.
  3908. * builds/freetype.mk (PYTHON, PIP, VENV_NAME, VENV_DIR, ENV_PYTHON,
  3909. ENV_PIP): New variables.
  3910. (refdoc): Updated.
  3911. (refdoc-venv): New target.
  3912. (.PHONY): Updated.
  3913. 2018-08-23 Werner Lemberg <wl@gnu.org>
  3914. Add macros for handling over-/underflowing `FT_Int64' values.
  3915. * include/freetype/internal/ftcalc.h (ADD_INT64, SUB_INT64,
  3916. MUL_INT64, DIV_INT64) [FT_LONG64]: New macros.
  3917. * src/base/ftcalc.c (ft_corner_orientation) [FT_LONG64]: Use
  3918. `SUB_INT64' and `MUL_INT64'.
  3919. Reported as
  3920. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10028
  3921. 2018-08-22 Werner Lemberg <wl@gnu.org>
  3922. [truetype] Improve legibility of `glyf' parsing.
  3923. * src/truetype/ttgload.c (ON_CURVE_POINT, X_SHORT_VECTOR,
  3924. Y_SHORT_VECTOR, REPEAT_FLAG, X_POSITIVE, SAME_X, Y_POSITIVE, SAME_Y,
  3925. OVERLAP_SIMPLE): New macros.
  3926. (TT_Load_Simple_Glyph): Use new macros to make code more readable.
  3927. Remove useless adjustment of `outline->tags' elements.
  3928. 2018-08-21 Werner Lemberg <wl@gnu.org>
  3929. * src/sfnt/ttcpal.c (tt_face_load_cpal): Add missing safety check.
  3930. Reported as
  3931. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9981
  3932. 2018-08-18 Werner Lemberg <wl@gnu.org>
  3933. [psaux] Avoid slow PS font parsing in case of error.
  3934. Reported as
  3935. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9955
  3936. * src/psaux/psobjs.c (ps_parser_to_bytes): Set `parser->cursor' even
  3937. in case of error to avoid potential re-scanning.
  3938. 2018-08-18 Werner Lemberg <wl@gnu.org>
  3939. [cff] Fix heap buffer overflow in old engine.
  3940. Reported as
  3941. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9967
  3942. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  3943. <cff_op_blend> [CFF_CONFIG_OPTION_OLD_ENGINE]: `num_designs' must be
  3944. non-zero.
  3945. 2018-08-16 Young Xiao <yangx92@hotmail.com>
  3946. * builds/mac/ftmac.c (parse_fond): Fix buffer overrun.
  3947. Reported as bug #54515, duplicate of #43540.
  3948. 2018-08-16 Werner Lemberg <wl@gnu.org>
  3949. * builds/*/ftsystem.c (FT_COMPONENT): Updated also.
  3950. 2018-08-15 Alexei Podtelezhnikov <apodtele@gmail.com>
  3951. [bdf] Don't track duplicate encodings.
  3952. There is no harm except some umbiguity in broken fonts with duplicate
  3953. encodings.
  3954. * src/bdf/bdflib.c (_bdf_parse_glyphs): Remove duplicate tracking.
  3955. (_bdf_parse_t): Remove large `have' bitfield.
  3956. 2018-08-15 Werner Lemberg <wl@gnu.org>
  3957. Don't use `trace_' prefix for FT_COMPONENT arguments.
  3958. * include/freetype/internal/ftdebug.h (FT_TRACE_COMP,
  3959. FT_TRACE_COMP_): New auxiliary macros to add `trace_' prefix.
  3960. (FT_TRACE): Use `FT_TRACE_COMP'.
  3961. */* (FT_COMPONENT): Updated.
  3962. 2018-08-14 Werner Lemberg <wl@gnu.org>
  3963. Use formatting string in FT_TRACEX calls for non-simple arguments.
  3964. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  3965. <cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>:
  3966. Do it.
  3967. * src/psaux/pshints.c (cf2_hintmap_build): Ditto.
  3968. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
  3969. cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR,
  3970. cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto.
  3971. * src/truetype/ttinterp.c (TT_RunIns): Ditto.
  3972. 2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
  3973. [bdf] Remove unused fields.
  3974. * src/bdf/bdf.h (bdf_font_t): Remove `nmod', `umod', and `modified',
  3975. which were set but never used.
  3976. * src/bdf/bdflib.c (_bdf_parse_{glyphs,properties}, bdf_load_font):
  3977. Updated accordingly.
  3978. 2018-08-14 Werner Lemberg <wl@gnu.org>
  3979. [cff] Fix another segv in old engine.
  3980. Reported as
  3981. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9872
  3982. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  3983. [CFF_CONFIG_OPTION_OLD_ENGINE]: Disallow invalid T1 opcodes in
  3984. dictionaries.
  3985. 2018-08-14 Werner Lemberg <wl@gnu.org>
  3986. [cff] Fix missing error handling.
  3987. Reported as
  3988. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9865
  3989. * src/psaux/cffparse.c (cff_parser_run)
  3990. [CFF_CONFIG_OPTION_OLD_ENGINE]: Don't ignore return value of
  3991. `parse_charstrings_old'.
  3992. 2018-08-14 Alexei Podtelezhnikov <apodtele@gmail.com>
  3993. [bdf] Remove unused overflow storage.
  3994. * src/bdf/bdf.h (bdf_glyphlist_t): Remove this type.
  3995. (bdf_font_t): Remove `overflow' field.
  3996. * src/bdf/bdflib.c (bdf_free_font): Remove `overflow' freeing.
  3997. 2018-08-14 Werner Lemberg <wl@gnu.org>
  3998. [cff] Fix segv in old engine.
  3999. Reported as
  4000. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9864
  4001. * src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
  4002. <cff_op_random> [CFF_CONFIG_OPTION_OLD_ENGINE]: Use top dict's
  4003. `random' field directly if parsing dictionaries.
  4004. 2018-08-13 Alexei Podtelezhnikov <apodtele@gmail.com>
  4005. [bdf] Use unsigned types.
  4006. * src/bdf/bdf.h (bdf_glyph_t): Unsign `encoding'.
  4007. (bdf_font_t): Unsign `default_char'.
  4008. * src/bdf/bdfdrivr.h (BDF_encoding_el): Unsign `enc'.
  4009. * src/bdf/bdflib.c (_bdf_add_property, _bdf_parse_glyphs,
  4010. _bdf_parse_start): Updated accordingly.
  4011. * src/bdf/bdfdrivr.c (bdf_cmap_char_{index,next}): Ditto.
  4012. 2018-08-13 Werner Lemberg <wl@gnu.org>
  4013. * src/type42/t42parse.c (t42_parse_sfnts): One more format check.
  4014. Reported as
  4015. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9832
  4016. 2018-08-11 Werner Lemberg <wl@gnu.org>
  4017. * src/base/ftcalc.c (FT_Matrix_Check): Fix integer overflow.
  4018. Reported as
  4019. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9811
  4020. 2018-08-10 Alexei Podtelezhnikov <apodtele@gmail.com>
  4021. * src/sfnt/ttsbit.c (tt_sbit_decoder_load_compound): Follow specs.
  4022. 2018-08-10 Ben Wagner <bungeman@google.com>
  4023. * src/sfnt/sfobjs.c (sfnt_done_face): Fix memory leak (#54435).
  4024. 2018-08-10 Werner Lemberg <wl@gnu.org>
  4025. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Improve tracing.
  4026. 2018-08-10 Werner Lemberg <wl@gnu.org>
  4027. Fix clang warnings.
  4028. * src/base/ftdebug.c (ft_trace_level_enabled,
  4029. ft_trace_level_disabled): Add `static' keyword.
  4030. 2018-08-09 Alexei Podtelezhnikov <apodtele@gmail.com>
  4031. [raster, smooth] Reinstate bitmap size limits.
  4032. This again moves outline and bitmap size checks one level up.
  4033. * src/base/ftoutln.c (FT_Outline_Render): Explicitly reject enormous
  4034. outlines.
  4035. * src/raster/ftrend1.c (ft_raster1_render): Reject enormous bitmaps
  4036. and, therefore, outlines that require them.
  4037. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Ditto.
  4038. * src/raster/ftraster.c (ft_black_render): Remove outline size checks.
  4039. * src/smooth/ftgrays.c (gray_raster_render): Ditto.
  4040. [STANDALONE]: Remove `FT_Outline_Get_CBox' copy.
  4041. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  4042. [pcf] Revert massive unsigning.
  4043. 2018-08-08 Werner Lemberg <wl@gnu.org>
  4044. [smooth] Improve tracing.
  4045. * src/smooth/ftgrays.c (gray_convert_glyph_inner): Only use tracing
  4046. if called the first time.
  4047. (gray_convert_glyph): Updated.
  4048. 2018-08-08 Werner Lemberg <wl@gnu.org>
  4049. Add internal functions `FT_Trace_Disable' and `FT_Trace_Enable'.
  4050. It sometimes makes sense to suppress tracing informations, for
  4051. example, if it outputs identical messages again and again.
  4052. * include/freetype/internal/ftdebug.h: Make `ft_trace_levels' a
  4053. pointer.
  4054. (FT_Trace_Disable, FT_Trace_Enable): New declarations.
  4055. * src/base/ftdebug.c (ft_trace_levels): Rename to...
  4056. (ft_trace_levels_enabled): ... this.
  4057. (ft_trace_levels_disabled): New array.
  4058. (ft_trace_levels): New pointer.
  4059. (FT_Trace_Disable, FT_Trace_Enable): Implement.
  4060. (ft_debug_init): Updated.
  4061. 2018-08-08 Werner Lemberg <wl@gnu.org>
  4062. Debugging improvements.
  4063. * src/base/ftobjs.c (pixel_modes): Move this array to top level
  4064. from ...
  4065. (FT_Load_Glyph): ... here.
  4066. (FT_Render_Glyph_Internal): Use `width' x `height' in trace message.
  4067. Use `pixel_modes'.
  4068. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  4069. [pcf] Massive unsigning (part 2).
  4070. Treat all size related properties as unsigned values.
  4071. * src/pcf/pcf.h (PCF_ParsePropertyRec): Use unsigned `name' and
  4072. `value'.
  4073. * src/pcf/pcfread.c (pcf_get_properties, pcf_load_font): Updated
  4074. parsing code and handling of AVERAGE_WIDTH, POINT_SIZE, PIXEL_SIZE,
  4075. RESOLUTION_X and RESOLUTION_Y.
  4076. 2018-08-08 Alexei Podtelezhnikov <apodtele@gmail.com>
  4077. [pcf] Massive unsigning (part 1).
  4078. Unofficial specifications hesitate to use unsigned 32-bit integers.
  4079. Negative values caused a lot of trouble in the past and it is safer
  4080. and easier to treat some properties as unsigned.
  4081. * src/pcf/pcf.h (PCF_AccelRec): Use unsigned values for `fontAscent',
  4082. `fontDescent', and `maxOverlap'.
  4083. * src/pcf/pcfread.c (pcf_load_font, pcf_get_accel): Updated.
  4084. * src/pcf/pcfdrivr.c (PCF_Glyph_Load, PCF_Size_Select,
  4085. PCF_Size_Request): Updated.
  4086. 2018-08-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  4087. * src/pcf/pcfread.c (pcf_get_bitmaps): Unsign `offsets' and
  4088. `bitmapSizes'.
  4089. 2018-08-06 Werner Lemberg <wl@gnu.org>
  4090. * devel/ftoption.h: Synchronize with main `ftoption.h'.
  4091. 2018-08-06 Alexei Podtelezhnikov <apodtele@gmail.com>
  4092. [pcf] Use unsigned types.
  4093. * src/pcf/pcf.h (PCF_Encoding): Use unsigned `enc'.
  4094. * src/pcf/pcfdrivr.c (pcf_cmap_char_{index,next}): Ditto.
  4095. * src/pcf/pcfread.c (pcf_get_encodings): Use unsigned types.
  4096. 2018-08-05 Werner Lemberg <wl@gnu.org>
  4097. * src/truetype/ttgload.c (compute_glyph_metrics): Fix overflow.
  4098. Reported as
  4099. https://bugs.chromium.org/p/chromium/issues/detail?id=777151
  4100. 2018-08-04 Werner Lemberg <wl@gnu.org>
  4101. * src/truetype/ttinterp.c (opcode_name): Fix typos.
  4102. 2018-08-04 Werner Lemberg <wl@gnu.org>
  4103. Fix clang warnings.
  4104. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
  4105. `orientation'.
  4106. * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.
  4107. * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
  4108. Add cast.
  4109. * src/type1/t1load.c (parse_weight_vector): Fix cast.
  4110. 2018-07-31 Werner Lemberg <wl@gnu.org>
  4111. * src/cid/cidtoken.h: Handle `XUID' keyword.
  4112. 2018-07-31 Werner Lemberg <wl@gnu.org>
  4113. [cid] Trace PostScript dictionaries.
  4114. * src/cid/cidload.c: Include FT_INTERNAL_POSTSCRIPT_AUX_H.
  4115. (cid_load_keyword, cid_parse_font_matrix, parse_fd_array,
  4116. parse_expansion_factor, cid_parse_dict): Add tracing calls.
  4117. (parse_font_name): New function to trace `/FontName' keywords in
  4118. /FDArray dict.
  4119. (cid_field_records): Register `parse_font_name'.
  4120. 2018-07-30 Werner Lemberg <wl@gnu.org>
  4121. [cff] Fix typo.
  4122. Reported as
  4123. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9409
  4124. * src/cff/cffdrivr.c (cff_get_cid_from_glyph_index): Fix boundary
  4125. check.
  4126. 2018-07-29 Werner Lemberg <wl@gnu.org>
  4127. * src/pcf/pcfread.c (pcf_get_encodings): Another thinko.
  4128. Reported as
  4129. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9608
  4130. 2018-07-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  4131. [smooth] Fix Harmony memory management.
  4132. Reported as
  4133. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9501
  4134. * src/smooth/ftgrays.c (ft_smooth_render_generic): Restore buffer
  4135. after each rendering in case of failure.
  4136. 2018-07-28 Werner Lemberg <wl@gnu.org>
  4137. [type1] Avoid segfaults with `FT_Get_PS_Font_Value'.
  4138. Reported as
  4139. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9610
  4140. * src/type1/t1driver.c (t1_ps_get_font_value): Protect against NULL.
  4141. 2018-07-27 Werner Lemberg <wl@gnu.org>
  4142. [truetype] Make `TT_Set_MM_Blend' idempotent (#54388).
  4143. * src/truetype/ttgxvar.c (tt_set_mm_blend): Correctly set
  4144. `face->doblend' if the current call to the function yields the same
  4145. blend coordinates as the previous call.
  4146. 2018-07-27 Werner Lemberg <wl@gnu.org>
  4147. [psaux, type1]: More tracing improvements.
  4148. * src/psaux/psintrp.c (cf2_interpT2CharString): Trace skipped
  4149. outline commands.
  4150. * src/psaux/t1decode.c (t1_decoder_parse_charstring): Fix
  4151. missing case.
  4152. (t1_decoder_parse_metrics): Make tracing output more compact.
  4153. * src/type1/t1gload.c (T1_Compute_Max_Advance): Be less verbose.
  4154. (T1_Get_Advances): Add tracing.
  4155. 2018-07-25 Werner Lemberg <wl@gnu.org>
  4156. [psaux, type1] Trace PostScript dictionaries and other things.
  4157. The tracing of /Encoding, /Subrs, and /Charstrings is rudimentary
  4158. right now.
  4159. * src/psaux/psobjs.c (ps_parser_load_field,
  4160. ps_parser_load_field_table): Add tracing calls.
  4161. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Make tracing
  4162. output more compact.
  4163. * src/type1/t1gload.c (T1_Compute_Max_Advance, T1_Get_Advances): Add
  4164. tracing messages.
  4165. * src/type1/t1load.c (parse_blend_axis_types,
  4166. parse_blend_design_positions, parse_blend_design_map,
  4167. parse_weight_vector, t1_load_keyword, t1_parse_font_matrix,
  4168. parse_encoding, parse_subrs, parse_charstrings, T1_Open_Face): Add
  4169. tracing calls.
  4170. * src/type1/t1objs.c (T1_Face_Init): Add tracing call.
  4171. * src/sfnt/sfobjs.c (sfnt_init_face): Make tracing message more
  4172. verbose.
  4173. 2018-07-25 Werner Lemberg <wl@gnu.org>
  4174. Fix minor ASAN run-time warnings.
  4175. * src/base/ftutil.c (ft_mem_alloc, ft_mem_realloc): Only call
  4176. `FT_MEM_ZERO' if we actually have a buffer.
  4177. (ft_mem_dup): Only call `ft_memcpy' if we actually have a buffer.
  4178. 2018-07-24 Alexei Podtelezhnikov <apodtele@gmail.com>
  4179. [build] Fortify dllexport/dllimport attributes (#53969,#54330).
  4180. We no longer use predefined _DLL, which can be defined for static
  4181. builds too with /MD. We use DLL_EXPORT and DLL_IMPORT instead,
  4182. following libtool convention.
  4183. * CMakeLists.txt [WIN32], builds/windows/vc2010/freetype.vcxproj:
  4184. Define DLL_EXPORT manually.
  4185. * include/freetype/config/ftconfig.h, builds/unix/ftconfig.in,
  4186. builds/vms/ftconfig.h, builds/windows/vc2010/index.html,
  4187. src/base/ftver.rc: /_DLL/d, s/FT2_DLLIMPORT/DLL_IMPORT/.
  4188. 2018-07-24 Werner Lemberg <wl@gnu.org>
  4189. [type1] Check relationship between number of axes and designs.
  4190. For Multiple Masters fonts we don't support intermediate designs;
  4191. this implies that
  4192. number_of_designs == 2 ^^ number_of_axes
  4193. Reported as
  4194. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9557
  4195. * src/type1/t1load.c (T1_Open_Face): Ensure above constraint.
  4196. (T1_Get_MM_Var): Remove now redundant test.
  4197. 2018-07-24 Hin-Tak Leung <htl10@users.sourceforge.net>
  4198. [truetype] Match ttdebug's naming of instruction mnemonics.
  4199. * src/truetype/ttinterp.c: The form used in ttdebug,
  4200. "MDRP[G,B,W,?]", etc., is slightly more readable than
  4201. "MDRP[00,01,02,03]".
  4202. 2018-07-24 Werner Lemberg <wl@gnu.org>
  4203. * src/pcf/pcfread.c (pcf_get_encodings): Thinko.
  4204. Reported as
  4205. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9561
  4206. 2018-07-22 Werner Lemberg <wl@gnu.org>
  4207. * src/pcf/pcfread.c (pcf_get_encodings): Check index of defaultChar.
  4208. Reported as
  4209. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9527
  4210. 2018-07-22 Werner Lemberg <wl@gnu.org>
  4211. * src/pcf/pcfread.c (pcf_load_font): Fix number of glyphs.
  4212. This is an oversight of the module change 2018-07-21.
  4213. Reported as
  4214. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9524
  4215. 2018-07-22 Werner Lemberg <wl@gnu.org>
  4216. [cid] Sanitize `BlueShift' and `BlueFuzz'.
  4217. This code is taken from the type1 module.
  4218. Reported as
  4219. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9510
  4220. * src/cid/cidload.c (parse_fd_array): Set some private dict default
  4221. values.
  4222. (cid_face_open): Do the sanitizing.
  4223. Fix some tracing messages.
  4224. 2018-07-21 Werner Lemberg <wl@gnu.org>
  4225. [pcf] Fix handling of the undefined glyph.
  4226. This change makes the driver use the `defaultChar' property of PCF
  4227. files.
  4228. * src/pcf/pcf.h (PCF_FaceRec): Change type of `defaultChar' to
  4229. unsigned.
  4230. * src/pcf/pcfread.c (pcf_get_encodings): Read `defaultChar' as
  4231. unsigned.
  4232. Validate `defaultChar'.
  4233. If `defaultChar' doesn't point to glyph index zero, swap glyphs with
  4234. index zero and index `defaultChar' and adjust the encodings
  4235. accordingly.
  4236. * src/pcf/pcfdrivr.c (pcf_cmap_char_index, pcf_cmap_char_next,
  4237. PCF_Glyph_Load): Undo change from 2002-06-16 which always enforced
  4238. the first character in the font to be the default character.
  4239. 2018-07-20 Armin Hasitzka <prince.cherusker@gmail.com>
  4240. Move the legacy fuzz target to the `freetype-testing' repository.
  4241. It can now be found at
  4242. https://github.com/freetype/freetype2-testing/tree/master/fuzzing/src/legacy
  4243. * src/tools/ftfuzzer: Remove this folder and its contents from the
  4244. repository.
  4245. 2018-07-20 Werner Lemberg <wl@gnu.org>
  4246. [cff] Avoid left-shift of negative numbers (#54322).
  4247. * src/cff/cffgload.c (cff_slot_load): Use multiplication.
  4248. 2018-07-17 Werner Lemberg <wl@gnu.org>
  4249. Allow FT_ENCODING_NONE for `FT_Select_Charmap'.
  4250. This is a valid encoding tag for BDF, PCF, and Windows FNT, and
  4251. there is no reason to disallow it for these formats.
  4252. * src/base/ftobjs.c (FT_Select_Charmap): Implement it.
  4253. 2018-07-17 Werner Lemberg <wl@gnu.org>
  4254. * src/pcf/pcfread.c (pcf_get_encodings): Trace `defaultChar'.
  4255. 2018-07-16 Armin Hasitzka <prince.cherusker@gmail.com>
  4256. * include/freetype/internal/ftcalc.h: Add macros for handling
  4257. harmless over-/underflowing `FT_Int' values.
  4258. * src/sfnt/sfdriver.c (fixed2float): Fix negation of
  4259. `(int)(-2147483648)'.
  4260. Reported as
  4261. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9423
  4262. 2018-07-16 Werner Lemberg <wl@gnu.org>
  4263. * src/truetype/ttgxvar.c (tt_set_mm_blend): Fix off-by-one error.
  4264. Reported as
  4265. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9412
  4266. 2018-07-12 Werner Lemberg <wl@gnu.org>
  4267. * src/base/ftoutln.c (FT_Outline_Get_Orientation): Init `cbox'.
  4268. Taken from patch #9667, written by Steve Langasek
  4269. <vorlon@debian.org>.
  4270. This fixes a build failure (most probably a bug in gcc) on ppc64el
  4271. when building with -O3.
  4272. 2018-07-05 Werner Lemberg <wl@gnu.org>
  4273. Fix typo (#54238).
  4274. * src/base/ftcolor.c (FT_Palette_Set_Foreground_Color)
  4275. [!TT_CONFIG_OPTION_COLOR_LAYERS]: Add return value.
  4276. 2018-07-05 Werner Lemberg <wl@gnu.org>
  4277. Adjust table size comparisons (#54242).
  4278. * src/sfnt/ttcpal.c (tt_face_load_cpal): Implement it.
  4279. 2018-07-05 Werner Lemberg <wl@gnu.org>
  4280. Fix more 32bit issues (#54208).
  4281. * src/cff/cffload.c (cff_blend_build_vector): Convert assertion into
  4282. run-time error.
  4283. * src/truetype/ttgxvar.c (ft_var_to_normalized): Protect against
  4284. numeric overflow.
  4285. 2018-07-04 Werner Lemberg <wl@gnu.org>
  4286. Fix 32bit build warnings (#54239).
  4287. * src/base/ftbitmap.c (FT_Bitmap_Blend): Add casts to avoid signed
  4288. vs. unsigned comparisons.
  4289. * srb/sfnt/ttcolr.c (tt_face_get_colr_layer): Ditto.
  4290. 2018-07-02 Jeff Carey <Jeff.Carey@monotype.com>
  4291. * src/psnames/psmodule.c (ps_unicodes_init): Fix alloc debugging.
  4292. 2018-07-02 Werner Lemberg <wl@gnu.org>
  4293. s/palette_types/palette_flags/.
  4294. Suggested by Behdad.
  4295. 2018-07-02 Werner Lemberg <wl@gnu.org>
  4296. Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
  4297. * include/freetype/freetype.h, src/base/ftobjs.c
  4298. (FT_Get_Color_Glyph_Layer, FT_Render_Glyph_Internal): Updated.
  4299. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func),
  4300. src/sfnt/ttcolr.h, src/sfnt/ttcolr.c (tt_face_get_colr_layer):
  4301. Updated.
  4302. 2018-07-01 Werner Lemberg <wl@gnu.org>
  4303. * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Guard SFNT function.
  4304. Reported by Behdad.
  4305. 2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  4306. * src/base/fttrigon.c (FT_Tan): Improve accuracy.
  4307. (FT_Vector_Rotate): Simplify.
  4308. 2018-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
  4309. * src/base/ftobjs.c (FT_Set_Charmap): Robustify.
  4310. 2018-06-25 Werner Lemberg <wl@gnu.org>
  4311. [truetype] Fix memory leak.
  4312. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Add initializers.
  4313. Fix typo in `goto' destination.
  4314. Reported as
  4315. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9071
  4316. 2018-06-25 Werner Lemberg <wl@gnu.org>
  4317. * src/truetype/ttgxvar.c (tt_face_vary_cvt): Add initializers.
  4318. Reported as
  4319. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9070
  4320. 2018-06-24 Werner Lemberg <wl@gnu.org>
  4321. [truetype] Increase precision while applying VF deltas.
  4322. It turned out that we incorrectly round CVT and glyph point deltas
  4323. before accumulation, leading to severe positioning errors if there
  4324. are many delta values to sum up.
  4325. Problem reported by Akiem Helmling <akiem@underware.nl> and analyzed
  4326. by Behdad.
  4327. * src/truetype/ttgxvar.c (ft_var_readpackeddelta): Return deltas in
  4328. 16.16 format.
  4329. (tt_face_var_cvt): Collect deltas in `cvt_deltas', which is a 16.16
  4330. format array, and add the accumulated values to the CVT at the end
  4331. of the function.
  4332. (TT_Vary_Apply_Glyph_Deltas): Store data in `points_org' and
  4333. `points_out' in 16.16 format.
  4334. Collect deltas in `point_deltas_x' and `point_deltas_y', which are
  4335. 16.16 format arrays, and add the accumulated values to the glyph
  4336. coordinates at the end of the function.
  4337. 2018-06-24 Werner Lemberg <wl@gnu.org>
  4338. New base function `FT_Matrix_Check' (#54019).
  4339. * src/base/ftcalc.c (FT_Matrix_Check): New base function to properly
  4340. reject degenerate font matrices.
  4341. * include/freetype/internal/ftcalc.h: Updated.
  4342. * src/cff/cffparse.c (cff_parse_font_matrix), src/cid/cidload.c
  4343. (cid_parse_font_matrix), src/type1/t1load.c (t1_parse_font_matrix),
  4344. src/type42/t42parse.c (t42_parse_font_matrix): Use
  4345. `FT_Matrix_Check'.
  4346. 2018-06-23 Werner Lemberg <wl@gnu.org>
  4347. Fix typo.
  4348. Reported by Behdad.
  4349. * src/base/ftcolor.c (FT_Palette_Data_Get)
  4350. [!TT_CONFIG_OPTION_COLOR_LAYERS]: s/apalette/apalette_data/.
  4351. 2018-06-21 Werner Lemberg <wl@gnu.org>
  4352. s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
  4353. * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
  4354. src/sfnt/ttcolr.c: Do it.
  4355. 2018-06-19 Werner Lemberg <wl@gnu.org>
  4356. [sfnt] Fix CPAL heap buffer overflow.
  4357. Reported as
  4358. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8968
  4359. * src/sfnt/ttcpal.c (tt_face_load_cpal): Guard CPAL version 1
  4360. offsets.
  4361. 2018-06-19 Werner Lemberg <wl@gnu.org>
  4362. Doh. Don't use CPAL or COLR data if tables are missing.
  4363. Reported by Alexei.
  4364. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): Return immediately if
  4365. `colr' is NULL.
  4366. * src/sfnt/ttcpal.c (tt_face_palette_set): Return immediately, if
  4367. `cpal' is NULL.
  4368. 2018-06-17 Alexei Podtelezhnikov <apodtele@gmail.com>
  4369. [base] Introduce `FT_New_Glyph'.
  4370. This function facilitates access to full capabilities of FreeType
  4371. rendering engine for custom glyphs. This can be quite useful for
  4372. consistent rendering of mathematical and chemical formulas, e.g.
  4373. https://bugs.chromium.org/p/chromium/issues/detail?id=757078
  4374. * include/freetype/ftglyph.h, src/base/ftglyph.c (FT_New_Glyph): New
  4375. function.
  4376. 2018-06-17 Armin Hasitzka <prince.cherusker@gmail.com>
  4377. [bdf] Fix underflow of an unsigned value.
  4378. bdflib.c:1562 could be reached with `font->glyphs_used == 0'. That
  4379. caused an underflow of the unsigned value which results in undefined
  4380. behaviour.
  4381. * src/bdf/bdflib.c (_bdf_parse_glyphs): Bail out earlier than before
  4382. if the `ENCODING' keyword cannot be found.
  4383. 2018-06-17 Werner Lemberg <wl@gnu.org>
  4384. [base] Add tracing for `FT_Bitmap_Blend'.
  4385. * include/freetype/internal/fttrace.h (trace_bitmap): New
  4386. enumeration.
  4387. * src/base/ftbitmap.c (FT_COMPONENT): Define.
  4388. (FT_Bitmap_Blend): Add `FT_TRACE5' calls.
  4389. 2018-06-17 Werner Lemberg <wl@gnu.org>
  4390. s/trace_bitmap/trace_checksum/.
  4391. * include/freetype/internal/fttrace.h: s/bitmap/checksum/.
  4392. * src/base/ftobjs.c (FT_COMPONENT): s/trace_bitmap/trace_checksum/.
  4393. Adjust code.
  4394. 2018-06-16 Werner Lemberg <wl@gnu.org>
  4395. [sfnt] Fix color glyph layer loading.
  4396. * src/sfnt/ttcolr.c (Colr): Add `table_size' field.
  4397. (tt_face_load_colr): Set it.
  4398. (tt_face_get_colr_layer): Check pointer limit for layer entries.
  4399. 2018-06-16 Werner Lemberg <wl@gnu.org>
  4400. [sfnt] Fix color palette loading.
  4401. Reported as
  4402. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8933
  4403. * src/sfnt/ttcpal.c (Cpal): Add `table_size' field.
  4404. (tt_face_load_cpal): Set it.
  4405. (tt_face_palette_set): Check pointer limit for color entries.
  4406. 2018-06-16 Werner Lemberg <wl@gnu.org>
  4407. * src/base/ftbitmap.c (FT_Bitmap_Blend): Avoid integer overflow.
  4408. 2018-06-16 Werner Lemberg <wl@gnu.org>
  4409. Add `FT_Bitmap_Blend' API.
  4410. Still missing: Support for negative bitmap pitch and subpixel offset
  4411. of source bitmap.
  4412. * include/freetype/ftbitmap.h, src/base/ftbitmap.c
  4413. (FT_Bitmap_Blend): New function.
  4414. 2018-06-14 Werner Lemberg <wl@gnu.org>
  4415. Replace `FT_Get_GlyphLayers' with `FT_Get_Color_Glyph_Layer'.
  4416. This avoids any additional allocation of COLR related structures in
  4417. a glyph slot.
  4418. * include/freetype/freetype.h (FT_Glyph_Layer, FT_Glyph_LayerRec,
  4419. FT_Get_GlyphLayers): Removed.
  4420. * include/freetype/internal/ftobjs.h (FT_Colr_InternalRec): Removed.
  4421. (FT_Slot_InternalRec): Remove `color_layers'.
  4422. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func):
  4423. Removed.
  4424. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Remove
  4425. `load_colr_layer'.
  4426. * src/base/ftobjs.c (ft_glyph_slot_done): Updated.
  4427. (FT_Render_Glyph_Internal): Use `FT_Get_Color_Glyph_Layer'.
  4428. (FT_Get_GlyphLayers): Removed.
  4429. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
  4430. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Removed.
  4431. * src/sfnt/ttcolr.h: Updated.
  4432. * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
  4433. 2018-06-14 Werner Lemberg <wl@gnu.org>
  4434. Provide iterative API to access `COLR' data.
  4435. This solution doesn't store any data in an `FT_GlyphSlot' object.
  4436. * include/freetype/freetype.h (FT_LayerIterator): New structure.
  4437. (FT_Get_Color_Glyph_Layer): New function.
  4438. * include/freetype/internal/sfnt.h (TT_Get_Colr_Layer_Func): New
  4439. function type.
  4440. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
  4441. * src/base/ftobjs.c (FT_Get_Color_Glyph_Layer): Implement it.
  4442. * src/sfnt/ttcolr.c (tt_face_get_colr_layer): New function.
  4443. * src/sfnt/ttcolr.h: Updated.
  4444. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
  4445. 2018-06-14 Werner Lemberg <wl@gnu.org>
  4446. Add glyph index and glyph load flags to glyph slot.
  4447. * include/freetype/freetype.h (FT_GlyphSlotRec): Rename unused
  4448. `reserved' field to `glyph_index'.
  4449. * include/freetype/internal/ftobjs.h (FT_Slot_InternalRec): Add
  4450. `load_flags' field.
  4451. * src/base/ftobjs.c (FT_Load_Glyph): Set new fields.
  4452. 2018-06-14 Werner Lemberg <wl@gnu.org>
  4453. [sfnt] Move `CPAL' stuff into separate files.
  4454. * src/sfnt/sfdriver.c: Include `ttcpal.h'.
  4455. * src/sfnt/sfnt.c: Include `ttcpal.c'.
  4456. * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: Move CPAL stuff to ...
  4457. * src/sfnt/ttcpal.c, src/sfnt/ttcpal.c: ... these new files.
  4458. * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC):
  4459. Updated.
  4460. * include/freetype/internal/fttrace.h: Add support for `colr' and
  4461. `cpal'.
  4462. Sort entries.
  4463. 2018-06-13 Werner Lemberg <wl@gnu.org>
  4464. [sfnt] Separate `CPAL' and `COLR' table handling.
  4465. Later on we want to support the `SVG' table also, which needs `CPAL'
  4466. (but not `COLR').
  4467. * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_cpal'
  4468. and `free_cpal' fields.
  4469. (FT_DEFINE_SFNT_INTERFACE): Updated.
  4470. * include/freetype/internal/tttypes.h (TT_FaceRec): Replace
  4471. `colr_and_cpal' fields with `cpal' and `colr'.
  4472. * src/sfnt/sfdriver.c (sfnt_interface): Updated.
  4473. * src/sfnt/sfobjs.c (sfnt_load_face, sfnt_done_face): Updated.
  4474. * src/sfnt/ttcolr.c (Colr, Cpal): Add `table' field.
  4475. (ColrCpal): Removed.
  4476. (tt_face_load_colr): Split off CPAL handling into...
  4477. (tt_face_load_cpal): ... this new function.
  4478. (tt_face_free_colr): Split off CPAL handling into...
  4479. (tt_face_free_cpal): ... this new function.
  4480. (tt_face_load_colr_layers, tt_face_palette_set): Updated.
  4481. * src/sfnt/ttcolr.h: Updated.
  4482. * src/truetype/ttgload.c (TT_Load_Glyph): Updated.
  4483. 2018-06-12 Werner Lemberg <wl@gnu.org>
  4484. [sfnt] Fix `sizeof' thinko.
  4485. * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_palette_set): Don't
  4486. use `sizeof' for computing array limit.
  4487. 2018-06-12 Werner Lemberg <wl@gnu.org>
  4488. Finish CPAL/COLR support (4/4).
  4489. * src/sfnt/ttcolr.c (tt_face_find_color): Removed.
  4490. (tt_face_colr_blend_layer): Use `face->palette' instead of calling
  4491. `tt_face_find_color'.
  4492. Use and set text foreground color.
  4493. 2018-06-12 Werner Lemberg <wl@gnu.org>
  4494. Finish CPAL/COLR support (3/4).
  4495. * src/base/ftcolor.c: Include FT_INTERNAL_SFNT_H.
  4496. (FT_Palette_Select, FT_Palette_Set_Foreground_Color): Implement
  4497. functions.
  4498. 2018-06-12 Werner Lemberg <wl@gnu.org>
  4499. Finish CPAL/COLR support (2/4).
  4500. * src/sfnt/ttcolr.c (tt_face_palette_set): New function.
  4501. (tt_face_load_colr): Allocate `face->palette' and call
  4502. `tt_face_palette_set'.
  4503. Adjust return error code in case of error.
  4504. * src/sfnt/ttcolr.h: Updated.
  4505. * include/freetype/internal/sfnt.h (TT_Set_Palette_Func): New
  4506. function type.
  4507. (SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Add it.
  4508. * src/sfnt/sfdriver.c (sfnt_interface), src/sfnt/sfobjs.c
  4509. (sfnt_done_face): Updated.
  4510. 2018-06-12 Werner Lemberg <wl@gnu.org>
  4511. Finish CPAL/COLR support (1/4).
  4512. * include/freetype/internal/tttypes.h (TT_FaceRec): New fields
  4513. `palette_index', `palette', `have_foreground_color' and
  4514. `foreground_color'.
  4515. 2018-06-12 Werner Lemberg <wl@gnu.org>
  4516. [sfnt] Minor.
  4517. * src/sfnt/ttcolr.c (tt_face_load_colr_layers):
  4518. s/palette_index/palette_entry_index/ for consistency.
  4519. Adjust return error code in case of error.
  4520. 2018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
  4521. [raster] Clean up.
  4522. * src/raster/ftraster.c (black_TWorker, SCALED, Set_High_Precision):
  4523. Clean up after 5-level gray removal (8dc8635874).
  4524. (Vertical_Sweep_Span): Be brief.
  4525. 2018-06-10 Werner Lemberg <wl@gnu.org>
  4526. [sfnt] Fix compiler warnings.
  4527. * src/sfnt/ttcolr.c (tt_face_load_colr, tt_face_load_colr_layers,
  4528. tt_face_colr_blend_layer): Add `NULL' initializers.
  4529. 2018-06-10 Werner Lemberg <wl@gnu.org>
  4530. s/FT_Palette/FT_Palette_Data/, s/palette/palette_data/.
  4531. * include/freetype/ftcolor.h, include/freetype/internal/tttypes.h,
  4532. src/base/ftcolor.c, src/sfnt/sfobjs.c, src/sfnt/ttcolr.c: Updated.
  4533. 2018-06-10 Nikolaus Waxweiler <madigens@gmail.com>
  4534. CMakeLists: also accept IOS_PLATFORM=SIMULATOR64
  4535. This might be needed to build FreeType for the iOS simulator. See
  4536. https://savannah.nongnu.org/bugs/index.php?54048. Patch contributed
  4537. by Steve Robinson.
  4538. * CMakeLists.txt: Accept IOS_PLATFORM=SIMULATOR64
  4539. 2018-06-10 Werner Lemberg <wl@gnu.org>
  4540. Implement `FT_Palette_Get'.
  4541. * src/base/ftcolor.c: New file.
  4542. * src/base/Jamefile (_sources), src/base/rules.mk (BASE_SRC),
  4543. src/base/ftbase.c: Add `ftcolor.c'.
  4544. 2018-06-10 Werner Lemberg <wl@gnu.org>
  4545. * src/sfnt/ttcolr.c (tt_face_load_colr): Improve overflow checks.
  4546. 2018-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
  4547. [raster] Deal with pitch sign earlier.
  4548. * src/raster/ftraster.c (black_TWorker): Remove unused `traceG',
  4549. s/bTarget/bOrigin/.
  4550. (Render_Glyph): Set `ras.bOrigin' at the bottom-left corner.
  4551. (Vertical_Sweep_Init, {Vertical,Horizontal}_Sweep_{Span,Drop}):
  4552. Updated accordingly.
  4553. 2018-06-09 Werner Lemberg <wl@gnu.org>
  4554. [sfnt] Read `CPAL' version 1 tables.
  4555. * include/freetype/internal.tttypes.h: Include FT_COLOR_H.
  4556. (TT_FaceRec): Add `palette' field.
  4557. * src/sfnt/ttcolr.c: Include FT_COLOR_H.
  4558. (Cpal): Remove all data covered by the new `palette' field in
  4559. `TT_FaceRec'.
  4560. (tt_face_load_colr): Updated.
  4561. Read `CPAL' version 1 data.
  4562. (tt_face_load_colr_layers, tt_face_find_color): Updated.
  4563. * src/sfnt/sfobjs.c (sfnt_done_face): Free glyph color palette data.
  4564. 2018-06-07 Alexei Podtelezhnikov <apodtele@gmail.com>
  4565. [base] API for Harmony LCD rendering.
  4566. This introduces `FT_Library_SetLcdGeometry' for setting up arbitrary
  4567. LCD subpixel geometry including non-striped patterns.
  4568. * src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): New function.
  4569. * include/freetype/ftlcdfil.h: Document it.
  4570. * include/freetype/freetype.h: Minor.
  4571. * include/freetype/ftchapters.h: Minor.
  4572. 2018-06-06 Werner Lemberg <wl@gnu.org>
  4573. ftcolor.h: Redesign API.
  4574. While going to implement it I noticed that I need access to most of
  4575. the `CPAL' elements; I thus plan to add a `cpal' field to
  4576. `TT_FaceRec', which makes most of the previously suggested API
  4577. functions obsolete because the fields will be directly accessible.
  4578. 2018-06-06 Parth Wazurkar <parthwazurkar@gmail.com>
  4579. [bdf, pcf] Remove deprecated FT_FACE_FLAG_FAST_GLYPHS flag.
  4580. * src/bdf/bdfdrivr.c (BDF_Face_Init): Remove deprecated
  4581. FT_FACE_FLAG_FAST_GLYPHS flag.
  4582. * src/pcf/pcfread.c (pcf_load_font): Remove deprecated
  4583. FT_FACE_FLAG_FAST_GLYPHS flag.
  4584. 2018-06-06 Werner Lemberg <wl@gnu.org>
  4585. [smooth, raster] Limit bitmap size (#54019).
  4586. * src/raster/ftraster.c [STANDALONE] (FT_Outline_Get_CBox): Add
  4587. function.
  4588. [!STANDALONE]: Include FT_OUTLINE_H.
  4589. (ft_black_render): Compute CBox and reject glyphs larger than
  4590. 0xFFFF x 0xFFFF.
  4591. * src/smooth/ftgrays.c (gray_raster_render): Reject glyphs larger
  4592. than 0xFFFF x 0xFFFF.
  4593. 2018-06-03 Armin Hasitzka <prince.cherusker@gmail.com>
  4594. * src/smooth/ftgrays.c (gray_convert_glyph): Remove unused variables.
  4595. 2018-06-03 Werner Lemberg <wl@gnu.org>
  4596. * src/tools/glnames.py (main): Emit header in `light' comment style.
  4597. 2018-06-02 Alexei Podtelezhnikov <apodtele@gmail.com>
  4598. [smooth] Attempt to mitigate bug #54019.
  4599. The robust rendering of estra large glyphs came with unbearable cost.
  4600. The old way of bisecting should fail but fail faster.
  4601. * src/smooth/ftgrays.c (gray_convert_glyph): Switch back to bisecting
  4602. in y-direction.
  4603. 2018-06-02 Werner Lemberg <wl@gnu.org>
  4604. * src/truetype/ttinterp.c (Ins_MIRP): Use SUB_LONG; avoid FT_ABS.
  4605. Reported as
  4606. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8706
  4607. 2018-06-02 Werner Lemberg <wl@gnu.org>
  4608. * src/autofit/afwarp.h: Use AF_CONFIG_OPTION_USE_WARPER (#54033).
  4609. 2018-05-31 Werner Lemberg <wl@gnu.org>
  4610. * src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field.
  4611. This is no longer used.
  4612. 2018-05-31 Werner Lemberg <wl@gnu.org>
  4613. [sfnt] Get colors from `CPAL' table in right order (#54015).
  4614. * src/sfnt/ttcolr.c (tt_face_find_color): Fix it.
  4615. 2018-05-30 Werner Lemberg <wl@gnu.org>
  4616. ftcolor.h: Improve API design, fix typos (#54011, #54014).
  4617. * include/freetype/ftcolor.h (FT_Palette_Get_Names): Replace with...
  4618. (FT_Palette_Get_Name_IDs): ... this function.
  4619. (FT_Palette_Get_Entry_Names): Replace with...
  4620. (FT_Palette_Get_Entry_Name_IDs): ... this function
  4621. s/FT_Palette_Set_Foreground_COlor/FT_Palette_Set_Foreground_Color/.
  4622. 2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
  4623. Beautify a3cfed5e87232c933bdc64f43e8ebebcfd18b41b.
  4624. * src/autofit/afloader.c (af_loader_load_glyph): Move the
  4625. initialisationand declaration of variables into the if-block.
  4626. 2018-05-30 Armin Hasitzka <prince.cherusker@gmail.com>
  4627. Fix pointer underflow.
  4628. The declaration of `edge2' can be reached with `edge1 == NULL' and
  4629. `axis->edges == 0' which results in undefined behaviour.
  4630. * src/autofit/afloader.c (af_loader_load_glyph): Initialise `edge2'
  4631. after checking `axis->num_edges > 1'. `edge1 != NULL' can be assumed.
  4632. 2018-05-30 Werner Lemberg <wl@gnu.org>
  4633. Various minor color fixes.
  4634. * include/freetype/config/ftheader.h (FT_COLOR_H): New macro.
  4635. * include/freetype/internal/ftobjs.h (FT_Colr_Internal): Change
  4636. type of `load_flags' to `FT_Int32'.
  4637. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func): Change
  4638. type of `idx' to `FT_UInt'.
  4639. (TT_Blend_Colr_Func): Change type of `color_index' to `FT_UInt'.
  4640. * src/base/ftobjs.c (FT_Render_Glyph_Internal): Change type of
  4641. `load_flags' to `FT_Int32'.
  4642. * src/sfnt/ttcolr.c (find_base_glyph_record,
  4643. tt_face_load_colr_layers): Change type of `glyph_id' to `FT_UInt'.
  4644. (tt_face_find_color, tt_face_colr_blend_layer): Change type of
  4645. `color_index' to `FT_UInt'.
  4646. Fix signedness and type issues.
  4647. * src/sfnt/ttcolr.h: Updated.
  4648. 2018-05-25 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
  4649. [docmaker] Fix missing `Defined in (...)' under Windows/Cygwin.
  4650. This platform uses backslashes for paths, which docmaker didn't
  4651. understand correctly.
  4652. * src/tools/docmaker/tohtml.py (HtmlFormatter::blockEnter): Use
  4653. `os.path.normpath' to normalize the path for the platform being
  4654. used.
  4655. 2018-05-24 Alexei Podtelezhnikov <apodtele@gmail.com>
  4656. [smooth] Formalize Harmony LCD rendering.
  4657. This generalizes magic outline shifts that make Harmony LCD
  4658. rendering work in terms of precise two-dimensional RGB subpixel
  4659. positions. These coordinates are now set in time of the `smooth'
  4660. module initialization and later used to shift a glyph outline for
  4661. rendering. FT_RENDER_MODE_LCD and FT_RENDER_MODE_LCD_V use the same
  4662. coordinates. The letter, however, rotates them before using.
  4663. The LCD bitmap padding is also calculated using these coordinates.
  4664. * include/freetype/internal/ftobjs.h (FT_LibraryRec): New array field
  4665. `lcd_geometry'.
  4666. * src/base/ftlcdfil.c (ft_lcd_padding): Reworked.
  4667. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): Updated accordingly.
  4668. * src/smooth/ftsmooth.c [!FT_CONFIG_OPTION_SUBPIXEL_RENDERING]
  4669. (ft_smooth_init): Initialize `lcd_geometry'.
  4670. (ft_smooth_render_generic): Formalize outline shifts.
  4671. 2018-05-22 Werner Lemberg <wl@gnu.org>
  4672. [truetype] Reject elements of composites with invalid glyph indices.
  4673. Reported as
  4674. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8413
  4675. * src/truetype/ttgload.c (TT_Load_Composite_Glyph): Implement it.
  4676. 2018-05-22 Werner Lemberg <wl@gnu.org>
  4677. * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Trace # of points.
  4678. 2018-05-20 Werner Lemberg <wl@gnu.org>
  4679. * include/freetype/ftcolor.h: New file.
  4680. This is an interface to the `CPAL' OpenType table. No
  4681. implementation yet.
  4682. 2018-05-18 Alexei Podtelezhnikov <apodtele@gmail.com>
  4683. * include/freetype/internal/ftcalc.h (FT_MSB): Verified `_MSC_VER'.
  4684. Actually `_BitScanReverse' is available since VS2005.
  4685. 2018-05-18 Werner Lemberg <wl@gnu.org>
  4686. * include/freetype/internal/ftcalc.h (FT_MSB): Use `_MSC_VER' value.
  4687. Older VC versions don't provide `_BitScanReverse'. We test for VC
  4688. 2013.
  4689. Reported by John Emmas <john@creativepost.co.uk>.
  4690. 2018-05-17 Werner Lemberg <wl@gnu.org>
  4691. s/inline/__inline/ for MSVC.
  4692. Reported by John Emmas <john@creativepost.co.uk>.
  4693. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Do it.
  4694. 2018-05-16 Werner Lemberg <wl@gnu.org>
  4695. Add function `FT_Get_GlyphLayers' to access `COLR' table data.
  4696. * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec): Move this
  4697. structure to...
  4698. * include/freetype/freetype.h (FT_Glyph_LayerRec): ... this
  4699. header file.
  4700. (FT_Glyph_Layer): New typedef.
  4701. Update code to use it where appropriate.
  4702. * src/base/ftobjs.c (FT_Get_GlyphLayers): New function.
  4703. 2018-05-15 Alexei Podtelezhnikov <apodtele@gmail.com>
  4704. [base] Fix mono bitmap presetting (#53896).
  4705. It is rather fundamental to set monochrome bitmap based on rounded
  4706. CBox because the b/w rasterizer turns on pixels when their centers are
  4707. inside the glyph outline. The dropout control is unpredictable and can
  4708. distort narrow glyphs if the bitmap is too wide.
  4709. Reported by Chris Liddell.
  4710. * src/base/ftobjs.c (ft_glyphslot_preset_bitmap): If BBox boundaries
  4711. are too close, adjust them before rounding.
  4712. 2018-05-15 Werner Lemberg <wl@gnu.org>
  4713. [psaux] Fix compiler warning (#53915).
  4714. * src/psaux/psft.c (cf2_freeT1SeacComponent): Do it.
  4715. 2018-05-15 Werner Lemberg <wl@gnu.org>
  4716. [sfnt] Fix memory leak in handling `COLR' data.
  4717. * src/truetype/ttgload.c (TT_Load_Glyph): Free old `layers' array
  4718. before reassigning allocated memory.
  4719. Only allocate `color_layers' if we don't have one already.
  4720. 2018-05-15 Werner Lemberg <wl@gnu.org>
  4721. [sfnt] If `COLR' is present, don't assume that all glyphs use it.
  4722. * src/sfnt/ttcolr.c (tt_face_load_colr_layers): Return FT_Err_Ok if
  4723. current glyph is not a `COLR' base glyph.
  4724. * src/truetype/ttgload.c (TT_Load_Glyph): Don't allocate
  4725. `color_layers' if there are no color layers.
  4726. 2018-05-14 Werner Lemberg <wl@gnu.org>
  4727. * src/base/ftobjs.c (FT_Load_Glyph): Fix signature of `pixel_modes'.
  4728. 2018-05-14 Werner Lemberg <wl@gnu.org>
  4729. Provide dummy functions if `TT_CONFIG_OPTION_SFNT_NAMES' is not set.
  4730. * src/base/ftsnames.c [!TT_CONFIG_OPTION_SFNT_NAMES]: Implement it.
  4731. 2018-05-13 Werner Lemberg <wl@gnu.org>
  4732. * src/base/ftobjs.c (FT_Load_Glyph): Improve tracing.
  4733. 2018-05-13 Shao Yu Zhang <shaozhang@fb.com>
  4734. Werner Lemberg <wl@gnu.org>
  4735. [sfnt] Preliminary support of colored layer outlines (#44689).
  4736. This commit enables OpenType's COLR/CPAL table handling; a typical
  4737. application are color emojis that can be scaled to any size.
  4738. If the color palette does not exist or is invalid, the rendering
  4739. step rasterizes the outline instead. The current implementation
  4740. assumes that the foreground is black.
  4741. Enable this by defining option TT_CONFIG_OPTION_COLOR_LAYERS.
  4742. There are still some issues with metrics; additionally, an API to
  4743. fetch color layers is missing.
  4744. * devel/ftoption.h, include/freetype/config/ftoption.h
  4745. (TT_CONFIG_OPTION_COLOR_LAYERS): New macro.
  4746. * include/freetype/internal/ftobjs.h (FT_Glyph_LayerRec,
  4747. FT_Colr_InternalRec): New structures.
  4748. (FT_Slot_InternalRec): Add `color_layers' field.
  4749. * include/freetype/internal/sfnt.h (TT_Load_Colr_Layer_Func,
  4750. TT_Blend_Colr_Func): New function types.
  4751. (SFNT_Interface): Add `load_colr', `free_colr', `load_colr_layer',
  4752. and `colr_blend' fields.
  4753. * include/freetype/internal/tttypes.h (TT_FaceRec): Add
  4754. `colr_and_cpal' field.
  4755. * include/freetype/internal/tttags. (TTAG_COLR, TTAG_CPAL): New
  4756. macros.
  4757. * src/sfnt/ttcolr.c, src/sfnt/ttcolr.h: New files.
  4758. * src/base/ftobjs.c (ft_glyphslot_done, FT_Render_Glyph_Internal):
  4759. Handle glyph color layers.
  4760. * src/sfnt/Jamfile (_sources), src/sfnt/rules.mk (SFNT_DRV_SRC): Add
  4761. `ttcolr.c'.
  4762. * src/sfnt/sfdriver.c: Include `ttcolr.h'.
  4763. (PUT_COLOR_LAYERS): New macro.
  4764. Update call to `FT_DEFINE_SFNT_INTERFACE'.
  4765. * src/sfnt/sfnt.c: Include `ttcolr.c'.
  4766. * src/sfnt/sfobjs.c (sfnt_load_face): Load `COLR' and `CPAL' tables.
  4767. (sfnt_done_face): Updated.
  4768. * src/truetype/ttgload.c (TT_Load_Glyph): Handle color layers.
  4769. 2018-05-12 Arkady Shapkin <arkady.shapkin@gmail.com>
  4770. Use MS VC++'s _BitScanReverse to calculate MSB (patch #9636).
  4771. * include/freetype/internal/ftcalc.h (FT_MSB) [_MSC_VER]: Implement
  4772. it.
  4773. 2018-05-10 Alan Coopersmith <alan.coopersmith@oracle.com>
  4774. Fix DLL compilation on Solaris.
  4775. AC_COMPILE_IFELSE only tries to compile a `*.c' to a `*.o'. The
  4776. Solaris Studio 12.1 through 12.5 compilers see the
  4777. `-fvisibility=hidden' flag, but ignore it with a warning of:
  4778. cc: Warning: Option -fvisibility=hidden passed to ld,
  4779. if ld is invoked, ignored otherwise
  4780. AC_LINK_IFELSE does the compile and then tries to link the result,
  4781. at which point the Solaris linker will issue an error:
  4782. ld: fatal: option '-fvisibility=hidden' is incompatible with
  4783. building a dynamic executable
  4784. If we don't use AC_LINK_IFELSE to catch the error, then configure
  4785. will fail further tests which attempt to link, such as those testing
  4786. dependencies like `libbz2'.
  4787. Also, don't try adding `-fvisibility' if we have already added
  4788. `-xldscope', just use one of them, since Sun Studio 12 and earlier
  4789. compilers only issue a warning, and don't try passing through to the
  4790. linker to generate an error, so AC_LINK_IFELSE doesn't catch them.
  4791. Tested on Solaris 11.4 beta with compiler versions:
  4792. Sun Studio 8 (Sun C 5.5)
  4793. Sun Studio 10 (Sun C 5.7)
  4794. Sun Studio 11 (Sun C 5.8)
  4795. Sun Studio 12 (Sun C 5.9)
  4796. Sun Studio 12.1 (Sun C 5.10)
  4797. Oracle Solaris Studio 12.2 (Sun C 5.11)
  4798. Oracle Solaris Studio 12.3 (Sun C 5.12)
  4799. Oracle Solaris Studio 12.4 (Sun C 5.13)
  4800. Oracle Developer Studio 12.5 (Sun C 5.14)
  4801. Oracle Developer Studio 12.6 (Sun C 5.15)
  4802. gcc 5.5.0
  4803. gcc 7.3.0
  4804. and verified the libfreetype.so.6 generated by each of those
  4805. compilers exported the same set of symbols.
  4806. * builds/unix/configure.raw: Implement it.
  4807. 2018-05-08 Werner Lemberg <wl@gnu.org>
  4808. [autofit] Avoid potential SEGV if running out of memory.
  4809. Problem reported by Shailesh Mistry <shailesh.mistry@hotmail.co.uk>.
  4810. * src/autofit/afshaper.c (af_shaper_buf_create,
  4811. af_shaper_buf_destroy) [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Don't
  4812. allocate and free a four-byte buffer. Instead, make those functions
  4813. no-ops; the calling functions will provide a pointer to a buffer
  4814. instead.
  4815. * src/autofit/afcjk.c (af_cjk_metrics_init_widths,
  4816. af_cjk_metrics_init_blues, af_cjk_metrics_check_digits),
  4817. src/autofit/aflatin.c (af_latin_metrics_init_widths,
  4818. af_latin_metrics_init_blues, af_latin_metrics_check_digits)
  4819. [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Use pointer to local variable for
  4820. `shaper_buf'.
  4821. 2018-05-07 Nikolaus Waxweiler <madigens@gmail.com>
  4822. [cmake] Allow using project as subfolder in other project.
  4823. * CMakeLists.txt: Test for CMake build directory being different
  4824. from source directory. Provide other parts of the build system
  4825. access the full include directory.
  4826. 2018-05-07 Werner Lemberg <wl@gnu.org>
  4827. [build] Suppress configure's `nothing to be done' message.
  4828. This is due to calling the configure script via `make' (within the
  4829. top-level `configure' wrapper script). The same can happen for all
  4830. other secondary make targets that are used to only modify the
  4831. primary one, e.g., `make setup devel'.
  4832. * builds/dos/detect.mk (emx, turboc, watcom, borlandc, borlandc16),
  4833. builds/os2/detect (visualage, watcom, borlandc, devel),
  4834. builds/unix/detect.mk (devel, lcc, unix), builds/windows/detect.mk
  4835. (visualc, watcom, visualage, lcc, mingw32, bcc32, devel-bcc,
  4836. devel-gcc): Use no-op recipe.
  4837. 2018-05-04 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
  4838. Support symbol visibility features of Sun / Oracle C compilers.
  4839. Reported by Kiyoshi Kanazawa:
  4840. https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html
  4841. Thanks to the suggestions by Alexei and Alan Coopersmith.
  4842. * builds/unix/configure.raw: Check if "-xldscope=hidden" is
  4843. accepted, and if so, it is added to CFLAGS. This is the option
  4844. making Sun / Oracle C compilers hide the symbols from global
  4845. scope.
  4846. * include/freetype/config/ftconfig.h: Use "__global" prefix
  4847. for FT_EXPORT() macro, if SunPro C is newer than Sun ONE
  4848. Studio 8 (2003).
  4849. * builds/unix/ftconfig.in: Ditto.
  4850. * builds/vms/ftconfig.h: Ditto.
  4851. 2018-05-02 Nikolaus Waxweiler <madigens@gmail.com>
  4852. Unbreak CMake Windows installation
  4853. * CMakeLists.txt: Generate ftconfig.h on non-UNIX.
  4854. 2018-05-02 Werner Lemberg <wl@gnu.org>
  4855. Remove FT_CONFIG_OPTION_PIC and related code.
  4856. */* [FT_CONFIG_OPTION_PIC]: Remove all code guarded by this
  4857. preprocessor symbol.
  4858. */*: Replace `XXX_GET' macros (which could be either a function in
  4859. PIC mode or an array in non-PIC mode) with `xxx' arrays.
  4860. * include/freetype/internal/ftpic.h, src/autofit/afpic.c,
  4861. src/autofit/afpic.h, src/base/basepic.c, src/base/basepic.h,
  4862. src/base/ftpic.c, src/cff/cffpic.c, src/cff/cffpic.h,
  4863. src/pshinter/pshpic.c, src/pshinter/pshpic.h, src/psnames/pspic.c,
  4864. src/psnames/pspic.h, src/raster/rastpic.c, src/raster/rastpic.h,
  4865. src/sfnt/sfntpic.c, src/sfnt/sfntpic.h, src/smooth/ftspic.c,
  4866. src/smooth/ftspic.h, src/truetype/ttpic.c, src/truetype/ttpic.h:
  4867. Removed.
  4868. ----------------------------------------------------------------------------
  4869. Copyright (C) 2018-2021 by
  4870. David Turner, Robert Wilhelm, and Werner Lemberg.
  4871. This file is part of the FreeType project, and may only be used, modified,
  4872. and distributed under the terms of the FreeType project license,
  4873. LICENSE.TXT. By continuing to use, modify, or distribute this file you
  4874. indicate that you have read the license and understand and accept it
  4875. fully.
  4876. Local Variables:
  4877. version-control: never
  4878. coding: utf-8
  4879. End: