| 1 |
libLASi Release 1.1.3 |
| 2 |
~~~~~~~~~~~~~~~~~~~~~ |
| 3 |
This is a maintenance release of libLASi that reflect the ongoing |
| 4 |
efforts of the libLASi developers to respond to bug reports for this |
| 5 |
stable and convenient library for creating PostScript documents that |
| 6 |
can contain characters from any of the script and symbol blocks |
| 7 |
supported in Unicode and by the Pango layout engine. |
| 8 |
|
| 9 |
If you encounter a problem with libLASi, then please send a bug report to |
| 10 |
the libLASi developers via the lasi-devel mailing list described at |
| 11 |
http://lists.sourceforge.net/lists/listinfo/lasi-devel. |
| 12 |
|
| 13 |
Please see the license under which this software is distributed (LGPL), and |
| 14 |
the disclaimer of all warranties, given in the COPYING.LIB file. |
| 15 |
|
| 16 |
INDEX |
| 17 |
|
| 18 |
1. OFFICIAL NOTICES FOR USERS |
| 19 |
|
| 20 |
1.1 CMake version compatibility |
| 21 |
1.2 Backwards-incompatible libLASi API changes |
| 22 |
1.3 Need help getting rid of deprecation build warnings |
| 23 |
|
| 24 |
2. Changes relative to our previous release (version 1.1.2) in decreasing order of importance |
| 25 |
|
| 26 |
2.1 Improve libLASi's response when pango/fontconfig chooses pure bitmapped fonts |
| 27 |
2.2 Make glyph names have a one-to-one relationship with glyphs |
| 28 |
2.3 Set target property POSITION_INDEPENDENT_CODE ON for the libLASi library |
| 29 |
2.4 Make "MissingGlyphExample" a more stringent test of font or glyph issues for libLASi |
| 30 |
2.5 Replace deprecated lower-case variants of Freetype macro constants with preferred upper-case form |
| 31 |
2.6 Add bounding boxes to the "MissingGlyphExample" and "ComplexTextLayoutExample" examples |
| 32 |
2.7 Rename example applications and results using consistent and descriptive core names |
| 33 |
2.8 Fix low-resolution boundary box issue |
| 34 |
2.9 Update doxygen configuration files from doxygen version 1.8.1.2 to 1.8.13 |
| 35 |
2.10 Change the minimum version of CMake from 2.8.9 to 3.13.2 |
| 36 |
|
| 37 |
3. Testing of this release. |
| 38 |
|
| 39 |
END of INDEX |
| 40 |
|
| 41 |
1. OFFICIAL NOTICES FOR USERS |
| 42 |
|
| 43 |
1.1 CMake version compatibility |
| 44 |
|
| 45 |
Our build system is implemented using CMake. The minimum version |
| 46 |
of CMake we allow is 3.13.2 on all platforms. That version is the |
| 47 |
one we have used to test this release of libLASi (see Section 3 |
| 48 |
below). However, if you try later CMake versions as they are |
| 49 |
released during the life of this libLASi release, our build system |
| 50 |
will likely continue to work well because CMake has an excellent |
| 51 |
reputation for preserving backwards compatibility. |
| 52 |
|
| 53 |
1.2 Backwards-incompatible libLASi API changes |
| 54 |
|
| 55 |
The bug fixes in this release required backwards-incompatible |
| 56 |
changes to the libLASi API (a change in the argument list of the |
| 57 |
PostscriptDocument::GlyphId::GlyphId protected method that is |
| 58 |
designed for internal use only and the addition of the |
| 59 |
PostscriptDocument::PangoItem_do protected method that is also |
| 60 |
designed for internal use only). Therefore, the SOVERSION for |
| 61 |
libLASi has been bumped from 1 to 2 to force source code that |
| 62 |
depends on this library (e.g., the PLplot psttf device driver) to |
| 63 |
be recompiled. However, such source code will not require changes |
| 64 |
to adjust to this backwards-incompatible change in the libLASi |
| 65 |
API. |
| 66 |
|
| 67 |
1.3 Need help getting rid of deprecation build warnings |
| 68 |
|
| 69 |
This release has deprecation warning build issues which are |
| 70 |
|
| 71 |
* "warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]" |
| 72 |
|
| 73 |
* "warning: ‘PangoContext* pango_ft2_get_context(double, double)’ is deprecated: Use 'pango_font_map_create_context' instead [-Wdeprecated-declarations]" |
| 74 |
|
| 75 |
* "warning: ‘FT_FaceRec_* pango_ft2_font_get_face(PangoFont*)’ is deprecated: Use 'pango_fc_font_lock_face' instead [-Wdeprecated-declarations]" |
| 76 |
|
| 77 |
All of these are beyond my current C++ and pango skill level to fix so |
| 78 |
help with cleaning up any of these deprecation build warnings messages |
| 79 |
would be much appreciated! |
| 80 |
|
| 81 |
2. Changes relative to our previous release (version 1.1.2) in decreasing order of importance |
| 82 |
|
| 83 |
2.1 Improve libLASi's response when pango/fontconfig chooses pure bitmapped fonts |
| 84 |
|
| 85 |
This change was the primary motivation for this release. |
| 86 |
|
| 87 |
Previous to this change when pango chose the popular Noto Color |
| 88 |
Emoji font to help render the Aries glyph, libLASi threw an error |
| 89 |
and aborted since such pure bitmap fonts are not suitable for |
| 90 |
libLASi's outline font needs. Such a response completely stops |
| 91 |
PLplot tests when PLplot standard example 7 attempts to render an |
| 92 |
Aries glyph with either the psttf or psttfc devices. So this |
| 93 |
previous response was completely unacceptable, and the fix for it |
| 94 |
is important. |
| 95 |
|
| 96 |
This change fixes that previous response by replacing all glyphs |
| 97 |
for a PangoItem where pango chooses a non-outline font with the |
| 98 |
default glyph used to represent missing glyphs. Of course, a |
| 99 |
much better procedure would be to request pango to limit its |
| 100 |
choices to outline fonts, but as far as I know there is no method |
| 101 |
for doing that (outside of having one fontconfig configuration |
| 102 |
for libLASi use and another for all other situations), and, in |
| 103 |
any case, the present workaround is "good enough for now" because |
| 104 |
pure bitmap fonts are rare (for example, it is possible that Noto |
| 105 |
Color Emoji in the future may become available in the outline |
| 106 |
form generally preferred for modern fonts), and Pango/fontconfig |
| 107 |
chooses such pure bitmap fonts for relatively few glyphs. |
| 108 |
|
| 109 |
2.2 Make glyph names have a one-to-one relationship with glyphs |
| 110 |
|
| 111 |
This change is an important motivation for this release. |
| 112 |
|
| 113 |
This change is confined to the case when fonts don't follow |
| 114 |
standards so that they cannot be interrogated for the glyph name, |
| 115 |
i.e., FT_HAS_GLYPH_NAMES(face) is false. Before this change, |
| 116 |
libLASi computed its own unique glyph name using the template |
| 117 |
|
| 118 |
LASi_glyph_<unique number> |
| 119 |
|
| 120 |
where <unique number> was incremented whenever the code decided a |
| 121 |
new glyph had been encountered. This scheme had the following |
| 122 |
disadvantages: |
| 123 |
|
| 124 |
* The logic for deciding when new glyphs were encountered was |
| 125 |
faulty with the result that the same glyph would have multiple |
| 126 |
glyph names and therefore redundant glyph information stored in |
| 127 |
the PostScript header whenever, for example, both |
| 128 |
|
| 129 |
doc.osBody() << show(string) |
| 130 |
|
| 131 |
and |
| 132 |
|
| 133 |
doc.get_dimensions(string,&lineSpacing,&xAdvance,&yMinimum,&yMaximum); |
| 134 |
|
| 135 |
(a common combination when bounding boxes are being determined) |
| 136 |
were called for the same string. |
| 137 |
|
| 138 |
* The glyph name depended on the order with which strings were |
| 139 |
processed with the result that PLplot octave results (where all |
| 140 |
standard octave examples were run from one instance of octave) |
| 141 |
had different glyph names than PLplot C results (where all |
| 142 |
standard C examples were run using separate executables for each |
| 143 |
example). |
| 144 |
|
| 145 |
* The glyph names were completely meaningless to humans reading |
| 146 |
through the PostScript code in the results. |
| 147 |
|
| 148 |
All these issues were addressed by borrowing a static function |
| 149 |
from PLplot (whose LGPL'd code allows us to do that) to calculate |
| 150 |
the UCS4 (32-bit unsigned) encoding of unicode for each glyph |
| 151 |
encountered in the UTF-8 encoded input string. With the result |
| 152 |
that the glyph names now have the template |
| 153 |
|
| 154 |
LASi_glyph_U+<UCS4 hexadecimal code for the glyph> |
| 155 |
|
| 156 |
where by definition the UCS4 hexadecimal code completely |
| 157 |
identifies the glyph in a unique way which is easy to look up, |
| 158 |
e.g., with the gucharmap application. |
| 159 |
|
| 160 |
The net result of this change is the PLplot test_diff_device |
| 161 |
target for the case when -DPLPLOT_TEST_DEVICE=psttfc now gives a |
| 162 |
clean report for the first time ever. So this change is an |
| 163 |
important one. |
| 164 |
|
| 165 |
2.3 Set target property POSITION_INDEPENDENT_CODE ON for the libLASi library |
| 166 |
|
| 167 |
This change is an important motivation for this release. |
| 168 |
|
| 169 |
This bug fix allows the static version of libLASi to be used with |
| 170 |
shared builds of external software that depend on libLASi such as |
| 171 |
the PLplot psttf device driver. |
| 172 |
|
| 173 |
2.4 Make "MissingGlyphExample" a more stringent test of font or glyph issues for libLASi |
| 174 |
|
| 175 |
The most important change here was to add |
| 176 |
|
| 177 |
"Unicode U+2648 ARIES (twice): ♈♈" |
| 178 |
"Embedded newlines a\\nb\\nc: a\nb\nc" |
| 179 |
|
| 180 |
to the strings that are rendered to PostScript by this example. |
| 181 |
|
| 182 |
For the first of these, the Debian Buster version of pango |
| 183 |
(likely due to the default fontconfig configuration) decides to |
| 184 |
use the popular Noto Color Emoji font to render the Aries glyphs, |
| 185 |
but the problem for that font is it is a pure bitmap font with no |
| 186 |
outline information that is required by libLASi. So this line |
| 187 |
tests the response of libLASi to this situation. |
| 188 |
|
| 189 |
For the second of these the linefeed "\n" glyph is a non-printing |
| 190 |
glyph. It appears for all such glyphs there is a "missing glyph" |
| 191 |
issue so regardless of future font improvements this line seems |
| 192 |
to be a reliable way to trigger missing-glyph issues to test the |
| 193 |
response of libLASi to this situation. |
| 194 |
|
| 195 |
2.5 Replace deprecated lower-case variants of Freetype macro constants with preferred upper-case form |
| 196 |
|
| 197 |
2.6 Add bounding boxes to the "MissingGlyphExample" and "ComplexTextLayoutExample" examples |
| 198 |
|
| 199 |
The resulting MissingGlyphExample.eps and |
| 200 |
ComplexTextLayoutExample.eps files join SimpleLASiExample.eps as |
| 201 |
being properly formatted EPS (Encapsulated PostScript) files. |
| 202 |
|
| 203 |
Note also that for the "Complex Text Layout" case, I implemented |
| 204 |
some generally useful C++ code macros (called |
| 205 |
LASI_SHOW_AND_UPDATE_BB, LASI_SCALED_SHOW_AND_UPDATE_BB, and |
| 206 |
LASI_ROTATED_SHOW_AND_UPDATE_BB), which made it straightforward |
| 207 |
to handle even complex cases such as determining the bounding box |
| 208 |
of text that has undergone anamorphic scaling or rotation. For |
| 209 |
example, the LASI_ROTATED_SHOW_AND_UPDATE_BB macro includes C++ |
| 210 |
code to apply the rotation matrix to determine the x,y |
| 211 |
coordinates of the corners of the rotated text box and use those |
| 212 |
corner coordinates to help determine the overall bounding box. |
| 213 |
|
| 214 |
2.7 Rename example applications and results using consistent and descriptive core names |
| 215 |
|
| 216 |
Those core names are " MissingGlyphExample", "SimpleLASiExample", |
| 217 |
and "ComplexTextLayoutExample". As a result the example source |
| 218 |
code name is <core name>.cpp, the example application name is |
| 219 |
<core name> (or <core name>.exe on Windows platforms), the EPS |
| 220 |
(Encapsulated PostScript) results are named <core name>.eps, and |
| 221 |
the PNG results (generated from the EPS results using inkscape) |
| 222 |
are named <core name>.png. |
| 223 |
|
| 224 |
2.8 Fix low-resolution boundary box issue |
| 225 |
|
| 226 |
As a result of this change the low-res (int) BB (bounding box) |
| 227 |
limits are calculated from the high-res (double) BB limits with |
| 228 |
the appropriate combinations of floor and ceil so the low-res |
| 229 |
limits always lie on or outside (by up to but not including 1 |
| 230 |
point) the high-res limits. Previously this calculation was done |
| 231 |
incorrectly with floor for all limits. |
| 232 |
|
| 233 |
2.9 Update doxygen configuration files from doxygen version 1.8.1.2 to 1.8.13 |
| 234 |
|
| 235 |
These changes were done in the usual way by running the following |
| 236 |
commands: |
| 237 |
|
| 238 |
doxygen -u Doxyfile.developer |
| 239 |
doxygen -u Doxyfile.user |
| 240 |
|
| 241 |
2.10 Change the minimum version of CMake from 2.8.9 to 3.13.2 |
| 242 |
|
| 243 |
This change was motivated by the bug fixes in later CMake |
| 244 |
versions and also the much better checking of the build system |
| 245 |
that occurs for the policies automatically used for 3.13.2. |
| 246 |
|
| 247 |
3. Testing of this release. |
| 248 |
|
| 249 |
This release has been successfully built and run-tested (following the |
| 250 |
prescription in README.Release_Manager_Cookbook) for both the shared |
| 251 |
and static library case on Linux (Debian Buster) using CMake-3.13.2 |
| 252 |
(the minimum allowed version of CMake for libLASi), libpango-1.42.4, |
| 253 |
libcairo-1.16.0, libfreetype-2.9.1, and libfontconfig-2.13.1. |
| 254 |
|
| 255 |
This release has not been tested (yet) on Mac OS X or Windows |
| 256 |
platforms, but we anticipate no difficulties on those platforms since |
| 257 |
previous versions of libLASi have worked well on those platforms. In |
| 258 |
other words, the cross-platform nature of libLASi appears to have been |
| 259 |
well supported by CMake in the past, and we feel that happy state will |
| 260 |
continue with this release as well. |