#include "hb.hh"
+#ifndef HB_NO_NAME
+
#include "hb-ot-name-table.hh"
#include "hb-ot-face.hh"
hb_ot_name_list_names (hb_face_t *face,
unsigned int *num_entries /* OUT */)
{
-#ifdef HB_NO_NAME
- if (num_entries)
- *num_entries = 0;
- return 0;
-#endif
const OT::name_accelerator_t &name = *face->table.name;
if (num_entries) *num_entries = name.names.length;
return (const hb_ot_name_entry_t *) name.names;
unsigned int *text_size /* IN/OUT */,
char *text /* OUT */)
{
-#ifdef HB_NO_NAME
- if (text_size)
- *text_size = 0;
- return 0;
-#endif
return hb_ot_name_get_utf<hb_utf8_t> (face, name_id, language, text_size,
(hb_utf8_t::codepoint_t *) text);
}
unsigned int *text_size /* IN/OUT */,
uint16_t *text /* OUT */)
{
-#ifdef HB_NO_NAME
- if (text_size)
- *text_size = 0;
- return 0;
-#endif
return hb_ot_name_get_utf<hb_utf16_t> (face, name_id, language, text_size, text);
}
unsigned int *text_size /* IN/OUT */,
uint32_t *text /* OUT */)
{
-#ifdef HB_NO_NAME
- if (text_size)
- *text_size = 0;
- return 0;
-#endif
return hb_ot_name_get_utf<hb_utf32_t> (face, name_id, language, text_size, text);
}
+
+
+#endif
hb_blob_destroy (blob);
blob = nullptr;
- unsigned int count;
+ unsigned int count = 0;
+
+#ifndef HB_NO_NAME
const hb_ot_name_entry_t *entries = hb_ot_name_list_names (face, &count);
for (unsigned int i = 0; i < count; i++)
printf ("%s\n", buf);
}
+#endif
hb_face_destroy (face);