Class: PDF::Reader::CidWidths
- Inherits:
-
Object
- Object
- PDF::Reader::CidWidths
- Extended by:
- Forwardable
- Defined in:
- lib/pdf/reader/cid_widths.rb
Overview
A Hash-like object that wraps the array of glyph widths in a CID font and gives us a nice way to query it for specific widths.
there are two ways to calculate a cidfont_glyph_width, that are defined in Section 9.7.4.3 PDF 32000-1:2008 pp 271, the differences are remarked on below. because of these difference that may be contained within the same array, it is a bit difficult to parse this array.
Instance Method Summary collapse
-
#initialize(default, array) ⇒ CidWidths
constructor
A new instance of CidWidths.
Constructor Details
#initialize(default, array) ⇒ CidWidths
Returns a new instance of CidWidths.
20 21 22 |
# File 'lib/pdf/reader/cid_widths.rb', line 20 def initialize(default, array) @widths = parse_array(default, array.dup) end |