[HarfBuzz] harfbuzz: Branch 'master' - 6 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Aug 2 09:04:39 UTC 2018
src/hb-face.cc | 1 -
src/hb-graphite2.cc | 2 +-
src/hb-machinery-private.hh | 8 +++++++-
src/hb-ot-layout-private.hh | 15 +++++++--------
src/hb-uniscribe.cc | 8 ++++----
5 files changed, 19 insertions(+), 15 deletions(-)
New commits:
commit d4d1bf8177b127caa57b146c932f553dca1ad933
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Aug 2 02:04:02 2018 -0700
Fix for recent rename
diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
index da7944b8..2ba905d6 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -106,7 +106,7 @@ _hb_graphite2_shaper_face_data_create (hb_face_t *face)
}
hb_blob_destroy (silf_blob);
- hb_graphite2_face_data_t *data = (hb_graphite2_face_data_t *) calloc (1, sizeof (hb_graphite2_shaper_face_data_t));
+ hb_graphite2_face_data_t *data = (hb_graphite2_face_data_t *) calloc (1, sizeof (hb_graphite2_face_data_t));
if (unlikely (!data))
return nullptr;
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 6d579534..94e6bb55 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -442,7 +442,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
hb_uniscribe_face_data_t *
_hb_uniscribe_shaper_face_data_create (hb_face_t *face)
{
- hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_face_data_t));
+ hb_uniscribe_face_data_t *data = (hb_uniscribe_face_data_t *) calloc (1, sizeof (hb_uniscribe_face_data_t));
if (unlikely (!data))
return nullptr;
@@ -520,7 +520,7 @@ _hb_uniscribe_shaper_font_data_create (hb_font_t *font)
{
if (unlikely (!hb_uniscribe_shaper_face_data_ensure (font->face))) return nullptr;
- hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) calloc (1, sizeof (hb_uniscribe_shaper_font_data_t));
+ hb_uniscribe_font_data_t *data = (hb_uniscribe_font_data_t *) calloc (1, sizeof (hb_uniscribe_font_data_t));
if (unlikely (!data))
return nullptr;
commit 91126aa11a5fa2bff72137df4768ad13fc9b7803
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Aug 2 02:03:13 2018 -0700
[uniscribe] Update for recent changes
diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc
index 7f7f10d0..6d579534 100644
--- a/src/hb-uniscribe.cc
+++ b/src/hb-uniscribe.cc
@@ -383,7 +383,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
memcpy(new_sfnt_data, orig_sfnt_data, length);
- OT::name &name = OT::StructAtOffset<OT::name> (new_sfnt_data, name_table_offset);
+ OT::name &name = StructAtOffset<OT::name> (new_sfnt_data, name_table_offset);
name.format.set (0);
name.count.set (ARRAY_LENGTH (name_IDs));
name.stringOffset.set (name.get_size ());
@@ -399,7 +399,7 @@ _hb_rename_font (hb_blob_t *blob, wchar_t *new_name)
}
/* Copy string data from new_name, converting wchar_t to UTF16BE. */
- unsigned char *p = &OT::StructAfter<unsigned char> (name);
+ unsigned char *p = &StructAfter<unsigned char> (name);
for (unsigned int i = 0; i < name_str_len; i++)
{
*p++ = new_name[i] >> 8;
commit 66952ec47b5f09d88b83fb6a71b1cdb26c53668d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Aug 2 01:44:20 2018 -0700
Remove unused table reference
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh
index fc2e57e7..c8855723 100644
--- a/src/hb-ot-layout-private.hh
+++ b/src/hb-ot-layout-private.hh
@@ -179,11 +179,10 @@ struct hb_ot_layout_t
/* TODO Move the following out of this struct. */
hb_face_t *face; /* MUST be before the lazy loaders. */
- hb_table_lazy_loader_t<1, struct OT::BASE> base;
- hb_table_lazy_loader_t<2, struct OT::MATH> math;
- hb_table_lazy_loader_t<3, struct OT::fvar> fvar;
- hb_table_lazy_loader_t<4, struct OT::avar> avar;
- hb_table_lazy_loader_t<5, struct AAT::morx> morx;
+ hb_table_lazy_loader_t<1, struct OT::MATH> math;
+ hb_table_lazy_loader_t<2, struct OT::fvar> fvar;
+ hb_table_lazy_loader_t<3, struct OT::avar> avar;
+ hb_table_lazy_loader_t<4, struct AAT::morx> morx;
};
commit 443de26fa56dd1ef149d3ce4206f4495eceec2eb
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Aug 2 01:41:19 2018 -0700
Minor
diff --git a/src/hb-face.cc b/src/hb-face.cc
index 75dc486e..9d17c4a5 100644
--- a/src/hb-face.cc
+++ b/src/hb-face.cc
@@ -33,7 +33,6 @@
#include "hb-open-file-private.hh"
-
/**
* hb_face_count: Get number of faces on the blob
* @blob:
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh
index 3a99937c..fc2e57e7 100644
--- a/src/hb-ot-layout-private.hh
+++ b/src/hb-ot-layout-private.hh
@@ -171,6 +171,12 @@ struct hb_ot_layout_t
const struct OT::GSUB *gsub;
const struct OT::GPOS *gpos;
+ unsigned int gsub_lookup_count;
+ unsigned int gpos_lookup_count;
+
+ hb_ot_layout_lookup_accelerator_t *gsub_accels;
+ hb_ot_layout_lookup_accelerator_t *gpos_accels;
+
/* TODO Move the following out of this struct. */
hb_face_t *face; /* MUST be before the lazy loaders. */
hb_table_lazy_loader_t<1, struct OT::BASE> base;
@@ -178,12 +184,6 @@ struct hb_ot_layout_t
hb_table_lazy_loader_t<3, struct OT::fvar> fvar;
hb_table_lazy_loader_t<4, struct OT::avar> avar;
hb_table_lazy_loader_t<5, struct AAT::morx> morx;
-
- unsigned int gsub_lookup_count;
- unsigned int gpos_lookup_count;
-
- hb_ot_layout_lookup_accelerator_t *gsub_accels;
- hb_ot_layout_lookup_accelerator_t *gpos_accels;
};
commit ee35af738b5c802ca62eb1c39b77f0bd992329df
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Aug 2 01:37:57 2018 -0700
Make lazy-loader safe for nil objectification
diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh
index 140bff6c..40e42071 100644
--- a/src/hb-machinery-private.hh
+++ b/src/hb-machinery-private.hh
@@ -656,6 +656,8 @@ struct hb_lazy_loader_t : hb_base_lazy_loader_t<WheresFace, hb_lazy_loader_t<Whe
{
static inline T *create (hb_face_t *face)
{
+ if (unlikely (!face))
+ return const_cast<T *> (&Null(T));
T *p = (T *) calloc (1, sizeof (T));
if (unlikely (!p))
p = const_cast<T *> (&Null(T));
@@ -678,6 +680,8 @@ struct hb_table_lazy_loader_t : hb_base_lazy_loader_t<WheresFace, hb_table_lazy_
{
static inline hb_blob_t *create (hb_face_t *face)
{
+ if (unlikely (!face))
+ return hb_blob_get_empty ();
return hb_sanitize_context_t ().reference_table<T> (face);
}
static inline void destroy (hb_blob_t *p)
commit 6404c49d0735d92779089ddef5c1d34aad1542d7
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Thu Aug 2 01:36:08 2018 -0700
Minor
diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh
index 081cbbfd..140bff6c 100644
--- a/src/hb-machinery-private.hh
+++ b/src/hb-machinery-private.hh
@@ -587,7 +587,7 @@ struct BEInt<Type, 4>
/*
- * Lazy struct and blob loaders.
+ * Lazy loaders.
*/
template <unsigned int WheresFace,
@@ -649,6 +649,8 @@ struct hb_base_lazy_loader_t
mutable Stored *instance;
};
+/* Specializations. */
+
template <unsigned int WheresFace, typename T>
struct hb_lazy_loader_t : hb_base_lazy_loader_t<WheresFace, hb_lazy_loader_t<WheresFace, T>, T>
{
More information about the HarfBuzz
mailing list