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.
18
19
20
21
22
|
# File 'lib/harfbuzz/face.rb', line 18
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.
16
17
18
|
# File 'lib/harfbuzz/face.rb', line 16
def hb_face
@hb_face
end
|
Instance Method Details
#glyph_count ⇒ Object
32
33
34
|
# File 'lib/harfbuzz/face.rb', line 32
def glyph_count
Harfbuzz.hb_face_get_glyph_count(@hb_face)
end
|
#index ⇒ Object
24
25
26
|
# File 'lib/harfbuzz/face.rb', line 24
def index
Harfbuzz.hb_face_get_index(@hb_face)
end
|
#upem ⇒ Object
28
29
30
|
# File 'lib/harfbuzz/face.rb', line 28
def upem
Harfbuzz.hb_face_get_upem(@hb_face)
end
|