[os2] Capitalize table tag and struct
Other tables follow the case of the OT tag, except this one.
This commit is contained in:
parent
8034d1dda0
commit
2c68f34bdd
@ -194,8 +194,8 @@ struct hmtxvmtx
|
||||
bool got_font_extents = false;
|
||||
if (T::os2Tag)
|
||||
{
|
||||
hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<os2> (face);
|
||||
const os2 *os2_table = os2_blob->as<os2> ();
|
||||
hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<OS2> (face);
|
||||
const OS2 *os2_table = os2_blob->as<OS2> ();
|
||||
#define USE_TYPO_METRICS (1u<<7)
|
||||
if (0 != (os2_table->fsSelection & USE_TYPO_METRICS))
|
||||
{
|
||||
@ -336,7 +336,7 @@ struct hmtxvmtx
|
||||
struct hmtx : hmtxvmtx<hmtx, hhea> {
|
||||
static const hb_tag_t tableTag = HB_OT_TAG_hmtx;
|
||||
static const hb_tag_t variationsTag = HB_OT_TAG_HVAR;
|
||||
static const hb_tag_t os2Tag = HB_OT_TAG_os2;
|
||||
static const hb_tag_t os2Tag = HB_OT_TAG_OS2;
|
||||
};
|
||||
struct vmtx : hmtxvmtx<vmtx, vhea> {
|
||||
static const hb_tag_t tableTag = HB_OT_TAG_vmtx;
|
||||
|
@ -36,11 +36,11 @@ namespace OT {
|
||||
* OS/2 and Windows Metrics
|
||||
* https://docs.microsoft.com/en-us/typography/opentype/spec/os2
|
||||
*/
|
||||
#define HB_OT_TAG_os2 HB_TAG('O','S','/','2')
|
||||
#define HB_OT_TAG_OS2 HB_TAG('O','S','/','2')
|
||||
|
||||
struct os2
|
||||
struct OS2
|
||||
{
|
||||
static const hb_tag_t tableTag = HB_OT_TAG_os2;
|
||||
static const hb_tag_t tableTag = HB_OT_TAG_OS2;
|
||||
|
||||
inline bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
@ -50,12 +50,12 @@ struct os2
|
||||
|
||||
inline bool subset (hb_subset_plan_t *plan) const
|
||||
{
|
||||
hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<os2> (plan->source);
|
||||
hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<OS2> (plan->source);
|
||||
hb_blob_t *os2_prime_blob = hb_blob_create_sub_blob (os2_blob, 0, -1);
|
||||
// TODO(grieger): move to hb_blob_copy_writable_or_fail
|
||||
hb_blob_destroy (os2_blob);
|
||||
|
||||
os2 *os2_prime = (os2 *) hb_blob_get_data_writable (os2_prime_blob, nullptr);
|
||||
OS2 *os2_prime = (OS2 *) hb_blob_get_data_writable (os2_prime_blob, nullptr);
|
||||
if (unlikely (!os2_prime)) {
|
||||
hb_blob_destroy (os2_prime_blob);
|
||||
return false;
|
||||
@ -67,7 +67,7 @@ struct os2
|
||||
os2_prime->usLastCharIndex.set (max_cp);
|
||||
|
||||
_update_unicode_ranges (plan->unicodes, os2_prime->ulUnicodeRange);
|
||||
bool result = plan->add_table (HB_OT_TAG_os2, os2_prime_blob);
|
||||
bool result = plan->add_table (HB_OT_TAG_OS2, os2_prime_blob);
|
||||
|
||||
hb_blob_destroy (os2_prime_blob);
|
||||
return result;
|
||||
|
@ -171,8 +171,8 @@ _subset_table (hb_subset_plan_t *plan,
|
||||
case HB_OT_TAG_cmap:
|
||||
result = _subset<const OT::cmap> (plan);
|
||||
break;
|
||||
case HB_OT_TAG_os2:
|
||||
result = _subset<const OT::os2> (plan);
|
||||
case HB_OT_TAG_OS2:
|
||||
result = _subset<const OT::OS2> (plan);
|
||||
break;
|
||||
case HB_OT_TAG_post:
|
||||
result = _subset<const OT::post> (plan);
|
||||
|
Loading…
Reference in New Issue
Block a user