summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-ot-post-table.hh
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-ot-post-table.hh')
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-post-table.hh20
1 files changed, 14 insertions, 6 deletions
diff --git a/thirdparty/harfbuzz/src/hb-ot-post-table.hh b/thirdparty/harfbuzz/src/hb-ot-post-table.hh
index a4844e94bc..80d02ffba7 100644
--- a/thirdparty/harfbuzz/src/hb-ot-post-table.hh
+++ b/thirdparty/harfbuzz/src/hb-ot-post-table.hh
@@ -102,6 +102,14 @@ struct post
if (!serialize (c->serializer, glyph_names))
return_trace (false);
+ if (c->plan->user_axes_location->has (HB_TAG ('s','l','n','t')) &&
+ !c->plan->pinned_at_default)
+ {
+ float italic_angle = c->plan->user_axes_location->get (HB_TAG ('s','l','n','t'));
+ italic_angle = hb_max (-90.f, hb_min (italic_angle, 90.f));
+ post_prime->italicAngle.set_float (italic_angle);
+ }
+
if (glyph_names && version.major == 2)
return_trace (v2X.subset (c));
@@ -133,7 +141,7 @@ struct post
}
~accelerator_t ()
{
- hb_free (gids_sorted_by_name.get ());
+ hb_free (gids_sorted_by_name.get_acquire ());
table.destroy ();
}
@@ -160,7 +168,7 @@ struct post
if (unlikely (!len)) return false;
retry:
- uint16_t *gids = gids_sorted_by_name.get ();
+ uint16_t *gids = gids_sorted_by_name.get_acquire ();
if (unlikely (!gids))
{
@@ -263,10 +271,10 @@ struct post
bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
- return_trace (likely (c->check_struct (this) &&
- (version.to_int () == 0x00010000 ||
- (version.to_int () == 0x00020000 && v2X.sanitize (c)) ||
- version.to_int () == 0x00030000)));
+ return_trace (c->check_struct (this) &&
+ (version.to_int () == 0x00010000 ||
+ (version.to_int () == 0x00020000 && v2X.sanitize (c)) ||
+ version.to_int () == 0x00030000));
}
public: