Class: TTFunk::Table::Cff::SubrIndex

Inherits:
Index show all
Defined in:
lib/ttfunk/table/cff/subr_index.rb

Overview

CFF Subroutine index.

Instance Attribute Summary

Attributes inherited from SubTable

#file, #length, #table_offset

Instance Method Summary collapse

Methods inherited from Index

#[], #each, #encode, #items_count

Methods inherited from SubTable

#eot?, #initialize, #read

Constructor Details

This class inherits a constructor from TTFunk::SubTable

Instance Method Details

#biasInteger

Subroutine index biase. For correct subroutine selection the calculated bias must be added to the subroutine number operand before accessing the index.

Returns:

  • (Integer)
Source Code
lib/ttfunk/table/cff/subr_index.rb, line 12
12
def bias
13
  if items.length < 1240
14
    107
15
  elsif items.length < 33_900
16
    1131
17
  else
18
    32_768
19
  end
20
end