< prev index next >
src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-head-table.hh
Print this page
*** 27,37 ****
*/
#ifndef HB_OT_HEAD_TABLE_HH
#define HB_OT_HEAD_TABLE_HH
! #include "hb-open-type-private.hh"
/*
* head -- Font Header
* https://docs.microsoft.com/en-us/typography/opentype/spec/head
*/
--- 27,37 ----
*/
#ifndef HB_OT_HEAD_TABLE_HH
#define HB_OT_HEAD_TABLE_HH
! #include "hb-open-type.hh"
/*
* head -- Font Header
* https://docs.microsoft.com/en-us/typography/opentype/spec/head
*/
*** 43,62 ****
struct head
{
friend struct OffsetTable;
! static const hb_tag_t tableTag = HB_OT_TAG_head;
! inline unsigned int get_upem (void) const
{
unsigned int upem = unitsPerEm;
/* If no valid head table found, assume 1000, which matches typical Type1 usage. */
return 16 <= upem && upem <= 16384 ? upem : 1000;
}
! inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
version.major == 1 &&
magicNumber == 0x5F0F3CF5u);
--- 43,75 ----
struct head
{
friend struct OffsetTable;
! static constexpr hb_tag_t tableTag = HB_OT_TAG_head;
! unsigned int get_upem () const
{
unsigned int upem = unitsPerEm;
/* If no valid head table found, assume 1000, which matches typical Type1 usage. */
return 16 <= upem && upem <= 16384 ? upem : 1000;
}
! enum mac_style_flag_t {
! BOLD = 1u<<0,
! ITALIC = 1u<<1,
! UNDERLINE = 1u<<2,
! OUTLINE = 1u<<3,
! SHADOW = 1u<<4,
! CONDENSED = 1u<<5
! };
!
! bool is_bold () const { return macStyle & BOLD; }
! bool is_italic () const { return macStyle & ITALIC; }
! bool is_condensed () const { return macStyle & CONDENSED; }
!
! bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (c->check_struct (this) &&
version.major == 1 &&
magicNumber == 0x5F0F3CF5u);
*** 139,150 ****
* 1: Only strongly left to right;
* 2: Like 1 but also contains neutrals;
* -1: Only strongly right to left;
* -2: Like -1 but also contains neutrals. */
public:
! HBINT16 indexToLocFormat; /* 0 for short offsets, 1 for long. */
! HBINT16 glyphDataFormat; /* 0 for current format. */
DEFINE_SIZE_STATIC (54);
};
--- 152,163 ----
* 1: Only strongly left to right;
* 2: Like 1 but also contains neutrals;
* -1: Only strongly right to left;
* -2: Like -1 but also contains neutrals. */
public:
! HBUINT16 indexToLocFormat; /* 0 for short offsets, 1 for long. */
! HBUINT16 glyphDataFormat; /* 0 for current format. */
DEFINE_SIZE_STATIC (54);
};
< prev index next >