Module: HarfBuzz::OT::Meta
- Defined in:
- lib/harfbuzz/ot/meta.rb
Overview
OpenType Meta table API
Class Method Summary collapse
-
.entry(face, tag) ⇒ Blob
Returns the blob for a meta entry.
-
.entry_tags(face) ⇒ Array<Integer>
Returns the tags of all meta table entries.
Class Method Details
.entry(face, tag) ⇒ Blob
Returns the blob for a meta entry
29 30 31 |
# File 'lib/harfbuzz/ot/meta.rb', line 29 def entry(face, tag) Blob.wrap_owned(C.(face.ptr, tag)) end |
.entry_tags(face) ⇒ Array<Integer>
Returns the tags of all meta table entries
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/harfbuzz/ot/meta.rb', line 12 def (face) count_ptr = FFI::MemoryPointer.new(:uint) count_ptr.write_uint(0) C.(face.ptr, 0, count_ptr, nil) count = count_ptr.read_uint return [] if count.zero? = FFI::MemoryPointer.new(:uint32, count) count_ptr.write_uint(count) C.(face.ptr, 0, count_ptr, ) .read_array_of_uint32(count_ptr.read_uint) end |