The default tar-v7 is not good enough for us (99 char filename
limit), so I have had bumped to tar-pax. We got one complaint
that someone's tar couldn't handle tar-pax. Set to tar-ustar
which is ~13 years earlier than tar-pax and is good enough for us.
This adds a set of NMake Makefiles that can be used to build HarfBuzz, from
the standard basic build building the minimal HarfBuzz DLL (consisting
of OpenType, fallback and Uniscribe support only), to a full fledged build
consisting of GLib and FreeType support, as well as building the utilities,
the test programs in src/ and test/api, and HarfBuzz-ICU and
HarfBuzz-GObject, and up to building the introspection files. This means a
flexible build mechanism is supported here, so anything that is supported
for a Windows build (code-wise), should all be supported by this build
system.
As in an earlier commit, the source listings are shared with the autotools
builds with the various Makefile.sources in src/, src/hb-ucdn and util/, and
this set of NMake Makefiles will transform these lists into the form they
want.
In the current form, all the test programs in test/api pass, and this has
been checked successfully with 'make -j8 distcheck'.
When I originally wrote hb-ft, FreeType objects did not support reference
counting. As such, hb_ft_face_create() and hb_ft_font_create() had a
"destroy" callback and client was responsible for making sure FT_Face is
kept around as long as the hb-font/face are alive.
However, since this was not clearly documented, some clienets didn't
correctly did that. In particular, some clients assumed that it's safe
to destroy FT_Face and then hb_face_t. This, indeed, used to work, until
45fd9424c7, which make face destroy access
font tables.
Now, I fixed that issue in 395b35903e since
the access was not needed, but the problem remains that not all clients
handle this correctly. See:
https://bugs.freedesktop.org/show_bug.cgi?id=86300
Fortunately, FT_Reference_Face() was added to FreeType in 2010, and so we
can use it now. Originally I wanted to change hb_ft_face_create() and
hb_ft_font_create() to reference the face if destroy==NULL was passed in.
That would improve pretty much all clients, with little undesired effects.
Except that FreeType itself, when compiled with HarfBuzz support, calls
hb_ft_font_create() with destroy==NULL and saves the resulting hb-font on
the ft-face (why does it not free it immediately?). Making hb-face
reference ft-face causes a cycling reference there. At least, that's my
current understanding.
At any rate, a cleaner approach, even if it means all clients will need a
change, is to introduce brand new API. Which this commit does.
Some comments added to hb-ft.h, hoping to make future clients make better
choices.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=75299
As in building for Android / iPhone. Only set it if
struct{char} alignment is not 1.
NOT tested on an actual Arm architecture. Guess we'll know
when this makes it to people's build bots.