[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;
|
bool got_font_extents = false;
|
||||||
if (T::os2Tag)
|
if (T::os2Tag)
|
||||||
{
|
{
|
||||||
hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<os2> (face);
|
hb_blob_t *os2_blob = hb_sanitize_context_t().reference_table<OS2> (face);
|
||||||
const os2 *os2_table = os2_blob->as<os2> ();
|
const OS2 *os2_table = os2_blob->as<OS2> ();
|
||||||
#define USE_TYPO_METRICS (1u<<7)
|
#define USE_TYPO_METRICS (1u<<7)
|
||||||
if (0 != (os2_table->fsSelection & USE_TYPO_METRICS))
|
if (0 != (os2_table->fsSelection & USE_TYPO_METRICS))
|
||||||
{
|
{
|
||||||
|
@ -336,7 +336,7 @@ struct hmtxvmtx
|
||||||
struct hmtx : hmtxvmtx<hmtx, hhea> {
|
struct hmtx : hmtxvmtx<hmtx, hhea> {
|
||||||
static const hb_tag_t tableTag = HB_OT_TAG_hmtx;
|
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 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> {
|
struct vmtx : hmtxvmtx<vmtx, vhea> {
|
||||||
static const hb_tag_t tableTag = HB_OT_TAG_vmtx;
|
static const hb_tag_t tableTag = HB_OT_TAG_vmtx;
|
||||||
|
|
|
@ -36,11 +36,11 @@ namespace OT {
|
||||||
* OS/2 and Windows Metrics
|
* OS/2 and Windows Metrics
|
||||||
* https://docs.microsoft.com/en-us/typography/opentype/spec/os2
|
* 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
|
inline bool sanitize (hb_sanitize_context_t *c) const
|
||||||
{
|
{
|
||||||
|
@ -50,12 +50,12 @@ struct os2
|
||||||
|
|
||||||
inline bool subset (hb_subset_plan_t *plan) const
|
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);
|
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
|
// TODO(grieger): move to hb_blob_copy_writable_or_fail
|
||||||
hb_blob_destroy (os2_blob);
|
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)) {
|
if (unlikely (!os2_prime)) {
|
||||||
hb_blob_destroy (os2_prime_blob);
|
hb_blob_destroy (os2_prime_blob);
|
||||||
return false;
|
return false;
|
||||||
|
@ -67,7 +67,7 @@ struct os2
|
||||||
os2_prime->usLastCharIndex.set (max_cp);
|
os2_prime->usLastCharIndex.set (max_cp);
|
||||||
|
|
||||||
_update_unicode_ranges (plan->unicodes, os2_prime->ulUnicodeRange);
|
_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);
|
hb_blob_destroy (os2_prime_blob);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -171,8 +171,8 @@ _subset_table (hb_subset_plan_t *plan,
|
||||||
case HB_OT_TAG_cmap:
|
case HB_OT_TAG_cmap:
|
||||||
result = _subset<const OT::cmap> (plan);
|
result = _subset<const OT::cmap> (plan);
|
||||||
break;
|
break;
|
||||||
case HB_OT_TAG_os2:
|
case HB_OT_TAG_OS2:
|
||||||
result = _subset<const OT::os2> (plan);
|
result = _subset<const OT::OS2> (plan);
|
||||||
break;
|
break;
|
||||||
case HB_OT_TAG_post:
|
case HB_OT_TAG_post:
|
||||||
result = _subset<const OT::post> (plan);
|
result = _subset<const OT::post> (plan);
|
||||||
|
|
Loading…
Reference in New Issue