Class: EideticPDF::PdfObjects::PdfFontDescriptor
- Inherits:
-
PdfDictionaryObject
- Object
- IndirectObject
- PdfDictionaryObject
- EideticPDF::PdfObjects::PdfFontDescriptor
- Defined in:
- lib/epdfo.rb
Instance Attribute Summary
Attributes inherited from IndirectObject
Instance Method Summary collapse
-
#initialize(seq, gen, font_name, flags, font_b_box, missing_width, stem_v, stem_h, italic_angle, cap_height, x_height, ascent, descent, leading, max_width, avg_width) ⇒ PdfFontDescriptor
constructor
A new instance of PdfFontDescriptor.
Methods inherited from PdfDictionaryObject
Methods inherited from IndirectObject
#body, #footer, #header, #reference_object, #reference_string, #to_s
Constructor Details
#initialize(seq, gen, font_name, flags, font_b_box, missing_width, stem_v, stem_h, italic_angle, cap_height, x_height, ascent, descent, leading, max_width, avg_width) ⇒ PdfFontDescriptor
Returns a new instance of PdfFontDescriptor.
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/epdfo.rb', line 473 def initialize(seq, gen, font_name, flags, font_b_box, missing_width, stem_v, stem_h, italic_angle, cap_height, x_height, ascent, descent, leading, max_width, avg_width) super(seq, gen) dictionary['Type'] = PdfName.new('FontDescriptor') dictionary['FontName'] = PdfName.new(font_name) dictionary['Flags'] = PdfInteger.new(flags) dictionary['FontBBox'] = PdfArray.new(font_b_box.map { |i| PdfInteger.new(i) }) dictionary['MissingWidth'] = PdfInteger.new(missing_width) dictionary['StemV'] = PdfInteger.new(stem_v) if stem_v dictionary['StemH'] = PdfInteger.new(stem_h) if stem_h dictionary['ItalicAngle'] = PdfReal.new(italic_angle) dictionary['CapHeight'] = PdfInteger.new(cap_height) dictionary['XHeight'] = PdfInteger.new(x_height) dictionary['Ascent'] = PdfInteger.new(ascent) dictionary['Descent'] = PdfInteger.new(descent) dictionary['Leading'] = PdfInteger.new(leading) dictionary['MaxWidth'] = PdfInteger.new(max_width) dictionary['AvgWidth'] = PdfInteger.new(avg_width) end |