v0.9.0
Features
-Added support for transparency / alpha values
-Added support for NO_COLOR environment variable
-Added new color pickers: Gnome/Wayland via gdbus, zenity, yad, and wcolor
==============
Version 2.54.3
==============
- #866 - Fix detection of gi-docgen (David King, Jan Alexander Steffens).
- Install the generated documentation in the correct place so that
Devhelp can find it (thanks to Jan Tojnar for pointing this out).
==============
Version 2.54.2
==============
- #823 - Fix regressions when computing element geometries.
- Add a --disable-gtk-doc option for the configure script, so people
can disable generating documentation for cross-compiling (Matt
Turner).
- MSVC: Support generating documentation, and passing introspection
paths (Chun-wei Fan)
==============
Version 2.54.1
==============
This release just has some build-time fixes.
- Fix oversight in the Minimum Supported Rust Version (MSRV) - this
release requires Rust 1.56 or later. This has been true since
librsvg 2.53.1, but it was not checked correctly. (Matt Turner)
- #859 - Make rst2man and gi-docgen optional. (Kleis Auke Wolthuizen)
- #856 - Fix documentation comments.
==============
Version 2.54.0
==============
This is a summary of the 2.53.x release notes; you can also read them
for more detail. Not many new features; we've been working on
infrastructure and documentation.
- Librsvg now supports SVG2 geometry properties for these elements:
rect, circle, ellipse, image, svg (Jeremias Ortega).
- #721 - Catch circular references when rendering patterns.
- The C API documentation now uses gi-docgen instead of gtk-doc.
Rsvg-convert's man page is now converted to reStructuredText instead
of troff.
- The "Recommendations for applications" chapter in the documentation
is much improved!
==============
Version 2.53.2
==============
- #851 - Output filled text as text for PDF; fixes regression due to
outputting all text as paths.
- Fix taller-than-wide proportional scaling and size limiting in
rsvg-convert.
- #772, #773, #774, #775, #776 - Implement SVG2 geometry properties
for these elements: rect, circle, ellipse, image, svg (Jeremias
Ortega).
- #450 - Fix potential unaligned accesses in surface iterators
(Michael Howell).
- Actually use GDK_PIXBUF_MODULEDIR when calling
gdk-pixbuf-query-loaders (Fabrice Fontaine).
- Windows build fixes (Chun-wei Fan).
- Add links to functions and types throughout the C API documentation.
==============
Version 2.53.1
==============
While it is not a user-visible change, Jordan Petridis has ported
librsvg's Continuous Integration (CI) infrastructure to use
Freedesktop CI Templates. This lets us test librsvg easily on
different environments. If you want your environment tested, now is
the time to add it!
- #599 - Fix incorrect text rendering when text has different scales
in the X/Y axes. This regressed after librsvg 2.52.5, when Pango
had to revert its fix for the same bug. Now librsvg renders all
text as paths, and does the scaling itself. Please file a bug if
you have evidence that this presents a performance problem for you.
- Update to the latest gtk-rs release (Bilal Elmoussaoui).
- Port to Freedesktop CI Templates (Jordan Petridis).
of troff.
- The "Recommendations for applications" chapter in the documentation
is much improved!
==============
Version 2.53.2
==============
- #851 - Output filled text as text for PDF; fixes regression due to
outputting all text as paths.
- Fix taller-than-wide proportional scaling and size limiting in
rsvg-convert.
- #772, #773, #774, #775, #776 - Implement SVG2 geometry properties
for these elements: rect, circle, ellipse, image, svg (Jeremias
Ortega).
- #450 - Fix potential unaligned accesses in surface iterators
(Michael Howell).
- Actually use GDK_PIXBUF_MODULEDIR when calling
gdk-pixbuf-query-loaders (Fabrice Fontaine).
- Windows build fixes (Chun-wei Fan).
- Add links to functions and types throughout the C API documentation.
==============
Version 2.53.1
==============
While it is not a user-visible change, Jordan Petridis has ported
librsvg's Continuous Integration (CI) infrastructure to use
Freedesktop CI Templates. This lets us test librsvg easily on
different environments. If you want your environment tested, now is
the time to add it!
- #599 - Fix incorrect text rendering when text has different scales
in the X/Y axes. This regressed after librsvg 2.52.5, when Pango
had to revert its fix for the same bug. Now librsvg renders all
text as paths, and does the scaling itself. Please file a bug if
you have evidence that this presents a performance problem for you.
- Update to the latest gtk-rs release (Bilal Elmoussaoui).
- Port to Freedesktop CI Templates (Jordan Petridis).
- Visual Studio builds can work from a git checkout now (Chun-wei Fan)
- Windows build fixes (Martin Hertz, Chun-wei Fan)
==============
Version 2.53.0
==============
This is the first release in the new development series. There are no
new features, just changes to how the documentation is built.
The man page for rsvg-convert is now generated from a reStructuredText
document, and the C API reference is generated using gi-docgen.
Please make sure you install python3-docutils (for rst2man) and
gi-docgen before compiling librsvg from a tarball.
- #755 - rsvg-convert's man page is now generated from reStructuredText.
- #827 - Move C API reference to gi-docgen.
- Test suite updates (Michael Howell).
- Link against bcrypt for Visual Studio builds (Martin Hertz).
Version 4.2-1
o Allow the vcov. argument in the call to one of the effect methods
to be a matrix or a function. Previously only a function was
permitted.
o Fixed bug in plot.eff() for multiline plots in which the x.var
argument is set explicitly (reported by Gerrit Eichner).
o Small improvements to docs.
Version 4.2-0
o Adding the use of the insight package to get formulas.
o Added Effect.glmmPQL() for fitting generalized linear mixed models
using the glmmPQL() function in the MASS package for penalized
quasi-likelihood estimation.
o Don't ignore lines lty sub-argument to plot.effpoly() (fixing a bug
reported by Laura Adamovicz).
o One-column matrix predictors trigger a warning and correction
(following problem reported by Carla Hendricks).
o Added regression tests for classes of model objects
supported. Tests must be enabled in the effects sources at
tests/regression-tests.R.
o Rewrite of defining effect method vignette.
o Minor changes to predictor effects gallery vignette.
Version 4.1-4
o Change class(x) == "y" to inherits(x, "y") in code.
Version 4.1-3
o Handle xlevels=n argument correctly in Effect() (fixing bug
reported by Gerrit Eichner).
o Add col argument to effectsTheme(), mostly to accommodate
colorblind-friendly palette (suggestion of Sercan Kahveci).
Version 4.1-2
o Effect methods for clm, clm2, and clmm models were not correctly
passing the estimated theshholds to polr for computing effects (error
reported by Stefan Th. Gries).
o Updated "Defining Effects Methods ..." vignette to reflect
revisions to Effect.clm, Effect.clm2 and Effect.clmm.
o Make sure that Effect() and plot() methods work correctly with
character and logical predictors (following bug report by Julian
Gaviria Lopez).
pkgsrc: enable some more modern image formats (heif, webp, jp2)
Geeqie 1.7.3
============
- Fix crash with Flatpak version
Geeqie 1.7.2
============
- Copy image to clipboard option
- Fix MacOS problems
- Multi-threaded find duplicates
- Generate sRGB thumbnails for images with embedded color profile
- External image decoder option
- AppImage supported
- Support jpeg xl format
- Automated cache maintenance
- Support archive (e.g. zip) files
- Use system theme background color
And as usual:
- Many small improvements
- Many bug fixes
- Updated language support
TrueType fonts are a standard component of modern X distributions,
including NetBSD's, so there's probably no better need to mention them
here than in any other package.
-QML tool buttons that are styled by qqc2-desktop-style (e.g., inside KDE's
System Settings) are drawn like ordinary buttons as far as possible.
-Improvements and workarounds for LibreOffice's Qt skin.
-A warning dialog is added for kinetic scrolling. It should not be enabled by
theme makers.
freeglut 3.2.2
Changes
* Fix netbsd/aarch64 build by including sys/joystick.h instead of
machine/joystick.h.
* Fix build with gcc >= 10 which made -fno-common the default by no
longer relying on COMMON symbols for globals.
* Fix android build (default to FREEGLUT_GLES, and check for debug
flags).
* Add flat shading option to the shapes demo.
* Fix crash when calling primitive drawing functions without creating a
window first.
* Dropped really old and unmaintained doc directory from the source
tree.
v2.5.0
Merged pull requests:
tools/travis-ci/install.sh: git clone with https:// to fix 'The unaut…
Java Support 1.8 now...
Separate fuzz targets to increase coverage
CMakeLists.txt: do not set INSTALL_NAME_DIR for MacOS builds for CMake >= 3.0 (fixes
Avoid integer overflows in DWT. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44544
Updated "added support for partial bitstream decoding"
opj_encoder_set_extra_options(): add a GUARD_BITS=value option
More overflow related bug fixes
opj_j2k_setup_encoder(): validate number of tiles to avoid illegal values and potential overflow (fixes
Missed conversion from unsigned int to OPJ_INT32
Added check for integer overflow in get_num_images
Added overflow check for CVE-2021-29338
Fix integer overflow in num_images
Remove duplicate assignments in function tiftoimage
Fix some typos (found by codespell)
CI: Add CIFuzz action
Feature/decimation
API: deprecate 'bpp' member in favor of 'prec'
Added support for high throughput (HTJ2K) decoding.
verify-indentation.sh: fix for pull request from bar/master to foo/master
Change integer for version libtiff 4.3.0
Port continuous integration to github actions
Avoid integer overflows in DWT.
LGTM warning: Comparison result is always the same
A couple typos found by codespell
cmake: add install interface include directory
fix issues 1368: exist a issues of freeing uninitialized pointer in src/bin/jp2/opj_decompress.c,that will cause a segfault
opj_j2k_is_imf_compliant: Fix out of bounds access
opj_j2k_is_imf_compliant: Fix argument formatting for warnings.
CMakeLists.txt/appveyor.yml: update version number to 2.5.0…
.travis.yml: try to fix gcc 4.8 config by updating to xenial
Add support for enabling generation of TLM markers in encoder
Fix various compiler warnings
fix
Remove obsolete components JPWL, JP3D and MJ2
tools/travis-ci/install.sh: fix links to Kakadu and jpylyzer binaries
emscripten: disable big endian test
Fix cmake file with DESTDIR
CMakeLists.txt: Don't require a C++ compiler
Import files tiff and yuv(raw)
Fix year in NEWS
Fix lcms2 static linking using pgk config
fix static build only against tiff and its indirect dependencies
Closed issues:
integer constant is too large for 'long' type
Openjpeg3D lossy compression not working
mj2: Array overflow
OPJ fails to decode image that KDU manages correctly
yuvtoimage() bug in v1 and v2 for 16-Bit: please apply ASAP
JP3D: Fix CVE-2013-4289 CVE-2013-4290
MJ2 libraries are installed in lib
MJ2: realloc is misused and may leak memory
MJ2 wrapper not functional
JPWL is broken in trunk
MJ2 files not using OPENJPEG API correctly
Maximum bit depth supported by the OpenJPEG implementation of JP3D
does openjpeg support either visually lossless or numerically lossless jpeg2000 compression?
extract jpeg2000 tile without decompression
openjpeg doesn't install a relocatable shared lib on macOS
pull request - the cinema industry awaits!
Integer overflows in j2K
why lossly compression performance worse than jpeg when compress png?
cect
the docs don't describe bpp and prec in opj_image_comp very well
converting .png to .jp2 by opj_compress is different from the original image
Comparison result is always the same
Exist a issues of freeing uninitialized pointer in src/bin/jp2/opj_decompress.c,that will cause a segfault
[TEST NOT RUNNING]: bigendian test
opj_decompress 2.4.0 built with library 2.3.0.
New library htjpeg2000
Integer Overflow in num_images
All IMF Profile Selections Result in PART1
grayscale image
error C2169: 'lrintf': intrinsic function, cannot be defined
Generate lower-case extension
color of reconstructed png file much darker
CVE-2019-6988, CVE-2018-20846 and CVE-2018-16376
opj 2.4.0: opj_free missing in opj3d
Not able to compress volumetric data
HTML documents are not installed in specified place
Can't find openjpeg.h when cross-compile.
OpenJPEG is available with EasyConfig
Building Test Programs
Builds are not reproducible
strange behaviour of opj_jp3d_compress/decompress utility
Potential heap-based buffer overflow in function t2_encode_packet in src/lib/openmj2/t2.c and src/lib/openjp3d/t2.c
Function tgatoimage in src/bin/jpwl/convert.c need to check that the file is big enough to avoid excessive memory allocations
memory & cpu are exhausted when converting jp2 file into png
Cannot compress PGX into JP3D despite following the directions?
sscanf buffer overflow in opj_jp3d_compress.c
integer underflow may lead to writing garbage
sscanf buffer overflow
strcpy overflows
sprintf buffer overflows
strcpy buffer overflow
integer overflow in malloc()
out of bounds writes
out of bounds writes
divide by zero, perhaps multiplication overflow
missing format string parameter
leaks from cppcheck in lib folder
How to initialize DEBUG_PROFILE in color.c?
JP3D sample files
BIG_ENDIAN bug in jpwl.c
OpenJPEG fails to decode partial j2c where kdu succeeds
building mj2 binaries fails
openmj2\mj2.c: Out of bounds
bin\mj2\opj_mj2_decompress.c 101 wrong check / leak
Adding a couple of new components and a nice feature to transistors
and tubes.
- Added TVS diodes (transorb)
- Added proximity switches
- Added partially drawn tube and transistor borders
Merged
autotools: Add ws2_32 library with MagickCore for Win32 platform #5119
Avoid NULL pointer dereference in coders/wmf.c #5117
Commits
beta release 600c455
possible null dereference 4e085a2
improved error checking 2e5c976
Also create an arm64 installer. c84fcf5
Also create portable arm64 binaries. 6126915
eliminate coverity defect 4cec11d
eliminate Coverity defect 0364622
eliminate Coverity defect a619616
ImageMagick/ImageMagick#5099 43da986
prevent memory leak on exception 0157eb8
the tiles per page cannot be zero fecf247
check security policy before reading an -fx expression from a file c53fb96
fix exception on a valid ternary @ ImageMagick/ImageMagick#4533 64b5fe6
display the image pixel cache type 759029d
change order of pixel cache type 3529df8
change order of pixel cache type bacb357
use the correct property key for arithmetic coding 0184b6c
Reverted patch because HDRI should always be highres. 4e20a27
the maximum dissolve factor is 1.0 452c436
Removed duplicate check. b108dbd
Fixed possible memory leak reported in #5121. 9c957a6
Removed to heif_filetype_yes_unsupported check to resolved the issue reported in #5123. 47898c6
possible memory leak @ ImageMagick/ImageMagick#5121 b0c1967
eliminate compiler warnings a10a570
eliminate compiler warnings 3fa3d9f
conditional logging 53fb342
eliminate compiler warnings a429f44
background kept when making cylinder @ ImageMagick/ImageMagick#5112 925a6c5
cosmetic d4d5ca2
possible memory leak @ ImageMagick/ImageMagick#5131 8ed6d1d
release 4e6f7b1
release 39baedd
The major new features:
Multi-barcode reading with the new std::vector<Result>
ReadBardcodes(...) function. Does not work for Aztec, DataMatrix
and Maxicode, yet.
Multi-resolution scanning that can automatically downscale the
input to substantially increase the detection rate on high
resolution scans, see DecodeHints::tryDownscale, currently only
enabled in the ReadBardcodes function
New Result::symbologyIdentifier property (thanks to @gitlost)
Updated and improved android wrapper (thanks to @markusfisch)
Worth mentioning:
Most deprecated APIs from last release were removed (will likely
break your build if you still have deprecation warnings with
1.2.0)
New Result::lineCount and DecodeHints::minLineCount properties
to improve reliability of 1D code reading
New Result::isMirrored property (works for QRCode, PDF417,
DataMatrix)
Improved FNC1 handling and deprecation of DecodeHints::assumeGS1
Lots of small fixes all over the place
Drop in-tree copy of stb image library
New OpenCV example code
QRCode reading improvements
Python 3.10 support
Make tiff optional (default on, like before)
Merged
Add support for FITS images with NaN values #5084
Fixes grammar/typos/markdown #5083
Commits
prep Beta release d2c4a6f
ImageMagick/ImageMagick#3661 9090b17
possible obscure memory leak 8e0c95e
check event mask before logging eab8155
check event mask before logging 7dcb276
Also create changelog in the daily build. 878a667
Removed %GITHUB_WORKSPACE% from other builds. 2540c48
improve/optimize logging 7ba113a
ImageMagick/ImageMagick#5041 c942d53
need Changelog.md, referenced by web pages 6b6e7f3
ilatest autoconf update 9dfee98
move to wbsite repo 3e445a0
optimize thumbnail resizing 09ab692
ImageMagick/ImageMagick#4533 (comment) d13f844
Rename extent to length. b056cec
Allow exif profile that has a zero length (#5082). 0433d6e
Moved length check. 267a891
Removed code that was used to create a test image. bf925e6
Use consistent code style. c4c031b
revert bca2fb8
Added missing CoderEndianSupportFlag (#5090). 0952c6a
Sort commits by date instead. 7b95dda
https://oss-fuzz.com/testcase?key=5120317075357696 5622990
Removed unused arguments. c704997
Added missing typecasts. 6820800
check for image width/height exceeding INT_MAX 6d2c75e
eliminate compiler exception 8649f4f
add comment c506f55
Use set_arg_encoding as suggestion in #5092. 67a2613
optimize logging b2eaec1
fix copyright c2fc57a
initalize logging variable 263bfae
possible divide by zero dce1bcf
more informative exception message b7d240b
more informative exception message 354669f
make some logging coditional 372b5df
ImageMagick/ImageMagick#3859 f49b826
release a2b2c08
Version 1.4.1
Drop support for Python 3.4
Imagemagick 7 compatibility fixes
Fix: Implemented consistent behaviour between Pillow and Wand for out-of-bounds crop rectangles
Upstream changes:
WCSLIB version 7.11 (2022/04/26)
--------------------------------
* C library
- In tabini(), the default index array should contain a 1-relative
sequence: {1, 2,... N}. Previously it was 0-relative.
WCSLIB version 7.10 (2022/04/24)
--------------------------------
* C library
- In tabcpy(), collapse degenerate table index arrays if they are
collapsed in the source struct. Minor fix for output formatting
in tabprt().
- In the C test suite, added calls to wcstrim() in twcsfix to tidy
the structs before printing.
* Utilities
- The default option in wcsware now trims the wcsprm struct before
printing it. Use the '-p' option to print the untrimmed struct.
WCSLIB version 7.9 (2022/03/26)
-------------------------------
* C library
- In wcsset(), bug fix for identifying time coordinate axes.
Reported by Mihai Cara with patch.
WCSLIB version 7.8 (2022/03/25)
-------------------------------
* C library
- In wcssub(), bug fix for tabular coordinates that change axis
number, thus requiring tabprm::map to be updated. Reported by
Mihai Cara with patch.
Also in wcssub():
- check that all axes of a multi-dimensional table are extracted
together,
- fixed potential memory leaks for tabular coordinate axes when
an attempt to subimage non-separable axes fails,
- the error messages for non-separable coordinate systems are
generally more informative,
- subimage extraction by coordinate type now recognises time
coordinate axis types via WCSSUB_TIME.
- wcsset() now identifies time coordinate axes in wcsprm::types.
- Extended test program twcssub to test the above modifications.
* Installation
- Bug fix in the utils makefile for creating $(MANDIR)/man1.
Reported by Aleksander Kurek.
- Bug fix in the Fortran makefile for compiling and using 'tofits'.
Reported by Stefan Br▒ns.
* User manual
- Documentation generation moved to doxygen 1.9.3 (was 1.9.1).
WCSLIB version 7.7 (2021/07/12)
-------------------------------
* C library
- In disfree() and disset(), removed potential for double invokation
of free() on allocated memory. Reported by Cyril Richard.
- In wcsutil_fptr2str(), fixed a bug reported by Ralf Palsa (with fix)
that caused it to be overly enthusiastic in stripping leading zeroes
off addresses of function pointers.
- In wcspcx(), replaced variable length arrays with allocated memory
(portability issue). Reported by Mihai Cara with patch.
- Fixed buglets in wcsbth() and linsize() uncovered by gcc 11.1.0.
- Quelled inconsequential compiler warnings from gcc 11.1.0 concerning
wcsmix() (function prototype in wcs.h), wcstrim(), wcseulexe(),
wcsulex(), and wcsutrne().
- Defined _POSIX_C_SOURCE appropriately in tprj2.c and tspc.c to get
the function prototype etc. for nanosleep() from time.h.
* Fortran wrappers
- Quelled numerous inconsequential compiler warnings from gfortran
11.1.0.
- Fixed minor bugs uncovered by gfortran 11.1.0 in test programs tdis2
and ttab3.
* Utilities
- Moved 'tofits' from ./C/test/ into the utilities directory as it's
generally useful, and added usage (converted to man page).
Also made it a bit smarter in dealing with ISO/IEC 8859 and UTF-8
encoded byte streams, in particular translating non-breaking spaces
into ordinary spaces.
* Installation
- Two patches for configure.ac provided by Mos▒ Giordano:
1. makes it possible to build the Windows library using the MinGW
cross-compiler,
2. makes the soname of the MacOSX library consistent with other
Unix systems.
WCSLIB version 7.6 (2021/04/13)
-------------------------------
* C library
- Bug fix in tabs2x() triggered for 1-dimensional coordinate lookup
tables on axes > 1. Reported by Mihai Cara.
- In datfix(), don't return status 0 if no change was made (fix for
change made at release 7.4). Reported by Derek Homeier.
- New function wcspcx() in the wcsfix suite regularizes the linear
transformation component of a coordinate description to make it more
human-readable. It decomposes CDi_ja into PCi_ja and CDELTia in
such a way that CDELTia forms meaningful scaling parameters, often
leaving an orthogonal or near-orthogonal matrix. Optionally, it can
then permute rows of this matrix to unscramble axis permutations.
A test header may be generated from wcspcx.keyrec for input to
wcsware (not exercised as part of the standard test suite).
- New function wcstrim() frees memory allocated by wcsinit() for
arrays in a wcsprm struct that remain unused after the struct has
been set up.
- New functions wcssize(), auxsize(), tabsize(), linsize(), dissize(),
celsize(), prjsize(), spcsize(), and wcserr_size() compute the total
size of the relevant structs, including allocated memory.
- In the C test suite, inserted a brief pause in tprj2 and tspc, which
otherwise have now become a blur.
* Fortran wrappers
- Added wrappers for wcspcx(), wcstrim(), wcssize(), auxsize(),
tabsize(), linsize(), dissize(), celsize(), prjsize(), spcsize(),
and wcserr_size().
* Utilities
- Added -c, -cp, -C, and -Cp options to wcsware to apply wcspcx()
in a variety of ways, -m to apply wcstrim(), and -z to report the
total size of the wcsprm struct with a breakdown of the sizes of
its constituent structs.
- Fixed compiler warnings for sundazel (portability issue).
* Installation
- Upped the required version of Flex to 2.6.0 (was 2.5.9). Problems
with Flex 2.5.39 reported by Derek Homeier.
Also added '--disable-flex' as a new configure option to force the
use of the pre-generated Flex sources.
WCSLIB version 7.5 (2021/03/20)
-------------------------------
The C code in WCSLIB is moving piecemeal to the C99 standard. In fact,
various indispensible C99 constructs have been used in WCSLIB for many
years: the long long int data type (in fitshdr() only); stdint.h,
inttypes.h, and the use of PRI formatting control (in wcsprintf(), which
is widely used by the library); and the C99-extended library function
vsnprintf() (used by wcserr for a decade). Flex-generated C code also
uses C99 extensions, though with workarounds if they are not available.
Except in the header prologues, which are formatted in a special way for
generating the user manual, comments were changed en masse to C99 style
in release 7.3.1, and variable declarations in code that I have occasion
to modify will transition to the more general placement allowed by C99.
However, I have no plans to use any of the more esoteric features of
C99.
* C library
- New function, wcsccs(), changes the celestial coordinate system of a
wcsprm struct, for example, from equatorial to galactic coordinates.
The parameters that define the spherical coordinate transformation
must be provided. This allows WCSLIB to provide this functionality
without needing to know anything about specific celestial coordinate
systems, and has the advantage of making the routine completely
general. Requested by Mohammad Akhlaghi.
Modified test program twcsfix also to test wcsccs().
- Fixed a problem common to all of the Flex code (fitshdr, wcsbth,
wcspih, wcsulex, and wcsutrn) that made it thread-unsafe. Reported
by Cyril Richard.
Added a new test program, tpthreads, to test thread safety. It is
only used for code development, and not exercised as part of the
standard test suite.
- In fitshdr(), fixed a problem that potentially could arise on
systems where sizeof(long long int) is greater than 8 (64 bits).
* Fortran wrappers
- Match changes to the C library: added a wrapper for wcsccs(), and
modified twcsfix.f.
- Because null addresses cannot be passed to functions in Fortran,
wcssub_() now interprets *nsub == -1 && *axes == -1 as a signal to
do a deep copy of one wcsprm struct to another.
* Utilities
- New utility, sundazel, computes the local time of the Sun's passage
through the specified apparent longitude or latitude in a user-
defined coordinate system. It can also perform several other Solar
related calculations. (It is unrelated to FITS WCS, and does not
use WCSLIB.)
* Installation
- Added an 'uninstall' rule to the makefiles. Suggested by
Cyril Richard.
WCSLIB version 7.4 (2021/01/31)
-------------------------------
* C library
- In wcshdo(), fixed a bug introduced in release 5.9 that potentially
caused loss of numerical precision in the sprintf() formatting of
floating point keyvalues. This was triggered when a large range of
CRPIXja, PCi_ja, or CDELTia values (as three separate groups) were
formatted using an 'f' format descriptor, the range not being so
large that it would have forced wcshdo() to revert to 'E' format.
Reported by Mohammad Akhlaghi.
Also in wcshdo(), fixed a bug introduced in release 7.1 that caused
the coefficients of the TPD distortion function not to be written to
the header. TPD and Polynomial distortion function headers will now
always include the DPja.DOCORR keyword. Reported by Derek Homeier
with patch.
- In wcsset(), fixed a segv generated in attempting to report a non-
standard units string with wcserr message reporting disabled.
Reported by Mohammad Akhlaghi.
In wcsutrne(), allow 'Angstroms' and 'angstroms' as additional
synonyms for 'Angstrom'.
- In datfix(), ensure that 0 is returned if an informational message
is set in wcsprm::err. Consequent on feedback independently from
Mihai Cara and Bruce Merry.
Clarified that informational messages may be set in wcsprm::err
for returns of 0 from datfix(), obsfix(), unitfix(), and spcfix().
* User manual
- Added cautions about translating CDi_ja to PCi_ja plus CDELTia for
those historical distortion functions (TPV, TNX, ZPX) that expect to
operate on intermediate world coordinates, rather than intermediate
pixel coordinates. Consequent on feedback from Mohammad Akhlaghi.
- Documentation generation moved to doxygen 1.9.1 (was 1.8.19).
WCSLIB version 7.3.1 (2020/08/17)
---------------------------------
There are no functional changes in this release.
* C library
* Fortran wrappers
* PGSBOX
* Utilities
- Changed all C code, including within the flex sources, Fortran and
PGSBOX wrappers, and test suite, to use C99 style commenting (i.e.
using //), excluding the header prologues used to generate the user
manual.
* User manual
- Documentation generation moved to doxygen 1.8.19 (was 1.8.18).
WCSLIB version 7.3 (2020/06/03)
-------------------------------
* C library
- wcshdo() was writing MJD-OBS twice to the header, and MJD-BEG not
at all.
- In wcshdo(), if MJDREF assumes its default value, just write
MJDREF = 0 (not MJDREFI & MJDREFF), and omit writing DATEREF,
which, with a value of '1858-11-17', looks strange and is
potentially confusing. Reported by Thomas Robitaille.
If the fractional part of MJDREF is zero, then just write the
integer part as MJDREF (i.e. not as MJDREFI & MJDREFF).
- Bug fix in wcsfix() - it was writing error messages that referred
to DATE-REF and MJD-REF rather then DATEREF and MJDREF. Reported
by Mihai Cara.
- Under control of a new flag, WCSHDR_DATEREF, added the option to
wcspih() and wcsbth() to accept DATE-REF, MJD-REF, MJD-REFI,
MJD-REFF, JDREF, JD-REFI, and JD-REFF as synonyms for the standard
keywords, DATEREF, MJDREF, MJDREFI, MJDREFF, JDREF, JDREFI, and
JDREFF. The latter buck the pattern set by the other date keywords
({DATE,MJD}-{OBS,BEG,AVG,END}), thereby increasing the potential
for confusion and error.
* Fortran wrappers
- As compilers are becoming much stricter (gfortran 10), modified all
Fortran test programs to use the type-specific equivalents of the
various *PUT and *GET routines. Reported by Ole Streicher.
- For the fitshdr wrappers, added type-specific equivalents of
KEYGET: KEYGTI, KEYGTD, and KEYGTC.
* PGSBOX
- Modified pgtest to use the type-specific equivalents of WCSPUT.
* User manual
- In the section "WCSLIB Fortran wrappers", promoted use of the type-
specific equivalents of the various *PUT and *GET routines.
- In the section "FITS-WCS and related software", added ASCL and ADS
codes, where they exist, for all software packages mentioned.
- Documentation generation moved to doxygen 1.8.18 (was 1.8.17).
9.1.0 (2022-04-01)
------------------
- Fix loading FriBiDi on Alpine
- Added setting for converting GIF P frames to RGB
- Allow 1 mode images to be inverted
- Raise ValueError when trying to save empty JPEG
- Always save TIFF with contiguous planar configuration
- Connected discontiguous polygon corners
- Ensure Tkinter hook is activated for getimage()
- Use screencapture arguments to crop on macOS
- Do not mark L mode JPEG as 1 bit in PDF
- Added support for reading I;16R TIFF images
- If an error occurs after creating a file, remove the file
- Fixed calling DisplayViewer or XVViewer without a title
- Retain RGBA transparency when saving multiple GIF frames
- Save additional ICO frames with other bit depths if supplied
- Handle EXIF data truncated to just the header
- Added support for reading BMP images with RLE8 compression
- Support Python distributions where _tkinter is compiled in
- Added support for PPM arbitrary maxval
- Added BigTIFF reading
- When converting, clip I;16 to be unsigned, not signed
- Fixed loading L mode GIF with transparency
- Improved handling of PPM header
- Reset size when seeking away from "Large Thumbnail" MPO frame
- Replace requirements.txt with extras
- Added PyEncoder and support BLP saving
- Handle TGA images with packets that cross scan lines
- Added FITS reading
- Added rawmode argument to Image.getpalette()
- Fixed BUFR, GRIB and HDF5 stub saving
- Do not automatically remove temporary ImageShow files on Unix
- Correctly read JPEG compressed BLP images
- Merged _MODE_CONV typ into ImageMode as typestr
- Consider palette size when converting and in getpalette()
- Added enums
- Ensure image is opaque after converting P to PA with RGB palette
- Attach RGBA palettes from putpalette() when suitable
- Added get_photoshop_blocks() to parse Photoshop TIFF tag
- Drop excess values in BITSPERSAMPLE
- Added unpacker from RGBA;15 to RGB
- Enable arm64 for MSVC on Windows
- Keep IPython/Jupyter text/plain output stable
- Raise an error when performing a negative crop
- Deprecated show_file "file" argument in favour of "path"
- Fixed SPIDER images for use with Bio-formats library
- Ensure duplicated file pointer is closed
- Added specific error if path coordinate type is incorrect
- Return an empty bytestring from tobytes() for an empty image
- Remove readonly from Image.__eq__
The main reason for this release was that KF5 had a backward incompatible
change. The minimum required version of Qt is bumped to 5.15.0 and that of
KF5 to 5.82.0. As a result, old distros can't be supported anymore.
Other changes:
- A workaround is added for the wrong style code of KisDoubleSliderSpinBox in
Krita ≥ 5.0.0.
- Options are added (to Kvantum Manager) for setting corner radii when blurring
translucent menus and tooltips with rounded corners. Usually, a value of 2 is
enough for preventing blur artifacts.
- 16px is given to the width of vertical spinbox buttons.
- Small fixes.
In this version, several internal changes have been included in order to
streamline and organize better the components and to change the
management of color. The changes are pretty deep and subtle, so a bug or
unexpected behaviour is always possible. You can use the 1.4.6 rollback
point in case of trouble, but be sure to report any bug.
- Added connectors shapes, and included the BNC into that class
- Added nullator and norator shapes
- Added buzzer and reversed buzzer bipoles
- Added "dot" anchors to inductances
- Added "boxed only" option for some circular blocks
- Added DIN antenna shape
- Fixed block/input arrow connection
- Fixed a problem with generic tunable arrows
Internal changes:
- Added a generic drawing function for shapes, which are now drawn
always in background
- Added a hook system to be able to change component drawing settings
per-shape, per-class or globally
- All the 250+ shapes are now "protected" by possible external arrow and
arced corners parameters
- Completely changed the management of the shapes' color
- Use the generated ChangeLog.md file instead.
- release commits
- Changed the minimum version for libheif to 1.4.0.
- Get the intensity before changing the of the pixel channels (thanks Snibgo) #5067.
- initialize composite variables as they are declared
- Use version 3 of checkout.
- bump revisition
- Create ChangeLog during the release build.
- fix rare but possible memory leak
- use old-style comment declarations
- Try without %GITHUB_WORKSPACE%
- autoconf latest update
- eliminate Coverity defect
- ensure we don't dereference null pointer
- The default fetch-depth is 1.
- Use date of latest change to m4/version.m4 instead.
- laterst automake/autoconf update
- latest autoconf update
- eliminate Coverity defects
- Added option to mark the version as beta.
- Call CloseBlob earlier because we read the image from the file instead.
- latest autoconf/automake updates
- release
- set threshold policy by default
- Added missing with.
- fix compiler warning
- Added version checks for heif_check_filetype (#5049).
- eliminate compiler warning
- Changed triggers for the release build.
- unecessary check for null
- off-by-one fix
- Removed path.
- Changed fetch depth.
- Temporary list folder content.
- Corrected typo.
- fix copyright format
- proper check for number of channels
- Silenced warning when version is lower that 1.4.0.
- Removed parentheses.
- Also correct stroke opacity.
- Added missing cd.
5.85.0
Support binary content in QR codes
Constrain rendering by the minimum size, not the preferred size
5.87.0
Select the most efficient QR encoding mode rather than always using 8bit
5.88.0
Decrease the preferred size for PDF417 barcodes
Add PDF417 barcode support
5.91.0
Prison supports Windows
5.92.0
Fix include dir for .pri file
Normalise where headers are installed with the rest of KF
5.82.0
Support building with OpenEXR 3
xcf: fix new[]/delete mismatch, as detected by ASAN
ani: convert +1 to -1 so we don't do a potential integer overflow
5.83.0
avif: Adjust for libavif breaking change
Enable HEIC plugin to save all ICC profiles
Color profile loading/saving fixes
xcf: Make sure offsets are not negative
xcf: Fix Stack-buffer-overflow WRITE on broken files
5.84.0
avif: Disable all strict decoder checks
5.85.0
exr: Repair compability with openexr2
exr: Override the actual function signature
5.86.0
SGIImage::writeImage: Properly fail if the image is too big
exr: Port to std::log/pow
PCXHandler::write: Properly fail if the image is too big
5.87.0
avif: performance and quality improvements
5.89.0
avif: limit scope of variables
Add JXL to the list of supported formats
Add plugin for JPEG XL (JXL)
5.91.0
Check executables exist in PATH before passing them to QProcess
5.92.0
jxl: encoding improvements
avif: adjust dimension and memory limits
5.93.0
Fix XCF parasites metadata in QImage and support to ICC profile
avif: encoder speed 7->6
avif: fix jumpToImage
avif: warn about non-recommended libavif configuration
--------------------------------------------------------------------
5.81.0
Revert "avoid race condition on loading the plugin"
Revert "add private header to avoid extern in .cpp file"
Don't register our engine per default
More robust handling of missing global KDE themes
Ensure qrc + QDir::searchPaths work for icons
More robust and complete setup of the scaled test environment
Produce output with the request devicePixelRatio
Properly render non-square icons
Remove the assumption that SVG icons are squares in icon loading
Retain non-square icon sizes in KIconEngine::actualSize()
Revert icon size behavior changes
Align handling of non-square icons with how Qt behaves
5.82.0
Use deprecation macros for KIconLoader::alphaBlending()
Use new version-controlled enumerator deprecation warning macro
Deprecate KIconLoader::Panel in KF6
5.85.0
Introduce KIconLoader::hasCustomPalette
[KIconDialog] Revamp UI
5.86.0
Add support for static builds
5.88.0
Add QIcon::fallbackThemeName() as fallback
Fix @since marker
Include a test for properly testing icon recoloring
Also highlight charged text colors
Use KIconColors to re-color icons
Make icon colouring a per-icon property rather than a system
Create a d-pointer for KIconEngine
[KIconDialog] Also apply edge padding vertically
Ensure we retrieve our dependencies on Android
5.89.0
IconLoader: prefer icons from current theme before falling back to other themes
[KIconDialog] Add Ctrl+F shortcut for focussing search line
[KIconButton] Pre-select current icon when opening dialog
[KIconDialog] Add API for pre-selecting an icon
5.90.0
KIconColors: add Complement and Contrast
KIconColors: add .ColorScheme-ActiveText
5.91.0
Check executables exist in PATH before passing them to QProcess
Don't create a new KColorScheme for each KIconColors
5.92.0
Fix pixelated icons in item views
[KIconEngine] Create high-dpi pixmap in paint
Read the reference icon already scaled
5.81.0
Added branches with leaves to Kmymoney icon
Add a few symlinks for "configure" and "help-donate"
Add KMyMoney Pie-Chart Icon
Link svn-* icons to new vcs-* icons
Add vcs-* icons for Kate
Make lock icon filled status consistent
Remove 22 brightness icons in 16 size folder
Fix location of brightness icons
Add high-brightness and low-brightness icons
5.82.0
New Sidebar Show/Hide Icons
Revert "Added branches with leaves to Kmymoney icon"
Add financial-budget icon
Don't attempt to validate icons when cross-compiling
5.83.0
Added new KMyMoney icon again with some extra tweaks
Add Goodvibes icon
Add an icon for skanpage
Tweaked the Rust mimetypes to better match the official branding
Made links relative
Updated icons and added symlinks
Separated icons to -left and -right
5.84.0
Icons for stickers
Add network icons
Add Icons for advanced trimming tools in kdenlive
Add Qt Resource mime icon
5.85.0
React to Telegram's new ID and show the Breeze icon
also add zoom-fit-page symlink for 32px
align look of 22 px zoom-fit-{width,height} icons with others
add zoom-fit-page symlink for 22px
Symlink draw-cuboid to shape-cuboid
Add temperature icons
5.86.0
Add language-chooser symlinks for Maliit keyboard
Add keyboard icons for maliit Breeze theme
Add symlinks using reverse domain name for Haguichi app and status icons
Add new bookmark-new and bookmark-edit icons
Re-organize bookmark icon symlinks
kdenlive icons: Simplify xml and try to fix breeze-dark
Use a rotating gear for the process-working animation
Remove itinerary icons
Add Xfce compatibility symlinks
5.87.0
Fix KTimeTracker icon sizes
Tweaks to AnyDesk icons
Add 22px variants of the preferences icons
Add AnyDesk icons
Add more Godot MIME icons
Add symlink for skanlite's new icon name
Add process-working-symbolic, overhaul 22px animation
5.88.0
Use reference to a QString to avoid copying, fixing a warning
Add RTL logout icons
Missing color scheme usage at some icons
Fix the dark install directory for installing colored icons
Install colored icons sizes into breeze-dark them as well
Make some of the 22 px places icons actually be 22 again
Add Kongress icon fix grid alignment
Fix color of 16px im-user-offline icon
Optimize places 16 and 22px icons
BreezeIcon additional app icons most are for math apps
BreezeIcons add task-process icons for kalendar app task view
Add Joplin icon
Add syncthing icon
Move all of /preferences to icons, remove it from icons_dark
Fix scalable test to check breeze for breeze-dark
Make breeze-dark inherit from breeze
5.89.0
Install dark icons via execute_process to use copy command
Link application-menu -> open-menu-symbolic
Add icon for Virtual Box disk images
fix keyboard-caps-locked icon use now correct color
Add RTL half rating star
Add preferences-git and preferences-document icons for kate
Fix view-history icons
Use application-certificate icons for Kleopatra's certificate groups
Add "Invalid = -1" element to the KIconLoaderDummy::Context enum
Dolphin preferences dialog use colorfull icons only
Okular sidebar use now colorful icons
5.90.0
Support old cmake
Add places-book, -library, -comic icons
Include "*@*" in the icon_files list for installation
Make FM and system settings icons color-aware
Improve installation of light fallback icons
5.91.0
start-here-kde: Make icon adaptable to dark themes
Fix icon colors to be consistent across all sizes
Check executables exist in PATH before passing them to QProcess
Declare namespace for kongress icon
Fix naming of brightness icons
5.92.0
Add app icon for TeXstudio
5.93.0
Add some more symlinks for zoom icons
Add input-tvremote
5.83.0
high def new version printer
more versions of the printer icon size 16x16
more size versions of preferences-kde-connect
5.84.0
Ethernet port icon
2 more "new" system settings icons
thunderbolt preferences icon
search icon updated
more improvements to last day icon
more size versions of new screen
more work on sytemsetings icons
improved consistency and contrast
5.85.0
new color version for notification icon
improved icons from yesterday+ missing resolutions
preferences-desktop-notification-bell icon
kdf icon
5.86.0
Import icons from KAlarm
5.91.0
Check executables exist in PATH before passing them to QProcess
Main changes:
-New wallpapers are added and all wallpapers are put inside a single directory.
-A new theme is added (Valendas).
-Palettes that match some LXQt themes are added. They can be applied in LXQt
Appearance Configuration → Widget Style → Qt Palette.
-Several fixes are made in all themes.
-Menu arrows are added for RTL layouts.
Main changes:
-Used an SVG icon instead of the blurry PNG icon.
-Fixed several problems in calling external editors or default app.
-Added metadata file.
Main changes:
-Restore maximized state (if any) on un-fullscreening.
-Fixed capturing of an area of a screen that isn't positioned at the top left.
-Removed the desktop file for taking screenshots (the screenshot functionality
is kept, but LXQt's screenshot utility is Screengrab).
- Updated to Rust 2021
- Updated dependencies (structopt to 0.3.26, image to 0.24.0)
- Print output file size in terminal output
- Added ability to save defaults that will apply automatically were not
overridden
define LICENSE
Version 9e 16-Jan-2022
- Include alternate user interface files for cjpeg/djpeg.
- jcparam.c: change default chrominance DC quantization factor
for lossless support. Note: Requires rebuild of test images.
- rdgif.c, cderror.h: add sanity check for GIF image dimensions.
- Thank to Casper Sun for cjpeg potential vulnerability report.
CHANGES BETWEEN 2.11.1 and 2.12.0
I. IMPORTANT CHANGES
- FreeType now handles OT-SVG fonts, to be controlled with
`FT_CONFIG_OPTION_SVG` configuration macro. By default, it can
only load the 'SVG ' table of an OpenType font. However, by using
the `svg-hooks` property of the new 'ot-svg' module it is possible
to register an external SVG rendering engine. The FreeType demo
programs have been set up to use 'librsvg' as the rendering
library.
This work was Moazin Khatti's GSoC 2019 project.
II. MISCELLANEOUS
- The handling of fonts with an 'sbix' table has been improved.
- Corrected bitmap offsets.
- A new tag `FT_PARAM_TAG_IGNORE_SBIX` for `FT_Open_Face` makes
FreeType ignore an 'sbix' table in a font, allowing applications
to access the font's outline glyphs.
- `FT_FACE_FLAG_SBIX` and `FT_FACE_FLAG_SBIX_OVERLAY` together
with their corresponding preprocessor macros `FT_HAS_SBIX` and
`FT_HAS_SBIX_OVERLAY` enable applications to treat 'sbix' tables
as described in the OpenType specification.
- The internal 'zlib' code has been updated to be in sync with the
current 'zlib' version (1.2.11).
- The previously internal load flag `FT_LOAD_SBITS_ONLY` is now
public.
- Some minor improvements of the building systems, in particular
handling of the 'zlib' library (internal vs. external).
- Support for non-desktop Universal Windows Platform.
- Various other minor bug and documentation fixes.
- The `ftdump` demo program shows more information for Type1 fonts
if option `-n` is given.
- `ftgrid` can now display embedded bitmap strikes.
## Version 3.1.5 (April 11, 2022)
Patch release that address various bug/build/doc issues:
* Add backwards-compatibilty flags to the core library to match
original behavior of the the c++ library. Fixes reading of certain
files by the new core.
* Fix build failures on MSVC14 and MSVC 2022
* Fix build failure on latest 64-bit Ubuntu
* Documentation refers to primary branch as "main"
* Update the CI workflow matrix to VFX-CY2022
* Update auto-fetch Imath version to v3.1.5
Changes since 1.5.8
Allow libopengl.so to be used when GLX_LIB is missing [#257, John Bates]
Changes since 1.5.7
Revert changes from PR #238 / #229
Fixes regressions: #240, #252, #253
Changes since Epoxy 1.5.6
Remove type redefinition [#249]
Changes since 1.5.5
Fix issue with loading OpenGL/GLX/EGL libraries [#238, Yaroslav Isakov]
Expose dependency variables in pkg-config file [#231, Xavier Claessens]
Support Win64 pointer-sized types [#246]
Close output objects when generating files [#242, Aleksandr]
Changes since 1.5.4
Remove Python 2 support [#213]
Remove Autotools support [#212]
Use EGL_NO_X11 to disable X11 headers [#216]
Use call convention for mock function [crziter, #220]
Return correct version of GLSL on GLES2 [Eric Anholt, #223]
Rely on Meson's darwin_versions option [#225]
libansilove 1.3.0 (2022-04-14)
- Properly handle 512 characters XBin fonts
- Add a link to the Gentoo package in the README
- Also build and install libansilove as a static library
- List projects using libansilove in the README
4.05b
Correction of an option (tkzDrawY).
Removing axesmin.tex Move from \newif\iftkz at integer to base.sty
4.00b
Now the tkz-euclide package is independent from tkz-base, so some macros have
been transferred from one to the other. tkz-base is still mostly useful to work
together with tkz-fct. The name of the documentation is now tkz-base.pdf
New symbols: \Heart, \dHeart and \Maskey
New commands to define your own tikzsymbol:
- \tikzsymbolsdefinesymbol for symbol definition.
- \tikzsymbolsprovideandusesavebox to store and reuse symbols.
- plus a few other public functions.
No changes to the main pictex.tex macro file (still Version 1.1 9/21/87)
but the LaTeX interface in prepictex.tex and postpictex.tex is updated to
work alongside the extended picture environment in recent LaTex releases.
Neo (or New or Not) Simple (or Small or Suckless) X Image Viewer.
nsxiv is a fork of now unmaintained sxiv with the purpose of being a drop-in
replacement of sxiv, maintaining it and adding simple, sensible features.
nsxiv is free software licensed under GPLv2 and aims to be easy to modify
and customize.
3.12 2021-12-29
- added code for guessing box coordinates for pspicture
- added optional arguments showframe and calcframe
3.10a
- fix introduced bug in pstricks.pro
3.10
- move dot macros into a separate file pstricks-dots.tex
- use the internal Type1 version of PSTricksDotFont for latex
and the OpenType version for lualatex
- fix for rotation with \rput
- fix for \uput and lualatex
3.08
- moved the color stuff into a separate file pstricks-colors
- added macros to get the color values without the color model name
This new version of "fiziko" MetaPost package mostly contains various fixes
and cleanup in code and documentation. The most notable new feature is
"stippling" shader for most shapes, which can be used to depict rough surfaces.
### Added
- Option `overlay page number options`
- `\igrGetPageSize`
- `\igrPageWidth`
- `\igrPageHeight`
- `\igrSetPageSize`
- `\igrGetLastPage`
- `\igrLastPage`
- Adding/Guessing file name extensions
- Option `extensions`
- Option `extensions add`
- Option `extensions from graphics`
- Option `ignore on not found with extensions`
- Option `ignore on not found with extensions*`
- Option `no existence check`
### Changed
- Changelog moved from CHANGES to CHANGES.md and adapted to
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- From now on version numbers adhere to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html)
- Readme moved from README to README.md and adapted to
- Documentation code revised
- Internal package creation process modernized (invisible to the user)
- Adaption of paper size made compatible with lualatex
- Implementation of `\incgraph` and `\incmultigraph` changed (to LaTeX3)
### Fixed
- Documentation typos corrected
- `\incgraph` ignored option settings for not existing files.
A nasty bug fix and some hack to avoid that some global Ti*k*Z option
spill into the shapes.
- Fix bug with legacy transmission lines in `overlay`s
- Robustify some shapes: do not let arrows option pass
to the inner drawing
- Add warning about global draw options in the manual
- Fixes in the documentation: hyperlink the index again,
cite new recovery point, remove some legacy construct
- Added 1.4.6 rollback point
1.21.0 - 2022-03-07
-------------------
* Require Python 3.7+ :pr:`250`
* Require meson 0.53+
* Using `setup.py` directly to build/install pycairo is deprecated.
Use meson instead.
* `setup.py` now requires setuptools. Previously it was optional.
* The complete API reference is now included in the typing stubs, so it can be consumed/shown by IDEs. :pr:`236` :pr:`252`
export libjxl version #
set pixel format in image out block
coders: sync JXL output
Changed the format of MAGICK_GIT_REVISION and use this in -version.
Restore dds:compression=dxt5 behavior
Coders: proper check for out of bounds per https://bugs.chromium.org/…
Coders: eliminate compiler warnings
fix issue: outside the range of representable values of type 'unsigne…
Coders: PS and EPS %%BoundingBox not being parsed #4961
Coders: support 10-bit AVIF per #4932
Fix setting the pixel intensity method with SetImageProperty (#4969)
MagickCore: cosmetic
MagickCore: support getentropy()
build: release
getentropy() requires sys/random.h include
pending release
During the build gimp wants to convert svg files to png.
This reproducibly segfaults it's tooling if fontconfig cannot find any
fonts, which happens if bulk building with modular X.org.
==============
Version 2.52.8
==============
Just a bug fix:
- #721 - Catch circular references when rendering patterns.
==============
Version 2.52.7
==============
Backport a fix for the regression that was introduced in the last
release:
- #851 - Output filled text as text for PDF; fixes regression due to
outputting all text as paths.
Of particular note is this change in Mesa 21.2:
"32-bit x86 builds now default disable x87 math and use sse2."
This might need to be revisited in pkgsrc.
Bugfixes omitted from ChangeLog.
New features in Mesa 21.3:
VK_EXT_color_write_enable on lavapipe
GL_ARB_texture_filter_anisotropic in llvmpipe
Anisotropic texture filtering in lavapipe
VK_EXT_shader_atomic_float2 on Intel and RADV.
VK_EXT_vertex_input_dynamic_state on RADV.
VK_KHR_timeline_semaphore on lavapipe
VK_EXT_external_memory_host on lavapipe
GL_AMD_pinned_memory on llvmpipe
GL 4.5 compatibility on llvmpipe
VK_EXT_primitive_topology_list_restart on RADV and lavapipe.
ES 3.2 on zink
VK_KHR_depth_stencil_resolve on lavapipe
VK_KHR_shader_integer_dot_product on RADV.
OpenGL FP16 support on llvmpipe
VK_KHR_shader_float16_int8 on lavapipe
VK_KHR_shader_subgroup_extended_types on lavapipe
VK_KHR_spirv_1_4 on lavapipe
Experimental raytracing support on RADV
VK_KHR_synchronization2 on Intel
NGG shader based culling is now enabled by default on GFX10.3 on RADV.
VK_KHR_maintenance4 on RADV
VK_KHR_format_feature_flags2 on RADV.
EGL_EXT_present_opaque on wayland
New features in Mesa 21.2:
zink supports GL_ARB_texture_filter_minmax, GL_ARB_shader_clock
VK_EXT_provoking_vertex on RADV.
VK_EXT_extended_dynamic_state2 on RADV.
VK_EXT_global_priority_query on RADV.
VK_EXT_physical_device_drm on RADV.
VK_KHR_shader_subgroup_uniform_control_flow on Intel and RADV.
VK_EXT_color_write_enable on RADV.
32-bit x86 builds now default disable x87 math and use sse2.
GL ES 3.1 on GT21x hardware.
VK_EXT_acquire_drm_display on RADV and ANV.
VK_EXT_vertex_input_dynamic_state on lavapipe
wideLines on lavapipe
VK_EXT_line_rasterization on lavapipe
VK_EXT_multi_draw on ANV, lavapipe, and RADV
VK_KHR_separate_depth_stencil_layouts on lavapipe
VK_EXT_separate_stencil_usage on lavapipe
VK_EXT_extended_dynamic_state2 on lavapipe
NGG shader based primitive culling is now supported by RADV.
Panfrost supports OpenGL ES 3.1
New Asahi driver for the Apple M1
GL_ARB_sample_locations on zink
GL_ARB_sparse_buffer on zink
GL_ARB_shader_group_vote on zink
DRM format modifiers on zink
freedreno+turnip: Initial support for a6xx gen4 (a660, a635)
New features in Mesa 21.1:
VK_KHR_workgroup_memory_explicit_layout on Intel, RADV
DRM format modifiers for AMD.
VK_KHR_zero_initialize_workgroup_memory on Intel, RADV
Zink exposes GL 4.6 and ES 3.1
GL_EXT_depth_bounds_test on softpipe, zink
GL_EXT_texture_filter_minmax on nvc0 (gm200+)
GL_ARB_texture_filter_minmax on nvc0 (gm200+)
GL_ARB_post_depth_coverage on zink
VK_KHR_copy_commands2 on lavapipe
lavapipe exposes Vulkan 1.1
VRS attachment on RADV
New features in Mesa 21.0:
GL_EXT_demote_to_helper_invocation on radeonsi
GL_NV_compute_shader_derivatives on radeonsi
EGL_MESA_platform_xcb
Removed GL_NV_point_sprite for classic swrast.
driconf: remove glx_disable_oml_sync_control, glx_disable_sgi_video_sync, and glx_disable_ext_buffer_age
Removed support for loading DRI drivers older than Mesa 8.0, including all DRI1 support
Add support for VK_VALVE_mutable_descriptor_type on RADV
Removed classic OSMesa in favor of the newly improved gallium OSMesa
VK_KHR_fragment_shading_rate on RADV (RDNA2 only)
Freedreno a6xx exposes GL 3.3
Classic swrast dri driver removed in favor of gallium swrast (llvmpipe or softpipe)
Panfrost g31/g52/g72 exposes ES 3.0
Panfrost t760+ exposes GL 3.1 (including on Bifrost)
Sparse memory support on RADV
Rapid packed math (16bit-vectorization) on RADV
New features in Mesa 20.3:
GL 4.5 on llvmpipe
GL_INTEL_blackhole_render on radeonsi
GL_NV_copy_depth_to_color for NIR
GL_NV_half_float
GL_NV_shader_atomic_int64 on radeonsi
EGL_KHR_swap_buffers_with_damage on X11 (DRI3)
VK_PRESENT_MODE_FIFO_RELAXED on X11
GLX_EXT_swap_control for DRI2 and DRI3
GLX_EXT_swap_control_tear for DRI3
VK_KHR_copy_commands2 on RADV
VK_KHR_shader_terminate_invocation on RADV
NGG GS support in ACO
VK_KHR_shader_terminate_invocation on ANV
driconf: add glx_extension_override
driconf: add indirect_gl_extension_override
VK_AMD_mixed_attachment_samples on RADV (GFX6-GFX7).
GL_MESA_pack_invert on r100 and vieux
GL_ANGLE_pack_reverse_row_order
VK_EXT_shader_image_atomic_int64 on RADV
New features in mesa 20.2:
GL_ARB_compute_variable_group_size on Iris.
GL_ARB_gpu_shader5 on llvmpipe
GL_ARB_post_depth_coverage on llvmpipe
GLES 3.2 on llvmpipe
GL_EXT_shader_group_vote on GLES3.
GL_EXT_texture_shadow_lod on llvmpipe
VK_AMD_texture_gather_bias_lod on RADV.
VK_AMD_gpu_shader_half_float on RADV/ACO.
VK_AMD_gpu_shader_int16 on RADV/ACO.
VK_EXT_extended_dynamic_state on ANV and RADV.
VK_EXT_image_robustness on RADV.
VK_EXT_private_data on ANV and RADV.
VK_EXT_custom_border_color on ANV and RADV.
VK_EXT_pipeline_creation_cache_control on ANV and RADV.
VK_EXT_shader_demote_to_helper_invocation on RADV/LLVM.
VK_EXT_subgroup_size_control on RADV/ACO.
VK_GOOGLE_user_type on ANV and RADV.
VK_KHR_shader_subgroup_extended_types on RADV/ACO.
GL_ARB_gl_spirv on nvc0/nir.
GL_ARB_spirv_extensions on nvc0/nir.
RADV now uses ACO per default as backend
RADV_DEBUG=llvm option to enable LLVM backend for RADV
VK_EXT_image_robustness for ANV
VK_EXT_shader_atomic_float on ANV
VK_EXT_4444_formats on ANV and RADV.
VK_KHR_memory_model on RADV.
GL 4.5 on llvmpipe
EGL_KHR_swap_buffers_with_damage on X11 (DRI3)
New features in mesa 20.1:
GL_ARB_compute_variable_group_size on i965.
GL_EXT_depth_bounds_test on Iris.
GL_EXT_texture_shadow_lod on radeonsi, nvc0.
GL_NV_alpha_to_coverage_dither_control on radeonsi
GL_NV_copy_image on all gallium drivers.
GL_NV_pixel_buffer_object on all gallium drivers, i915, i965, swrast.
GL_NV_viewport_array2 on nvc0 (GM200+).
GL_NV_viewport_swizzle on nvc0 (GM200+).
VK_AMD_memory_overallocation_behavior on RADV.
VK_KHR_shader_non_semantic_info on Intel, RADV.
GL_EXT_draw_instanced on gles2
VK_KHR_8bit_storage for ACO on GFX8+
VK_KHR_16bit_storage for ACO on GFX8+ (storageInputOutput16 is still unsupported)
shaderInt16 for ACO on GFX9+
VK_KHR_shader_float16_int8 for ACO on GFX8+ (shaderFloat16 is still unsupported)
VK_EXT_robustness2 on Intel, RADV.
Add Rocket Lake (RKL) support on anvil and iris.
By default, Coin is installed on Darwin as a framework, which is a completely
different file layout incompatible with pkgsrc. Add a configure argument to
prevent this and select a standard layout compatible with pkgsrc.
Update eog to 40.3
Highlights:
- !106, EogImage: Do not crash if content type or filesize cannot be
detected (Felix Riemann)
- #195, Critical warning after closing EOG (invalid unclassed pointer;
assertion 'EOG_IS_IMAGE (img)' failed) (Felix Riemann)
- !100, Remove directories when unmount external drive (Krifa75)
- #189, Crash Report: eog_thumb_view_clear_range: assertion failed:
(start_thumb <= end_thumb) (Andrew Consroe)
- #146, Part of a large image (exceeding certain dimensions)
does not display (Felix Riemann)
- #181, docs: Remove PicasaWeb support (Andre Klapper)
- !83, Re-detect mimetype from data if loading fails the first time (Krifa75)
- !89, Update EogWindow and EogListStore when deleting
a monitored directory (Krifa75)
- !85, Fix several image reference counting issues (Felix Riemann)
- many new and updated translations
version 1.2.2
This is a binary compatible release.
* webpmux: add "-set bgcolor A,R,G,B"
* add ARM64 NEON support for MSVC builds
* fix duplicate include error in Xcode when using multiple XCFrameworks in a
project
* doc updates and bug fixes
Changelog:
Inkscape 1.1.2
--------------
Released on **2022-02-05**
Release highlights
------------------
This is a bugfix release:
- Dependencies updated, fixing bitmap exports
- Graphic tablet pens erasors switch to the correct tool
- Fix lost styling of text converted to path
- Fix relative position of clones pasted to a new document
- Fix various crashes
Full release notes on https://wiki.inkscape.org/wiki/index.php/Release_notes/1.1.2
Changes to the previous version are relatively small (though we do need
this version to compile with the upcoming ocaml 4.14).
I've also added options to not compile the gtk and pango packages, which
means the package can be used on headless setups.
Significant changes relative to 2.1.2
Fixed a regression introduced by 2.0 beta1[7] whereby cjpeg compressed PGM input files into full-color JPEG images unless the -grayscale option was used.
cjpeg now automatically compresses GIF and 8-bit BMP input files into grayscale JPEG images if the input files contain only shades of gray.
The build system now enables the intrinsics implementation of the AArch64 (Arm 64-bit) Neon SIMD extensions by default when using GCC 12 or later.
Fixed a segfault that occurred while decompressing a 4:2:0 JPEG image using the merged (non-fancy) upsampling algorithms (that is, with cinfo.do_fancy_upsampling set to FALSE) along with jpeg_crop_scanline(). Specifically, the segfault occurred if the number of bytes remaining in the output buffer was less than the number of bytes required to represent one uncropped scanline of the output image. For that reason, the issue could only be reproduced using the libjpeg API, not using djpeg.
GEGL-0.4.36 2022-02-21
The primary addition in this release is SIMD dispatch, buffer access functions
get built for x86-64 v2 and v3 microarchitecture levels as well as ARM neon.
the same applies to core operations where we have .so bundles for the variants
as well as a generic build.
Operations:
The npd operation fixed with multiple threads.
Automatic LUT creation for conversions from <=24bpp of colorant componants,
SIMD builds for x86_64 micro-architecture levels and ARM neon, pre-defined
CIE Lab u8 and CIE Lab u16 formats. Fix bug of an unlocked non-locked mutex,
which started failing on some platforms.
9.0.1 (2022-02-03)
------------------
- In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010
- Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009
9.0.0 (2022-01-02)
------------------
- Restrict builtins for ImageMath.eval(). CVE-2022-22817 #5923
- Ensure JpegImagePlugin stops at the end of a truncated file #5921
- Fixed ImagePath.Path array handling. CVE-2022-22815, CVE-2022-22816 #5920
- Remove consecutive duplicate tiles that only differ by their offset #5919
- Improved I;16 operations on big endian #5901
- Limit quantized palette to number of colors #5879
- Fixed palette index for zeroed color in FASTOCTREE quantize #5869
- When saving RGBA to GIF, make use of first transparent palette entry #5859
- Pass SAMPLEFORMAT to libtiff #5848
- Added rounding when converting P and PA #5824
- Improved putdata() documentation and data handling #5910
- Exclude carriage return in PDF regex to help prevent ReDoS #5912
- Fixed freeing pointer in ImageDraw.Outline.transform #5909
- Added ImageShow support for xdg-open #5897
- Support 16-bit grayscale ImageQt conversion #5856
- Convert subsequent GIF frames to RGB or RGBA #5857
- Do not prematurely return in ImageFile when saving to stdout #5665
- Added support for top right and bottom right TGA orientations #5829
- Corrected ICNS file length in header #5845
- Block tile TIFF tags when saving #5839
- Added line width argument to polygon #5694
- Do not redeclare class each time when converting to NumPy #5844
- Only prevent repeated polygon pixels when drawing with transparency #5835
- Add support for pickling TrueType fonts #5826
- Only prefer command line tools SDK on macOS over default MacOSX SDK #5828
- Drop support for soon-EOL Python 3.6 #5768
- Fix compilation on 64-bit Termux #5793
- Use title for display in ImageShow #5788
- Remove support for FreeType 2.7 and older #5777
- Fix for PyQt6 #5775
- Removed deprecated PILLOW_VERSION, Image.show command parameter, Image._showxv and ImageFile.raise_ioerror #5776
With a little bit of help of pin.
==============
Version 2.52.6
==============
Backport a fix from the main branch:
- #599 - Fix incorrect text rendering when text has different scales
in the X/Y axes. This regressed after librsvg 2.52.5, when Pango
had to revert its fix for the same bug. Now librsvg renders all
text as paths, and does the scaling itself. Please file a bug if
you have evidence that this presents a performance problem for you.
==============
Version 2.52.5
==============
Just bugfixes this time:
- #812 - Fix mangled output in rsvg-convert when redirecting output to
a pipe on Windows (Michael Howell).
- #766 - When outputting to SVG, rsvg-convert now uses the
width/height units specified in the command line; it always used
pixels before (Daniel Petri Rocha).
- #814 - Fix incorrect top/left margins for SVG/PS/EPS/PDF output
(Daniel Petri Rocha).
- #599 - Fix incorrect placement of glyphs when text has non-uniform
scaling in the X/Y axes. This is not a librsvg bug, but is fixed by
Pango 1.49.3 and later. Hopefully Pango 1.48.11 will be released
soon with this fix as well. Note that this release of librsvg
cannot increase the minimum Pango version to 1.48.11 because it is
not released yet.
Miscellaneous:
- Updated crate dependencies: assert_cmd, cast, clap cssparser,
float-cmp, itertools, nalgebra, png, proptest, rctree, selectors,
system-deps.
==============
Version 2.52.4
==============
New features:
- #816 - Support the isolation property from the Compositing and
Blending Level 1 specification.
- Support Visual Studio 2022 (Chun-wei Fan).
Fixes:
- #818 - The opacity and mix-blend-mode properties were not being
applied when an element has a mask.
- Fix panic when an empty group has a pattern fill and filters.
- Fix the tests on Windows; the still only work when Fontconfig is
present (Chun-wei Fan).
- Work around a bug in the cairo-rs bindings in the test suite, that
only manifests itself in s/390x due to its calling convention. See
https://github.com/gtk-rs/gtk-rs-core/issues/335
==============
Version 2.52.3
==============
Bugfixes, mostly for text layout. Also, text links in PDF!
- #17 - Support text-decoration=overline.
- #249 - Basic support for the unicode-bidi property. Librsvg still
considers each tspan independently of others, which is incorrect, but
at least bidi-override works now for a single embedding level.
- #804 - Fix placement of tspan that changes the text direction.
- #805 - :lang() selector should now match lang attribute from an
element's parent. (Michael Howell)
- #806 - Fix the text-anchor property for right-to-left text.
- #807 - PDF now includes links inside text elements. (Michael Howell)
==============
Version 2.52.2
==============
Bugfixes and new features!
## New features
Thanks to Michael Howell, rsvg-convert now supports generating
multi-page PDFs in a sensible way.
With one SVG document per page, each page with the
SVG's natural size:
rsvg-convert --format=pdf -o out.pdf a.svg b.svg c.svg
With all pages sized as portrait US Letter, and each SVG scaled to fit
so that there is a 1in margin around each page:
rsvg-convert --format=pdf -o out.pdf \
--page-width=8.5in --page-height=11in \
--width=6.5in --height=8.5in --keep-aspect-ratio \
--top=1in --left=1in \
a.svg b.svg c.svg
Please see the man page for details.
- #738 - Support <a> elements inside <text>. Also, support the CSS :link
pseudo-class for matching against links. (Michael Howell)
- #649 - Support the CSS :lang() pseudo-class for matching against an
element's xml:lang attribute. (Michael Howell)
- #790 - Support the mask-type property from SVG2.
## Fixes
- #800 - Don't panic when a shorthand property is set to
inherit. (Michael Howell)
- #788 - Fix regression with the viewport size of interior <svg>
elements. (Michael Howell)
- #731 - Allow length units to be case-insensitive, per SVG2. (Kolja Lampe)
## Documentation
- There is now a FEATURES.md in the repository, where you can see all
the elements, attributes, and properties that librsvg supports. We
will be adding detail to this gradually.
- For developers, there is now devel-docs/adding-a-property.md with a
tutorial on how to add support for new CSS properties.
==============
Version 2.52.1
==============
This is a bugfix release; there are no new features this time.
## Changes:
- #791 - Fix ordering of tspan inside text elements for right-to-left
languages.
- #789 - Fix text-anchor positioning for right-to-left languages.
- #797 - Fix regression in computing sizes when an SVG has only one of
width/height and a viewBox. Thanks to Joshua Fogg for compiling a
list of test cases for this.
- #565 - Spec compliance - the writing-mode property applies only to
text elements, no to individual tspan elements.
- #794 - Fix build on big-endian platforms.
- Clarify documentation for the rsvg_handle_write() /
rsvg_handle_close() deprecated APIs.
==============
Version 2.52.0
==============
This is a big release! What follows is a summary from the 2.51.x
release notes; you can also read them for more detail.
The biggest user-visible change is that rsvg-convert has been ported
to Rust (Sven Neumann, Paolo Borelli), and it has new features!
## New features in rsvg-convert
### Support for physical units
rsvg-convert is now aware of physical units, and
fixes a bug where PDFs were created at the wrong size. Do you need to
render an SVG in a PDF file, scaled to 10x10 cm, placed at a certain
position of a landscape A4 page?
rsvg-convert --format=pdf \
--page-width=297mm --page-height=210mm \
--width=10cm --height=10cm --keep-aspect-ratio \
--top=5cm --left=8cm \
foo.svg > foo.pdf
Please see the rsvg-convert(1) man page for more details and plenty of
examples.
### Support for Accept-Language
Previously, librsvg picked up the user's language preferences through
environment variables like LANG and LC_MESSAGES. This is inconvenient
for applications that call rsvg-convert but don't want to synthesize a
LANG variable.
There is a new option in rsvg-convert so you can pass
--accept-language=<languages> formatted as an HTTP Accept-Language
header. This is used to specify which languages will be chosen from
elements with the "systemLanguage" attribute:
rsvg-convert --accept-language=es-MX,en foo.svg
That command will select Mexican Spanish and English from suitable SVG
elements. Please see the man page for details.
### Miscellaneous
rsvg-convert's default DPI is now 96, to better match W3C
standards. It was 90 before for historical reasons. We can change
this back to 90 if it breaks too many scripts. You can use the
options "--dpi-x=90 --dpi-y=90" to restore the old behavior.
rsvg-convert no longer supports the "xml" or "recording" output
formats. These are useful only for debugging Cairo, not for general
usage.
## SVG2/CSS3 features
The following features are supported now. Madds H, John Ledbetter,
worked on these features.
- transform property from SVG2; previously librsvg only supported the
transform attribute from SVG1.1, which has different syntax.
- context-fill and context-stroke for <marker> and <use> elements.
- markers now support orient="auto-start-reverse".
- paint-order for text elements.
- "auto" values for the width and height attributes of the <image>,
<rect>, and <svg> elements.
- All the <filter-function> types from the Filter Effects Module Level
1 specification: blur(), brightness(), contrast(), drop-shadow(),
grayscale(), hue-rotate(), invert(), opacity(), sepia(), saturate().
- The filter property now supports chains of uri() filters or
<filter-function> shortcuts.
- Support CSS selectors for attribute matching, like rect[attr^="prefix"]
## New APIs
See the HTML documentation for details:
- rsvg_handle_get_intrinsic_size_in_pixels()
- rsvg_major_version / rsvg_minor_version / rsvg_micro_version
variables - used to obtain the librsvg version from languages other
than C, since they do not have access to the C macros like
LIBRSVG_MAJOR_VERSION.
## Deprecations
The following APIs are deprecated but still available:
- rsvg_handle_render_cairo() - use rsvg_handle_render_document() instead.
- rsvg_handle_render_cairo_sub() - use rsvg_handle_render_layer() or
rsvg_handle_render_element() depending on what you want to do.
Please see the "Migrating from old APIs" chapter in the HTML
documentation for details.
## News for developers
If you want to run the librsvg test suite easily, there are now Docker
scripts to do so. Please see the tools/docker/README.md file for
details. (Madds H)
There is no leftover C code in the library; all of the implementation
and the publically-visible symbols are defined in the Rust code. The
remaining .h files are all public and do not reflect any .c
code. (Sven Neumann)
The test suite is now ported to Rust. The only remaining tests in C
are for the C API itself (tests/api.c). With the test suite in
Rust, the tests are automatically run in parallel across CPU cores,
making test runs much faster. (Sven Neumann, Dunja Lalic)
"cargo build", "cargo test" now work without running autotools first,
so you can in general develop librsvg as a normal Rust project.
The HTML documentation has new chapters; you may find interesting
things there!
## News for distributors
There is a new list of librsvg releases with security fixes in
SECURITY.md. That file also contains security-related information
on librsvg's dependencies.
The Minimum Supported Rust Version (MSRV) is now Rust 1.52.
## Special thanks
Paolo Borelli and Sven Neumann did a lot of painstaking work to finish
porting the library and rsvg-convert to Rust.
Sven Neumann and Dunja Lalic ported the test suite to Rust, making it
much faster.
Dunja Lalic rewrote the Continuous Integration infrastructure, making
it MUCH faster.
Madds H did their Outreachy internship for librsvg and implemented a
bunch of useful SVG2/CSS3 features.
John Ledbetter methodically went through all the <filter-function>
shortcuts and implemented them for SVG2.
Ismael Luceno has been cleaning up our autotools scripts.
Andre Klapper has been wrangling numerous bug reports from Wikimedia
as usual.
Chun-wei Fan, Abraham Toriz, Christian Hergert, Ignacio Casal Quinteiro
have been keeping the Windows and MacOS builds working.
==============
Version 2.51.4
==============
- #618 - SVG2: Implement context-fill and context-stroke for markers
(Madds H).
- #727 - SVG2: Implement paint-order for text elements (Madds H).
- #747 - SVG2: Support width="auto" and height="auto" for the image element.
- Fix the Windows build (Chun-wei Fan).
- The tools/docker directory now has scripts that developers can use
to test librsvg on containers for various Linux distributions.
- Gtk-rs dependency is updated to 0.14.0 (Bilal Elmoussaoui, Chun-wei Fan).
- #758 - Panic when rendering with masks or opacity to a non-image surface.
- #757 - Fix 32-bit builds.
==============
Version 2.51.3
==============
The big news is that rsvg-convert is now aware of physical units, and
fixes a bug where PDFs were created at the wrong size. Do you need to
render an SVG in a PDF file, scaled to 10x10 cm, placed at a certain
position of a landscape A4 page?
rsvg-convert --format=pdf \
--page-width=297mm --page-height=210mm \
--width=10cm --height=10cm --keep-aspect-ratio \
--top=5cm --left=8cm \
foo.svg > foo.pdf
Please see the rsvg-convert(1) man page for more details and plenty of
examples.
SVG2 features:
Markers now implement orient="auto-start-reverse". The work on
markers is by Madds H., who is doing their Outreachy internship for
librsvg.
All the <filter-function> types in SVG2 are now supported, thanks to
John Ledbetter.
- The Minimum Supported Rust Version (MSRV) is now Rust 1.52. This
takes care of CVE-2021-28878 in the Rust standard library.
- #514 - rsvg-convert is now aware of physical units.
- #484 - Markers can now have orient="auto-start-reverse" per SVG2
(Madds H - Outreachy internship).
- #711 - Implement the drop-shadow() filter function (John Ledbetter).
- #713 - Implement the hue-rotate() filter function (John Ledbetter).
- #677 - rsvg-convert, do not clip the rightmost/bottomost pixels of
an image with partial pixel coverage.
- Partial fix for #668 - Render small caps for fonts that support the
"smcp" OpenType feature. Librsvg and Pango are not yet able to
synthesize small caps for fonts that do not support them, but for
those that do, they should work fine now.
- #566 - Restrict which elements can appear inside a clipPath, to be
spec compliant.
- #746 - Possible cairo_save() without cairo_restore() in render_layer().
- Various updates to the developer's documentation.
==============
Version 2.51.2
==============
This release fixes an important bug about text spacing. The bug fix
requires an update to at least Pango 1.44. Sorry for the increased
requirements!
Librsvg now supports most of the filter function shortcuts in SVG2;
see below.
Previously, librsvg picked up the user's language preferences through
environment variables like LANG and LC_MESSAGES. This is inconvenient
for applications that call rsvg-convert but don't want to synthesize a
LANG variable.
There is a new option in rsvg-convert so you can pass
--accept-language=<languages> formatted as an HTTP Accept-Language
header. This is used to specify which languages will be chosen from
elements with the "systemLanguage" attribute:
rsvg-convert --accept-language=es-MX,en foo.svg
That command will select Mexican Spanish and English from suitable SVG
elements. Please see the man page for details.
- The Minimum Supported Rust Version (MSRV) is now Rust 1.51.
- Librsvg now requires at least Pango 1.44.
- #730 - Incorrect text spacing when the transform is not 1:1. You
can see this when a small font-size is scaled up due to a
transform. It is less visible for a large font-size scaled down.
- #709#710#712 714 #715#716#717 - The "filter" attribute now
accepts lists of "<filter-function>" per SVG2. There is support for
blur(), contrast(), grayscale(), invert(), opacity(), saturate(),
sepia() (John Ledbetter).
- #356 - Add --accept-language option to rsvg-convert.
- #704 - Fix circle/ellipse in paths when they are made out of a
single Arc command.
- #691 - Don't allow number lists with unbounded lengths in
tableValues attributes, for feComponentTransfer and
feConvolveMatrix (Madds H).
- #718 - Negative rx/ry in rect element should be ignored.
- #687 - Reduce memory pressure when rendering text.
- Fix build on 32-bit ARM (Lovell Fuller).
- Update the Rust crate dependencies (Bastien Orivel).
- Refactoring parsers (Paolo Borelli).
- There is a new list of librsvg releases with security fixes in
SECURITY.md. That file also contains security-related information
on librsvg's dependencies.
Special thanks to John Ledbetter for carefully implementing each of
the new shortcuts for filter functions in SVG2.
==============
Version 2.51.1
==============
- The Minimum Supported Rust Version is now 1.48.
- rsvg-convert should fully work on Windows again (Abraham Toriz).
- rsvg-convert's SVG output format uses pixel units instead of points again.
- #699 - Images embedded as data: URLs didn't render if they had a
MIME type with a charset parameter.
- #698 - Add limit for too-large radiuses on the feMorphology filter (Madds H).
- #686 - Reduced stack usage (Sebastian Dröge).
- #261 - Parse the enable-background property.
- #703 - Properly ignore elements in an error state inside the "switch" element.
- #695 - Fix cascading mode for the "feImage" element.
- Fix cascading for the "filter" element and filter primitives in general.
- Remove constraints on the types of units used within the "filter"
element and filter primitives.
- Reduced memory consumption in general by about 300 bytes per SVG element.
- Update vulnerable crates:
smallvec to 1.6.1 (RUSTSEC-2021-0003)
generic-array to 0.13.3 (RUSTSEC-2020-0146)
- Lots of cleanups to the build (Sven Neumann).
- Update to gtk-rs 0.9 (Bilal Elmoussaoui).
- Updated ARCHITECTURE.md and documentation in general.
Special thanks to Dunja Lalic for adding the start of code coverage
analysis to the build.
==============
Version 2.51.0
==============
There are many changes in this development release! This experimental
release is meant for early testing, with the understanding that some
things may be broken, especially since we have large changes to the
way librsvg's artifacts are built.
The biggest user-visible change is that rsvg-convert has been ported
to Rust (Sven Neumann, Paolo Borelli).
Please file bugs at https://gitlab.gnome.org/GNOME/librsvg/-/issues/new
if these changes break your scripts; they are experimental for the
2.51.x development series:
- #646 - rsvg-convert's default DPI is now 96, to better match W3C
standards. It was 90 before for historical reasons. We can change
this back to 90 if it breaks too many scripts. You can use the
options "--dpi-x=90 --dpi-y=90" to restore the old behavior.
- rsvg-convert's --export-id (-i) option should now have more useful
behavior. This extracts a particular element from the SVG document
and renders it scaled to the size specified by the --width/--height
arguments, or to the pixel size of the element as if it had no
transformations applied.
- rsvg-convert no longer supports the "xml" or "recording" output
formats. These are useful only for debugging Cairo, not for general
usage.
Known missing features, which should be restored for the stable release:
- rsvg-convert does not allow stdin/stdout streams on Windows; this is
being tracked in issue #676.
The following are changes related to porting to Rust; they are not
necessarily user-visible, but important for developers of the library:
- There is no leftover C code in the library; all of the
implementation and the publically-visible symbols are defined in the
Rust code. The remaining .h files are all public and do not reflect
any .c code. (Sven Neumann)
- The test suite is now ported to Rust. The only remaining tests in C
are for the C API itself (tests/api.c). With the test suite in
Rust, the tests are automatically run in parallel across CPU cores,
making test runs much faster. (Sven Neumann, Dunja Lalic)
- "cargo build", "cargo test" should now work without running
autotools first.
- The C API is now implemented on top of the public Rust API, without
special hooks into the library's internals.
The following APIs are deprecated but still available:
- rsvg_handle_render_cairo() - use rsvg_handle_render_document() instead.
- rsvg_handle_render_cairo_sub() - use rsvg_handle_render_layer() or
rsvg_handle_render_element() depending on what you want to do.
- These deprecations are because the new APIs conform with the web
world's view of how SVGs should be positioned and scaled in
surrounding content. Whereas the old APIs were about rendering SVGs
to whatever current transformation matrix a Cairo context may
contain, the new APIs take a rectangular viewport and librsvg
automatically scales the SVG document to fit in it. The "natural
sizing" that was implicit in the deprecated APIs is now explicitly
documented, and available through the new API
rsvg_handle_get_intrinsic_size_in_pixels().
New APIs:
- rsvg_handle_get_intrinsic_size_in_pixels() converts an SVG
document's intrinsic dimensions to pixels, i.e. transforms the SVG
document's "width" and "height" attributes to CSS pixels.
New features and bug fixes:
- #615: SVG2: Support a chain of uri() filters in the "filter" property
(John Ledbetter, Sven Neumann).
- #483: Support CSS selectors for attribute matching, like rect[attr^="prefix"]
- #554: Fixed the geometry_for_layer() APIs to not ignore the passed viewport.
- Fixed CSS "import" so it allows only files from the same base directory
(Lars Schmertmann).
- #642 - Fix dx/dy offsets in nested <tspan> elements.
- #601 - Compute correct bounds for objects with stroke-width=0.
- Slight speed improvements in the RGBA premultiplication code (Sven Neumann).
- #623 - The pkg-config files (*.pc) do not define the 'svgz_supported' and
'css_supported' variables anymore. These variables were hardcoded
to 'true' and unchanged since 2011.
- #624 - The source repository no longer produces a librsvg-uninstalled.pc file.
- Fix the MacOS build (Christian Hergert, Ignacio Casal Quinteiro).
- Deal with missing pkg-config (Ismael Luceno).
- For cross-compilation, check for target-specific prefixed tools like
rustc/cargo (Heiko Becker).
Changes in the Rust API:
- #597 - The LoadingError and RenderingError enums have changed, and
are now marked #[non_exhaustive]. They will probably change again
to hide details of error variants before we make librsvg available
as a crate on crates.io.
Special thanks for this release:
- Dunja Lalic for revamping the CI infrastructure and making our CI
runs much, much faster - !398.
- Sven Neumann, Dunja Lalic for porting the test suite to Rust.
- Sven Neumann, Paolo Borelli for porting rsvg-convert to Rust and
unraveling all the little historical details that were embedded in
it.
- Paolo Borelli for constant refactoring.
This package provides a simple interface for building .dot graph files, for
input into the dot and graphviz tools. It includes a monadic interface for
building graphs.
picat - picture cat
Picat converts images to sixel graphics, and outputs them to stdout. The tool
achieves high quality output by making use of the
libimagequant, https://pngquant.org/lib/ library for converting RGBA images
to the sixel palette.
The release tarballs contain prebuilt files (specifically documentation).
If using the tagged snapshots, the documentation needs to be built which
requires tcl as a build tool. If built with option -tcl, the package fails
to build.
2022-02-12 7.1.0-24 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-24 GIT revision 19683:26523979f:20220212
2021-02-06 7.1.0-24 <quetzlzacatenango@image...>
* optimize reading of XPM properties.
* the GIF Netscape block must appear immediately after the global color table.
2022-02-05 7.1.0-23 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-23 GIT revision 19647:706986228:20220205
2021-02-02 7.1.0-23 <quetzlzacatenango@image...>
* limit recursion when reading the VID image format.
* improperly resizing memory due to errant check (reference
https://github.com/ImageMagick/ImageMagick/issues/4807).
4.2.4 (2021-12-27)
Improvements
* spec_helper: drop require_relative to lib directory (#1306)
* Fix build error with Ruby 3.1 on macOS (#1313)
Bug Fixes
* remove Mutex in trace_proc= (#1303)
* channel_mean_spec: fix floating point comparison (#1307)
* changed_predicate_spec: ensure target directory exists (#1305)
* Doc: Fix documentation of Magick::Image#crop (#1311)
* Magick::UndefinedKernel should also not be used when creating a new
KernelInfo. (#1312)
v3.3.6 October 2021
-------------------
* Bytestring bound bump
* Fix bug #187. (Some JPEGs are misidentified as SourceTiff.)
* Fix EXIF handling of strings of four characters or fewer.
* Fix endianness bug in short ExifString and ExifUndefined.
AnsiLove/C 4.1.6 (2021-02-10)
- Mention experimental seccomp support availability in README
- Bump CMake minimum required version to 3.1
- Add SPDX short license identifier in source files
- Add a test case for retina output
- Add a test case for SAUCE output
- Use CMAKE_C_STANDARD instead of hardcoding compiler flags
- Stop linking against libm, it's not necessary anymore
libansilove 1.2.9 (2022-02-10)
- Stop forcing FORTIFY_SOURCE=2, it should be package builders decision
- Bump CMake minimum required version to 3.1
- Add SPDX short license identifier in source files
- Use CMAKE_C_STANDARD instead of hardcoding compiler flags
- Add missing <stdint.h> include
pygraphviz-1.9¶
Drop Python 3.7 support
Add Python 3.10 support
Add osage and patchwork to progs list
Add IPython rich display hook to AGraph class
Add contributor guide
Fixed directed nature of AGraph.copy()
Minor documentation and code fixes
pygraphviz-1.8
Drop Python 3.7 support
Add Python 3.10 support
Add IPython rich display hook to AGraph class
Add contributor guide
Fixed directed nature of AGraph.copy()
Minor documentation and code fixes
ZXing-C++ ("zebra crossing") is an open-source, multi-format 1D/2D
barcode image processing library implemented in C++.
It was originally ported from the Java ZXing Library but has been
developed further and now includes many improvements in terms of
quality and performance. It can both read and write barcodes in a
number of formats.
If audio/pulseaudio is already installed, the build fails by pulse/pulseaudio.h not found error.
The pulseaudio option is disabled by default.
Bump PKGREVISION by dependency change.
2022-01-29 7.1.0-22 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-22 GIT revision 19618:cb0ac9022:20220129
2021-01-29 7.1.0-22 <quetzlzacatenango@image...>
* limit colorname length to avoid possible DoS
* restore MPRI URI in SVG
2022-01-28 7.1.0-21 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-21 GIT revision 19609:f084a86ec:20220128
2021-01-24 7.1.0-21 <quetzlzacatenango@image...>
* PDF now shows the correct Unicode title (reference
https://github.com/ImageMagick/ImageMagick/issues/4771).
* optimize Fx image statistics (reference
https://github.com/ImageMagick/ImageMagick/discussions/4533).
pkgsrc changes:
---------------
* Remove sm3600 variable since it is enabled for any OPSYS.
* Remove mustek and kvs40xx variables since these backends are built if
pthread is available. Actually it build on Linux and on other Unix-like
systems. For Unix-like other than Linux, pthread is not enabled by default
but we explicitly enable it in Makefile.
* Bump revision
/!\ pint is built if sys/scanio.h exists. Feel free to add systems that implement it.
/!\ Feel free to reintroduce mustek and kvs40xx for systems that do not implement
pthread.
2022-01-21 7.1.0-20 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-20 GIT revision 19585:2cd840776:20220121
2022-01-09 7.1.0-20 Dirk Lemstra <dirk@lem.....org>
* Added support for ARM64 to the Visual Studio build on Windows.
* Removed ImageMagickObject from the Windows installer.
2021-01-01 7.1.0-20 <quetzlzacatenango@image...>
* Support seamless blending of a foreground and background image.
* Support saliency blending of a foreground and background image.
* Support QOI image format.
* Perist frame delay when converting APNG to Webp (reference
https://github.com/ImageMagick/ImageMagick/issues/4704).
* -fx performance increase by one or two orders of magnitude (reference
https://github.com/ImageMagick/ImageMagick/discussions/4533).
* Add support for formatted text (reference
https://github.com/ImageMagick/ImageMagick/discussions/4515).
Upstream changes (from NEWS):
== Ruby-GNOME 3.5.1: 2021-01-17
This is a release for Windows.
=== Changes
==== All
* windows: Add workaround for mingw-w64-x86_64-gettext-0.21-1 or
later. Dummy (({DllMain()})) is defined.
==== Ruby/Pango
* Fixes
* Fixed a bug that can't be started.
[GitHub#1456][Reported by Akira Ouchi]
==== Ruby/GObjectIntrospection
* Fixes
* Fixed a bug that (({NoMethodError})) is raised on invalid
signature for constructor.
=== Thanks
* Akira Ouchi
== Ruby-GNOME 3.5.0: 2021-01-11
This is a release that adds support for Ractor.
Ruby/GObjectIntrospection has some backward incompatibilities for
Ractor support. If you have any problem, please report it to
https://github.com/ruby-gnome/ruby-gnome/issues .
=== Changes
==== Ruby/GLib2
* Improvements
* Added support for Ractor.
* Added support for signal handlers and virtual methods in
included module.
* Added support for (({try_convert})) protocol for property setter.
* Added support for converting tuple (({GVariant})) to Ruby.
==== Ruby/GIO2
* Improvements
* Added support for GIO 2.70.
* Added (({Gio::RubyInputStream})) to use Ruby objects as
(({Gio::InputStream})).
* Added (({Gio::RubyOutputStream})) to use Ruby objects as
(({Gio::OutputStream})).
==== Ruby/GObjectIntrospection
* Improvements
* Added support for Ractor. This introduced some backward
incompatiblities.
* Added support for "transfer full" for out (({GError})).
[GitHub#1437][Reported by mcclumpherty]
* Added support for changing whether GVL is unlocked per object by
the following APIs.
* (({GObjectIntrospection::FunctionInfo#set_lock_gvl_default}))
* (({GObjectIntrospection::FunctionInfo#add_lock_gvl_predicate}))
* (({GObjectIntrospection::Loader#prepare_function_info_lock_gvl}))
* Added support for converting from raw argument to enum.
* Added support for (({GList<GVariant>})) return value.
* Added support for reporting an error in callback.
* Fixes
* Fixed a bug that virtual functions of grandparent class can't be
implemented.
[GitHub#1433][Patch by shibafu]
==== Ruby/Pango
* Improvements
* Added support for Ruby 3.2.
==== Ruby/GTK3
* Improvements
* Improved documentation.
[GitHub#1454][Patch by Andy Maleh]
* Added support for Ruby 3.2.
==== Ruby/GDK4
* Improvements
* Updated pkg-config ID.
[GitHub#1435][Patch by Sasi Olin]
==== Ruby/GTK4
* Improvements
* Removed needless rsvg2 dependency on Windows.
[GitHub#1440][Reported by HuBandiT]
* Fixes
* Fixed typos in warning messages.
[GitHub#1442][Patch by HuBandiT]
[GitHub#1415][Reported by rubyFeedback]
=== Thanks
* shibafu
* Sasi Olin
* mcclumpherty
* HuBandiT
* rubyFeedback
* Andy Maleh
Mon, 03 Jan 2022 11:29:03 +0100 Daniel Friesel <derf+feh@finalrewind.org>
* Release v3.8
* Add button ID "0" to cursor bindings. This pseudo-button is triggered
whenever feh observes a cursor movement. It does not have a default
binding.
* Support hexadecimal IDs in --window-id
* Disable --auto-rotate in feh builds compiled with Imlib2 1.7.5 or later.
Imlib2 1.7.5 introduces transparent EXIF-based image orientation
adjustment, so --auto-rotate is no longer needed (and would cause
mis-orientation of images, as Imlib2 has already adjusted the
orientation).
2021-12-22 7.1.0-19 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-19 GIT revision 19456:d7f1b2b9b:20211222
2021-12-22 7.1.0-19 <quetzlzacatenango@image...>
* support -integral option.
* possible DoS for certain SVG constructs (reference
https://github.com/ImageMagick/ImageMagick/issues/4626).
2021-12-18 7.1.0-18 <quetzlzacatenango@image...>
* Release ImageMagick version 7.1.0-18 GIT revision 19447:6c7d62f7d:20211218
2021-12-11 7.1.0-18 <quetzlzacatenango@image...>
* support face index for font collections, e.g. msgothic.ttc[1].
2021-12-11 7.1.0-18 Dirk Lemstra <dirk@lem.....org>
* Improved adjustment of page offset when resizing an image.
This flag should be set for packages that import pkg_resources
and thus need setuptools after the build step.
Set this flag for packages that need it and bump PKGREVISION.
pkgsrc changes:
---------------
* Set nls option to default enabled to avoid forgetting new .mo files in PLIST
when updating.
* Remove patch-backend_genesys_low.cpp since it has been fixed in 1.0.31.
* Add textproc/libxml2 missing dependency thanks to verifypc.
upstream changes:
-----------------
The changes are listed in ChangeLog.
Changelog:
2021-12-02 Werner Lemberg <wl@gnu.org>
* Version 2.11.1 released.
==========================
Tag sources with `VER-2-11-1'.
* docs/VERSION.TXT: Add entry for version 2.11.1.
* docs/CHANGES, docs/release: Updated.
* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html, builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
docs/freetype-config.1: s/2.11.0/2.11.1/, s/2110/2111/.
* include/freetype/freetype.h (FREETYPE_PATCH): Set to 1.
* builds/unix/configure.raw (version_info): Set to 24:1:18.
* CMakeLists.txt (VERSION_PATCH): Set to 1.
* builds/toplevel.mk (version_tag, CHANGELOG_SCRIPT): New variables.
(do-dist): Generate `ChangeLog` file with all commits since last release.
2021-11-30 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Improve debugging.
* builds/windows/ftdebug.c (FT_Message, FT_Panic): Buffer output
and call `OutputDebugStringA` only if `IsDebuggerPresent`.
[_WIN32_WCE] (OutputDebugStringA): Implement the missing API.
2021-11-29 Seigo Nonaka <nona@google.com>
* src/base/ftobjs.c (FT_Request_Metrics): Fix build warning on Android.
Use casts since `FT_USHORT_MAX` is unsigned short in bionic (libc used in
Android).
2021-11-28 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/windows/vc2010/freetype.vcxproj (DlgCopy): Minor tweak.
2021-11-26 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/truetype/ttpload.c (tt_face_load_hdmx): Added comments.
2021-11-26 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Quietly reject out-of-spec `hdmx` tables.
The `hdmx` table is optional and can be safely rejected without
an error if it does not follow specifications. The record size
must be equal to the number of glyphs + 2 + 32-bit padding.
* src/truetype/ttpload.c (tt_face_load_hdmx): Thoroughly check
the record size and improve tracing.
2021-11-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Partly revert 5b626281.
Fixes#1118.
* src/truetype/ttpload.c (tt_face_load_hdmx): Do not assume that
`record_size` is rounded even though the records are padded.
2021-11-23 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/windows/vc2010/freetype.vcxproj (DlgCopy): Use transforms.
2021-11-22 Werner Lemberg <wl@gnu.org>
Update `CHANGES` files, other minor whitespace and documentation issues.
2021-11-21 Werner Lemberg <wl@gnu.org>
formats.txt: Add info about WOFF and WOFF2.
2021-11-21 Werner Lemberg <wl@gnu.org>
meson.build: Initialize `common_ldflags`.
2021-11-21 Lukas Oberhuber <@lukaso>
* meson.build: Fix compatibility version on MacOS.
Fixes#1117.
2021-11-21 Werner Lemberg <wl@gnu.org>
* src/truetype/ttinterp.c (Ins_MD): Avoid `FT_ABS`.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38562
2021-11-20 Alexei Podtelezhnikov <apodtele@gmail.com>
* include/freetype/fttypes.h (FT_MAKE_TAG): Remove the same casting.
2021-11-20 Werner Lemberg <wl@gnu.org>
[gxvalid] Fix minor compilation warning.
* src/gxvalid/gxvmort5.c (gxv_mort_subtable_type5_subtable_setup): Declare
as static.
2021-11-20 Werner Lemberg <wl@gnu.org>
[smooth] Fix stand-alone compilation.
* src/smooth/ftgrays.c (FT_Trace_Enable, FT_Trace_Disable)[STANDALONE_]:
Define.
2021-11-20 Werner Lemberg <wl@gnu.org>
Avoid undefined left-shifts.
We really have to use double casts to avoid issues with C's and C++'s
signedness propagation rules in implicit casts.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41178https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=41182
* include/freetype/config/public-macros.h (FT_STATIC_CAST,
FT_REINTERPRET_CAST): Modify macro to take two arguments.
Update all callers.
(FT_STATIC_BYTE_CAST): New macro.
* include/freetype/freetype.h (FT_ENC_TAG): Use `FT_STATIC_BYTE_CAST`.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
* include/freetype/fttypes.h (FT_MAKE_TAG): Ditto.
Use `FT_Tag` for casting.
* src/ftraster/ftmisc.h (FT_MAKE_TAG): Removed, no longer needed.
(FT_STATIC_BYTE_CAST): New macro.
* src/smooth/ftgrays.c (FT_STATIC_CAST): Replace with...
(FT_STATIC_BYTE_CAST): ... this.
2021-11-18 Werner Lemberg <wl@gnu.org>
Provide C++ versions for public macros with casts.
Many FreeType clients use C++. However `g++ -Wold-style-cast` warns for
macros with C-style casts even for system header files; this also affects
directories included with `-isystem`. While this could be seen as a problem
with g++, the problem is more a philosophical one: Over the time, C and C++
diverged more and more, and some features of C are no longer the 'right'
solution in C++.
* include/freetype/config/public-macros.h (FT_STATIC_CAST,
FT_REINTERPRET_CAST): New macros.
* include/freetype/freetype.h (FT_ENC_TAG, FT_LOAD_TARGET_,
FT_LOAD_TARGET_MODE): Use `FT_STATIC_CAST`.
Correctly handle negative 'signed char' input.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
* include/freetype/fttypes.h (FT_MAKE_TAG, FT_BOOL): Ditto.
* include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): Use
`FT_REINTERPRET_CAST`.
* src/smooth/ftgrays.c (FT_STATIC_CAST)[STANDALONE_]: New macro.
[!STANDALONE]: Include `FT_CONFIG_CONFIG_H`.
Fixes#1116.
2021-11-16 Werner Lemberg <wl@gnu.org>
Fix clang++ warnings.
* src/*: Initialize some variables to NULL.
2021-11-16 Werner Lemberg <wl@gnu.org>
[truetype] Updates for the forthcoming OpenType 1.9 standard (2/2).
* src/truetype/ttgxvar.c (ft_var_load_item_variation_store):
s/shortDeltaCount/wordDeltaCount/ (as done in the specification, too).
Recognize new format and reject it for now.
2021-11-16 Werner Lemberg <wl@gnu.org>
[truetype] Updates for the forthcoming OpenType 1.9 standard (1/2).
This is in preparation for implementing `DeltaSetIndexMap` format 1, which
is used by `COLR` v1 tables, and which allows 32bit indices.
https://docs.microsoft.com/en-us/typography/opentype/otspec190/delta/otvarcommonformats_delta.html
* src/truetype/ttgxvar.h (GX_DeltaSetIdxMapRec): Change type of `mapCount`
to `FT_ULong`.
* src/truetype/ttgxvar.c (ft_var_load_delta_set_index_mapping): Add argument
for passing the table size; update caller.
Implement new format.
2021-11-14 Werner Lemberg <wl@gnu.org>
Fix clang warnings.
* src/gxvalid/gxvcmmn.h (GXV_SET_ERR_IF_PARANOID): Use 'do' block.
* src/gxvalid/gxvmod.c (GXV_TABLE_LOAD, GXV_TABLE_VALIDATE): Ditto.
* src/smooth/ftgrays.c (gray_convert_glyph): Add cast.
* src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Remove cast.
* src/type1/t1load.c (read_binay_data): Use `FT_ULong` for `size` parameter.
(parse_subrs, parse_charstrings, parse_dict): Ditto; also add some casts.
2021-11-13 Dominik Röttsches <drott@chromium.org>
[sfnt] Avoid undefined shifts in `COLR` v1 paint parsing
* src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Tighten shift
behavior by using multiplication, mostly using macros from ftcalc.h.
Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1269168
2021-11-13 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Improve `DlgCopy` target.
Fixes#1113.
* builds/windows/vc2010/freetype.vcxproj: Run `DlgCopy` conditionally
and decouple it from `Build`.
2021-11-12 Alexei Podtelezhnikov <apodtele@gmail.com>
Explicitly define `FT_MSB` for Clang.
* include/freetype/internal/ftcalc.h [__clang__] (FT_MSB): Updated.
2021-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/truetype/ttgxvar.c (ft_var_to_normalized): Edge optimization.
2021-11-10 Alexei Podtelezhnikov <apodtele@gmail.com>
Additional `FT_MSB` macro definitions.
Better macros for Windoes CE and ARM in general, based on !109
from metarutaiga.
* include/freetype/internal/ftcalc.h [_MSC_VER] (FT_MSB): Updated.
2021-11-09 Alexei Podtelezhnikov <apodtele@gmail.com>
[build/windows] Remove logging from default debug configurations.
DLG is rather costly for performance and should be used judiciously.
This removes it from the default configurations but gives an example
how to enable it using the `UserDefines` property.
* builds/windows/vc2010/freetype.vcxproj: Hide FT_DEBUG_LOGGING.
2021-11-08 Werner Lemberg <wl@gnu.org>
* src/sfnt/sfobjs.c (sfnt_open_font): Fix typo.
2021-11-08 Werner Lemberg <wl@gnu.org>
* src/gxvalid.*, src/otvalid.*: Fix `-Wformat` warnings.
2021-11-08 Werner Lemberg <wl@gnu.org>
[pshinter] Fix C++ compilation.
* src/pshinter/pshalgo.c (psh_compute_dir): Fix type of `result`.
(psh_hint_table_find_strong_points): Add cast.
2021-11-08 Werner Lemberg <wl@gnu.org>
[sfnt] Reduce footprint if WOFF and WOFF2 support is not needed.
Based on a patch from metarutaiga (MR !106). The gist of this commit is
that it doesn't make sense to support WOFF without compression (which would
be only possible in WOFF 1.0 anyway).
* src/sfnt/sfobjs.c (sfnt_open_font): Guard WOFF code with
`FT_CONFIG_OPTION_USE_ZLIB` block.
Guard WOFF2 code with `FT_CONFIG_OPTION_USE_BROTLI` block.
* src/sfnt/sfwoff.c, src/sfnt/sfwoff.h: Guard files with
`FT_CONFIG_OPTION_USE_ZLIB` blocks, not parts of the code.
* src/sfnt/sfwoff2.c, src/sfnt/sfwoff2.h, src/sfnt/woff2tags.c,
src/sfnt/woff2tags.h: Guard files with `FT_CONFIG_OPTION_USE_BROTLI` blocks,
not parts of the code.
Fixes#1111.
2021-11-08 Werner Lemberg <wl@gnu.org>
[truetype] Make trickyness checks depend on TT_USE_BYTECODE_INTERPRETER.
Based on a patch from metarutaiga (MR !106).
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag,
tt_check_trickyness_family, tt_synth_sfnt_checksum, tt_get_sfnt_checksum,
tt_check_trickyness_sfnt_ids, tt_check_trickyness): Put functions into a
`TT_USE_BYTECODE_INTERPRETER` block.
(tt_face_init): Put trickyness checks into a `TT_USE_BYTECODE_INTERPRETER`
block.
Fixes#1111.
2021-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/ttload.c (tt_face_load_gasp): Fix a type mismatch warning.
2021-11-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[dlg] Define DLG_STATIC explicitly.
DLG_STATIC is intended to disable Windows DLL linking attributes.
It does not hurt to define it explicitly when we wrap DLG code.
This fixes tons of LNK4286 and C4273 warnings from MSVC if we
forget to define DLG_STATIC as a compiler option.
* builds/windows/vc2010/freetype.vcxproj: Remove DLG_STATIC option.
* src/dlg/dlgwrap.c [FT_DEBUG_LOGGING]: Define DLG_STATIC.
* include/freetype/internal/ftdebug.h [FT_DEBUG_LOGGING]: Ditto.
2021-11-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[dlg] Lighten up the inclusions.
The DLG wrapper needs to know if FT_DEBUG_LOGGING is defined in
`ftoption.h`. It does not need entire FreeType.
* src/dlg/dlgwrap.c: Include FT_CONFIG_OPTIONS_H directly.
2021-11-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Avoid some memory zeroing in variations.
* src/truetype/ttgxvar.c (ft_var_readpackeddeltas, ft_var_load_avar,
ft_var_load_item_variation_store, ft_var_load_gvar): Use FT_QNEW_ARRAY
if memory immediately initialized or discarded otherwise.
2021-11-05 Jany Belluz <jany.belluz@daltonmaag.com>
[truetype] Fix handling of packed deltas in Variation Fonts.
* src/truetype/ttgxvar (ft_var_readpackeddeltas): Don't expect the number of
bytes used to encode the deltas to be higher than the number of encoded
values. The specification allows a very compact encoding; for example, a
list of 200 zeros can be encoded with just a couple of bytes.
We now count the consumed bytes to make sure to not read more than expected.
2021-11-04 Jany Belluz <jany.belluz@daltonmaag.com>
[truetype] Fix CVAR handling of tuples for all points.
* src/truetype/ttgxvar (tt_face_vary_cvt): Function
`ft_var_readpackedpoints`, when it returns `ALL_POINTS`, also sets
`point_count` to value 0. However, the CVAR code was incorrectly expecting
that `point_count` would be set to match the length of the CVT table.
2021-11-04 Jany Belluz <jany.belluz@daltonmaag.com>
* src/truetype/ttgxvar.c: Fix typos in macros that guard CVAR code.
2021-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
* docs/INSTALL: Mention Meson and MSBuild more prominently.
2021-11-03 Gabor Kertesz <gabor.kertesz@linaro.org>
[libpng] Update Meson wrap for win-arm64
1.6.37-5 released patches for win-arm64 to successfully build
libpng with Meson:
https://github.com/mesonbuild/wrapdb/pull/205https://github.com/mesonbuild/wrapdb/pull/216
Updated by the following command:
meson wrap update libpng
Tested on win-arm64 and x64.
2021-11-03 Dominik Röttsches <drott@chromium.org>
[sfnt] Clarify `COLR` v1 FT_Paint* format representations
* include/freetype/ftcolor.h (FT_PaintLinearGradient,
FT_PaintRadialGradient, FT_PaintSweepGradient, FT_PaintTransform,
FT_PaintTranslate, FT_PaintScale, FT_PaintRotate, FT_PaintSkew): Clarify
16.16 fixed point representation of struct fields.
* src/sfnt/ttcolr.c (read_paint): Shift coordinates for
FT_PaintLinearGradient, FT_PaintRadialGradient, FT_PaintSweepGradient
accordingly.
Fixes: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1110
2021-11-03 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Let MSBuild handle DLG copy.
* builds/windows/vc2010/freetype.vcxproj: Specify DlgCopy target.
* builds/windows/vc2010/script.bat: Deleted.
2021-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/truetype/ttgload.c (load_truetype_glyph): Fix MSVC warning C4312.
2021-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Separate MSVC linker and librarian.
MSVC uses LIB for static and LINK for dynamic libraries. They are
related but the former has much smaller set of options.
* builds/windows/vc2010/freetype.vcxproj: Updated.
2021-10-29 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Revise MSVC linking optimizations.
* builds/windows/vc2010/freetype.vcxproj: Optimize DLL linking only.
* builds/windows/visualc/freetype.dsp: Ditto.
* builds/windows/visualc/freetype.vcproj: Ditto.
2021-10-28 Alexei Podtelezhnikov <apodtele@gmail.com>
[woff] Optimize table tagging.
* include/freetype/internal/wofftypes.h (WOFF_TableRec): Use
32-bit tag.
* src/sfnt/sfwoff.c (woff_open_font): Use 32-bit tag.
2021-10-28 Alexei Podtelezhnikov <apodtele@gmail.com>
[woff2] Optimize table tagging.
Fixes#1107.
* include/freetype/internal/wofftypes.h (WOFF2_TableRec): Use
32-bit tag.
* src/sfnt/sfwoff2.c (compare_tags, find_table, woff2_open_font):
Use 32-bit tag.
* src/sfnt/woff2tags.[ch] (woff2_known_tags): Use static storage and
return 32-bit tag.
2021-10-26 Werner Lemberg <wl@gnu.org>
Formatting.
2021-10-26 Ben Wagner <bungeman@chromium.org>
[mm] Tolerate missing Blend dictionary entries
In a Multiple Master font, the Blend dictionary must contain valid
Private, FontInfo, and FontBBox. The current code will error if any of
these are present and invalid, but will not error and will provide
uninitialized data if the Blend dictionary exists but does not contain
one of these entries. This change reverts to the older behavior of
treating any missing entries as containing all zero data and not
returning an error.
In the future it may be best to keep track of when these are actually
initialized and error if they are not.
* src/type1/t1load.c (t1_allocate_blend): Zero initiailize.
2021-10-26 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Add MSVC linker optimazations.
We continue to build static libraries with statically linked C run-
time and add options to optimize references.
* builds/windows/vc2010/freetype.vcxproj: Sort entries, add options.
2021-10-23 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/windows/vc2010/freetype.vcxproj: Use MachineARM64.
2021-10-22 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Prioritize x64.
* builds/windows/vc2010/freetype.sln: Sort entries.
2021-10-22 Gabor Kertesz <gabor.kertesz@linaro.org>
[builds/windows] Add ARM64 platform.
* builds/windows/vc2010/freetype.sln: Updated
* builds/windows/vc2010/freetype.vcxproj: Updated.
* builds/windows/vc2010/freetype.vcxproj.filters: Minor fix.
2021-10-21 Ben Wagner <bungeman@chromium.org>
[mm] Delay setting blend weight and design position.
Previously the `blend->weight_vector`, `blend->default_weight_vector`,
and `blend->design_pos` were set early to allocated but uninitialized
memory under the assumption that the memory would eventually be
initialized. However, it is possible that some of the required
keywords may not actually be present, leaving the memory uninitialized.
This is different from a present but invalid table, which would produce
an error.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1261762
* src/type1/t1load.c (t1_allocate_blend): Remove early allocation and
initialization.
(parse_blend_design_positions, parse_weight_vector): Parse into local
and assign to blend if valid.
(T1_Open_Face): Check that if a blend exists that it has the weight
vector and design positions.
2021-10-21 Ben Wagner <bungeman@chromium.org>
[cff] Commit vstore data and regions on allocation.
The vstore->regionCount and vstore->dataCount were read directly
from the data. However, vstore->varRegionList and vstore->varData
would still contain uninitialized entries with uninitialized
pointers in the event of an error, leading to issues when attempting
to clean up.
Reportd as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40104
* src/cff/cffload.c (cff_vstore_load): Read the region and data counts
into locals and update the vstore counts immediately after each entry
becomes free-able.
2021-10-20 Ben Wagner <bungeman@chromium.org>
[sfnt] Delay setting gasp ranges and count until computed.
Previously, the gasp.numRanges was set and gasp.gaspRanges was
allocated and assigned before a possible early exit if the frame could
not be entered. It is also possible that the gaspRanges allocation
could fail but the numRanges still be set to non-zero. In such cases
an error would be returned, but the face would have a gasp in an
inconsistent state which may still be accessed.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1261450
* src/sfnt/ttload.c (tt_face_load_gasp): Delay setting gasp.numRanges
and gasp.gaspRanges until after the ranges are initialized.
2021-10-20 Ben Wagner <bungeman@chromium.org>
[sfnt] Delay setting names and langTags until computed.
Previously, the table->names and table->langTags fields were created
pointing to uninitialized memory and an early exit could happen if the
frame could not be entered. The caller would then be unable to properly
dispose of the memory as the string fields had not been initialized.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1261343
* src/sfnt/ttload.c (tt_face_load_name): delay setting table->langTags
and table->names until after the memory they will point to is fully
initialized.
2021-10-20 Alexei Podtelezhnikov <apodtele@gmail.com>
* tests/issue-1063/main.c: s/PATH_MAX/FILENAME_MAX/.
Closes!97 for Windows by using a standard macro.
2021-10-19 Werner Lemberg <wl@gnu.org>
[bdf, cid, pfr, winfonts] Improve rejection of other font formats.
This is mainly for better diagnostics of malformed fonts.
* src/bdf/bdflib.c (_bfd_readstream): Stop font format testing if the first
input line is too long or doesn't end with `\r` or `\n`.
* src/cid/cidparse.c (cid_parser_new): Don't handle too short input as an
error but as an unknown format.
* src/pfr/pfrobjs.c (pfr_face_init): Ditto.
* src/winfonts/winfnt.c (fnt_font_load, fnt_face_get_dll_font): Ditto.
2021-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
[pcf] Zero out the allocated properties.
Fallout reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40033
* src/pcf/pcfread.c (pcf_get_properties): Use FT_NEW_ARRAY and zero
out `properties` in case of failure.
2021-10-18 Werner Lemberg <wl@gnu.org>
configure: Use string comparison for directory inodes.
Inode values might be larger than integers supported by the shell.
Fixes#1105.
2021-10-17 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/ttload.c (tt_face_load_name): NULL-initialize langTag.
Another attempt to fix fallout reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40024
2021-10-17 Alexei Podtelezhnikov <apodtele@gmail.com>
[bdf] Fix up user properties.
Fallout reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=40027
* src/bdf/bdflib.c (_bdf_add_property): Cosmetic NULL.
(bdf_create_property): Limit allocations to customary signed
FT_Long and NULL-initialize unused storage.
(bdf_free_font): Do not free unused storage.
2021-10-17 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/ttload.c (tt_face_load_name): Accounting fix.
Fallout reported as
https://crbug.com/40024
2021-10-16 Ben Wagner <bungeman@chromium.org>
Fix typos in memory macros.
FT_QNEW_ARRAY and FT_QRENEW_ARRAY were using the non-Q
FT_MEM_NEW_ARRAY and FT_MEM_RENEW_ARRAY. Change these to use the Q
versions. Also fix the one issue discovered in tt_face_load_name
where table->names is created with FT_QNEW_ARRAY but the extra
string member is not initialized to NULL.
* include/freetype/internal/ftmemory.h (FT_Q(RE)NEW_ARRAY):
Use FT_MEM_Q(RE)NEW_ARRAY as needed.
* src/sfnt/ttload.c (tt_face_load_name): Initialize `entry->string`.
2021-10-15 Ben Wagner <bungeman@chromium.org>
[truetype] Reload context after re-executing `prep`.
When a different hinting mode from the current is selected, the `prep` table
must be re-executed with the new mode. After this happens the context must
be re-loaded in preparation for the glyph program to be run.
Fixes#1104.
* truetype/ttgload.c (tt_loader_init): Add call to `TT_Load_Context`.
2021-10-15 Werner Lemberg <wl@gnu.org>
[truetype] Minor documentation improvements.
2021-10-14 Anurag Thakur <anuthadev@gmail.com>
Add clang build to linux CI
2021-10-12 Anurag Thakur <anuthadev@gmail.com>
CI: Add macOS CI, including a clang build
2021-10-12 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cid/cidload.c (parse_fd_array): Protect against trancation.
2021-10-12 Alexei Podtelezhnikov <apodtele@gmail.com>
[type1] Revert to signed size for binary data.
Recently introduced and reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39838
* src/type1/t1load.c (read_binary_data): Reject negative size.
(parse_subrs, parse_charstrings): Use customary signed size.
2021-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[psaux] Signedness revisions.
Unsigned indexes are easier to check.
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings): Updated.
* src/psaux/psintrp.c (cf2_interpT2CharString): Ditto.
* src/psaux/t1decode.c (t1_decoder_parse_charstrings): Ditto.
* src/type1/t1load.c (read_binary_data): Ditto.
2021-10-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[cid] Signedness revisions.
Unsigned checks are simpler.
* include/freetype/t1tables.h (CID_FaceInfoRec): Change to unsignd
`num_dicts`.
* src/cid/cidparse.h (CID_Parser): Change to unsigned `num_dict`.
* src/cid/cidgload.c (cid_load_glyph): Updated.
* src/cid/cidload.c (cid_load_keyword, parse_fd_array,
parse_expansion_factor, parse_font_name, cid_read_subrs,
cid_face_open): Updated.
* src/cid/cidobjs.c (cid_face_done): Updated.
* src/cid/cidparse.c (cid_parser_new): Updated.
2021-10-09 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cid/cidload.c (cid_face_open): Streamline CIDCount check.
2021-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cid/cidload.c (cid_face_open): Streamline SubrCount check.
2021-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cid/cidgload.c (cid_load_glyph): Fortify incremental loading.
2021-10-08 Alexei Podtelezhnikov <apodtele@gmail.com>
Signedness revisions.
This eliminates explicit casting by switching to unsigned fields.
The revisions mostly impact the handling of CID fonts.
* include/freetype/fttypes.h (FT_Data): Change to unsigned `length`.
* include/freetype/t1tables.h (CID_FaceDictRec): Ditto for `sd_bytes`.
(CID_FaceInfoRec): Ditto for `gd_bytes` and `gd_bytes`.
* include/freetype/internal/tttypes.h (TT_LoaderRec): Ditto for
`byte_len`.
* src/cid/cidgload.c (cid_load_glyph): Updated.
* src/cid/cidload.h (cid_get_offset): Update argument.
* src/cid/cidload.c (cid_get_offset, cid_read_subrs, cid_face_open):
Updated.
* src/cff/cffgload.c (cff_get_glyph_data, cff_free_glyph_data):
Updated.
* src/psaux/psft.c (cf2_getT1SeacComponent): Updated.
* src/truetype/ttgload.c (TT_Process_Composite_Glyph,
load_truetype_glyph): Updated.
2021-10-07 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
meson.build (gen_docs): Use `current_source_dir` instead of `source_root`.
These two are not equal when FreeType is used as a subproject, such as in
`freetype-demos`. In that case, `source_root` points at the root project,
causing the docs build to fail.
2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (FT_DIV_MOD): Limit the ARM workaround.
2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/unix, builds/vms] Standardize `mmap` failure.
* builds/unix/ftsystem.c (FT_Stream_Open): Check for MAP_FAILED.
* builds/vms/ftsystem.c (FT_Stream_Open): Ditto.
This should cover https://savannah.nongnu.org/patch/?5909 as well.
2021-10-05 Hugh McMaster <hugh.mcmaster@outlook.com>
autogen.sh: Only copy submodules if building from a git branch.
`autogen.sh` fails if building from a standard source tarball. Firstly, git
expects to be called in a git repository, then `copy_submodule_files`
blindly attempts to copy files.
Debian, Ubuntu, Linux Mint, and other derivatives all run `autogen.sh`
before compiling to regenerate build files.
This patch ensures that various git commands are only called and 'dlg' files
are only copied if `autogen.sh` is called from a git repository.
2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com>
* include/freetype/internal/ftgloadr.h: Add missing header.
Noticed by Jouk Jansen.
2021-10-05 Alexei Podtelezhnikov <apodtele@gmail.com>
[pshinter] Additional clean-ups.
* src/pshinter/pshalgo.h (psh_hint_table_find_strong_points): Streamline code.
* src/pshinter/pshalgo.h (PSH_Glyph): Remove unused fields.
2021-10-04 Alexei Podtelezhnikov <apodtele@gmail.com>
[pshinter] More convenient direction definition.
It is easier to check directions using flags than integer values.
* src/pshinter/pshalgo.h (PSH_Dir): Redefine directions.
(PSH_PointRec): Use them as an enum type.
* src/pshinter/pshalgo.c (psh_compute_dir): Modify return type.
(psh_glyph_init, psh_hint_table_find_strong_points,
psh_glyph_find_blue_points): Update users.
2021-10-04 Alexei Podtelezhnikov <apodtele@gmail.com>
[pshinter] Remove unnecessary check.
* src/pshinter/pshalgo.c (psh_hint_table_find_strong_points): Do not
check if direction is defined before checking how.
2021-10-02 AnuthaDev <anuthadev@gmail.com>
CI: Hardcode meson version to fix build failure on windows
2021-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
Additional `FT_MSB` macro definitions.
* include/freetype/internal/ftcalc.h [__DECC,_CRAYC]: Use builtins
and intrinsics.
2021-10-01 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/autofit/afhints.c (af_glyph_hints_reload): Decrease casting.
2021-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/tools/apinames.c: Facilitate OpenVMS linker options.
2021-09-29 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/winfonts/winfnt.c (FNT_Face_Init): Correct reallocation.
2021-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/unix] Do not use autoconf SIZEOF.
* builds/unix/ftconfig.h.in [FT_USE_AUTOCONF_SIZEOF_TYPES]: Removed.
* builds/unix/configure.raw: Remove AC_CHECK_SIZEOF and update.
After this commit, autoconf builds will fully rely on <limits.h>
rather than falling back on it if AC_CHECK_SIZEOF failed for some
reason. There is a risk that misconfigured cross-compilation might
have wrong headers. Note that Meson and CMake builds always relied on
<limits.h> for sizes and availability of integer types.
2021-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
Propagate sign when reading OFF3.
Signed 24-bit values are extremely rare. FreeType only reads them in
PFR fonts with bitmap strikes conditionally. They have not been seen
in the known fonts. That is why this bug could never be discovered.
`FT_FRAME_OFF3` propagates sign correctly.
* include/freetype/internal/ftstream.h (FT_PEEK_OFF3, FT_PEEK_OFF3_LE):
Propagate sign into 32-bit value.
(FT_GET_OFF3, FT_READ_OFF3): Needed fixing but removed as unused.
2021-09-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[bdf] Simplify comment collection or lack thereof.
BDF comments are neither actually collected nor retrieved. There is
no need to be fancy with delimiters.
* src/bdf/bdflib.c (_add_bdf_comment): Delimit comments with zeros...
(bdf_load_font): ...and do not null-terminate comments additionally.
(_bdf_parse_glyphs): Check if comments are kept, which they are not.
(_bdf_parse_start): Minor clean up.
2021-09-24 Alexei Podtelezhnikov <apodtele@gmail.com>
Use NULL for pointers only.
* src/bdf/bdflib.c (*): Code changes.
* include/freetype/freetype.h: Comments only.
* src/cff/cffload.c, src/cff/cffobjs.c: Ditto.
* src/winfonts/winfnt.c: Ditto.
2021-09-23 Werner Lemberg <wl@gnu.org>
Minor documentation fixes and improvements.
2021-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
Reference `fopen` in the docs.
2021-09-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[bdf, pcf] Minor optimization.
* src/pcf/pcfread.c (pcf_load_font): Do not call `FT_MulDiv` for a
small job.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto.
* src/bdf/bdflib.c (_bdf_parse_glyphs): Fix a comment.
2021-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Initialize stream memory earlier.
With Windows memory management tracking heap, it is important to use
it during the stream opening fallback. In Unix, the argument is
unused, but it is better to set it correctly.
* src/base/ftobjs.c (FT_Stream_New): Set memory before calling
`FT_Stream_Open`.
* builds/windows/ftsystem.c, builds/unix/ftsystem.c (FT_Stream_Open,
ft_close_stream_by_free): Call `ft_alloc` and `ft_free` with proper
memory argumment.
2021-09-22 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Revert back to `CreateFileA` only.
Calling `CreateFileW` without making sure that the patname is really
`wchar_t` is a bad idea and can lead to unpredictable overreads. For
Windows CE, we impelemnt the missing API.
Fixes#1098 and !76 again.
* builds/windows/ftsystem.c (FT_Stream_Open): Call `CreateFileA`.
[_WIN32_WCE] (CreateFileA, FileSizeEx): Implement missing interfaces.
2021-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/bdf/bdflib.c (_bdf_parse_{start,glyphs}): Use appropriate scanner.
2021-09-21 Alexei Podtelezhnikov <apodtele@gmail.com>
Minor.
2021-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cff/cffdrivr.c (cff_ps_get_font_{info,extra}): Use FT_QNEW.
2021-09-18 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Minor clean-ups.
* src/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP): Remove parantheses.
* src/cache/ftccache.c (FTC_Cache_Lookup): Ditto.
(FTC_Cache_RemoveFaceID): Remove unnecessary variable.
2021-09-17 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Try both wide and narrow `CreateFile`
Windows handles wchar_t* UTF-16 and char* ANSI (presently UTF-8)
filenames using alternative -A and -W API. We'll try them both
when opening a file. This means that you should not worry about
about conversions.
Fixes#1098 and !76.
* builds/windows/ftsystem.c (FT_Stream_Open): Call alternative
`CreateFile` in the case of failure.
2021-09-17 Edwin Steiner <edwin.steiner@gmail.com>
[cff] Explicitly set StandardEncoding or ExpertEncoding offsets.
Fixes#1097.
* src/cff/cffload.c (cff_encoding_load): Set special offset values.
2021-09-16 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Miscellaneous clean-ups.
* src/cache/ftccache.c (ftc_get_top_node_for_hash, FTC_Cache_Clear):
Remove barely used variables.
(ftc_cache_add): Adjust casting.
* src/cache/ftccmap.c (FTC_CMapCache_Lookup): Remove casting.
* src/cache/ftcsbits.c (ftc_snode_load): Remove casting.
2021-09-16 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cff/cffload.c (cff_fd_select_get): Remove casting.
2021-09-16 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/pcf/pcfread.c (pcf_read_TOC): Remove casting.
2021-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Minor type adjustments.
* src/cff/cffobjs.c (cff_face_init): Reduce casting.
* src/truetype/ttobjs.c (tt_size_ready_bytecode): Ditto.
* src/type1/t1load.c (T1_Set_MM_Design): Ditto.
2021-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Replace boolean allocation macros with MEM ones.
* src/base/ftbitmap.c (FT_Bitmap_Copy): Use MEM-macro.
* src/base/ftobjs.c (ft_glyphslot_alloc_bitmap): Ditto.
* src/bzip2/ftbzip2.c (ft_bzip2_alloc): Ditto.
* src/cache/ftccache.c (ftc_cache_init): Ditto
* src/gzip/ftgzip.c (ft_gzip_alloc): Ditto.
* src/psnames/psmodule.c (ps_unicodes_init): Ditto.
* src/sfnt/sfobjs.c (sfnt_load_face): Ditto.
* src/sfnt/ttload.c (tt_face_load_name): Ditto.
2021-09-15 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Revert to some zeroing.
* src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Zero
`buckets` again to fix some crashes.
2021-09-14 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/pshinter/pshrec.c (ps_mask_table_merge_all): Tweak loops.
Fixes fallout from 731d0b685685 reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38685
2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com>
[cff, pshinter] Clean up unsigned counters.
Loops with unsigned decrement can be reliably stopped when the counter
wraps around after reaching zero.
* src/cff/cffload.c (cff_charset_compute_cids): Use unsigned counter.
* src/pshinter/pshalgo.c (psh_hint_table_activate_mask): Ditto.
* src/pshinter/pshrec.c (ps_mask_table_merge): Ditto.
2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com>
[bdf, psnames, sfnt] Avoid some memory zeroing.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Use Q-macro.
* src/sfnt/sfobjs.c (sfnt_load_face): Ditto.
* src/psnames/psmodule.c (src/psnames/psmodule.c): Remove zero.
2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftobjs.c (FT_CMap_New): Revert to zeroing.
Fixes fallout from c1fa7aa2bc96, reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38641
2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Clean up `exec` initialization.
* src/truetype/ttinterp.c (Init_Context): Absorbed into...
(TT_New_Context): ... this function.
2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Avoid some memory zeroing.
* src/truetype/ttgload.c (load_truetype_glyph): Use Q-macro.
* src/truetype/ttinterp.c (Update_Max): Ditto.
* src/truetype/ttpload.c (src/truetype/ttpload.c): Ditto.
2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Avoid some memory zeroing.
* src/base/ftobjs.c (FT_New_Size, FT_CMap_New, FT_CMap_Done,
ft_open_face_internal, ft_open_face_internal): Use Q-macros.
2021-09-13 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache, psaux] Remove zeros.
* src/cache/ftcmru.c (FTC_MruList_New): Remove initialization.
* src/psaux/psstack.c (cf2_stack_init): Ditto.
2021-09-12 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Avoid some memory zeroing.
* src/cache/ftcmru.c (FTC_MruList_New): Use Q-macro.
* src/cache/ftcmanag.c (FTC_Manager_RegisterCache): Ditto.
* src/cache/ftccache.c (ftc_cache_init, ftc_cache_resize): Ditto.
2021-09-11 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cache/ftcmanag.c (FTC_Manager_New): Add missing zero.
Fixes fall out from a7b199d081e7.
2021-09-10 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Tweak `hdmx` checking.
Fixes#1096.
* src/truetype/ttpload.c (tt_face_load_hdmx): Account for padding.
2021-09-10 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Tweak `loca` clamping.
Fixes#1095.
* src/truetype/ttpload.c (tt_face_load_loca): Fix up clamping.
* include/freetype/internal/tttypes.h (TT_Face): Correct docs.
2021-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
Fortify memory debugging (cont'd).
* src/base/ftdbgmem.c (FT_DumpMemory): Check for active debugger.
(ft_mem_table_destroy): Move `FT_DumpMemory` call from here...
(ft_mem_debug_done): ... to here.
2021-09-08 Alexei Podtelezhnikov <apodtele@gmail.com>
Fortify memory debugging.
These changes are neccessary to properly recover `memory->user` that
holds the Windows heap handle now.
* src/base/ftdbgmem.c (ft_mem_debug_init): Handle all table allocations,
initializations, and sizing instead of...
(ft_mem_table_new): ... this function removed.
(ft_mem_debug_done): Better check for the active debugger and free the
debugger table here instead of...
(ft_mem_table_destroy): ... here.
2021-09-08 Werner Lemberg <wl@gnu.org>
src/tools/ftrandom/ftrandom.c (_XOPEN_SOURCE): Set to 600.
This allows C99 compilation on Solaris.
Problem reported by Mojca Miklavec.
2021-09-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Use native memory allocation API.
* builds/windows/ftsystem.c (ft_alloc, ft_realloc, ft_free):
Wrap HeapAlloc, HeapReAlloc, and HeapFree.
(FT_New_Memory): Set the heap handle.
2021-09-07 Werner Lemberg <wl@gnu.org>
[dlg] Synchronize with upstream.
* src/dlg/dlgwrap.c (_XOPEN_SOURCE): Set to 600.
Fixes#1093.
2021-09-04 Alexei Podtelezhnikov <apodtele@gmail.com>
Cosmetic zeros.
2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/bdf/bdflib.c (_bdf_parse_start): Keep parser memory.
2021-09-03 Werner Lemberg <wl@gnu.org>
autogen.sh: Make it work with old Solaris 10 shell.
2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth, raster, sdf] Clean up initialization calls.
* src/raster/ftraster.c (ft_black_init): Removed.
(ft_black_new): Clean up.
* src/sdf/ftbsdf.c (bsdf_raster_new): Ditto.
* src/sdf/ftsdf.c (sdf_raster_new): Ditto.
* src/smooth/ftgrays.c (gray_raster_new): Ditto.
2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cache/ftcmanag.c (FTC_Manager_New): Avoid some zeroing.
2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/bdf/bdflib.c (bdf_load_font): Remove memory shuffling.
2021-09-03 Alexei Podtelezhnikov <apodtele@gmail.com>
Cosmetic zeros.
2021-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Clean up stream reading.
* src/base/ftstream.c (FT_Stream_ReadUShort, FT_Stream_ReadUOffset,
FT_Stream_ReadULong and their LE variants): Remove unnecessary
initialization and slightly refactor.
(FT_Stream_GetByte, FT_Stream_ReadByte): Rename to return unsigned
value and align with sister functions.
* include/freetype/internal/ftstream.h (FT_Stream_GetByte,
FT_Stream_ReadByte): Update prototypes and caller macros.
2021-09-02 Alexei Podtelezhnikov <apodtele@gmail.com>
s/0/NULL/ where appropriate.
2021-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/windows/ftsystem.c (FT_Stream_Open): Fix double-close.
2021-08-30 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Reduce shift in multiply-shift optimization.
* src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): Reduce shift.
Smaller shifts that keep the division operands of FT_UDIVPREP within
32 bits result in slightly faster divisions, which is noticeable in
the overall performance. The loss of precision is tolerable until the
divisors (the components dx and dy) approach 32 - PIXEL_BITS. With
PIXEL_BITS = 8, this corresponds to 65,000 pixels or the bitmap size
that we refuse to render anyway.
Using `ftbench -p -s60 -t5 -bc timesi.ttf`,
Before: 8.52 us/op
After: 8.32 us/op
2021-08-28 Werner Lemberg <wl@gnu.org>
[truetype] Fix compilation if !TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
* src/truetype/ttgxvar.c (tt_cvt_ready_iterator): Compile function
conditionally.
(tt_face_vary_cvt) [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Add code.
Fixes#1091.
2021-08-27 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Revise SSE2 settings.
* builds/windows/vc2010/freetype.vcxproj [x64]: Remove explicit SSE2.
* builds/windows/visualc/freetype.vcproj [Win32]: Add explicit SSE2.
2021-08-27 Ben Wagner <bungeman@chromium.org>
[smooth] Detect SSE2 with MSVC for x86
MSVC does not set `__SSE2__`. Instead one must check whether `_M_IX86_FP` is
defined and greater than or equal to 2.
* src/smooth/ftgrays.c (FT_SSE2): New macro.
Use it where appropriate.
2021-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
Expand comment (cont'd).
2021-08-26 Alexei Podtelezhnikov <apodtele@gmail.com>
Expand comment.
2021-08-24 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (gray_render_conic): Refactor redundancy.
2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[truetype] Fix for the family name shorter than 8 characters.
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag):
If the family name to be checked is shorter than 8 characters,
do not check its syntax.
2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[truetype] Simplify `trick_names'.
* src/truetype/ttobjs.c (tt_check_trickyness_family): For the case
that the beginning part of a long tricky family name is already
registered as another tricky family name, no need to double-check
the longer one. Such long tricky family names are removed from
the `trick_names'.
2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[truetype] Add 2 tricky font names.
Additional fix for the issue #1087.
* src/truetype/ttobjs.c (tt_check_trickyness_family): Add 2 tricky
font names reported in #1087.
2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[truetype] New function to skip the randomization tag.
* src/truetype/ttobjs.c (tt_skip_pdffont_random_tag):
New function to skip the randomization tag in the names of the
fonts embedded in a PDF. It is used by tt_check_trickyness_family(),
to keep from mistaking "DLC" in the randomization tag as a
tricky font name. See discussion in:
https://lists.nongnu.org/archive/html/freetype-devel/2021-02/msg00002.html
For technical detail about the randomization tag, please find
PDF Reference 5.5.3 "Font Subsets". Thanks to Justyna Wawrzynska
for pointing out the issue caused by the randomization tag.
2021-08-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
[truetype] Add checksums for 2 tricky fonts.
Thanks to Ting717 for providing sample PDF. Fixes#1087.
* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Add
checksums for 2 tricky fonts `DFHei-Bd-WIN-HK-BF' and
`DFMing-Md-WIN-HK-BF'.
2021-08-23 Alexei Podtelezhnikov <apodtele@gmail.com>
Whitespace formatting.
2021-08-22 Alexei Podtelezhnikov <apodtele@gmail.com>
Decorate const arguments.
* src/base/ftglyph.c (FT_Glyph_Transform, FT_Glyph_To_Bitmap): Do it.
* include/freetype/ftglyph.h (FT_Glyph_Transform, FT_Glyph_To_Bitmap):
Do it.
2021-08-21 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Clean up the null cell usage.
Put the null cell at the end of the pool and store it explicitly so that
we can use it as both the limit and the dumpster.
* src/smooth/ftgrays.c (gray_TWorker): Store the last `cell_null` and
remove unnecesary fields.
(NULL_CELL_PTR, CELL_IS_NULL): Remove in favor of explicit `cell_null`.
(gray_dump_cells, gray_set_cell, gray_sweep{,_direct}): Update callers.
(gray_convert_glyph_inner): Trace remaining cells (oh well).
(gray_convert_glyph): Set up `cell_null` and slightly improve the pool
management.
2021-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Restore quiet no-op rendering of bitmap glyphs.
Fixes#1076.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Discard an error when
rendering a bitmap glyph.
2021-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Fortify 64-bit algorithm.
* src/smooth/ftgrays.c (FT_UDIVPREP, FT_UDIV): s/long/FT_Int64/ and
s/unsigned long/FT_UInt64/.
(gray_render_line): Adjust a critical variable type.
2021-08-20 Carlo Bramini <carlo.bramix@libero.it>
* builds/windows/ftsystem.c (FT_Stream_Open): Support legacy Windows.
2021-08-20 Alexei Podtelezhnikov <apodtele@gmail.com>
Determine `long long` availability based on its size.
MSVC, for example, used `long long` even without full C99 support.
* include/freetype/config/ftstdlib.h: Check if `long long` limits are
defined in <limits.h>.
* include/freetype/config/integer-types.h: Check `long long` size and
use it to typedef FT_Int64.
2021-08-19 Dominik Röttsches <drott@chromium.org>
[sfnt] Fix format expectation for `COLR` v1 ClipList
* src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Change ClipList
format expectation to 1 instead of 0 to make it compliant with the
latest spec.
2021-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
Readily use `long long` as a 64-bit type in C99 mode.
* include/freetype/config/integer-types.h (FT_INT64):
FT_CONFIG_OPTION_FORCE_INT64 is no longer required to use `long long`.
2021-08-19 Alexei Podtelezhnikov <apodtele@gmail.com>
Use FT_INT64 instead of FT_LONG64.
* include/freetype/config/integer-types.h: Remove synonymous FT_LONG64.
* include/freetype/internal/ftcalc.h: s/FT_LONG64/FT_INT64/.
* src/base/ftcalc.c: Ditto.
* src/base/fttrigon.c: Ditto.
* src/smooth/ftgrays.c: Ditto.
2021-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Do not set CharacterSet for VC++.
* builds/windows/vc2010/freetype.vcxproj: s/Unicode/NotSet/.
* builds/windows/visualc/freetype.vcproj: s/"1"/"0"/.
2021-08-18 Werner Lemberg <wl@gnu.org>
* src/sdf/ftsdf.c (get_control_box): Fix compiler warning.
2021-08-18 Werner Lemberg <wl@gnu.org>
[base] Fix ppem size overflow.
Fixes#1086.
* src/base/ftobjs.c (FT_Request_Metrics): Add return value.
Check whether ppem values fit into unsigned short values.
(FT_Request_Size): Updated.
* include/freetype/internal/ftobjs.h: Updated.
* src/cff/cffobjs.c (cff_size_request), src/cid/cidobjs.c
(cid_size_request), src/truetype/ttdriver.c (tt_size_request),
src/type1/t1objs.c (T1_Size_Request): Updated.
2021-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/windows/ftsystem.c (FT_Stream_Open): Cast to remove warning.
2021-08-18 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/windows/ftsystem.c (FT_Stream_Open): Support UNICODE compilation.
2021-08-09 Werner Lemberg <wl@gnu.org>
* src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Minor fix.
2021-08-09 Dominik Röttsches <drott@chromium.org>
[sfnt] Add missing blend mode 'plus' to 'COLR' v1.
* include/freetype/ftcolor.h (FT_Composite_Mode): Add missing blend mode
'plus' after it was added to the spec.
2021-08-08 Werner Lemberg <wl@gnu.org>
include/freetype/freetype.h (FT_Encoding): Improve documentation.
Based on a suggestion by Antony Lee <anntzer.lee@gmail.com>.
2021-08-07 Werner Lemberg <wl@gnu.org>
[smooth] Avoid integer overflow.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36243
* src/smooth/ftgrays.c(ADD_LONG, SUB_LONG, MUL_LONG, NEG_LONG)
[STANDALONE_]: Removed, unused.
(ADD_INT) [STANDALONE_]: New macro.
(FT_INTEGRATE): Use ADD_INT.
2021-08-07 Dominik Röttsches <drott@chromium.org>
[sfnt] Add API for retrieving a 'COLR' v1 'ClipBox' table.
The optional 'COLR' v1 glyph-specific clip box helps upstream graphics
libraries allocate a sufficiently large bitmap for a glyph without having to
traverse the glyph graph for that. See
https://github.com/googlefonts/colr-gradients-spec/issues/251
for background on the introduction of this specification change.
* include/freetype/ftcolor.h (FT_ClipBox): New structure.
(FT_Get_Color_Glyph_ClipBox): New function declaration.
* include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_ClipBox_Func):
New function type.
(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Use it.
* src/base/ftobjs.c (FT_Get_Color_Glyph_ClipBox): New function to link API
with SFNT implementation.
* src/sfnt/sfdriver.c (sfnt_interface): Updated.
* src/sfnt/ttcolr.c (Colr): New field `clip_list`.
(tt_face_load_colr): Parse global clip list offset.
(tt_face_get_color_glyph_clipbox): New function to find the clip box for a
glyph id from the clip list array.
* src/sfnt/ttcolr.h: Updated.
2021-08-06 Werner Lemberg <wl@gnu.org>
[smooth] Fix left shifts of negative numbers.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36241
* src/smooth/ftgrays.c (LEFT_SHIFT): New macro.
(gray_render_conic) [BEZIER_USE_DDA]: Use it.
2021-08-02 Werner Lemberg <wl@gnu.org>
* meson.build: Fix zlib support.
This commit synchronizes zlib support with both autotools and cmake: If no
external zlib is found (or intentionally disabled on the command line), use
the internal zlib by undefining `FT_CONFIG_OPTION_SYSTEM_ZLIB` without
modifying `FT_CONFIG_OPTION_USE_ZLIB`.
Also improve summary output.
Problem reported by Moazin.
2021-08-02 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Fix out-of-range-access.
* src/sdf/ftbsdf.c (first_pass, second_pass): Fix range during forward pass.
Otherwise the index goes out of range for the last column.
Fixes issue #1077.
2021-08-02 Anuj Verma <anujv@iitbhilai.ac.in>
Fix invalid memory access in `bsdf` rasterizer.
Do not generate SDF from bitmap if the `FT_GLYPH_OWN_BITMAP` flag is not
set. In some cases the bitmap buffer is freed but still points to a valid
address; to handle those cases check the flag before accessing the memory.
* src/sdf/ftsdfrend.c (ft_bsdf_render): Handle the above case.
Also, return an error message if the bitmap's rows/pitch is invalid,
otherwise `slot->buffer` might be assigned to some invalid memory location.
(ft_sdf_render): Same as above.
Plus, move the outline back to original state after rasterization and not if
any error occurs.
2021-07-29 Heiko Becker <heirecka@exherbo.org>
* meson.build: Honor `--includedir` instead of hard-coding 'include'.
2021-07-29 Werner Lemberg <wl@gnu.org>
src/sfnt/ttcolr.c: Minor formatting.
2021-07-29 Dominik Röttsches <drott@chromium.org>
[sfnt] 'COLR' v1 PaintSweepGradient spec update
* src/sfnt/ttcolr.c (read_paint): PaintSweepGradient follows other
spec changes and now has the angles specified as F2DOT14, reflect
that in the implementation.
* include/freetype/ftcolor.h (FT_PaintSweepGradient): Update
documentation.
2021-07-29 Dominik Röttsches <drott@chromium.org>
[sfnt] Retrieve affine matrix from offset in 'COLR' v1 parsing.
* src/sfnt/ttcolr.c (read_paint): Implement spec change where
affine transform matrix is now referenced by offset instead of
being placed inline in the PaintTransform table.
2021-07-29 Dominik Röttsches <drott@chromium.org>
[sfnt] 'COLR' v1 PaintSkew related spec updates
* src/sfnt/ttcolr.c (read_paint): Implement spec changes around
PaintSkew, PaintSkewAroundCenter. Update parsing to read shorter
values as changed in the spec.
* include/freetype/ftcolor.h (FT_PaintSkew): Update documentation.
2021-07-29 Dominik Röttsches <drott@chromium.org>
[sfnt] PaintRotate/PaintRotateAroundCenter spec updates
* src/sfnt/ttcolr.c (read_paint): Implement spec change where
PaintRotate and PaintRotateAroundCenter were split for a more
compact format definition. Update parsing to read shorter values
as changed in the spec.
* include/freetype/ftcolor.h (FT_PaintRotate): Update documentation.
2021-07-29 Dominik Röttsches <drott@chromium.org>
[sfnt] 'COLR' v1 PaintTranslate and PaintScale precision
* src/sfnt/ttcolr.c (read_paint): Implement spec changes in
PaintTranslate and PaintScale and friends. Update parsing to read
new shorter values.
2021-07-29 AnuthaDev <anuthadev@gmail.com>
README.git: Add Code of Conduct.
2021-07-25 Werner Lemberg <wl@gnu.org>
ChangeLog housekeeping.
Archive old `ChangeLog` file.
We no longer write ChangeLog entries manually; instead, the file will be
created from commit messages (which should be formatted in GNU's ChangeLog
style) by a call to
gitlog-to-changelog --format='%B%n'
or something similar (this script is part of the 'gnulib' repository).
2021-07-24 Werner Lemberg <wl@gnu.org>
Fix some `cppcheck` warnings.
* src/bzip2/ftbzip2.c (ft_bzip2_file_skip_output), src/gzip/ftgzip.c
(ft_gzip_file_skip_output): Reduce scope of `delta`.
* src/psaux/psintrp.c, src/psaux/psintrp.h (cf2_interpT2CharString): Add
`const` to `buf` parameter.
* src/raster/ftraster.c (DelOld): Add `const` to `profile` parameter.
(Vertical_Sweep_Span): Reduce scope of `target`.
(FT_Outline_Get_CBox): Reduce scope of `xMin`, `xMax`, `yMin`, `yMax`.
* src/smooth/ftgrays.c (gray_render_conic): Reduce scope of `split`.
(gray_sweep, gray_sweep_direct): Reduce scope of `area`.
* src/tools/apinames.c (names_dump) <OUTPUT_WATCOM_LBC>: Reduce scope of
`temp`.
2021-07-24 AnuthaDev <anuthadev@gmail.com>
* .gitlab-ci.yml: Fixed cmake build, using correct options.
2021-07-24 AnuthaDev <anuthadev@gmail.com>
* CMakeLists.txt: Make `cmake` handle disabled dependencies correctly.
Include 'CMakeDependentOption'.
Replace `FT_WITH_XXX` options with `FT_DISABLE_XXX` and `FT_REQUIRE_XXX`
pairs. Update option logic accordingly.
Fixes#1066.
2021-07-24 Ben Wagner <bungeman@chromium.org>
[autofit] Split `afwrtsys.h`.
The header file `afwrtsys.h` has two distinct functions: to include the
required writing system headers and also to generate code for each writing
system. At each current use site only one or the other is used, with
various macro trickery selecting one or the other. Split this header into
`afws-decl.h` for the required writing system declarations and `afws-iter.h`
for iterating over the writing systems to generate code.
The motivation for this change is that the Visual C++ compiler treats the
standard include guard idiom like `#pragma once` 'if no non-comment code or
preprocessor directive comes before or after the standard form of the
idiom'. It appears to check this after macro expansion, so if
`WRITING_SYSTEM` expands to empty the bottom of `afwrtsys.h` is empty and
looks like the standard include guard idiom which is treated like `#pragma
once`, so subsequent inclusion of `afwrtsys.h` is elided.
Fixes#1075.
* src/autofit/afglobal.c (af_writing_system_classes), src/autofit/aftypes.h
(AF_WritingSystem), src/autofit/rules.mk (AUTOF_DRV_H): Updated.
* src/autofit/afwrtsys.h: Split into...
* src/autofit/afws-decl.h, src/autofit/afws-iter.h: New files.
2021-07-18 Werner Lemberg <wl@gnu.org>
* Version 2.11.0 released.
==========================
Tag sources with `VER-2-11-0'.
* docs/VERSION.TXT: Add entry for version 2.11.0.
* docs/CHANGES: Updated.
* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html,
builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html,
builds/wince/vc2008-ce/index.html, docs/freetype-config.1:
s/2.10.4/2.11.0/, s/2104/2110/.
* include/freetype/freetype.h (FREETYPE_MINOR): Set to 11.
(FREETYPE_PATCH): Set to 0.
* builds/unix/configure.raw (version_info): Set to 24:0:18.
* CMakeLists.txt (VERSION_MINOR): Set to 11.
(VERSION_PATCH): Set to 0.
* builds/toplevel.mk (dist): Ignore more git-related files.
2021-07-17 David Turner <david@freetype.org>
* src/smooth/ftgrays.c: Fix compilation if `FT_LONG64` is undefined.
The code assumed that if `__SSE2__` is defined, then 64-bit integer
types are available. This is not the case apparently for certain
multilib compiler targets like 'x86_32.x86' used by Gentoo.
This patch fixes the issue by disabling the special code path when
64-bit integer types are not available.
Fixes#1071.
2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
[tests] Allow arbitrary build directories.
* tests/issue-1063/main.c (main): I am building with a build
directory that is not directly inside the source tree, so the path
`../tests/data/As.I.Lay.Dying.ttf` does not resolve to the test
input file. This change passes the test data directory as an
environment variable to allow arbitrary build directories.
* tests/meson.build: Updated.
2021-07-16 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
* tests/issue-1063/main.c (main): Fix uninitialized variable.
I tried running `meson test` but the test just crashed and gdb
reported that the face argument to `FT_Get_Char_Index` was nonsense.
With this change the test prints 'Could not open file: ' as it
should.
2021-07-16 Werner Lemberg <wl@gnu.org>
[smooth] Minor fixes.
* src/smooth/ftgrays.c (gray_render_conic): Move variable and
structure declarations to beginning of function. Inspite of C99
compliance we still do this for the sake of backward compatibility.
This also avoids a shadowing declaration of `count`.
(gray_convert_glyph_inner): Fix typo.
2021-07-15 Ben Wagner <bungeman@chromium.org>
* src/smooth/ftgrays.c: Guard inclusion of `emmintrin.h`.
Guard inclusion of `emmintrin.h` with `#ifdef __SSE2__`. The gcc
version of this header, `xmmintrin.h`, and `mmintrin.h` check that
the appropriate defines are set before defining anything (are
internally guarded). However, the clang versions of these includes
are not internally guarded. As a result of this, externally guard
the inclusion of these headers.
2021-07-15 David Turner <david@freetype.org>
[smooth] Implement Bézier quadratic arc flattening with DDA.
Benchmarking shows that this provides a very slighty performance
boost when rendering fonts with lots of quadratic Bézier arcs,
compared to the recursive arc splitting, but only when SSE2 is
available, or on 64-bit CPUs.
On a 2017 Core i5-7300U CPU on Linux/x86_64:
ftbench -p -s10 -t5 -cb DroidSansFallbackFull.ttf
Before: 4.033 us/op (best of 5 runs for all numbers)
After: 3.876 us/op
ftbench -p -s60 -t5 -cb DroidSansFallbackFull.ttf
Before: 13.467 us/op
After: 13.385 us/op
* src/smooth/ftgrays.c (gray_render_conic): New implementation
based on DDA and optionally SSE2.
2021-07-15 David Turner <david@freetype.org>
[smooth] Minor speedup to smooth rasterizer.
This speeds up the smooth rasterizer by avoiding conditional
branches in the hot path.
- Define a fixed 'null cell', which will be pointed to whenever the
current cell is outside of the current target region. This avoids
a `ras.cell != NULL` check in the `FT_INTEGRATE` macro.
- Also use the null cell as a sentinel at the end of all `ycells`
linked-lists, by setting its x coordinate to `INT_MAX`. This
avoids a `if (!cell)` check in `gray_set_cell` as well.
- Slightly change the worker struct fields to perform a little less
operations during rendering.
Example results (on a 2013 Corei5-3337U CPU)
out/ftbench -p -s10 -t5 -bc DroidSansFallbackFull.ttf
Before: 5.472 us/op
After: 5.275 us/op
out/ftbench -p -s60 -t5 -bc DroidSansFallbackFull.ttf
Before: 17.988 us/op
After: 17.389 us/op
* src/smooth/ftgrays.c (grat_TWorker): Replace `num_cells` field with
`cell_free` and `cell_limit`.
(NULL_CELL_PTR, CELL_MAX_X_VALUE, CELL_IS_NULL): New macros.
(gray_dump_cells, gray_set_cell, gray_sweep, gray_sweep_direct,
gray_convert_glyph_inner, gray_convert_glyph): Updated.
2021-07-15 David Turner <david@freetype.org>
[tests] Rewrite download script in Python3.
This commit replaces the bash script with a Python script that does
the same work, plus avoiding to download anything if the files are
already installed with the right content.
We now use the first 8 bytes of each file's sha256 hash for the
digest.
* tests/scripts/download-test-fonts.sh: Removed.
* tests/scripts/download-test-fonts.py: New script.
* tests/README.md: Updated.
2021-07-15 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Support architectures where `long` is smaller than pointers.
I am currently trying to compile FreeType for CHERI-extended ISAs
(CHERI-RISC-V and Arm's Morello), but I am getting compiler warnings
from the `FT_UINT_TO_POINTER` macro. When compiling with the CHERI
Clang compiler, not using `uinptr_t` for casts between integers an
pointers results in the following `-Werror` build failures:
```
In file included from .../src/truetype/truetype.c:22:
.../src/truetype/ttgload.c:1925:22: error:
cast from provenance-free integer type to pointer type will
give pointer that can not be dereferenced
[-Werror,-Wcheri-capability-misuse]
node->data = FT_UINT_TO_POINTER( glyph_index );
^
.../include/freetype/internal/compiler-macros.h:79:34: note:
expanded from macro 'FT_UINT_TO_POINTER'
```
* include/freetype/internal/compiler-macros.h (FT_UINT_TO_POINTER):
The ISO C standard compliant fix for this would be to use
`uintptr_t` from `stdint.h`, but I am not sure if this is supported
by the minimum compiler version. Therefore, use the
compiler-defined `__UINTPTR_TYPE__` macro (supported in GCC 4.6+ and
Clang since about 3.0) before checking for `_WIN64` and falling back
to `unsigned long`.
2021-07-13 Oleg Oshmyan <chortos@inbox.lv>
[base] Fix `FT_Open_Face`'s handling of user-supplied streams.
This was already true (though undocumented) most of the time, but
not if `FT_NEW` inside `FT_Stream_New` failed or if the
`FT_OPEN_XXX` flags were bad.
Normally, `FT_Open_Face` calls `FT_Stream_New`, which returns the
user-supplied stream unchanged, and in case of any subsequent error
in `FT_Open_Face`, the stream is closed via `FT_Stream_Free`.
Up to now, however, `FT_Stream_New` allocates a new stream even if
it is already given one by the user. If this allocation fails, the
user-supplied stream is not returned to `FT_Open_Face` and never
closed. Moreover, the user cannot detect this situation: all they
see is that `FT_Open_Face` returns `FT_Err_Out_Of_Memory`, but that
can also happen after a different allocation fails within the main
body of `FT_Open_Face`, when the user's stream has already been
closed by `FT_Open_Face`. It is plausible that the user stream's
`close` method frees memory allocated for the stream object itself,
so the user cannot defensively free it upon `FT_Open_Face` failure
lest it ends up doubly freed. All in all, this ends up leaking the
memory/resources used by user's stream.
Furthermore, `FT_Stream_New` simply returns an error if the
`FT_OPEN_XXX` flags are unsupported, which can mean either an
invalid combination of flags or a perfectly innocent
`FT_OPEN_STREAM` on a FreeType build that lacks stream support.
With this patch, the user-supplied stream is closed even in these
cases, so the user can be sure that if `FT_Open_Face` failed, the
stream is definitely closed.
* src/base/ftobjs.c (FT_Stream_New): Don't allocate a buffer
unnecessarily.
Move error-handling code to make the control flow more obvious.
Close user-supplied stream if the flags are unsupported.
`FT_Stream_Open` always sets `pathname.pointer`, so remove the
redundant (re)assignment. None of the `FT_Stream_Open...` functions
uses `stream->memory`, so keep just one assignment at the end,
shared among all possible control flow paths.
('Unsupported flags' that may need a stream closure can be either an
invalid combination of multiple `FT_OPEN_XXX` mode flags or a clean
`FT_OPEN_STREAM` flag on a FreeType build that lacks stream
support.)
2021-07-13 Oleg Oshmyan <chortos@inbox.lv>
[base] Reject combinations of incompatible `FT_OPEN_XXX` flags.
The three modes are mutually exclusive, and the documentation of the
`FT_OPEN_XXX` constants notes this. However, there was no check to
validate this in the code, and the documentation on `FT_Open_Args`
claimed that the corresponding bits were checked in a well-defined
order, implying it was valid (if useless) to specify more than one.
Ironically, this documented order did not agree with the actual
code, so it could not be relied upon; hopefully, nobody did this and
nobody will be hurt by the new validation.
Even if multiple mode bits were allowed, they could cause memory
leaks: if both `FT_OPEN_STREAM` and `stream` are set along with
either `FT_OPEN_MEMORY` or `FT_OPEN_PATHNAME`, then `FT_Stream_New`
allocated a new stream but `FT_Open_Face` marked it as an 'external'
stream, so the stream object was never released.
* src/base/ftobjs.c (FT_Stream_New): Reject incompatible
`FT_OPEN_XXX` flags.
2021-07-12 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
* meson.build: Fix build for other UNIX systems (e.g., FreeBSD).
Without this change the build of `unix/ftsystem.c` fails because the
`ftconfig.h` header that defines macros such as `HAVE_UNISTD_H` and
`HAVE_FCNTL_H` is only being generated for Linux, macOS, and Cygwin
systems:
```
.../builds/unix/ftsystem.c:258:32: error:
use of undeclared identifier 'O_RDONLY'
file = open( filepathname, O_RDONLY );
```
Instead of hardcoding a list of operating systems for this check,
update the logic that decides whether to build the file and set a
boolean flag that can be checked instead.
2021-07-12 Werner Lemberg <wl@gnu.org>
[autofit] More clean-ups.
* src/autofit/afhints.h (AF_GlyphHintsRec): Remove the no longer
needed fields `xmin_delta` and `xmax_delta`.
* src/autofit/afhints.c (af_glyph_hints_reload),
src/autofit/afloader.c (af_loader_load_glyph): Updated.
2021-07-12 Werner Lemberg <wl@gnu.org>
Small clean-ups for the last few commits.
* include/freetype/fttrace.h (afwarp): Removed.
2021-07-12 David Turner <david@freetype.org>
Remove obsolete `AF_Angle` type and related sources.
* src/autofit/afangles.c: File removed. Functions related to
sorting moved to...
* src/autofit/afhints.c (af_sort_pos, af_sort_and_quantize_widths):
This file.
* src/autofit/afangles.h: File removed.
* src/autofit/aftypes.h: Updated.
* src/autofit/autofit.c: Updated.
* src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.
2021-07-12 David Turner <david@freetype.org>
Remove experimental auto-hinting 'warp' mode.
This feature was always experimental, and probably never worked
properly. This patch completely removes it from the source code,
except for a documentation block describing it for historical
purposes.
* devel/ftoption.h, include/freetype/config/ftoption.h: Remove
`AF_CONFIG_OPTION_USE_WARPER`.
* include/freetype/ftdriver.h: Document 'warping' property as
obsolete.
* src/autofit/afwarp.c, src/autofit/afwarp.h: Files removed.
* src/autofit/*: Remove any code related to warp mode.
2021-07-12 David Turner <david@freetype.org>
Remove experimental 'Latin2' writing system (`FT_OPTION_AUTOFIT2`).
This code has always been experimental and was never compiled anyway
(`FT_OPTION_AUTOFIT2` does not appear in `ftoption.h` or even any of
our build files).
* include/freetype/internal/fttrace.h (aflatin2): Removed.
* src/autofit/aflatin2.h, src/autofit/aflatin2.c: Files removed.
* src/autofit/afloader.c: Remove undocumented hook to activate
Latin2 system.
* src/autofit/afstyles.h: Remove `ltn2_dflt` style definition.
* src/autofit/afwrtsys.h: Remove `LATIN2` writing system definition.
* src/autofit/autofit.c: Updated.
2021-07-05 Werner Lemberg <wl@gnu.org>
* src/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix argument.
Reported by Hin-Tak.
2021-07-03 Werner Lemberg <wl@gnu.org>
* meson_options.txt: Sort alphabetically; no final full stops.
2021-07-01 Ben Wagner <bungeman@chromium.org>
* src/truetype/ttgxvar.c (tt_set_mm_blend): Test `coords`.
It is undefined behavior to pass `NULL` to `memcpy`. `coords' is
passed to `memcpy` but `TT_Get_MM_Blend` and `TT_Get_Var_Design`
explictly call `tt_set_mm_blend` with `coords` as `NULL`. In
addition, `TT_Set_MM_Blend` has a similar possible issue.
2021-06-30 Dominik Röttsches <drott@chromium.org>
[sfnt] Support PaintScale in 'COLR' v1 parsing.
* include/freetype/ftcolor.h (FT_PaintFormat): Renumber values, add
`FT_COLR_PAINTFORMAT_SCALE`.
(FT_PaintScale): New structure to represent 'PaintScale*' tables.
(FT_COLR_Paint): Updated.
* src/sfnt/ttcolr.c (FT_PaintFormat_Internal): New enumeration.
(read_paint): Parse 'PaintScale' and friends.
2021-06-30 Dominik Röttsches <drott@chromium.org>
[sfnt] Handle fonts without layer list in 'COLR' v1.
'COLR' v1 fonts do not necessarily need to have a layer list; for
this reason, 'fontTools' recently started generating fonts in a way
that drops the layer list if there are no layers in it. This
results in the layer list offset becoming zero, which FreeType
treated as an invalid table. Fix that and handle the case for layer
list offset being 0. This slightly changes how we need to calculate
the starting offset for paints.
* src/sfnt/ttcolr.c (tt_face_load_colr): Handle case of layer list
offset being zero without outright rejecting table.
2021-06-30 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/raster/ftraster.c (Render_Single_Pass): Simplify `band_stack'.
2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
[raster] Do not skip the second pass without dropout control.
The second pass also fixes horizontal lines through the pixel centers.
* src/raster/ftraster.c (black_TWorker): Do not use `second_pass'.
(Render_Glyph): Skip the second pass only with the appropriate flag.
2021-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
[raster] Handle sub-band stack locally.
* src/raster/ftraster.c (black_TWorker): Move `band_stack' from here..
(Render_Single_Pass): ... to here and accept limit arguments.
(Render_Glyph): Updated.
2021-06-25 Anurag Thakur <anuthadev@gmail.com>
[CI] Introduce linux CI and refactor job names.
* .gitlab-ci.yml: Added jobs for building freetype on linux.
2021-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
[raster] Handle Bézier stack locally.
* src/raster/ftraster.c (black_TWorker): Move `arcs' from here...
(Conic_To, Cubic_To): ... to here to tighten their scope.
(Bezier_Up, Bezier_Down): ... Take the current `arc' argument.
2021-06-28 Dominik Röttsches <drott@chromium.org>
[sfnt] Improve paint limit checks
Paint tables can appear before the `base_glyphs_v1` offset if the
font is produced with the layer list before the base glyph list. In
this case paint tables can occur after the layer list but before the
base glyph list. Checks in the 'COLR' v1 code were rejecting fonts
with this layout. Improve these checks by calculating a minimum
offset after which paint tables can occur and use that in safety
checks.
* src/sfnt/ttcolr.c (Colr, tt_face_load_colr): Declare
`paint_start_v1` and calculate that as the minimum of the end of
layer list and base glyph list.
(get_child_table_pointer, read_paint, tt_face_get_paint_layers):
Use that in safety checks.
2021-06-28 Alexei Podtelezhnikov <apodtele@gmail.com>
[raster] Clean up vertical sweep.
* src/raster/ftraster.c (black_TWorker): Replace the current line
offset with the pointer and drop the increment.
(Function_Sweep_Init): Take values as arguments instead of pointers.
(Vertical_Sweep_*, Horizontal_Sweep_Init, Draw_Sweep): Updated.
2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[raster] Make `band_top' local variable.
* src/raster/ftraster.c (black_TWorker): Move `band_top' from here...
(Render_Single_Pass): ... to here, and refactor.
(Render_Glyph): Updated.
2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[raster] Adjust sub-band bisecting limits.
We can bisect a band until it is just a single scan line. This might
be slow and cause time-outs but if we need to impose limits it should
be elsewhere.
* src/raster/ftraster.c (Render_Single_Pass): Tweak sub-banding.
2021-06-25 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/raster/ftraster.c (Render_Single_Pass): Remove dead code.
2021-06-25 Werner Lemberg <wl@gnu.org>
[base] Add trace level to logging output.
Some practical debugging work has shown that displaying level X of
an `FT_TRACEX` macro in the output of `FT2_DEBUG="... -v"` would be
very helpful to find out which trace level should be selected. As
an example, we now get output like
```
[ttobjs:2] TTF driver
[ttobjs:2] SFNT driver
[sfobjs:2] not a font using the SFNT container format
[t1objs:2] Type 1 driver
[stream:7] FT_Stream_EnterFrame: 14 bytes
```
* include/freetype/internal/ftdebug.h (FT_LOGGING_TAGX): New macro.
(FT_LOG): Use it to add the trace level to the logging tag.
* include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH):
Adjust.
* docs/DEBUG: Updated.
2021-06-24 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth, raster] Fix up and align error codes.
FT_Render_Glyph picked up FAILURE or 1 returned from the raster
function, which became a confusing error code. Instead, return
Raster_Overflow in the unlikely event that banding does not help or
another meaningful error.
* src/smooth/ftgrays.c (gray_convert_glyph_inner, gray_convert_glyph):
Use Raster_Overflow when the rendering pool is exhausted and return it
if banding does not help.
(gray_raster_render): Use Smooth_Err_Ok.
* src/raster/ftraster.c (Render_Single_Pass): Return Raster_Overflow
if banding does not help or another error code.
2021-06-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth, raster] Remove synonymous error macros.
* src/smooth/ftgays.c [STANDALONE_]: s/ErrRaster_/Smooth_Err_/.
(gray_convert_glyph_inner): Updated accordingly.
* src/raster/ftraster.c [STANDALONE_]: Do not abbreviate error macros.
(New_Profile, End_Profile, Insert_Y_Turn, Line_Up, Bezier_Up,
Decompose_Curve, Draw_Sweep, Render_Single_Pass, ft_black_render):
Updated accordingly.
2021-06-22 Dominik Röttsches <drott@chromium.org>
[sfnt] s/PaintTransformed/PaintTransform/, s/transformed/transform/.
* include/freetype/ftcolor.h (FT_PaintTransformed, FT_PaintFormat,
FT_COLR_Paint): Do it to make it harmonize with other names such as
'PaintTranslate'.
* src/sfnt/ttcolr.c (read_paint, tt_face_get_paint): Ditto.
2021-06-22 Dominik Röttsches <drott@chromium.org>
Move 'COLR' API to `ftcolor.h`.
* include/freetype/freetype.h: Cut section layer managament
containing 'COLR' v0 and v1 API and move it to `ftcolor.h` as
requested by Werner on freetype-devel.
* include/freetype/ftcolor.h: Paste that section.
2021-06-19 Werner Lemberg <david@freetype.org>
[truetype] Fix integer overflow.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35312
* src/truetype/ttinterp.c (Ins_JMPR): Use `ADD_LONG`.
2021-06-19 Werner Lemberg <david@freetype.org>
[autofit] Prevent hinting if there are too many segments.
This speeds up handling of broken glyphs.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=35309
* src/autofit/aflatin.c (af_latin_hints_compute_segments): Implement
it.
2021-06-18 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sdf/ftsdfrend.c (ft_(b)sdf_render): Do not FT_ERROR routinely.
2021-06-16 David Turner <david@freetype.org>
[autofit] Fix return value of `FT_Load_Glyph`.
* src/autofit/afglobal.c (af_face_globals_get_metrics): The issue is
that `style_metrics_init` sometimes returns -1 without clearing
`error`. While looping to `Again`, the next operation is
successful, but -1 is still returned by the function. The fix is to
set `error` to 0 appropriately.
Fixes#1063.
2021-06-15 David Turner <david@freetype.org>
[meson] Add first regression test to FreeType.
* tests/README.md: New file that explains how to build and run the
tests with the Meson build.
* tests/scripts/download-test-fonts.sh: New bash script to download
test font files to the `tests/data` folder.
* meson.build, meson_options.txt: Add 'tests' option to enable
building and running the test programs (disabled by default).
* tests/meson.build: New file.
* tests/issue-1063/main.c: Simple regression test to exhibit issue
1063.
* .gitignore: Ignore the content of the `tests/data` folder for
now.
2021-06-12 Alexei Podtelezhnikov <apodtele@gmail.com>
[type42] Fix new memory leak.
We need to inverse inheritance of FT_GlyphSlot_Internal so that we
have a chance to free the rendered bitmap from the parent slot.
* src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts
of the child `ttslot' and replace it with the parent structure.
(T42_GlyphSlot_Done): Updated accordingly.
2021-06-12 Werner Lemberg <wl@gnu.org>
[psaux] Fix another assertion.
* src/psaux/psintrp.c (cf2_interpT2CharString)
<cf2_escCALLOTHERSUBR>: Convert assertion into error, since the
problem can happen with invalid user input.
Test case is file
fuzzing/corpora/legacy/oss-fuzz/5754332360212480-unknown-read
in the `freetype2-testing` repository.
2021-06-12 Werner Lemberg <wl@gnu.org>
[psaux] Fix assertions.
* src/psaux/pshints.c (cf2_hintmap_adjustHints): Check for overflow
before emitting an assertion error.
Test case is file
fuzzing/corpora/legacy/oss-fuzz/4594115297673216-integer-overflow
in the `freetype2-testing` repository.
2021-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/truetype/ttinterp.c (TT_RunIns): Optimize tracing.
2021-06-09 Alexei Podtelezhnikov <apodtele@gmail.com>
[sdf] Fix SDF positioning.
* src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Add padding to
`bitmap_top' and `bitmap_left'.
* sdf/sdf/ftsdf.c (sdf_generate_with_overlaps): Fix VC++ warning.
2021-06-08 Werner Lemberg <wl@gnu.org>
Fix 'devel' build for 'COLR' v1.
* devel/ftoption.h: Synchronize with
`include/freetype/config/ftoption.h`.
2021-06-08 Werner Lemberg <wl@gnu.org>
[sfnt] Sanitize cmap4 table better.
Fixes#1062.
* src/sfnt/ttcmap.c (tt_cmap4_validate): Handle a too-small value of
`length` gracefully.
2021-06-08 Dominik Röttsches <drott@chromium.org>
[sfnt] Pointer validity check when reading 'COLR' v1 layers
* src/sfnt/ttcolr.c (tt_face_get_paint_layers): In addition to the
existing sanity checks, ensure that the pointer to the layer to be
read is within the 'COLR' v1 table.
2021-06-08 Werner Lemberg <wl@gnu.org>
* src/sdf/ftsdfcommon.c: Fix inclusion of header files.
2021-06-08 Werner Lemberg <wl@gnu.org>
[sdf] Make `make multi` work.
* src/sdf/ftsdf.c: Include `ftbitmap.h`.
* src/sdf/ftsdfcommon.h: Move function bodies to `ftsdfcommon.c`.
Include `ftobjs.h` to get definitions of `FT_LOCAL` and friends.
* src/sdf/ftsdfcommon.c: New file.
* src/sdf/rules.mk, src/sdf/sdf.c: Updated.
2021-06-08 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Use 8 bits for final SDF output instead of 16bits.
Since 8-bits is enough to represent SDF data we no longer require
16-bits for this purpose. Also, we now normalize the output data
to use the entire 8-bit range efficiently. For example: if we use
3.5 format with a spread of 1 we basically only use the starting
5-bits. By normalizing we can use the entire 8-bit range.
* include/freetype/freetype.h (FT_Render_Mode): Updated description
for `FT_RENDER_MODE_SDF` regarding this change.
* include/freetype/ftimage.h (FT_Pixel_Mode): Removed
`FT_PIXEL_MODE_GRAY16` since no longer required.
* include/freetype/fttypes.h (FT_F6Dot10): Removed since no longer
required.
* src/sdf/ftsdfrend.c (ft_sdf_render, ft_bsdf_render): Allocate 8-bit
bitmap instead of 16-bit buffer.
* src/sdf/ftsdfcommon.h (map_fixed_to_sdf): Added function to convert
16.16 distance value to our desired format.
* src/sdf/ftsdf.c (sdf_generate_with_overlaps,
sdf_generate_bounding_box): Use the new `map_fixed_to_sdf` function
and also use 8-bit output buffer.
* src/sdf/ftbsdf.c (finalize_sdf): Output to a 8-bit buffer instead
of 16-bit buffer.
2021-06-02 Ben Wagner <bungeman@chromium.org>
Werner Lemberg <wl@gnu.org>
[sfnt] Fix fallout from 2021-05-29 change.
* src/sfnt/ttcolr.c (find_base_glyph_record,
find_base_glyph_v1_record): Adjust binary search.
Needs to be updated with change to unsigned.
2021-06-02 Werner Lemberg <wl@gnu.org>
* src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix tracing.
Problem reported by Alexei.
2021-06-02 Werner Lemberg <wl@gnu.org>
[psaux] Fix MSVC compiler warnings.
* src/psaux/afmparse.c (afm_parse_track_kern, afm_parse_kern_pairs):
Add cast.
2021-05-29 Werner Lemberg <wl@gnu.org>
Fix compilation errors and (some) warnings for clang++.
* src/autofit/afmodule.c (AF_GlyphHintsRec): Make it static.
* src/cache/ftcache.c (FTC_Cache_NewNode), src/cache/ftcsbits.c
(ftc_snode_compare): Remove semicolon.
* src/cff/cffparse.c (cff_parser_run): Add `break` statement.
* src/cid/cidload.c (cid_hex_to_binary): Add cast.
* src/sdf/ftbsdf.c (CHECK_NEIGHBOR): Use `do {} while(0)` loop.
(bsdf_init_distance_map, finalize_sdf, bsdf_raster_render): Add
casts.
* src/sdf/ftsdf.c (sdf_generate_bounding_box,
sdf_generate_with_overlaps): Ditto.
* src/sdf/ftsdfcommon.h (square_root): Ditto.
* src/sdf/ftsdfrend.c (sdf_property_get, ft_sdf_render,
ft_bsdf_render): Ditto.
* src/sfnt/ttcolr.c (find_base_glyph_record,
find_base_glyph_v1_record): Fix variable signedness.
(read_color_line): Add cast.
(read_paint): Add casts.
Fix signedness issue.
(tt_face_get_colorline_stops) Fix signedness issues.
* src/sfnt/ttpost.c (load_format_20): Add casts.
* src/truetype/ttsubpix.c (TWEAK_RULES, TWEAK_RULES_EXCEPTIONS):
Remove final semicolons.
2021-05-29 Werner Lemberg <wl@gnu.org>
[build] Allow overriding of `ANSIFLAGS` for GNU make build.
* builds/*: Implement it.
2021-05-27 Alexei Podtelezhnikov <apodtele@gmail.com>
[type42] Fix auto-hinting.
The autohinter could not access the base (unscaled) outline in the
child TrueType glyph slot. We now share the internal parts between
the parent and child glyph slots. Fixes#1057.
* src/type42/t42objs.c (T42_GlyphSlot_Init): Remove the internal parts
of `T42_GlyphSlot' and replace it with the child TrueType structure.
(T42_GlyphSlot_Done): Updated accordingly.
2021-05-25 Werner Lemberg <wl@gnu.org>
[psaux] Guard and trace AFM kern data allocation.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=31543
* include/freetype/internal/fttrace.h: Add 'afmparse' trace
component.
* src/psaux/afmparse.c (FT_COMPONENT): Define.
(afm_parse_track_kern, afm_parse_kern_pairs): Protect against
allocations bombs.
Add tracing.
(afm_parse_kern_data): Don't allow multiple kern data sections.
2021-05-23 Alexei Podtelezhnikov <apodtele@gmail.com>
* meson.build (ft2_public_headers): Add missing `ftcid.h'.
Fixes#1058.
2021-05-20 Alexei Podtelezhnikov <apodtele@gmail.com>
[type42] Avoid some memory zeroing.
* src/type42/t42objs.c (T42_Open_Face): Tweak allocation macro.
* src/type42/t42parse.c (t42_parse_sfnts): Ditto.
2021-05-19 Nikolaus Waxweiler <madigens@gmail.com>
[CMake] Update dependency finders.
1. Fixes CMake using any found HarfBuzz version lower than the minimum
required. This is based on HALX99's merge request at
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/31
2. Update FindHarfBuzz.cmake from
https://github.com/WebKit/WebKit/blob/1ce32454/Source/cmake/FindHarfBuzz.cmake
and guard post-CMake-3.1 features to keep the minimum version unchanged
3. Update FindBrotliDec.cmake to stop the warnings, based on what
https://github.com/google/woff2/blob/a0d0ed7d/cmake/FindBrotliDec.cmake
is doing
* CMakeLists.txt, builds/cmake/FindHarfBuzz.cmake: Implement 1 and 2.
* builds/cmake/FindBrotliDec.cmake: Implement 3.
2021-05-19 Ben Wagner <bungeman@chromium.org>
[gzip] Use exact type for `ft_gzip_alloc` and `ft_gzip_free`.
While a function pointer may be cast to another function pointer
type, it is required to cast the function pointer back to the
original function pointer type before calling it. If a parameter is
a pointer the exact pointer type is required. Using a pointer to a
different underlying type is technically undefined behavior. The
wrapper functions `ft_gzip_alloc` and `ft_gzip_free` took
`FT_Memory` (a `FT_MemoryRec_*`) instead of `voidpf` (`void*`), so
when gzip calls these callbacks through `alloc_func` or `free_func`
it invokes undefined behavior. On most platforms this works out as
expected, but newer undefined behavior detectors and targets like
wasm can detect this and will produce an error.
* src/gzip/ftgzip.c (ft_gzip_alloc, ft_gzip_free): Update signatures
to exactly match `alloc_func` and `free_func`, respectively.
Internally, cast the `void*` opaque pointer to `FT_Memory`.
2021-05-18 Alexei Podtelezhnikov <apodtele@gmail.com>
Prioritize the anti-aliasing renderer module.
* modules.cfg: Reorder the renderers.
* include/freetype/config/ftmodule.h: Ditto.
2021-05-16 Alexei Podtelezhnikov <apodtele@gmail.com>
[sfnt] Additional guards on the POST table.
Fixes timeout (#1055) analyzed by Ben Wagner, reported as
https://crbug.com/1194092
* src/sfnt/ttload.c (tt_face_load_post): Check POST format.
* src/sfnt/sfobjs.c (sfnt_load_face): Synthesize the missing unicode
charmap only if the glyph names exist.
* src/psnames/psmodule.c (ps_unicode_value): Short cut ".notdef" and
".null".
2021-05-13 Daniel McArdle <dmcardle@chromium.org>
[psaux] Use doubling allocation strategy for CF2_ArrStack.
Fixes timeout reported as
https://crbug.com/1206181
* src/psaux/psarrst.c (cf2_arrstack_{push,init}): Implement it.
* src/psaux/psarrst.h (CF2_ArrStackiRec): Drop `chunk'.
2021-05-12 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (FT_MAX_GRAY_SPANS): Increase from 10 to 16.
Ten was barely enough for two slanted stems. Sixteen can actually fit
a bit more complicated scanlines.
2021-05-11 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (FT_GRAY_SET): Adjust for better code.
2021-05-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Faster bitmap sweeping.
Selecting the fill rule or checking the direct mode each time we call
`gray_hline' is sub-optimal. This effectively splits the direct mode
into a separate code path while inlining `gray_hline' and saving 5-7%
of rendering time.
* src/smooth/ftgrays.c (gray_hline): Eliminated in favor of...
(FT_FILL_RULE, FT_GRAY_SET): ... these new macros...
(gray_sweep): ... inlined here.
(gray_sweep_direct): New function that handles the direct span buffer.
(gray_TWorker): Remove the span buffer.
(gray_raster_render, gray_convert_glyph): Updated.
2021-05-10 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (gray_hline): Simplify even-odd computations.
It is too bad the even-odd rule is not used much.
2021-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[type1] Avoid MM memory zeroing.
* src/type1/t1load.c (t1_allocate_blend, parse_blend_design_map):
Tweak allocation macros.
* src/type1/t1objs.c (T1_Face_Done): Minor.
2021-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/bdf/bdflib.c (_bdf_list_ensure): Tweak allocation macro.
2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/psaux/psobjs.c (ps_parser_load_field): Tweak allocation macro.
2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/sfobjs.c (sfnt_load_face): Tweak allocation macro.
2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cid/cidload.c (cid_read_subrs): Tweak allocation macro.
2021-05-06 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Tweak allocation.
2021-05-05 Alexei Podtelezhnikov <apodtele@gmail.com>
[cff,psaux] Avoid memory zeroing (contd.).
* src/cff/cffload.c (cff_blend_doBlend, cff_blend_build_vector): Tweak
allocation macros.
* src/psaux/psarrst.c (cf2_arrstack_setNumElements): Ditto.
* src/psaux/psstack.c (cf2_stack_init): Ditto.
2021-05-04 Ben Wagner <bungeman@chromium.org>
* src/cid/cidload.c (cid_hex_to_binary): Improve return value.
Add argument to return the actual number of bytes that were decoded.
The actual number of bytes decoded can be quite variable depending
on the number of ignored 'whitespace' bytes or early termination
with `>`.
(cid_face_open): Updated to use this calculated value. This avoids
trusting `parser->binary_length` is always be correct and reading
uninitialized bits if fewer are actually decoded.
First reported as
https://crbug.com/1203240
2021-05-03 Alexei Podtelezhnikov <apodtele@gmail.com>
[sfnt] Streamline POST format 2.0 handing.
To reduce memory allocations, we read an entire Pascal-string buffer
and convert it to a C-string buffer. We also reject tables with
Postscript glyph names exceeding 63 bytes.
* src/sfnt/ttpost.c (load_format20): Implement it.
(load_post_names): Check the minimal POST table size.
(load_format25, tt_face_free_ps_names): Updated accordingly.
2021-05-02 Alexei Podtelezhnikov <apodtele@gmail.com>
[bdf,pcf] Avoid memory zeroing (contd.).
* src/bdf/bdflib.c (bdf_create_property, _bdf_add_comment,
_bdf_add_property, bdf_load_font): Tweak allocation macros.
* src/pcf/pcfread.c (pcf_get_properties, pcf_get_metrics): Ditto.
2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cid/cidload.c (cid_read_subrs): Tweak allocaton macro.
2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
[sfnt] Avoid some memory zeroing.
* src/sfnt/sfobjs.c (sfnt_open_font, sfnt_init_face,
tt_name_ascii_from_{utf16,other}): Tweak allocaton macros.
* src/sfnt/ttload.c (tt_face_load_name): Ditto.
2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/ttpost.c (load_format_{20,25}): Tweak allocaton macros.
2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/pngshim.c (Load_SBit_Png): Tweak allocaton macro.
2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
[truetype] Avoid some memory zeroing.
* src/truetype/ttinterp.c (Init_Context): Tweak allocation macro.
* src/truetype/ttpload.c (tt_face_load_cvt): Ditto.
2021-05-01 Alexei Podtelezhnikov <apodtele@gmail.com>
[woff2] Avoid some memory zeroing.
* src/sfnt/sfwoff2.c (store_loca, woff2_open_font): Tweak macros.
2021-04-30 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/gzip/ftgzip.c (ft_gzip_alloc): Zero out memory again.
2021-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
[lzw] Preserve decompression stack when relocating to heap.
* src/lzw/ftzopen.c (ft_lzwstate_stack_grow): Copy stack when
relocating to heap.
2021-04-27 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cid/cidgload.c (cid_load_glyph): Restore the glyph_length check.
2021-04-27 Werner Lemberg <wl@gnu.org>
* src/psmodule.c (ps_unicodes_init): Ignore empty glyph names.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33637
2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/sfobjs.c (sfnt_init_face): Revert macro change.
2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
[cff] Avoid some memory zeroing.
* src/cff/cffparse.c (cff_parser_init): Tweak memory macro.
* src/cff/cffload.c (cff_index_load_offsets, cff_index_get_pointers,
cff_charset_load, cff_vstore_load): Ditto.
2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
[pfr] Avoid some memory zeroing.
* src/pfr/pfrobjs.c (pfr_face_init) : Tweak memory macro.
* src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps,
pfr_phy_font_load): Ditto.
2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/winfonts/winfnt.c (FNT_Face_Init): Tweak memory macro.
2021-04-26 Alexei Podtelezhnikov <apodtele@gmail.com>
[psaux,psnames] Avoid some memory zeroing.
* src/psaux/psstack.c (cf2_stack_init): Tweak memory macro.
* src/psnames/psmodule.c (ps_unicodes_init): Ditto.
2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] Avoid some memory zeroing.
* src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Use FT_QNEW_ARRAY.
* src/base/ftsnames.c (FT_Get_Sfnt_{Name,LangTag}): Ditto.
2021-04-25 Alexei Podtelezhnikov <apodtele@gmail.com>
[bdf,pcf] Avoid some memory zeroing.
* src/pcf/pcfread.c (pcf_read_TOC, pcf_get_properties, pcf_load_font):
Tweak memory macros.
* src/bdf/bdfdrivr.c (BDF_Face_Init): Ditto.
* src/bdf/bdflib.c (_bdf_readstreami, bdf_create_property,
_bdf_parse_glyphs, _bdf_parse_start): Ditto.
(_bdf_add_property): Do not handle zero size.
2021-04-25 Issam E. Maghni <issam.e.maghni@mailbox.org>
* builds/meson/process_ftoption_h.py: Add LF at EOF.
This fixes
.../ftoption.h:1030:10: error:
no newline at end of file [-Werror,-Wnewline-eof]
for the generated `ftoption.h` file.
2021-04-24 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/cff/cffload.c (cff_index_get_pointers): s/FT_QALLOC/FT_ALLOC/.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftobjs.c (Mac_Read_POST_Resource): s/FT_ALLOC/FT_QALLOC/.
* builds/mac/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sdf/ftsdf.c (sdf_{edge,contour,shape}_new): Use FT_QALLOC.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[sfnt] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/sfnt/sfdriver.c (get_win_string, get_apple_string,
sfnt_get_var_ps_name): Do not zero out the buffer.
* src/sfnt/sfobjs.c (sfnt_init_face): Ditto.
* src/sfnt/sfwoff.c (woff_open_font): Ditto.
* src/sfnt/sfwoff2.c (woff2_open_font): Ditto.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[cff,type1,type42] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/cff/cffload.c (cff_index_get_pointers, cff_index_get_name):
Do not zero out the buffer.
* src/cff/cffdrivr.c (cff_ps_get_font_info): Ditto.
* src/type1/t1load.c (parse_subrs, parse_charstrings,
parse_blend_axis_types): Ditto.
* src/type1/t1parse.c (T1_New_Parser, T1_Get_Private_Dict): Ditto.
* src/type42/t42parse.c (t42_parser_init): Ditto.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[cid] s/FT_ALLOC/FT_QALLOC/ and clean up.
* src/cid/cidgload.c (cid_load_glyph): Do not zero out the buffer.
* src/cid/cidload.c (cid_face_open, cid_read_subrs): Ditto.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[pfr] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/pfr/pfrload.c (pfr_extra_item_load_font_id, pfr_aux_name_load):
Do not zero out the buffer.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[bzip2,gzip] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/bzip2/ftbzip2.c (ft_bzip2_alloc): Do not zero out the buffer.
* src/gzip/ftgzip.c (ft_gzip_alloc, FT_Stream_OpenGzip): Ditto.
2021-04-23 Alexei Podtelezhnikov <apodtele@gmail.com>
[pcf,bdf,winfonts] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/pcf/pcfread.c (pcf_interpret_style): Do not zero out the buffer.
* src/bdf/bdfdrivr.c (bdf_interpret_style): Ditto.
* src/winfonts/winfnt.c (FNT_Face_Init, FNT_Load_Glyph): Ditto.
2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Optimize SBit copying.
* src/cache/ftcsbits.c (ftc_snode_load): Do not initialize the buffer.
(ftc_sbit_copy_bitmap): Accept zero size, s/FT_ALLOC/FT_QALLOC/.
2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
[gxvalid,otvalid] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/gxvalid/gxvmod.c (gxv_load_table): Do not zero out the buffer.
* src/otvalid/otvmod.c (otv_load_table): Ditto.
2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
[psaux] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/psaux/psobjs.c (ps_table_done, ps_parser_load_field): Do not
zero out the buffer.
2021-04-22 Alexei Podtelezhnikov <apodtele@gmail.com>
[base] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
* src/base/ftobjs.c (open_face_PS_from_sfnt_stream,
Mac_Read_sfnt_Resource): Do not zero out the buffer.
* src/base/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto.
* src/base/ftrfork.c (raccess_make_file_name,
raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Ditto.
2021-04-20 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Restore SBit copying for unowned (BDF) bitmaps.
* src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Restore.
(ftc_snode_load): Check ownership and copy unowned bitmaps.
2021-04-19 Dominik Röttsches <drott@chromium.org>
[sfnt] Return in 'COLR' v1 when layer pointer outside table
* src/sfnt/ttcolr.c (tt_face_get_paint_layers): Add missing return
when paint pointer outside table.
(read_paint): Add missing return when paint pointer outside table.
2021-04-18 Alexei Podtelezhnikov <apodtele@gmail.com>
[cache] Switch to lazy SBit setting.
* src/cache/ftcsbits.c (ftc_sbit_copy_bitmap): Removed.
(ftc_snode_load): Take the bitmap ownership instead of copying.
2021-04-16 Daniel Welty <@danielwelty>
* src/cache/ftcsbits.c (ftc_snode_load): Properly handle short pitch.
2021-04-16 Werner Lemberg <wl@gnu.org>
* builds/unix/freetype2.m4: Fix help string formatting.
The indented `dnl` macros inserted unwanted horizontal space.
Problem reported by Ozkan Sezer <sezeroz@gmail.com>.
2021-04-16 Dominik Röttsches <drott@chromium.org>
[sfnt] Safeguard 'COLR' v1 layer extraction
* src/sfnt/ttcolr.c (tt_face_get_paint_layers): Do not output
layer pointer to iterator if it is outside the 'COLR' table.
(read_paint): Do not attempt to read layers that are outside the
table.
2021-04-02 Ben Wagner <bungeman@chromium.org>
[base] Complete `ft_glyphslot_clear`.
* src/base/ftobjs.c (ft_glyphslot_clear): This function is intended
to reset all the values of a glyph slot. However, it was not
resetting the values of the advances and `glyph_index`. Reset the
advances and `glyph_index` to zero.
2021-04-02 Ben Wagner <bungeman@chromium.org>
[truetype] Prevent glyph program state from persisting.
`FDEF` instructions are specified as allowed only in 'prep' or
'fpgm'. FreeType has attempted to prevent their use in the glyph
program, but they were still allowed in glyph programs if defined in
a function defined in 'prep' or 'fpgm' and called from the glyph
program.
Similarly, `IDEF` instructions are specified not to be able to
modify any existing instruction. FreeType has attempted to prevent
their use in the glyph program, but they can still be used like
`FDEF`.
This change stores the initial bytecode range type and disallows the
use of `FDEF` and `IDEF` while running the glyph program.
Most other state is copied from the `TT_Size` into the execution
context. However, it is possible for a glyph program to use `WS` to
write to the storage area or `WCVTP`, `WCVTF`, and `DELTAC[123]` to
write to the control value table.
Allowing any change to the global state from the glyph program is
problematic as the outlines of any given glyph may change based on
the order the glyphs are loaded or even how many times they are
loaded. There exist fonts that write to the storage area or the
control value table in the glyph program, so their use should not be
an error.
Possible solutions to using these in the glyph program are
* ignore the writes;
* value-level copy on write, discard modified values when finished;
* array-level copy on write, discard the copy when finished;
* array-level copy up-front.
Ignoring the writes may break otherwise good uses. A full copy
up-front was implemented, but was quite heavy as even well behaved
fonts required a full copy and the memory management that goes along
with it. Value-level copy on write could use less memory but
requires a great deal more record keeping and complexity. This
change implements array-level copy on write. If any attempt is made
to write to the control value table or the storage area when the
initial bytecode range was in a glyph program, the relevant array
will be copied to a designated storage area and the copy used for
the rest of the glyph program's execution.
* src/truetype/ttinterp.h (TT_ExecContextRec): New fields
`iniRange`, `glyfCvtSize`, `glyfCvt`, `origCvt`, `glyfStoreSize`,
`glyfStorage`, and `origStorage`.
* src/truetype/ttinterp.c (Modify_CVT_Check): New function to handle
`exc->glyfCvt`.
(Write_CVT, Write_CVT_Stretched, Move_CVT, Move_CVT_Stretched): Use
it.
(Ins_WS): Handle `exc->glyfStorage`.
(Ins_FDEF, Ins_IDEF): Updated.
(TT_RunIns): Updated.
(TT_Done_Context): Free 'glyf' CVT working and storage area.
(TT_Load_Context): Fix/add casts.
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Fix cast.
2021-03-30 Dominik Röttsches <drott@chromium.org>
[sfnt] Check validity of pointer location of `read_color_line`.
* src/sfnt/ttcolr.c (get_child_table_pointer): New function to fetch
child table pointer early for all paint formats that compute a child
table pointer.
(read_color_line, read_paint): Updated.
(tt_face_get_colorline_stops): Check `colr->table`.
2021-03-28 Nikhil Ramakrishnan <ramakrishnan.nikhil@gmail.com>
[docs] Update docwriter stylesheet for 1.3.1.
This change is required to support docwriter 1.3.1.
See
https://gitlab.freedesktop.org/freetype/docwriter/-/merge_requests/101
for more information.
* docs/markdown/stylesheets/extra.css:
(.wy-nav-content, .md-sidebar--secondary): Remove.
2021-03-16 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/sfnt/pngshim.c (Load_SBit_Png): Free `rows` once later.
2021-03-16 Ben Wagner <bungeman@google.com>
[sfnt] Fix memory leak in png loading.
Reported as
https://bugs.chromium.org/p/chromium/issues/detail?id=1182552
Memory is allocated and the pointer assigned to `rows` inside a
'setjmp' scope. This memory must be freed outside the 'setjmp'
scope after a 'longjmp'. Since `rows` is a local and modified
inside the 'setjmp' scope it must be marked volatile or it will have
an indeterminate value after the 'longjmp'.
* src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak of `rows`.
2021-03-16 Christopher Degawa <ccom@randomderp.com>
* CMakeLists.txt: Don't limit generation of 'pkg-config' file to UNIX.
mingw-w64 uses the 'pkg-config' files but does not set UNIX.
2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (gray_set_cell): Refactor to fix VC++ warning.
2021-03-13 Werner Lemberg <wl@gnu.org>
Handle various VC++ compiler warnings.
Fixes#1039.
* src/base/ftstroke.c (ft_stroker_inside, ft_stroker_outside):
Initialize `sigma`.
* src/sdf/ftsdf.c (sdf_generate_with_overlaps): Exit immediately if
function arguments are invalid.
* src/sdf/ftsdfrend.c (sdf_property_set) <"overlaps">: Fix cast.
* src/sfnt/sfwoff2.c (woff2_decompress)
[!FT_CONFIG_OPTION_USE_BROTLI]: Use `FT_UNUSED`.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Initialize `fvar_head`.
2021-03-11 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Reduce copying during integration phase.
We now record `cover' and `area' directly into the linked list. This
makes rendering faster by 10% or even more at larger sizes.
* src/smooth/ftgrays.c (FT_INTEGRATE): Write directly.
(gray_TWorker): Add direct cell reference and remove unused fields.
(gray_set_cell): Consolidate the linked list management and pointers.
(gray_convert_glyph, gray_convert_glyph_inner): Updated.
2021-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (FT_INTEGRATE): New convenience macro.
(gray_render_line, gray_render_scanline): Use it.
2021-03-09 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (gray_render_line): Rearrange conditionals.
These produce faster or more optimizable code.
2021-03-08 Tim-Philipp Müller <tim@centricular.com>
[meson] Fix 'mmap' handling on Windows.
* meson.build (ft2_sources): Always use `windows/ftsystem.c` on
Windows unless mmap has been disabled.
https://gitlab.freedesktop.org/freetype/freetype/-/merge_requests/5#note_829289
2021-03-07 Tim-Philipp Müller <tim@centricular.com>
[ci] Add basic support for Meson builds with MSVC on Windows.
This adds meson jobs for VS2017 (x86 and x86_64).
* .gitlab-ci.yml: New file.
2021-03-07 Tim-Philipp Müller <tim@centricular.com>
[meson] Add subproject fallbacks for 'libpng' and 'zlib'.
* subprojects/libpng.wrap, subprojects/zlib.wrap: New files.
* meson.build: Updated.
2021-03-07 Xavier Claessens <xavier.claessens@collabora.com>
[meson] Make it work with Windows.
* meson.build: Do not process `ftconfig.h` when not using
`ftconfig.h.in`.
Fixes#1029.
2021-02-25 Werner Lemberg <wl@gnu.org>
[woff2] Fix memory leak.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28148
* src/sfnt/sfwoff2.c (woff2_open_font): Reject fonts that have
multiple tables with the same tag. While not explicitly forbidden
in the OpenType specification, it is implicitly forbidden by
describing a binary search algorithm for tables that only works
reliably if table tags are unique.
2021-02-22 Werner Lemberg <wl@gnu.org>
* CMakeLists.txt: Update location of `LICENSE.TXT`.
Fixes#1035.
2021-02-19 Werner Lemberg <wl@gnu.org>
* builds/unix/ax_pthread.m4: Update from 'autoconf-archive'.
A bunch of fixes were added recently to its git repository.
2021-02-17 Werner Lemberg <wl@gnu.org>
[unix] Updates for autoconf 2.71.
This fixes warnings reported by autoupdate.
* builds/unix/ax_pthread.m4: Replace `as_echo` with `AS_ECHO`.
* builds/unix/configure.raw: Remove obsolete `AC_HEADER_STDC`.
Don't escape back quotes in messages for `AC_MSG_WARN`.
2021-02-16 Werner Lemberg <wl@gnu.org>
* builds/toplevel.mk: Fix previous commit.
<top_level>: Use `TOP_DIR` in `wildcard` function.
(check_out_submodule, copy_submodule): Move down to come after
definition of `all` rule.
Call `mkdir` conditionally.
2021-02-16 Werner Lemberg <wl@gnu.org>
* builds/toplevel.mk: Use rules for handling 'dlg'.
Suggested by Alexei.
(check_out_submodule, copy_submodule): New targets.
<top-level>: Replace calls to `shell` with rules.
2021-02-16 Werner Lemberg <wl@gnu.org>
* builds/toplevel.mk: Avoid side effects of `shell`.
We use a dummy variable to catch its output. Otherwise the `make`
program is going to interpret the return value of `shell`; this can
cause obscure warning or error messages or even be harmful.
2021-02-16 Werner Lemberg <wl@gnu.org>
Move 'dlg' submodule to `subprojects` directory.
This is for future changes with Meson, which doesn't allow a
different name for its `subprojects` directory. Having both a
`submodules` and a `subprojects` directory is confusing.
* .gitmodules, autogen.sh (copy_submodule_files, DLG_INC_DIR,
DLG_SRC_DIR): Updated.
* builds/toplevel.mk (<top-level>, do-dist),
builds/windows/vc2010/script.bat: Updated.
* src/tools/no-copyright: Updated.
2021-02-16 Dominik Röttsches <drott@chromium.org>
[sfnt] Update paint format values to support non-variable paints.
* freetype.h (FT_PaintFormat): Update paint format identifiers after
a specification change. The specification was updated to have
sibling formats, variable and non-variable variants for each.
Reflect that here.
* sfnt/ttcolr.c (read_paint): Remove parsing of variable indices as
the non-variable formats no longer have them.
2021-02-15 Daniel E <daniel.engberg.lists@pyret.net>
* CMakeLists.txt: Improve 'bz2' support.
Not all distributions such as FreeBSD provide a `.pc` file for
'(lib)bz2' so follow autotools and add it to `Libs.private` instead.
2021-02-13 Werner Lemberg <wl@gnu.org>
* src/tools/update-copyright-year: Fix single-year entry handling.
The fix from 2021-01-17 didn't cover the case where the year to be
updated is identical to the current year.
2021-02-13 Werner Lemberg <wl@gnu.org>
Add new function `FT_Get_Transform`.
See
https://github.com/harfbuzz/harfbuzz/issues/2428
for some reasons to introduce this function.
* include/freetype/freetype.h, src/base/ftobjs.c (FT_Get_Transform):
Implement it.
2021-02-12 Alexei Podtelezhnikov <apodtele@gmail.com>
Decorate `qsort` callbacks with `cdecl`.
* include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
Add new macro.
* src/base/ftrfork.c, src/bdf/bdflib.c, src/gxvalid/gxvcommn.c,
src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c,
src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update `qsort` callbacks.
Fixes#1026 when compiling FreeType with an unusual calling
convention while the C library function `qsort` still expects
`cdecl`.
2021-02-10 Dominik Röttsches <drott@chromium.org>
[sfnt] Implement 'COLR' v1 sweep gradients.
* freetype.h (FT_PaintSweepGradient): Add `FT_PaintSweepGradient` to
represent a 'COLR' v1 sweep gradient.
Update format.
(FT_PaintFormat): Update shifted paint formats.
Sync with spec.
* sfnt/ttcolr.c (read_paint): Logic to parse sweep gradients.
Fix struct access in radial gradient implementation.
2021-02-09 Dominik Röttsches <drott@chromium.org>
[sfnt] Provide optional root transform for 'COLR' v1 glyph graph.
* include/freetype/freetype.h (FT_Get_Color_Glyph_Paint):
Additional function argument `root_transform` to control whether
root transform should be returned.
(FT_OpaquePaint): Additional tracking field to denote whether
root transform is to be returned.
* include/freetype/internal/sfnt.h
(TT_Get_Color_Glyph_Paint_Func): Propagate additional argument.
* src/base/ftobjs.c (FT_Get_Color_Glyph_Paint): Ditto.
* src/sfnt/ttcolr.c (tt_face_get_colr_glyph_paint): Return root
transform reflecting the size and tranform configured on
`FT_Face`.
(read_paint): Initialize and track status of insert_root_transform
flag.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build: s/freetype2_dep/freetype_dep/.
Many projects (e.g., fontconfig, cairo) hardcode the `freetype_dep`
variable name to use FreeType as subproject because that was the
variable name in Centricular's Meson port of FreeType. While they
should stop hardcoding that variable name, it does not cost us
anything to keep using that name to ease transition.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
[meson] Fix handling of HarfBuzz library.
* meson.build (harfbuzz_dep): Do not fall back to HarfBuzz by
default.
Otherwise it causes a dependency cycle:
cairo => fontconfig => freetype2 => harfbuzz => cairo
Meson will still fall back to HarfBuzz subprojects if the `harfbuzz`
option is set to `enabled` instead of `auto` and a
`subprojects/harfbuzz.wrap` file is present. In that case it is the
responsibility of the main project to set the proper options on each
subproject to break the dependency cycle.
Fixes: #1028.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
[meson] Fix dependency lookup and generate `ftconfig.h`.
- zlib: If not found on the system, meson can build it as a
subproject. We thus never use the (outdated) zlib support that
comes with FreeType. Doing so has the additional advantage that
the zlib code can be shared with other projects like GLib if both
are subprojects of an application.
- harfbuzz: Build as a subproject if not found on the system.
- 'QUESTION: What if the compiler doesn't support `-D` but uses `/D`
instead as on Windows?' Answer: Meson translate arguments for us.
- visibility: Replace self-made code with meson-specific solution.
* meson.build (ft2_defines): Rewrite logic to set and handle it.
(process_header_command): New variable, previously called
`ftoption_command`.
(ftoption_command, ftconfig_command): New variables.
(zlib_option): Removed.
(zlib_dep): New variable.
(ft2_deps): Updated.
(harfbuzz_dep): Updated.
(ftconfig_h_in, ftconfig_h): New variables.
(ft2_sources): Updated.
(ft2_lib): Updated, handle visibility.
(summary): Updted.
* meson_options.txt (zlib): Updated.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build: Fix resource compilation on Windows.
This is copied from GStreamer's meson port of FreeType.
(ft2_sources): Add both debug and resource file (the latter for
Windows only).
(ft2_debug_src): Removed.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build: s/ft2_libtool_version/ft2_pkgconfig_version/.
(freetype2_dep): Use it.
`ft2_libtool_version` would be the shared library version, not the
one we should use in file `freetype2.pc`.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build: Use `meson.override_dependency`.
This is a new meson mechanism to avoid other projects to hard-code
the `freetype2_dep` variable name in their build definition. It
also ensures that meson does not mix system and subproject versions
of FreeType inside of the same project.
Also remove outdated TODO because `declare_dependency` was already
there.
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build (bzip2_dep): Simplify.
We remove `static:false` from `find_library('bz2')`.
I don't know whether the previous code was a workaround for an old
meson bug, but at least with version >=0.55.0 (which FreeType uses)
it picks the shared library when both are available.
File `freetype2.pc` still contains the full path to file `libbz2.so`
instead of `-lbz2` – that we need to do this is a meson bug even
present in the current version (0.57.0).
2021-02-09 Xavier Claessens <xavier.claessens@collabora.com>
* meson.build: Set project version.
2021-02-04 Werner Lemberg <wl@gnu.org>
[base] Fix Netpbm tracing message.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Don't emit Netpbm
warning if there is nothing to output.
2021-02-04 Werner Lemberg <wl@gnu.org>
* src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
This ensures good logging output, with all lines having a proper
prefix (if requested).
This is a continuation of a similar patch from 2020-12-02, which
missed some locations.
2021-02-03 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/unix/configure.raw [mmap]: Restore default path.
Fixes#1023.
2021-02-03 Werner Lemberg <wl@gnu.org>
[psaux] Fix integer overflow.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30154
* src/psaux/psblues.c (cf2_blues_capture): Use `SUB_INT32`.
2021-02-02 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/unix/configure.raw [mmap support]: Explicitly handle Windows.
Fixes#1024.
2021-01-31 Werner Lemberg <wl@gnu.org>
* builds/unix/configure.raw [mmap support]: Correctly handle Windows.
Fixes#1024.
2021-01-31 Werner Lemberg <wl@gnu.org>
* builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
2021-01-31 Werner Lemberg <wl@gnu.org>
Always provide logging API.
It's easier to have stubs if FT_DEBUG_LOGGING is undefined than to
modify `ftexport.sym` conditionally.
Problem reported by Alexei.
* src/base/ftdebug.c: Include `ftlogging.h`.
(FT_Trace_Set_Level, FT_Trace_Set_Default_Level, FT_Set_Log_Handler,
FT_Set_Default_Log_Handler) [!FT_DEBUG_LOGGING]: Provide stubs.
2021-01-31 Werner Lemberg <wl@gnu.org>
* builds/unix/configure.raw: Fix typo.
Bug introduced in Vincent's last commit bb33f03.
Fixes issue #1021.
2021-01-27 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps.
Fixes bug #1020.
2021-01-27 Alexei Podtelezhnikov <apodtele@gmail.com>
[stroker] Minor clean-up.
* src/base/ftstroke.c (FT_Stroker_{ConicTo,CubicTo}): Reset the last
line length.
(FT_Stroker_EndSubPath): Call `ft_stroker_process_corner'.
2021-01-27 Vincent Torri <vincent.torri@gmail.com>
* builds/windows/ftsystem.c: Add shared memory support on Windows.
* CMakeLists.txt (BASE_SRCS), builds/unix/configure.raw (FTSYS_SRC),
builds/windows/vc2010/freetype.vcxproj,
builds/windows/visualc/freetype.vcproj, meson.build (ft2_sources):
Add it (conditionally).
2021-01-23 Werner Lemberg <wl@gnu.org>
Require HarfBuzz 2.0.0.
This is needed to make commit f1f9705f9 work.
* CMakeLists.txt (HARFBUZZ_MIN_VERSION), builds/unix/configure.raw
(harfbuzz_pkg), meson.build (harfbuzz_dep): Updated.
2021-01-22 Alexei Podtelezhnikov <apodtele@gmail.com>
* autogen.sh: Absorb `version.sed'.
* version.sed: Removed.
2021-01-19 Alexei Podtelezhnikov <apodtele@gmail.com>
* srd/base/ftlcdfil.c (FT_Library_SetLcdGeometry): Fix return value.
2021-01-15 Nikolaus Waxweiler <madigens@gmail.com>
[afshaper] Fix hb_ot_tags_from_script deprecation warning.
* autofit/afshaper.c (af_shaper_get_coverage): Copy the source code
of the function as suggested in
https://github.com/harfbuzz/harfbuzz/issues/2737 and adjust to handle
at most three tags.
2021-01-17 Werner Lemberg <wl@gnu.org>
* src/tools/update-copyright-year: Fix single-year entry handling.
2021-01-16 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/unix/unixddef.mk: Remove the second DEVEL_DIR definition.
2021-01-14 Dominik Röttsches <drott@chromium.org>
[sfnt] Additional checks for 'colr' table presence.
* sfnt/ttcolr.c (tt_face_get_colr_glyph_paint,
tt_face_get_colorline_stops, tt_face_get_paint): Additional checks
for whether colr table is present. Prevents crashes when these
methods are called on non-COLR fonts.
2021-01-13 Dominik Röttsches <drott@chromium.org>
Add config option to test for 'COLR' v1 support in headers.
* include/freetype/config/ftoption.h (TT_SUPPORT_COLRV1): New macro
so that clients can test whether the FreeType checkout that they are
building against supports the 'COLR' v1 API. This is intended to be
a temporary solution until 'COLR' v1 support is released in a
FreeType version and such a check can be made by using the version
number instead.
2020-12-16 Dominik Röttsches <drott@chromium.org>
[base] Fill 'COLR' v1 API templates to make them work (#59703).
* src/base/ftobjs.c (FT_Get_Color_Glyph_Paint, FT_Get_Paint_Layers,
FT_Get_Paint, FT_Get_Colorline_Stops): Add basic sanity checks,
check for existence of `FT_Face`, check arguments and delegate calls
for the respective 'COLR' v1 API to the SFNT driver.
2020-12-16 Dominik Röttsches <drott@chromium.org>
[sfnt] Register 'COLR' v1 API in driver (#59703).
* include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_Paint_Func,
TT_Get_Paint_Layers_Func, TT_Get_Colorline_Stops_Func,
TT_Get_Paint_Func): New function pointer types.
(SFNT_Interface): Add them.
(FT_DEFINE_SFNT_INTERFACE): Updated.
* src/sfnt/sfdriver.c (PUT_COLOR_LAYERS_V1): New macro.
(sfnt_interface): Add new function pointers.
2020-12-16 Dominik Röttsches <drott@chromium.org>
[sfnt] Add 'COLR' v1 API to retrieve color layers (#59703).
* src/sfnt/ttcolr.c (tt_face_get_paint_layers): New function to get
the layers of a `PaintColrLayers` table in the font, using an
`FT_LayerIterator` from an `FT_PaintColrLayers` object retrieved via
`tt_face_get_paint`.
* src/sfnt/ttcolr.h: Updated.
2020-12-16 Dominik Röttsches <drott@chromium.org>
[sfnt] Add 'COLR' v1 API to iterate color stops (#59703).
* src/sfnt/ttcolr.c (tt_face_get_colorline_stops): New function to
return the current `FT_ColorStop` object from `FT_ColorStopIterator`.
Also increment the iterator.
* src/sfnt/ttcolr.h: Updated.
2020-12-16 Dominik Röttsches <drott@chromium.org>
[sfnt] Add API to get actual paint from `FT_OpaquePaint` (#59703).
* src/sfnt/ttcolr.c (tt_face_get_paint): New function to resolve an
`FT_OpaquePaint` paint reference into an `FT_COLR_Paint` object of a
certain format, which contains the detailed information stored in a
paint of the respective format.
(read_paint): New function to provide the format specific parsing
and to populate the data members of each specific `FT_COLR_Paint`
subtype.
(read_color_line): New function to parse retrieved color line
information into an `FT_ColorLine` object, which has information
about the color line extend mode as well as an
`FT_ColorStopIterator` object.
* src/sfnt/ttcolr.h: Updated.
2020-12-16 Dominik Röttsches <drott@chromium.org>
[sfnt] Add API to retrieve 'COLR' v1 root paint (#59703).
* src/sfnt/ttcolr.c (BaseGlyphV1Record): New structure.
(tt_face_load_colr): Handle version 1 table header.
(find_base_glyph_v1_record): New auxiliary function.
(tt_face_get_colr_glyph_paint): New function to find the root
`FT_OpaquePaint` object for a given glyph ID.
* src/sfnt/ttcolr.h: Updated.
2020-12-16 Dominik Röttsches <drott@chromium.org>
Add new methods required for 'COLR' v1 to public API (#59703).
* include/freetype/freetype.h (FT_Get_Color_Glyph_Paint): New method
for retrieving the root paint object for a color glyph by specifying
a glyph ID.
(FT_Get_Paint_Layers): New method for retrieving the layers of a
`PaintColorGlyph`.
(FT_Get_ColorLine_Stops): New method for retrieving the stops of a
color.
(FT_Get_Paint): New method for resolving an `FT_OpaquePaint` into an
`FT_COLR_Paint` object.
2020-12-16 Dominik Röttsches <drott@chromium.org>
Add types required for 'COLR' v1 to public API (#59703).
* include/freetype/freetype.h (FT_PaintFormat, FT_ColorStopIterator,
FT_ColorIndex, FT_ColorStop, FT_PaintExtend, FT_ColorLine,
FT_Affine23, FT_CompositeMode, FT_OpaquePaint, FT_PaintColrLayers,
FT_PaintSolid, FT_PaintLinearGradient, FT_PaintRadialGradient,
FT_PaintGlyph, FT_PaintColrGlyph, FT_PaintTransformed,
FT_PaintTranslate, FT_PaintRotate, FT_PaintSkew, FT_PaintComposite,
FT_COLR_Paint): Adding structs and enum to represent paint format,
color stop information, gradient extend information, structs to
reference paint offsets, and to define transforms and compositions.
Adding a union type to represent the union of the structs,
distinguished by `FT_PaintFormat`.
2021-01-10 Werner Lemberg <wl@gnu.org>
* builds/*: s/BUILD_DIR/PLATFORM_DIR/.
The old variable name caused confusion.
2021-01-08 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds] Revert `FTMODULE_H' changes.
* builds/toplevel.mk, builds/freetype.mk: Revert changes.
2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Fix up DLG build with VC++.
* builds/windows/vc2010/script.bat: Copy headers to include/.
* builds/windows/vc2010/freetype.vcxproj: Remove DLG paths.
2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds] Relocate `FTMODULE_H'.
* builds/toplevel.mk: Place `FTMODULE_H' in include/.
* builds/freetype.mk: Simplify included path.
2021-01-07 Werner Lemberg <wl@gnu.org>
Fix ABI incompatibility.
* include/freetype/ftimage.h (FT_Pixel_Mode): Don't insert
`FT_PIXEL_MODE_GRAY16' but append it.
* src/base/ftobjs.c (pixel_modes): Updated.
2021-01-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[dlg] Move the headers to include/dlg to simplify their use.
* autogen.sh, builds/toplevel.mk: Copy headers to include/dlg.
* builds/freetype.mk, builds/windows/vc2010/freetype.vcxproj:
Simplify included path.
* include/freetype/internal/ftdebug.h: Simplify #include.
* src/dlg/rules.mk, .gitignore: Updated.
2021-01-06 Werner Lemberg <wl@gnu.org>
* meson.build: Add summary.
Based on a patch from Vincent Torri <vincent.torri@gmail.com>.
2021-01-06 Torsten Hilbrich <emacs.nolkaf@hilbrich.tk>
* meson.build: Fix 'png' build option (#59458).
Without this patch, 'png' is always required.
2021-01-04 Alexei Podtelezhnikov <apodtele@gmail.com>
[builds/windows] Add SDF to VC2010 project.
* builds/windows/vc2010/freetype.vcxproj: Updated;
AfterBuild conveniences.
2020-12-26 Werner Lemberg <wl@gnu.org>
[sdf] Use 'counter-clockwise', not 'anti-clockwise'.
We prefer US nomenclature.
* src/sdf/ftsdf.c (SDF_Contour_Orientation):
s/SDF_ORIENTATION-ACW/SDF_ORIENTATION_CCW/.
Update all users.
2020-12-26 Werner Lemberg <wl@gnu.org>
* src/base/ftobjs.c (pixel_modes): Updated.
2020-12-26 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Remove custom memory tracker.
The internal FreeType memory tracker is sufficient.
* src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER, SDF_MemoryUser,
sdf_alloc, sdf_free, SDF_ALLOC, SDF_FREE,
SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP,
SDF_MEMORY_TRACKER_DONE): Removed.
s/SDF_ALLOC/FT_ALLOC/.
s/SDF_FREE/FT_FREE/.
Other updates.
2020-12-24 Werner Lemberg <wl@gnu.org>
[sdf] Fix `make multi`.
* src/sdf/ftsdf.c: Include `ftoutln.h`.
2020-12-24 Werner Lemberg <wl@gnu.org>
[sdf] Fix tracing.
* include/freetype/internal.fttrace.h: Add 'bsdf' component.
* src/sdf/ftbsdf.c, src/sdf/ftsdf.c (FT_COMPONENT): Define.
2020-08-21 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add debugging function.
* src/sdf/ftsdf.c (sdf_shape_dump): New function.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add 'bsdf' renderer to 'sdf' module.
* src/sdf/ftsdfrend.c (ft_bsdf_render): New function.
(ft_bitmap_sdf_renderer_class): New structure.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add interface functions for the 'bsdf' rasterizer.
* src/sdf/ftsdf.c (bsdf_raster_new, bsdf_raster_reset,
bsdf_raster_set_mode, bsdf_raster_render, bsdf_raster_done): New
functions.
(ft_bitmap_sdf_raster): New variable.
* src/sdf/ftsdf.h: Updated.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add function to copy SDF data into output bitmap.
* src/sdf/ftbsdf.c (finalize_sdf): New function.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add '8-point sequential Euclidean distance mapping' algorithm.
* src/sdf/ftbsdf.c (compare_neighbor, first_pass, second_pass,
edt8): New functions.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add function to copy source bitmap to distance map.
* src/sdf/ftbsdf.c (bsdf_init_distance_map): New function.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add functions to compute pixel edge distances.
* src/sdf/ftbsdf.c (compute_edge_distance, bsdf_approximate_edge):
New functions.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add function to find edge pixels in a grid of alpha values.
* src/sdf/ftbsdf.c (bsdf_is_edge): New function.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add essential structures for the 'bsdf' rasterizer.
* src/sdf/ftbsdf.c (ONE): New macro.
(BSDF_TRaster, ED, BSDF_Worker): New structures.
(zero_ed): New constant.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add 'sdf' module to non-gnumake build systems.
* include/freetype/config/ftmodule.h: Add both the 'sdf' and 'bsdf'
renderers to the list of modules.
* CMakeLists.txt (BASE_SRCS): Add 'sdf' single-object module.
2020-08-20 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Added basic overlapping contour support.
* src/sdf/ftsdf.c (sdf_generate_with_overlaps): New function.
(sdf_raster_render): Enable it.
2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add build infrastructure.
* src/sdf/module.mk, src/sdf/rules.mk: New files.
* src/sdf/ftsdf.h (ft_sdf_raster): New forward declaration.
* include/freetype/ftmoderr.h (FT_MODERRDEF): Add error definition
for the 'sdf' module.
* include/freetype/internal/fttrace.h (FT_TRACE_DEF): Add trace
definition for the `sdf' module.
* modules.cfg (RASTER_MODULES): Add the `sdf' module to the list of
rasterizers.
2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add interface functions for the 'sdf' rasterizer.
* src/sdf/ftsdf.c (sdf_raster_new, sdf_raster_reset,
sdf_raster_set_mode, sdf_raster_render, sdf_raster_done): New
functions.
(ft_sdf_raster): New structure.
2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add subdivision and bounding box optimization.
* src/sdf/ftsdf.c (sdf_generate_bounding_box): New function, which
is an optimized version of `sdf_generate`.
(sdf_generate_subdivision): New function.
2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add function to generate SDF.
* src/sdf/ftsdf.c (sdf_generate): New function, currently disabled.
This is a proof-of-concept implementation: It doesn't use any
optimization, it simply checks all grid points against all contours.
2020-08-19 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add functions to get shortest distance from any edge/contour.
* src/sdf/ftsdf.c (sdf_edge_get_min_distance): New function.
(sdf_contour_get_min_distance): New function, currently disabled.
2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add shortest distance finding functions.
* src/sdf/ftsdf.c (get_min_distance_line, get_min_distance_conic,
get_min_distance_cubic): New functions. Note that
`get_min_distance_conic` comes with two implementations (using an
analytical and an iterative method, to be controlled with the
`USE_NEWTON_FOR_CONIC` macro).
2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add function to resolve corner distances.
* src/sdf/ftsdf.c (resolve_corner): New function.
2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add essential math functions.
* src/sdf/ftsdf.c (cube_root, arc_cos) [!USE_NEWTON_FOR_CONIC]: New
auxiliary functions.
* src/sdf/ftsdf.c (solve_quadratic_equation, solve_cubic_equation)
[!USE_NEWTON_FOR_CONIC]: New functions.
2020-08-18 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add utility functions for contours.
* src/sdf/ftsdf.c (get_control_box, get_contour_orientation): New
functions.
(split_conic, split_cubic, split_sdf_conic, split_sdf_cubic,
split_sdf_shape): New functions.
2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add functions to decompose `FT_Outline`.
* src/sdf/ftsdf.c (sdf_move_to, sdf_line_to, sdf_conic_to,
sdf_cubic_to): New auxiliary decomposition functions.
(sdf_compose_funcs): New structure.
(sdf_outline_decompose): New function.
2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Structs, enums, macros, and functions for 'sdf' rasterizer.
* src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER)
[FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New macros.
(SDF_MemoryUser) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New
struct for memory usage tracing.
(sdf_alloc, sdf_free) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New
functions for memory usage tracing.
(SDF_ALLOC, SDF_FREE): New macros for memory management.
(SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP,
SDF_MEMORY_TRACKER_DONE): New macros to set up memory usage tracing.
(USE_NEWTON_FOR_CONIC, MAX_NEWTON_DIVISIONS, MAX_NEWTON_STEPS,
CORNER_CHECK_EPSILON, CG_DIMEN): New configuration macros for
controlling the process of finding the shortest distance.
(MUL_26D6, VEC_26D6_DOT): New auxiliary macros.
(SDF_TRaster, SDF_Edge, SDF_Contour, SDF_Shape, SDF_Signed_Distance,
SDF_Params): New structs for setting up SDF data.
(SDF_Edge_Type, SDF_Contour_Orientation): New enums for SDF data.
(zero_vector, null_edge, null_contour, null_shape, max_sdf): Useful
constants.
(sdf_edge_new, sdf_edge_done, sdf_contour_new, sdf_contour_done,
sdf_shape_new, sdf_shape_done): New constructors and destructors.
2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add raster parameters structure.
* src/sdf/ftsdf.h (SDF_Raster_Params): New structure.
* src/sdf/sdf.c: Include source files in order to make a single
object of the module.
2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add 'sdf' renderer.
* src/sdf/ftsdf.c: Add 'sdf' renderer along with its interface
functions.
Also add functions to set and get properties.
2020-08-17 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add common elements for 'sdf' and 'bsdf' renderers.
* src/sdf/ftsdfrend.h (SDF_Rendere_Module, ft_sdf_renderer_class,
ft_bitmap_sdf_renderer_class): New structures.
* src/sdf/ftsdfcommon.h (DEFAULT_SPREAD, MIN_SPREAD_MAX_SPREAD,
USE_SQUARED_DISTANCES): New macros.
(FT_INT_26D6, FT_INT_16D16, FT_26D6_16D16): New macros.
(FT_CALL, VECTOR_LENGTH_16D16): New macros.
(FT_26D6_Vec, FT_16D16_Vec, FT_16D16, FT_26D6, FT_6D10, FT_CBox):
New typedefs.
(square_root): New macro.
* src/sdf/ftsdferrs.h: Add module error setup.
2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
[sdf] Add files for new 'sdf' module.
Here is a breakdown of what the files will contain.
* src/sdf/ftsdfrend.c, src/sdf/ftsdfrend.h: The 'sdf' and 'bsdf'
renderers.
* src/sdf/ftsdf.c, src/sdf/ftsdf.h: The rasterizer for the 'sdf'
renderer.
* src/sdf/ftbsdf.c, src/sdf/ftbsdf.h: The rasterizer for the 'bsdf'
renderer.
* src/sdf/ftsdfcommon.h: Commmon properties and functions for both
rasterizers.
* src/sdf/ftsdferrs.h: Common error defines.
* src/sdf/sdf.c: For building a single object of the entire module.
2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
[base] Allow renderers of different formats.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the
glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming
'bsdf' renderer will require bitmaps for processing.
* src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove
renderer's glyph format check before adding and removing them. The
'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`.
2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
Add data types required for the forthcoming 'sdf' module.
* include/freetype/freetype.h (FT_Render_Mode): Add new render mode
`FT_RENDER_MODE_SDF`, which will be used to generate SDF.
* include/freetype/ftimage.h (FT_Pixel_Mode): Add new pixel mode
`FT_PIXEL_MODE_GRAY16`, which will be the output of the 'sdf'
module.
(FT_RASTER_FLAG_SDF): New raster flag to be used internally by the
'sdf' module.
* include/freetype/fttypes.h (FT_F6Dot10): New data type.
2020-08-16 Anuj Verma <anujv@iitbhilai.ac.in>
[base] Allow renderers of different formats.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Do not return if the
glyph's slot format is `FT_GLYPH_FORMAT_BITMAP`. The forthcoming
'bsdf' renderer will require bitmaps for processing.
* src/base/ftobjs.c (ft_add_renderer, ft_remove_renderer): Remove
renderer's glyph format check before adding and removing them. The
'bsdf' renderer will have a format `FT_GLYPH_FORMAT_BITMAP`.
2020-12-23 Werner Lemberg <wl@gnu.org>
* builds/windows/detect.mk (COPY): Make it work with `shell`.
Without this patch, we get the error
builds/toplevel.mk:127: *** missing separator. Stop.
Reported by Anuj, with a solution from Alexei.
2020-12-23 Ignacio Casal Quinteiro <qignacio@amazon.com>
* meson.build (ft2_defines): Fix builds on Windows.
2020-12-18 Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
[autofit] Fix double division in stem darkening.
The old code used to divide the darkening amount by em_ratio twice,
leading to unnecessarily bold stems on certain fonts with higher
units per em (e.g. Inter). This patch fixes it.
The return value of af_loader_compute_darkening was also changed to
use 16.16 fixed point to get rid of a redundant truncation operation.
This should slightly improve the precision, although it's still
bottlenecked by the emboldening function, which uses 26.6 fixed point.
* src/autofit/afloader.[ch]
(af_loader_compute_darkening): Return FT_Fixed.
(af_loader_embolden_glyph_in_slot): Revise calculations.
2020-12-17 Alexei Podtelezhnikov <apodtele@gmail.com>
* include/freetype/ftmodapi.h (FT_FACE_DRIVER_NAME): New public macro.
The driver name is needed for `FT_Property_Set' and `FT_Property_Get'.
2020-12-16 Chris Liddell <chris.liddell@artifex.com>
[truetype] Fix incremental metrics (#59503).
* src/truetype/ttgload.c (tt_get_metrics, load_truetype_glyph):
Previously, the code would populate the phantom points before
calling the `get_glyph_metrics` callback. For formats like PCL XL
format 1, class 2 downloaded fonts (where metrics are removed from
the TTF header), this causes problems when the hinting program uses
the phantom points (misplaced and distorted glyphs) due to the
metrics being unset (all zeros).
(tt_get_metrics_incr_overrides): Renamed to...
(tt_get_metrics_incremental): ... this. Updated caller
* include/freetype/ftincrem.h: Update the documentation to make it
clearer that `get_glyph_metrics` is to retrieve metrics from a
non-standard source, but *not* for the purpose of imposing custom
metrics.
2020-12-14 Werner Lemberg <wl@gnu.org>
[type42] Pacify static analysis tools (#59682).
* src/type42/t42objs.c (T42_Size_Init, T42_GlyphSlot_Init): Avoid
warnings about uninitialized variables.
2020-12-07 Werner Lemberg <wl@gnu.org>
* builds/unix/configure.raw: Don't set `FT_DEBUG_LOGGING`.
All debug options are handled exclusively in `ftoption.h`.
2020-12-07 Werner Lemberg <wl@gnu.org>
* src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`.
2020-12-07 Werner Lemberg <wl@gnu.org>
*/*: s/FT_LOGGING/FT_DEBUG_LOGGING/.
2020-12-05 Werner Lemberg <wl@gnu.org>
* builds/toplevel.mk (do-dist): Remove `submodules` directory.
2020-12-02 Werner Lemberg <wl@gnu.org>
* src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
This ensures good logging output, with all lines having a proper
prefix (if requested).
2020-12-02 Werner Lemberg <wl@gnu.org>
[base] Don't close 'stderr' after logging.
* src/base/ftdebug.c, builds/windows/ftdebug.c (ft_logging_deinit):
Fix it.
2020-12-02 Werner Lemberg <wl@gnu.org>
* submodules/dlg: Updated to commit 9f0c8b22.
2020-12-02 Werner Lemberg <wl@gnu.org>
* src/bdf/bdflib.c: Fix `-Wformat` warning.
2020-12-02 Werner Lemberg <wl@gnu.org>
Improve setup for 'dlg' library.
* autogen.sh (copy_submodule_file), builds/toplevel.mk: Redirect
stderr to `/dev/null`.
* builds/toplevel.mk: Move code block to handle 'dlg' stuff into
`check_platform` conditional.
Also fix wildcard expressions for guarding `git submodule` commands.
Also make file copying work with non-Unix platforms (untested).
2020-12-01 Werner Lemberg <wl@gnu.org>
[build] Use gcc (and clang) in C99 mode.
Other compilers are unchanged.
* builds/compiler/gcc-dev.mk, builds/compiler/gcc.mk (ANSIFLAGS):
s/-ansi/-std=c99/.
* builds/freetype.mk (FT_CFLAGS): Remove `-std=c99`.
* builds/unix/configure.raw: Handle C99.
Remove no longer needed test for gcc 4.6 and earlier.
2020-12-01 Werner Lemberg <wl@gnu.org>
[dlg] Fix compiler warnings.
* src/dlg/dlgwrap.c: Duplicate some feature test macros from
`dlg.c`, which must come first before loading standard headers. For
example, `freetype.h` loads `stdio.h` if compiled in debug mode.
2020-12-01 Werner Lemberg <wl@gnu.org>
* src/type42/t42parse.c: Fix `-Wformat` warnings.
2020-12-01 Priyesh Kumar <priyeshkkumar@gmail.com>
[builds/unix] Check for 'pthread' library.
* builds/unix/ax_pthread.m4: New file, taken from 'autoconf-archive'
git repository.
* builds/unix/configure.raw: Check for 'pthread'; also check whether
it works.
2020-12-01 Werner Lemberg <wl@gnu.org>
[base] Implement vertical alignment of log printing.
Based on a patch by Priyesh.
* include/freetype/internal/fttrace.h (FT_MAX_TRACE_LEVEL_LENGTH):
New macro.
* src/base/ftdebug.c, builds/windows/ftdebug.c (ft_log_handler):
Print logs after a fixed width to handle different lengths of
`FT_COMPONENT` entries.
Use `ft_strrchr` to check for final newline character.
2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
Update logging related documentation.
* docs/DEBUG: Updates related to `FT_LOGGING`.
* README.git: Updates related to logging.
2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
* src/*: Fix `-Wformat` warnings.
2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
[builds/windows] Changes to build 'dlg' with FreeType on Windows.
We only support Visual C++ 2010 and newer.
* builds/windows/vc2010/script.bat: New windows batch file to copy
necessary 'dlg' files from `submodules/dlg` to `src/dlg`. This file
is used as a pre-built event in Visual C++.
* builds/windows/ftdebug.c: Synchronize with `src/base/ftdebug.c`.
* builds/windows/vc2010/freetype.vcxproj.filters: Add
`src/dlgwrap.c`.
* builds/windows/vc2010/freetype.vcxproj
(AdditionalIncludeDirectories): Add include files of dlg for 'Debug'
and 'Debug Static' configurations on both 'x64' and 'win32'
platforms.
(PreprocessorDefinitions): Add `FT_LOGGING` for 'Debug' and 'Debug
Static' configurations on both 'x64' and 'win32' platforms.
Add `DLG_STATIC' for 'Debug' configuration on 'x64' and 'win32'
platforms.
(DisableLanguageExtensions): We need to disable the `/Za` option
when building 'dlg' with FreeType as 'dlg' strictly follows the C99
standard. Visual C++ produces behaves unexpectedly when
compiling a C99 file with `/Za` option enabled.
2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
[base] Add public API to change log handling function.
* include/freetype/ftlogging.h (FT_Custom_Log_Handler): New function
typedef to store the custom callback logging function.
(FT_Set_Log_Handler, FT_Set_Default_Log_Handler): New functions to
set and reset custom log handler.
* include/freetype/internal/ftdebug.h (custom_output_handler): New
variable to support a custom callback logging function.
(FT_Logging_Callback): A new function typedef to print log using
custom callback logging function, which is set using
`FT_Set_Log_Handler`.
(FT_Log): Use it.
* src/base/ftdebug.c (FT_Set_Log_Handler,
FT_Set_Default_Log_Handler, FT_Logging_Callback): Add function
definitions.
2020-11-28 Priyesh Kumar <priyeshkkumar@gmail.com>
[base] Add public API to change the levels of tracing components.
* include/freetype/ftlogging.h: New header file.
* include/freetype/internal/ftdebug.h [FT_LOGGING]: Include
`ftlogging.h`.
* src/base/ftdebug.c (ft_custom_trace_level): New variable.
(ft_debug_init): Update to support change of levels of tracing
components of FreeType at run-time.
(FT_Trace_Set_Level): New function to change the levels of tracing
components at run-time.
(FT_Trace_Set_Default_Level): New function to reset the levels of
tracing components back to default.
2020-11-28 Priyesh Kumar <priyeshkkumar@gmail.com>
[base] Updates to print timestamp and name of `FT_COMPONENT` in logs.
* include/freetype/internal/ftdebug.h (FT_LOGGING_TAG,
FT_LOGGING_TAG_): New macros to resolve the value of `FT_COMPONENT'
into a string.
(ft_add_tag, ft_remove_tag): New functions to add and remove dlg tags.
* src/base/ftdebug.c: Add new variables to control the logging of
timestamp and name of `FT_COMPONENT` along with actual logs.
(ft_add_tag, ft_remove_tag): Add function definitions.
(ft_log_handler): Updates to print timestamp and name of
`FT_COMPONENT`.
(ft_debug_init) [FT_LOGGING]: Users can now control the logging of
timestamp and name of `FT_COMPONENT` by adding tags in the
`FT2_DEBUG` environment variable.
2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com>
[base] Add functions and variables to print logs to a file.
* include/freetype/internal/ftdebug.h: Added dlg's header files.
(FT_LOG): New macro to redirect trace logs to dlg's API's whenever
`FT_LOGGING' is defined.
(ft_logging_init, ft_logging_deinit): New functions to handle
initialization and uninitialization of logging related variables.
(ft_log_handler): New function to handle logs of FreeType.
* src/base/ftdebug.c: Add necessary logging related variables.
(ft_logging_init, ft_logging_deinit, ft_log_handler): Add function
definitions.
* src/base/ftinit.c (FT_Init_FreeType) [FT_LOGGING]: Call
`ft_logging_init`.
(FT_Done_FreeType) [FT_LOGGING]: Call `ft_logging_deinit`.
* src/base/ftobjs.c (FT_New_Library): Call `ft_debug_init` only if
`FT_LOGGING` is not defined.
2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com>
[builds] Necessary changes to make 'dlg' compile.
* autogen.sh (copy_submodule_files): New script to copy all the
necessary source and include files from `submodules/dlg` to
`src/dlg`.
* src/dlg/dlgwrap.c: New wrapper file for `src/dlg.c`. It enables
the build of 'dlg' if the `FT_LOGGING` macro is defined.
* src/dlg/rules.mk: New sub-Makefile.
* builds/freetype.mk (DLG_DIR): New variable to include the
header files of the 'dlg' library.
(INCLUDES): Add `DLG_DIR`.
(FT_CFLAGS): Add `-std=c99' flag.
Include `src/dlg/rules.mk` file to build 'dlg' library.
(OBJ_S, OBJ_M): Add `DLG_OBJS_M` and `DLG_OBJS_S`.
* builds/toplevel.mk: For builds directly from the git repository
we need to copy files from `submodule/dlg` to `src/dlg`.
* include/freetype/config/ftoption.h, devel/ftoption.h (FT_LOGGING):
New macro to enable or disable the logging facility in FreeType.
2020-11-27 Priyesh Kumar <priyeshkkumar@gmail.com>
* .gitmodules: Add 'dlg' library's git repository as submodule.
2020-12-01 Werner Lemberg <wl@gnu.org>
* src/tools/chktrcmp.py (trace_use_pat): Update to current use.
2020-11-20 Alexei Podtelezhnikov <apodtele@gmail.com>
[cff,cid,type1] Demote old engine for lack of CFF2.
* src/cff/cffobjs.c (cff_driver_init): Always default to Adobe engine.
* src/cid/cidobjs.c (cid_driver_init): Ditto.
* src/type1/t1objs.c (T1_Driver_Init): Ditto.
2020-11-09 Werner Lemberg <wl@gnu.org>
* src/type42/t42parse.c (t42_parse_sfnts): More tracing messages.
2020-11-04 Werner Lemberg <wl@gnu.org>
* meson.build: Fix .pc file generation.
For backwards compatibility we need the libtool version, not the .so
number.
Reported by Nikolaus.
2020-10-28 Werner Lemberg <wl@gnu.org>
[truetype] Minor update to forthcoming OpenType 1.8.4 standard.
* src/truetype/ttgxvar.c (ft_var_load_item_variation_store): Limit
size of `regionCount`.
2020-10-26 Werner Lemberg <wl@gnu.org>
* meson.build: Fix 'harfbuzz' and 'brotli' build options (#59347).
Without this patch, 'harfbuzz' and 'brotli' are always required.
Patch submitted anonymously in Savannah bug report.
2020-10-23 Ben Wagner <bungeman@google.com>
* src/sfnt/pngshim.c (Load_SBit_Png): Fix memory leak (#59322).
The issue is that `rows` is allocated but will not be freed in the
event that the call to `png_read_image` fails and calls `longjmp`.
Changelog:
Overview of Changes from GIMP 2.10.28 to GIMP 2.10.30
=====================================================
Core:
- Do not follow subpixel font rendering choice from system settings
for text layer rendering. These systems are useful for GUI
rendering on a screen of a specific type and pixel order. Yet when
rendering an image which can be zoomed in or out, showed on various
screens or even printed, subpixel font rendering doesn't make sense.
- Rewrite the core selection drawing logics so that it works on macOS
Big Sur and over. This is a backport (adapted to GTK+2) of the fix
brought in GIMP 2.99.8 for Wayland and macOS.
- Ignore MakerNote metadata tag at export and only store the tags that
go in it, hence avoiding partial invalid metadata.
- Color picking from Colors dockable can now use the Freedesktop
portal.
- On Windows, move from GetICMProfile() to WcsGetDefaultColorProfile()
because the former is broken in Windows 11.
Plug-ins:
- metadata-viewer: improve how XMP tags with multiple values are
handled and shown (now each value on a separate line for better
readability).
- metadata-editor:
* XMP array tags of type BAG and SEQ are now on separate lines.
* Comparing XMP tags with equivalent IPTC tags with multiple values,
each value is compared individually, instead of comparing the list
as a whole.
- Many robustness improvements and other fixes to the metadata
plug-ins.
- AVIF: prefer AOM encoder for export.
- PSD:
* Skip sanity check for mask of rendered layers as some layer mask
have invalid dimensions in such cases. They will now be loaded
correctly.
* Fixed loading of CMYK PSD files without alpha.
* Fixed loading of CMYK images without layers.
* Fixed loading of merged image of a 16 bit per channel RGBA PSD
file with the alpha channel opaque.
- PBM: large file export now always works and does not depend anymore
on the platform's long int size.
- Screenshot:
* GNOME shell implementation dropped because the D-Bus API has been
restricted to core components for security reasons, thus our
plug-in was failing.
* KDE portal moved as last fallback after the X implementation
(when running on X) and Freedesktop portal, because KDE is also
starting to block API calls for security reasons.
Installer:
- Extension .avif now associated to GIMP.
- Drop codepage conversion, use UTF-8 for language files.
Build:
- macOS support officially bumped to macOS 10.12 (Sierra). We would
usually try to avoid doing this within a stable release but the
conditions (lack of contributors) is such that it is hard to avoid.
Changelog:
GEGL-0.4.34 2021-12-19
----------------------
Operations:
~~~~~~~~~~~
magick-load: use g_spawn_async instead of system to run the image magick
convert fallback - preventing shell expansion on non-escaped/filtered
paths in constructed commandline.
ripple: avoid a possible division by zero.
Build:
~~~~~~
Explicit dependency specification in meson for generated CL files.
ctx has been moved to be part of gegl-common.so nearer to the operations
using it avoiding polluting the GEGL library symbol table with the ctx
symbols.
pkgsrc updates:
---------------
* Add missing files in PLIST when nls option is enable.
* Remove lines in PLIST.Linux that are already in PLIST (thanks to
pkglint).
* Bump revision.