Class: Harfbuzz::Face
- Inherits:
-
Base
- Object
- Base
- Harfbuzz::Face
show all
- Defined in:
- lib/harfbuzz/face.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#define_finalizer, finalize
Constructor Details
#initialize(blob, face_index = 0) ⇒ Face
Returns a new instance of Face.
17
18
19
20
21
|
# File 'lib/harfbuzz/face.rb', line 17
def initialize(blob, face_index=0)
blob = Blob.new(blob) unless blob.kind_of?(Blob)
@hb_face = Harfbuzz.hb_face_create(blob.hb_blob, face_index)
define_finalizer(:hb_face_destroy, @hb_face)
end
|
Instance Attribute Details
#hb_face ⇒ Object
Returns the value of attribute hb_face.
15
16
17
|
# File 'lib/harfbuzz/face.rb', line 15
def hb_face
@hb_face
end
|
Instance Method Details
#glyph_count ⇒ Object
31
32
33
|
# File 'lib/harfbuzz/face.rb', line 31
def glyph_count
Harfbuzz.hb_face_get_glyph_count(@hb_face)
end
|
#index ⇒ Object
23
24
25
|
# File 'lib/harfbuzz/face.rb', line 23
def index
Harfbuzz.hb_face_get_index(@hb_face)
end
|
#upem ⇒ Object
27
28
29
|
# File 'lib/harfbuzz/face.rb', line 27
def upem
Harfbuzz.hb_face_get_upem(@hb_face)
end
|