Minor, tweak spaces
This commit is contained in:
parent
51b720f686
commit
0558413f27
|
@ -733,7 +733,7 @@ struct KerxSubTableHeader
|
||||||
{
|
{
|
||||||
typedef ExtendedTypes Types;
|
typedef ExtendedTypes Types;
|
||||||
|
|
||||||
unsigned int tuple_count () const { return tupleCount; }
|
unsigned tuple_count () const { return tupleCount; }
|
||||||
bool is_horizontal () const { return !(coverage & Vertical); }
|
bool is_horizontal () const { return !(coverage & Vertical); }
|
||||||
|
|
||||||
enum Coverage
|
enum Coverage
|
||||||
|
|
|
@ -408,8 +408,7 @@ struct hb_buffer_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void unsafe_to_break_all ()
|
void unsafe_to_break_all () { unsafe_to_break_impl (0, len); }
|
||||||
{ unsafe_to_break_impl (0, len); }
|
|
||||||
void safe_to_break_all ()
|
void safe_to_break_all ()
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < len; i++)
|
for (unsigned int i = 0; i < len; i++)
|
||||||
|
|
|
@ -203,8 +203,7 @@ struct bounds_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool empty () const
|
bool empty () const { return (min.x >= max.x) || (min.y >= max.y); }
|
||||||
{ return (min.x >= max.x) || (min.y >= max.y); }
|
|
||||||
|
|
||||||
point_t min;
|
point_t min;
|
||||||
point_t max;
|
point_t max;
|
||||||
|
|
|
@ -736,9 +736,7 @@ struct DefaultUVS : SortedArrayOf<UnicodeValueRange, HBUINT32>
|
||||||
struct UVSMapping
|
struct UVSMapping
|
||||||
{
|
{
|
||||||
int cmp (const hb_codepoint_t &codepoint) const
|
int cmp (const hb_codepoint_t &codepoint) const
|
||||||
{
|
{ return unicodeValue.cmp (codepoint); }
|
||||||
return unicodeValue.cmp (codepoint);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool sanitize (hb_sanitize_context_t *c) const
|
bool sanitize (hb_sanitize_context_t *c) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -167,7 +167,7 @@ struct KernOTSubTableHeader
|
||||||
static constexpr bool apple = false;
|
static constexpr bool apple = false;
|
||||||
typedef AAT::ObsoleteTypes Types;
|
typedef AAT::ObsoleteTypes Types;
|
||||||
|
|
||||||
unsigned int tuple_count () const { return 0; }
|
unsigned tuple_count () const { return 0; }
|
||||||
bool is_horizontal () const { return (coverage & Horizontal); }
|
bool is_horizontal () const { return (coverage & Horizontal); }
|
||||||
|
|
||||||
enum Coverage
|
enum Coverage
|
||||||
|
@ -222,7 +222,7 @@ struct KernAATSubTableHeader
|
||||||
static constexpr bool apple = true;
|
static constexpr bool apple = true;
|
||||||
typedef AAT::ObsoleteTypes Types;
|
typedef AAT::ObsoleteTypes Types;
|
||||||
|
|
||||||
unsigned int tuple_count () const { return 0; }
|
unsigned tuple_count () const { return 0; }
|
||||||
bool is_horizontal () const { return !(coverage & Vertical); }
|
bool is_horizontal () const { return !(coverage & Vertical); }
|
||||||
|
|
||||||
enum Coverage
|
enum Coverage
|
||||||
|
@ -276,7 +276,7 @@ struct kern
|
||||||
static constexpr hb_tag_t tableTag = HB_OT_TAG_kern;
|
static constexpr hb_tag_t tableTag = HB_OT_TAG_kern;
|
||||||
|
|
||||||
bool has_data () const { return u.version32; }
|
bool has_data () const { return u.version32; }
|
||||||
unsigned int get_type () const { return u.major; }
|
unsigned get_type () const { return u.major; }
|
||||||
|
|
||||||
bool has_state_machine () const
|
bool has_state_machine () const
|
||||||
{
|
{
|
||||||
|
|
27
src/main.cc
27
src/main.cc
|
@ -45,7 +45,8 @@ using namespace OT;
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
if (argc != 2) {
|
if (argc != 2)
|
||||||
|
{
|
||||||
fprintf (stderr, "usage: %s font-file.ttf\n", argv[0]);
|
fprintf (stderr, "usage: %s font-file.ttf\n", argv[0]);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +66,8 @@ main (int argc, char **argv)
|
||||||
const OpenTypeFontFile& ot = *sanitized;
|
const OpenTypeFontFile& ot = *sanitized;
|
||||||
|
|
||||||
|
|
||||||
switch (ot.get_tag ()) {
|
switch (ot.get_tag ())
|
||||||
|
{
|
||||||
case OpenTypeFontFile::TrueTypeTag:
|
case OpenTypeFontFile::TrueTypeTag:
|
||||||
printf ("OpenType font with TrueType outlines\n");
|
printf ("OpenType font with TrueType outlines\n");
|
||||||
break;
|
break;
|
||||||
|
@ -91,20 +93,23 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
int num_fonts = ot.get_face_count ();
|
int num_fonts = ot.get_face_count ();
|
||||||
printf ("%d font(s) found in file\n", num_fonts);
|
printf ("%d font(s) found in file\n", num_fonts);
|
||||||
for (int n_font = 0; n_font < num_fonts; n_font++) {
|
for (int n_font = 0; n_font < num_fonts; n_font++)
|
||||||
|
{
|
||||||
const OpenTypeFontFace &font = ot.get_face (n_font);
|
const OpenTypeFontFace &font = ot.get_face (n_font);
|
||||||
printf ("Font %d of %d:\n", n_font, num_fonts);
|
printf ("Font %d of %d:\n", n_font, num_fonts);
|
||||||
|
|
||||||
int num_tables = font.get_table_count ();
|
int num_tables = font.get_table_count ();
|
||||||
printf (" %d table(s) found in font\n", num_tables);
|
printf (" %d table(s) found in font\n", num_tables);
|
||||||
for (int n_table = 0; n_table < num_tables; n_table++) {
|
for (int n_table = 0; n_table < num_tables; n_table++)
|
||||||
|
{
|
||||||
const OpenTypeTable &table = font.get_table (n_table);
|
const OpenTypeTable &table = font.get_table (n_table);
|
||||||
printf (" Table %2d of %2d: %.4s (0x%08x+0x%08x)\n", n_table, num_tables,
|
printf (" Table %2d of %2d: %.4s (0x%08x+0x%08x)\n", n_table, num_tables,
|
||||||
(const char *) table.tag,
|
(const char *) table.tag,
|
||||||
(unsigned int) table.offset,
|
(unsigned int) table.offset,
|
||||||
(unsigned int) table.length);
|
(unsigned int) table.length);
|
||||||
|
|
||||||
switch (table.tag) {
|
switch (table.tag)
|
||||||
|
{
|
||||||
|
|
||||||
case HB_OT_TAG_GSUB:
|
case HB_OT_TAG_GSUB:
|
||||||
case HB_OT_TAG_GPOS:
|
case HB_OT_TAG_GPOS:
|
||||||
|
@ -114,7 +119,8 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
int num_scripts = g.get_script_count ();
|
int num_scripts = g.get_script_count ();
|
||||||
printf (" %d script(s) found in table\n", num_scripts);
|
printf (" %d script(s) found in table\n", num_scripts);
|
||||||
for (int n_script = 0; n_script < num_scripts; n_script++) {
|
for (int n_script = 0; n_script < num_scripts; n_script++)
|
||||||
|
{
|
||||||
const Script &script = g.get_script (n_script);
|
const Script &script = g.get_script (n_script);
|
||||||
printf (" Script %2d of %2d: %.4s\n", n_script, num_scripts,
|
printf (" Script %2d of %2d: %.4s\n", n_script, num_scripts,
|
||||||
(const char *)g.get_script_tag(n_script));
|
(const char *)g.get_script_tag(n_script));
|
||||||
|
@ -140,7 +146,8 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
int num_features = langsys.get_feature_count ();
|
int num_features = langsys.get_feature_count ();
|
||||||
printf (" %d feature(s) found in language system\n", num_features);
|
printf (" %d feature(s) found in language system\n", num_features);
|
||||||
for (int n_feature = 0; n_feature < num_features; n_feature++) {
|
for (int n_feature = 0; n_feature < num_features; n_feature++)
|
||||||
|
{
|
||||||
printf (" Feature index %2d of %2d: %d\n", n_feature, num_features,
|
printf (" Feature index %2d of %2d: %d\n", n_feature, num_features,
|
||||||
langsys.get_feature_index (n_feature));
|
langsys.get_feature_index (n_feature));
|
||||||
}
|
}
|
||||||
|
@ -149,7 +156,8 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
int num_features = g.get_feature_count ();
|
int num_features = g.get_feature_count ();
|
||||||
printf (" %d feature(s) found in table\n", num_features);
|
printf (" %d feature(s) found in table\n", num_features);
|
||||||
for (int n_feature = 0; n_feature < num_features; n_feature++) {
|
for (int n_feature = 0; n_feature < num_features; n_feature++)
|
||||||
|
{
|
||||||
const Feature &feature = g.get_feature (n_feature);
|
const Feature &feature = g.get_feature (n_feature);
|
||||||
int num_lookups = feature.get_lookup_count ();
|
int num_lookups = feature.get_lookup_count ();
|
||||||
printf (" Feature %2d of %2d: %c%c%c%c\n", n_feature, num_features,
|
printf (" Feature %2d of %2d: %c%c%c%c\n", n_feature, num_features,
|
||||||
|
@ -164,7 +172,8 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
int num_lookups = g.get_lookup_count ();
|
int num_lookups = g.get_lookup_count ();
|
||||||
printf (" %d lookup(s) found in table\n", num_lookups);
|
printf (" %d lookup(s) found in table\n", num_lookups);
|
||||||
for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++) {
|
for (int n_lookup = 0; n_lookup < num_lookups; n_lookup++)
|
||||||
|
{
|
||||||
const Lookup &lookup = g.get_lookup (n_lookup);
|
const Lookup &lookup = g.get_lookup (n_lookup);
|
||||||
printf (" Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups,
|
printf (" Lookup %2d of %2d: type %d, props 0x%04X\n", n_lookup, num_lookups,
|
||||||
lookup.get_type(), lookup.get_props());
|
lookup.get_type(), lookup.get_props());
|
||||||
|
|
Loading…
Reference in New Issue