Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
3cabd142
by Werner Lemberg at 2021-11-22T19:58:21+01:00
9 changed files:
- docs/CHANGES
- docs/INSTALL
- include/freetype/config/ftstdlib.h
- include/freetype/internal/sfnt.h
- src/base/ftobjs.c
- src/cid/cidload.c
- src/gxvalid/gxvmod.c
- src/psaux/t1decode.c
- src/truetype/ttobjs.c
Changes:
... | ... | @@ -8,6 +8,26 @@ CHANGES BETWEEN 2.11.0 and 2.11.1 |
8 | 8 |
additional means to protect against malformed input.
|
9 | 9 |
|
10 | 10 |
|
11 |
+ II. MISCELLANEOUS
|
|
12 |
+ |
|
13 |
+ - Cmake support has been further improved. To do that various
|
|
14 |
+ backward-incompatible changes were necessary; please see file
|
|
15 |
+ `CMakeLists.txt` for more details.
|
|
16 |
+ |
|
17 |
+ - Since version 2.11.0, a C99 compiler is necessary to compile
|
|
18 |
+ FreeType.
|
|
19 |
+ |
|
20 |
+ - The experimental 'COLR' v1 API has been updated to the latest
|
|
21 |
+ OpenType standard 1.9.
|
|
22 |
+ |
|
23 |
+ - The `apinames` tool got a new option `-wV` to output an OpenVMS
|
|
24 |
+ Linker Option File.
|
|
25 |
+ |
|
26 |
+ - VMS support was updated.
|
|
27 |
+ |
|
28 |
+ - MS Visual Studio support was added to build the demo programs.
|
|
29 |
+ |
|
30 |
+ |
|
11 | 31 |
======================================================================
|
12 | 32 |
|
13 | 33 |
CHANGES BETWEEN 2.10.4 and 2.11.0
|
... | ... | @@ -9,19 +9,19 @@ I. Prerequisites and dependencies |
9 | 9 |
|
10 | 10 |
FreeType is a low level C library that only depends on the standard
|
11 | 11 |
C library with very few platform-dependent optimizations utilized at
|
12 |
- build time. Any C89-compliant compiler should be able to compile
|
|
12 |
+ build time. Any C99-compliant compiler should be able to compile
|
|
13 | 13 |
FreeType. System libraries, such as zlib, Gzip, bzip2, Brotli,
|
14 | 14 |
and libpng, might be used to handle compressed fonts or decode
|
15 | 15 |
embedded PNG glyphs.
|
16 | 16 |
|
17 | 17 |
FreeType auto-configuration scripts should be able to detect the
|
18 | 18 |
prerequisites if the necessary headers are available at the default
|
19 |
- locations. Otherwise, modify `include/freetype/config/ftoption.h'
|
|
19 |
+ locations. Otherwise, modify `include/freetype/config/ftoption.h`
|
|
20 | 20 |
to control how the FreeType library gets built. Normally, you don't
|
21 | 21 |
need to change anything.
|
22 | 22 |
|
23 | 23 |
Applications have very limited control over FreeType's behaviour at
|
24 |
- run-time; look at the documentation of function `FT_Property_Set'.
|
|
24 |
+ run-time; look at the documentation of function `FT_Property_Set`.
|
|
25 | 25 |
|
26 | 26 |
|
27 | 27 |
II. Normal installation and upgrades
|
... | ... | @@ -32,7 +32,7 @@ II. Normal installation and upgrades |
32 | 32 |
This also includes MacOS, Cygwin, MinGW + MSYS, Mingw-w64 + MSYS2,
|
33 | 33 |
and possibly other, similar environments.
|
34 | 34 |
|
35 |
- Please read `INSTALL.UNIX' to install or upgrade FreeType 2 on a
|
|
35 |
+ Please read `INSTALL.UNIX` to install or upgrade FreeType 2 on a
|
|
36 | 36 |
Unix system. Note that you *need* GNU Make for automatic
|
37 | 37 |
compilation, since other make tools won't work (this includes BSD
|
38 | 38 |
Make).
|
... | ... | @@ -48,7 +48,7 @@ II. Normal installation and upgrades |
48 | 48 |
Windows, OS/2, and BeOS, including MinGW* (without MSYS*), Visual
|
49 | 49 |
C++, Borland C++, and more.
|
50 | 50 |
|
51 |
- Instructions are provided in the file `INSTALL.GNU'.
|
|
51 |
+ Instructions are provided in the file `INSTALL.GNU`.
|
|
52 | 52 |
|
53 | 53 |
|
54 | 54 |
3. Other build tools and platforms.
|
... | ... | @@ -57,27 +57,27 @@ II. Normal installation and upgrades |
57 | 57 |
the corresponding instruction files in the FreeType root folder
|
58 | 58 |
or the builds/ sub-folder.
|
59 | 59 |
|
60 |
- CMake :: see CMakeLists.txt for more information
|
|
61 |
- Meson :: see meson.build for more information
|
|
62 |
- MSBuild :: see builds/windows/vc2010/freetype.vcxproj
|
|
63 |
- MMS :: see vms_make.com and docs/INSTALL.VMS
|
|
60 |
+ CMake :: see `CMakeLists.txt` for more information
|
|
61 |
+ Meson :: see `meson.build` for more information
|
|
62 |
+ MSBuild :: see `builds/windows/vc2010/freetype.vcxproj`
|
|
63 |
+ MMS :: see `vms_make.com` and `docs/INSTALL.VMS`
|
|
64 | 64 |
|
65 | 65 |
|
66 | 66 |
4. With an IDE Project File (e.g., for Visual Studio or CodeWarrior)
|
67 | 67 |
|
68 |
- We provide a small number of `project files' for various IDEs to
|
|
68 |
+ We provide a small number of 'project files' for various IDEs to
|
|
69 | 69 |
automatically build the library as well. Note that these files
|
70 | 70 |
are not actively supported by FreeType developers, they can break
|
71 | 71 |
or become obsolete.
|
72 | 72 |
|
73 |
- To find them, have a look at the content of the `builds/<system>'
|
|
73 |
+ To find them, have a look at the content of the `builds/<system>`
|
|
74 | 74 |
directory, where <system> stands for your OS or environment.
|
75 | 75 |
|
76 | 76 |
|
77 | 77 |
5. From you own IDE, or own Makefiles
|
78 | 78 |
|
79 | 79 |
If you want to create your own project file, follow the
|
80 |
- instructions given in the `INSTALL.ANY' document of this
|
|
80 |
+ instructions given in the `INSTALL.ANY` document of this
|
|
81 | 81 |
directory.
|
82 | 82 |
|
83 | 83 |
|
... | ... | @@ -86,7 +86,7 @@ III. Custom builds of the library |
86 | 86 |
|
87 | 87 |
Customizing the compilation of FreeType is easy, and allows you to
|
88 | 88 |
select only the components of the font engine that you really need.
|
89 |
- For more details read the file `CUSTOMIZE'.
|
|
89 |
+ For more details read the file `CUSTOMIZE`.
|
|
90 | 90 |
|
91 | 91 |
|
92 | 92 |
----------------------------------------------------------------------
|
... | ... | @@ -97,7 +97,7 @@ III. Custom builds of the library |
97 | 97 |
https://makepp.sourceforge.net
|
98 | 98 |
|
99 | 99 |
for more information; you need version 2.0 or newer, and you must
|
100 |
- pass option `--norc-substitution'.
|
|
100 |
+ pass option `--norc-substitution`.
|
|
101 | 101 |
|
102 | 102 |
----------------------------------------------------------------------
|
103 | 103 |
|
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 |
* `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
|
45 | 45 |
* `int` and `long` in bytes at compile-time. So far, this works for all
|
46 | 46 |
* platforms the library has been tested on. We also check `ULLONG_MAX`
|
47 |
- * to see if we can use 64-bit `long long` later.
|
|
47 |
+ * to see whether we can use 64-bit `long long` later on.
|
|
48 | 48 |
*
|
49 | 49 |
* Note that on the extremely rare platforms that do not provide integer
|
50 | 50 |
* types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
|
... | ... | @@ -574,10 +574,10 @@ FT_BEGIN_HEADER |
574 | 574 |
*
|
575 | 575 |
* @output:
|
576 | 576 |
* clip_box ::
|
577 |
- * The clip box for the requested base_glyph if one is found. The clip
|
|
578 |
- * box is computed taking scale and transformations configured on the
|
|
579 |
- * @FT_Face into account. @FT_ClipBox contains @FT_Vector values in
|
|
580 |
- * 26.6 format.
|
|
577 |
+ * The clip box for the requested `base_glyph` if one is found. The
|
|
578 |
+ * clip box is computed taking scale and transformations configured on
|
|
579 |
+ * the @FT_Face into account. @FT_ClipBox contains @FT_Vector values
|
|
580 |
+ * in 26.6 format.
|
|
581 | 581 |
*
|
582 | 582 |
* @note:
|
583 | 583 |
* To retrieve the clip box in font units, reset scale to units-per-em
|
... | ... | @@ -4720,7 +4720,7 @@ |
4720 | 4720 |
renderer = FT_Lookup_Renderer( library, slot->format, &node );
|
4721 | 4721 |
}
|
4722 | 4722 |
|
4723 |
- /* it is not an error if we cannot render a bitmat glyph */
|
|
4723 |
+ /* it is not an error if we cannot render a bitmap glyph */
|
|
4724 | 4724 |
if ( FT_ERR_EQ( error, Cannot_Render_Glyph ) &&
|
4725 | 4725 |
slot->format == FT_GLYPH_FORMAT_BITMAP )
|
4726 | 4726 |
error = FT_Err_Ok;
|
... | ... | @@ -559,8 +559,8 @@ |
559 | 559 |
}
|
560 | 560 |
|
561 | 561 |
/* read the subrmap's offsets */
|
562 |
- if ( FT_STREAM_SEEK( cid->data_offset + dict->subrmap_offset ) ||
|
|
563 |
- FT_FRAME_ENTER( ( num_subrs + 1 ) * dict->sd_bytes ) )
|
|
562 |
+ if ( FT_STREAM_SEEK( cid->data_offset + dict->subrmap_offset ) ||
|
|
563 |
+ FT_FRAME_ENTER( ( num_subrs + 1 ) * dict->sd_bytes ) )
|
|
564 | 564 |
goto Fail;
|
565 | 565 |
|
566 | 566 |
p = (FT_Byte*)stream->cursor;
|
... | ... | @@ -77,8 +77,7 @@ |
77 | 77 |
FT_ULong len_ ## _sfnt = 0
|
78 | 78 |
|
79 | 79 |
#define GXV_TABLE_LOAD( _sfnt ) \
|
80 |
- do \
|
|
81 |
- { \
|
|
80 |
+ FT_BEGIN_STMNT \
|
|
82 | 81 |
if ( ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count ) && \
|
83 | 82 |
( gx_flags & FT_VALIDATE_ ## _sfnt ) ) \
|
84 | 83 |
{ \
|
... | ... | @@ -87,11 +86,10 @@ |
87 | 86 |
if ( error ) \
|
88 | 87 |
goto Exit; \
|
89 | 88 |
} \
|
90 |
- } while ( 0 )
|
|
89 |
+ FT_END_STMNT
|
|
91 | 90 |
|
92 | 91 |
#define GXV_TABLE_VALIDATE( _sfnt ) \
|
93 |
- do \
|
|
94 |
- { \
|
|
92 |
+ FT_BEGIN_STMNT \
|
|
95 | 93 |
if ( _sfnt ) \
|
96 | 94 |
{ \
|
97 | 95 |
ft_validator_init( &valid, _sfnt, _sfnt + len_ ## _sfnt, \
|
... | ... | @@ -102,7 +100,7 @@ |
102 | 100 |
if ( error ) \
|
103 | 101 |
goto Exit; \
|
104 | 102 |
} \
|
105 |
- } while ( 0 )
|
|
103 |
+ FT_END_STMNT
|
|
106 | 104 |
|
107 | 105 |
#define GXV_TABLE_SET( _sfnt ) \
|
108 | 106 |
if ( FT_VALIDATE_ ## _sfnt ## _INDEX < table_count ) \
|
... | ... | @@ -27,10 +27,12 @@ |
27 | 27 |
|
28 | 28 |
#include "psauxerr.h"
|
29 | 29 |
|
30 |
+ |
|
30 | 31 |
/* ensure proper sign extension */
|
31 |
-#define Fix2Int( f ) ( (FT_Int)(FT_Short)( (f) >> 16 ) )
|
|
32 |
+#define Fix2Int( f ) ( (FT_Int) (FT_Short)( (f) >> 16 ) )
|
|
32 | 33 |
#define Fix2UInt( f ) ( (FT_UInt)(FT_Short)( (f) >> 16 ) )
|
33 | 34 |
|
35 |
+ |
|
34 | 36 |
/**************************************************************************
|
35 | 37 |
*
|
36 | 38 |
* The macro FT_COMPONENT is used in trace mode. It is an implicit
|
... | ... | @@ -142,11 +142,11 @@ |
142 | 142 |
}
|
143 | 143 |
|
144 | 144 |
|
145 |
- /* The fonts embedded in PDF changes their family names
|
|
146 |
- * by the randomization tag. PDF Reference 5.5.3 "Font
|
|
147 |
- * Subsets" defines its format as 6 uppercase letters and
|
|
148 |
- * '+' sign. For safety, we do not skip the tag violating
|
|
149 |
- * this rule.
|
|
145 |
+ /*
|
|
146 |
+ * Fonts embedded in PDFs are made unique by prepending randomization
|
|
147 |
+ * prefixes to their names: as defined in Section 5.5.3, 'Font Subsets',
|
|
148 |
+ * of the PDF Reference, they consist of 6 uppercase letters followed by
|
|
149 |
+ * the `+` sign. For safety, we do not skip prefixes violating this rule.
|
|
150 | 150 |
*/
|
151 | 151 |
|
152 | 152 |
static const FT_String*
|
... | ... | @@ -196,7 +196,7 @@ |
196 | 196 |
"DFGothic-EB", /* DynaLab Inc. 1992-1995 */
|
197 | 197 |
"DFGyoSho-Lt", /* DynaLab Inc. 1992-1995 */
|
198 | 198 |
"DFHei", /* DynaLab Inc. 1992-1995 [DFHei-Bd-WIN-HK-BF] */
|
199 |
- /* covers "DFHei-Md-HK-BF" maybe DynaLab Inc. */
|
|
199 |
+ /* covers "DFHei-Md-HK-BF", maybe DynaLab Inc. */
|
|
200 | 200 |
|
201 | 201 |
"DFHSGothic-W5", /* DynaLab Inc. 1992-1995 */
|
202 | 202 |
"DFHSMincho-W3", /* DynaLab Inc. 1992-1995 */
|
... | ... | @@ -553,8 +553,8 @@ |
553 | 553 |
if ( face->family_name &&
|
554 | 554 |
tt_check_trickyness_family( face->family_name ) )
|
555 | 555 |
{
|
556 |
- FT_TRACE3(( "found as a tricky font by "
|
|
557 |
- "its family name: %s\n", face->family_name ));
|
|
556 |
+ FT_TRACE3(( "found as a tricky font"
|
|
557 |
+ " by its family name: %s\n", face->family_name ));
|
|
558 | 558 |
return TRUE;
|
559 | 559 |
}
|
560 | 560 |
|
... | ... | @@ -563,8 +563,8 @@ |
563 | 563 |
/* sfnt tables (`cvt', `fpgm', and `prep'). */
|
564 | 564 |
if ( tt_check_trickyness_sfnt_ids( (TT_Face)face ) )
|
565 | 565 |
{
|
566 |
- FT_TRACE3(( "found as a tricky font by "
|
|
567 |
- "its cvt/fpgm/prep table checksum\n" ));
|
|
566 |
+ FT_TRACE3(( "found as a tricky font"
|
|
567 |
+ " by its cvt/fpgm/prep table checksum\n" ));
|
|
568 | 568 |
return TRUE;
|
569 | 569 |
}
|
570 | 570 |
|