NEWS
devEMF 4.5 (2024-07-26)
- -fix bug in recyling of slots in EMF+ object table (github issue
#8). Previously, recycled object created the longest time ago.
Now, recycle object used the longest time ago. The earlier
algorithm led to, in certain cirumstances, a object being replaced
in the middle of a drawing operation.
devEMF 4.4-2 (2024-02-02)
- -change naming of callback functions (which must be declared extern
"C") to start with "EMFcb_". Previously, these functions were
defined inside a C++ namespace called EMFcb; however, the namespace
isn't included in the exported names, so this strategy was useless
at preventing global naming conflicts. Thanks to Tomas Kalibera
for identifying a windows header conflict and this easy solution.
devEMF 4.4-1 (2023-06-29)
- -revert a change to the EMF+ page transform made in v4.4.
Previously used (fake) "pixel" units but changed to "inch". Turns
out Word does not export to pdf properly when using an "inch" page
transform. Reverting back to "pixel".
-fix sign bug in AFM descent calculation
devEMF 4.4 (2023-06-14)
- -avoid linux font metric dependency on Xft, which requires a
connection to an X server, and instead directly use Fontconfig.
-fixed a typo that prevented multiple font families from being used
in the same plot.
-round instead of truncate when converting from logical units to mm
to calculate dimensions in EMF header
-fix typo when specifying figure width and height in mm
devEMF 4.3-1 (2023-04-14)
- -changes in v4.3 did not consider the possibility that a *compiling*
Mac might have different libraries available than the *installing*
Mac (as can be the case when the package is built by CRAN and
installed by users as a binary). This version works around this
problem by explicitly not trying to use xlib or xft if CoreText is
available.
devEMF 4.3 (2023-04-05)
- -modify autoconf configuration to explicitly test for CoreText on
Apple platforms (since older OSX versions don't have CoreText) and
allow use of zlib or xft on Apple if CoreText is unavailable.
devEMF 4.2 (2023-01-17)
- -When drawing EMF (not EMF+) text strings, the EMF specification
allows for supplying inter-character spacing, but the specification
is ambigiuous as to whether this spacing is required. In the
absence of this inter-character spacing, all tested versions of
LibreOffice and Microsoft Office have no problem loading and view
EMF files. However, if Office 365 imports an EMF file with
individual EMF text strings >= 40 characters long that lack this
spacing AND then the user attempts to export the Office 365
document to PDF, then it fails with an error message. This version
of devEMF works around this issue by adding inter-character spacing
to EMF text drawing records.
-clean up and unify code for handling font metrics. Add support for
loading kerning from AFM files.
-simplify autoconf script & #ifdefs to only specify Xft, not both
Xft and Freetype, because the existence of Xft implies the
existence of Freetype.
devEMF 4.1-2 (2022-12-20)
- -bug fix: when generating an EMF plot, completely transparent fills
were previously not handled correctly if they followed a solid
color fill. (Thanks to Mauricio Vargas for reporting.)
-moved code from personal svn repository to public github; added
github URL to DESCRIPTION file
devEMF 4.1-1 (2022-11-04)
- -clipping rectangles (both EMF and EMF+) were previously being
defined starting from the lower-left corner. However, the EMF/EMF+
spec says rectangles should be defined from the upper-left corner.
Most viewing programs handled either way; however, when Word
exports to PDF, it requires the definition to match the
specification. Fixed now, along with a couple other places
rectangles were used. (Thanks to Arnaud Atoch for reporting.)
devEMF 4.1 (2022-06-24)
- -if making an EMF+ file but have the possibility of using any EMF
drawing records (i.e., unless emfPlusFont=TRUE and
emfPlusRaster=TRUE), use EMF clipping in addition to EMF+ clipping.
Previously, if the file was EMF+, only did EMF+ clipping. The old
strategy worked with some viewing programs but not all.
-tweak missing font metric warning message under Linux to remind
user that they might want to install Xft
-added "units" argument to emf() function to allow specification of
device width & height in SI units (thanks to Mauricio Vargas for
suggesting)
devEMF 4.0-2 (2020-10-01)
- -add missing preprocessor conditional
-enable linear gradient fill for circles
devEMF 4.0-1 (2020-09-02)
- -fix configure script to handle case where Xft (or FreeType or Zlib)
is available but not covered by pkg-config.
devEMF 4.0 (2020-08-28)
- -new option emfPlusFontToPath that converts characters to EMF+
graphics paths and thus makes graphics files portable (otherwise
fonts must be installed on both the creating system and the viewing
system). This route is the closest the EMF/EMF+ spec gets to
embedding fonts. This option is implemented for Linux (via
FreeType support) and Windows; OSX support is not yet implemented.
devEMF 3.8 (2020-06-29)
- -accommodate R graphics engine version 13
-add support for linear gradient fills (feature of GE13) for EMF+;
other new features from GE13 do not appear possible to implement
with EMF/EMF+
-fix couple minor memory leaks
devEMF 3.7 (2019-10-01)
- -For EMF+, request PixelOffsetModeHalf during file setup; this
allows certain nominally adjacent drawn objects to appear as
actually adjacent (without a thin gap between).
-No longer create EMF+ record for polygon/path outline if transparent.
-eliminate R CMD config CPP from configure.ac (deprecated and unnecessary)
-request closest EMF/EMF+ text alignment (left-aligned /
center-aligned / right-aligned); previously always requested
left-aligned. Since R allows for arbitrary horizontal alignment
between [0,1], we still need to calculate text width and adjust the
reference point manually. This change works around minor slop in
the calculation of the string width using font metrics (the degree
of slop depends on the viewing program and can become noticeable
with very long right-aligned strings).
devEMF 3.6-3 (2019-06-24)
- -Workaround for recent Microsoft security patch that breaks the EMF
specification and does not allow viewing of EMF files containing
certain Font-related records in Microsoft Office. Files using only
EMF+ fonts are not affected. The relevant CVE seems likely to be
https://www.zerodayinitiative.com/advisories/ZDI-19-557/
-Error check: return error if user requests negative or NA width/height
-Bug fix: handle text & font metrics for Unicode characters consuming more
than 2 bytes
devEMF 3.6-2 (2019-01-03)
- -Bug fix: white text color not being set until a non-white text
color was used first (bug only in EMF).
devEMF 3.6-1 (2018-05-22)
- -emphasize inability to embed fonts in help page
-attempt to fix compiler error on certain newer OSX systems
devEMF 3.6 (2017-07-24)
- -for rotated text in EMF (as opposed to EMF+), insert rotation into
font specification rather than using world transform. This change
makes for more ungainly files but greater compatibility with
viewing programs that only support a subset of the EMF specification.
-fix roundoff error when calculating page size in micrometers (in
EMF header; unclear if used by any viewing program)
devEMF 3.5 (2017-06-10)
- -implement clipping at EMF/EMF+ level (previously relied on R to
clip, which is more aggressive, particularly with regard to text,
and led to difference between EMF output vs. other devices)
-only issue select object command for EMF font immediately before writing
text (previously issued when first requested font metrics, which was not
necessary)
-change EMF world rotation commands to avoid depending on
SAVE/RESTORE DC (which is unclear from spec whether it is supposed
to save world rotation state). This change avoids a bug triggered
when printing figures with rotated text in Word 2010 (Thanks to
Philip Harslett for reporting)
devEMF 3.4 (2017-04-14)
- -add option for user to specify DPI used when setting up device
coordinate system. Previously was fixed at one dot per 0.01mm (aka
2540 DPI; 0.01mm units are used elsewhere by EMF), but some lazy
EMF clients appear to render the image as a bitmap of size equal to
inches * DPI.. which can lead to out of memory errors. Changing
default to be 300 DPI.
-fix handling of miter limit for miter-type line joins in EMF+ files.
-correct R_init_* registration entrypoint name
-use registered R symbol as entrypoint in .External call
-fix PROTECT error (thanks to Tomas Kalibera's tool for identifying)
devEMF 3.3-1 (2017-02-11)
- -fix edge case on linux where both Xft and zlib are installed but a
connection cannot be made to the X server (i.e., if running R from
ssh session without forwarding X connections)
-add cleanup script
devEMF 3.3 (2017-02-09)
- -fix additional Solaris compiler errors & warnings
-add OSX linker option "-framework CoreText", which allows the
devEMF shared library to be loaded separately from standard R (and
hence pass cran checks).
-fix memory leak in EMF font handling (EMF+ was ok)
-fix memory leak in Windows GDI font metric code
-fix minor memory leak in Linux font metric code
devEMF 3.2 (2017-02-03)
- -add raster image support
-embed devEMF version number in EMF output (in a comment field)
-rework text output to use world transformations
-bug fixes related to path rendering
-eliminate compiler errors on Solaris C++98 compiler
devEMF 3.1
- -add back ability to use Adobe font metric (AFM) files, in case no
graphical interface (Xft, Windows, Apple) is available to query.
Adobe distributes AFMs for the 14 core PDF fonts, and these are now
included in the devEMF package (note before v2.0, devEMF accessed
the AFMs included in the grDevices package). To keep this package
size managable, the AFMs are gzipped, so using this ability
requires zlib.
-add support for path rendering
devEMF 3.0
- -add support for EMF+ output. This format has less complete support
in client programs but allows for partial transparency. EMF+
output is now the default, but the pure EMF output is still
possible with an option to the "emf()" call that opens the device.
devEMF 2.0 (2015-01-29)
- -switch to platform-specific font metric code instead of accessing
the AFM files supplied with core R via a non-public R API (this
previous approach violated CRAN policy). The primary downside is
that the new code will not operate on non-OSX, non-Windows
platforms unless X windows is installed along with the Xft
development headers. It should work on OSX and Windows out of the
box; please contact me if you have trouble (I primarily work on
linux).
-bug fix: EMF polygon record had potential rounding mismatch between
vertex coordinates and bounding box coordinates.
-bug fix: when PS_NULL, set pen BS_NULL (although seems unnecessary
in practice)
devEMF 1.2-1
- Bug fix: EMF custom line types not working properly for solid
lines. (Thanks to Nis Martensen for reporting and patching)
devEMF 1.2 (2013-11-19)
- Bug fix: TextUTF8 used incorrect vertical alignment. (Thanks to
Jared Decker for reporting)
- change yLineBias to be 0.2 for compatibility with R >= 2.14
devEMF 1.1 (2012-02-07)
- Add support for different line end and join styles. (Thanks to
Mathias Walter for suggesting)
devEMF 1.0-1
- Amend help to mention that partial transparency is not supported
by the EMF format
devEMF 1.0
- Been using for 6mo with no problems; bump version to 1.
- Replace remaining few uses of printf with Rprintf
devEMF 0.9-4 (2011-10-19)
- Placed package within NAMESPACE (in prep for R-2.14.0)
- modified ps_fonts.h to make compatible with R-2.14.0 revised
handling of gzip i/o