|  |  | @ -1,8 +1,8 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | # frozen_string_literal: true |  |  |  | # frozen_string_literal: true | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | # fix NoMethodError: undefined method `field_value' for #<HexaPDF::Type::AcroForm::Field |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | module HexaPDF |  |  |  | module HexaPDF | 
			
		
	
		
		
			
				
					
					|  |  |  |   module Type |  |  |  |   module Type | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     # fix NoMethodError: undefined method `field_value' for #<HexaPDF::Type::AcroForm::Field | 
			
		
	
		
		
			
				
					
					|  |  |  |     module AcroForm |  |  |  |     module AcroForm | 
			
		
	
		
		
			
				
					
					|  |  |  |       class Field |  |  |  |       class Field | 
			
		
	
		
		
			
				
					
					|  |  |  |         def field_value |  |  |  |         def field_value | 
			
		
	
	
		
		
			
				
					|  |  | @ -10,5 +10,34 @@ module HexaPDF | 
			
		
	
		
		
			
				
					
					|  |  |  |         end |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |       end |  |  |  |       end | 
			
		
	
		
		
			
				
					
					|  |  |  |     end |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     # comparison of Integer with HexaPDF::PDFArray failed | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     class CIDFont < Font | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       private | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       def widths | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         cache(:widths) do | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           result = {} | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           index = 0 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           array = self[:W] || [] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           while index < array.size | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             entry = array[index] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             value = array[index + 1] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if value.is_a?(Array) || value.is_a?(HexaPDF::PDFArray) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               value.each_with_index { |width, i| result[entry + i] = width } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               index += 2 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             else | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               width = array[index + 2] | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               entry.upto(value) { |cid| result[cid] = width } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               index += 3 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           result | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       end | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     end | 
			
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
		
		
			
				
					
					|  |  |  | end |  |  |  | end | 
			
		
	
	
		
		
			
				
					|  |  | 
 |