class_docstr: the OS/2 table
class_docstr_tok: ["the","OS\/2","table"]
docstr: Set the 'ulCodePageRange*' fields to the specified 'bits'.
docstr_tok: ["Set","the","'ulCodePageRange","*","'","fields","to","the","specified","'bits","'","."]
code: def setCodePageRanges(self, bits):
      """Set the 'ulCodePageRange*' fields to the specified 'bits'."""
      ul1, ul2 = 0, 0
      for bit in bits:
          if 0 <= bit < 32:
              ul1 |= 1 << bit
          elif 32 <= bit < 64:
              ul2 |= 1 << (bit - 32)
          else:
              raise ValueError(
                  f"expected 0 <= int <= 63, found: {bit:r}"
              )
      if self.version < 1:
          self.version = 1
      self.ulCodePageRange1, self.ulCodePageRange2 = ul1, ul2
  
imports: from fontTools.misc import sstruct
  from fontTools.misc.roundTools import otRound
  from fontTools.misc.textTools import safeEval, num2binary, binary2num
  from fontTools.ttLib.tables import DefaultTable
  import bisect
  import logging
label_desc: Use image node_id 16 for calling the table_O_S_2f_2 obj's underlying member method code with example usage: obj.setCodePageRanges(bits) without return types