[dfont] Minor
This commit is contained in:
parent
bf852f0e62
commit
3fba41906f
|
@ -411,17 +411,14 @@ struct ResourceForkHeader
|
||||||
|
|
||||||
inline const hb_bytes_t get_data (const ResourceTypeRecord& type,
|
inline const hb_bytes_t get_data (const ResourceTypeRecord& type,
|
||||||
unsigned int idx) const
|
unsigned int idx) const
|
||||||
{
|
{ return (this+map).get_resource_record (type, idx).get_data (&(this+data)); }
|
||||||
const ResourceMap &resource_map = this+map;
|
|
||||||
const void *data_base = &(this+data);
|
|
||||||
return resource_map.get_resource_record (type, idx).get_data (data_base);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const OpenTypeFontFace& get_face (unsigned int idx,
|
inline const OpenTypeFontFace& get_face (unsigned int idx,
|
||||||
unsigned int *base_offset = nullptr) const
|
unsigned int *base_offset = nullptr) const
|
||||||
{
|
{
|
||||||
const ResourceMap &resource_map = this+map;
|
const ResourceMap &resource_map = this+map;
|
||||||
for (unsigned int i = 0; i < resource_map.get_type_count (); i++)
|
unsigned int count = resource_map.get_type_count ();
|
||||||
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
const ResourceTypeRecord& type = resource_map.get_type_record (i);
|
const ResourceTypeRecord& type = resource_map.get_type_record (i);
|
||||||
if (type.is_sfnt () && idx < type.get_resource_count ())
|
if (type.is_sfnt () && idx < type.get_resource_count ())
|
||||||
|
|
Loading…
Reference in New Issue