Class: Pdfrb::Model::Type::FontFile
Overview
Type 1 font file stream (s7.8.2). Holds the Type1 / Type1C
font program. Referenced by FontDescriptor /FontFile.
Instance Attribute Summary
Attributes inherited from Cos::Stream
#stream
Attributes inherited from Object
#document, #gen, #oid, #value
Instance Method Summary
collapse
Methods inherited from Cos::Stream
#decoded_stream, #encoded_stream=, #initialize
#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate
Methods inherited from Object
#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type
Instance Method Details
#font_program ⇒ Object
22
23
24
|
# File 'lib/pdfrb/model/type/font_file.rb', line 22
def font_program
decoded_stream&.force_encoding(Encoding::BINARY)
end
|
#has_clear_text_mark? ⇒ Boolean
14
15
16
|
# File 'lib/pdfrb/model/type/font_file.rb', line 14
def has_clear_text_mark?
!!length1 && length1.positive?
end
|
#has_encrypted_portion? ⇒ Boolean
18
19
20
|
# File 'lib/pdfrb/model/type/font_file.rb', line 18
def has_encrypted_portion?
!!length2 && length2.positive?
end
|
9
|
# File 'lib/pdfrb/model/type/font_file.rb', line 9
def length1; self[:Length1]; end
|
10
|
# File 'lib/pdfrb/model/type/font_file.rb', line 10
def length2; self[:Length2]; end
|
11
|
# File 'lib/pdfrb/model/type/font_file.rb', line 11
def length3; self[:Length3]; end
|
12
|
# File 'lib/pdfrb/model/type/font_file.rb', line 12
def subtype; self[:Subtype]; end
|