[subset-serialize] Formatting

pull/4993/head
Khaled Hosny 1 month ago committed by خالد حسني (Khaled Hosny)
parent e943a0098b
commit 1ce8191289
  1. 15
      src/hb-subset-serialize.cc
  2. 20
      src/hb-subset-serialize.h

@ -36,16 +36,16 @@
* @num_hb_objs: number of hb_subset_serialize_object_t in the hb_objects array.
*
* Given the input object graph info, repack a table to eliminate offset overflows and
* serialize it into a continous array of bytes. A nullptr is returned if the serializing attempt fails.
* serialize it into a continuous array of bytes. A nullptr is returned if the serializing attempt fails.
* Table specific optimizations (eg. extension promotion in GSUB/GPOS) may be performed.
* Passing HB_TAG_NONE will disable table specific optimizations.
*
* XSince: REPLACEME
**/
HB_EXTERN hb_blob_t*
hb_subset_serialize_or_fail (hb_tag_t table_tag,
hb_subset_serialize_object_t* hb_objects,
unsigned num_hb_objs)
HB_EXTERN hb_blob_t *
hb_subset_serialize_or_fail (hb_tag_t table_tag,
hb_subset_serialize_object_t *hb_objects,
unsigned num_hb_objs)
{
hb_vector_t<const hb_subset_serialize_object_t *> packed;
packed.alloc (num_hb_objs + 1);
@ -53,8 +53,5 @@ hb_subset_serialize_or_fail (hb_tag_t table_tag,
for (unsigned i = 0 ; i < num_hb_objs ; i++)
packed.push (&(hb_objects[i]));
return hb_resolve_overflows (packed,
table_tag,
20,
true);
return hb_resolve_overflows (packed, table_tag, 20, true);
}

@ -23,8 +23,8 @@
*
*/
#ifndef HB_SUBSET_REPACKER_H
#define HB_SUBSET_REPACKER_H
#ifndef HB_SUBSET_SERIALIZE_H
#define HB_SUBSET_SERIALIZE_H
#include "hb.h"
@ -50,9 +50,9 @@ typedef struct hb_subset_serialize_link_t {
* hb_subset_serialize_object_t:
* @head: start of object data
* @tail: end of object data
* @num_real_links: num of offset field in the object
* @real_links: pointer to array of offset info
* @num_virtual_links: num of objects that must be packed
* @num_real_links: number of offset field in the object
* @real_links: array of offset info
* @num_virtual_links: number of objects that must be packed
* after current object in the final
* serialized order
* @virtual_links: array of virtual link info
@ -68,12 +68,12 @@ typedef struct hb_subset_serialize_object_t {
hb_subset_serialize_link_t *virtual_links;
} hb_subset_serialize_object_t;
HB_EXTERN hb_blob_t*
hb_subset_serialize_or_fail (hb_tag_t table_tag,
hb_subset_serialize_object_t* hb_objects,
unsigned num_hb_objs);
HB_EXTERN hb_blob_t *
hb_subset_serialize_or_fail (hb_tag_t table_tag,
hb_subset_serialize_object_t *hb_objects,
unsigned num_hb_objs);
HB_END_DECLS
#endif /* HB_SUBSET_REPACKER_H */
#endif /* HB_SUBSET_SERIALIZE_H */

Loading…
Cancel
Save