class_docstr: A class representing a Type-1 font, for use by backends.
  
  Attributes
  ----------
  parts : tuple
      A 3-tuple of the cleartext part, the encrypted part, and the finale of
      zeros.
  
  decrypted : bytes
      The decrypted form of ``parts[1]``.
  
  prop : dict[str, Any]
      A dictionary of font properties. Noteworthy keys include:
  
      - FontName: PostScript name of the font
      - Encoding: dict from numeric codes to glyph names
      - FontMatrix: bytes object encoding a matrix
      - UniqueID: optional font identifier, dropped when modifying the font
      - CharStrings: dict from glyph names to byte code
      - Subrs: array of byte code subroutines
      - OtherSubrs: bytes object encoding some PostScript code
class_docstr_tok: ["A","class","representing","a","Type-1","font",",","for","use","by","backends",".","Attributes","--","--","--","--","--","parts",":","tuple","A","3-tuple","of","the","cleartext","part",",","the","encrypted","part",",","and","the","finale","of","zeros",".","decrypted",":","bytes","The","decrypted","form","of","``","parts","[","1","]","``",".","prop",":","dict","[","str",",","Any","]","A","dictionary","of","font","properties",".","Noteworthy","keys","include",":","-","FontName",":","PostScript","name","of","the","font","-","Encoding",":","dict","from","numeric","codes","to","glyph","names","-","FontMatrix",":","bytes","object","encoding","a","matrix","-","UniqueID",":","optional","font","identifier",",","dropped","when","modifying","the","font","-","CharStrings",":","dict","from","glyph","names","to","byte","code","-","Subrs",":","array","of","byte","code","subroutines","-","OtherSubrs",":","bytes","object","encoding","some","PostScript","code"]
docstr: Split the Type 1 font into its three main parts.
  
  The three parts are: (1) the cleartext part, which ends in a
  eexec operator; (2) the encrypted part; (3) the fixed part,
  which contains 512 ASCII zeros possibly divided on various
  lines, a cleartomark operator, and possibly something else.
code: def _split(self, data):
      """
      Split the Type 1 font into its three main parts.
  
      The three parts are: (1) the cleartext part, which ends in a
      eexec operator; (2) the encrypted part; (3) the fixed part,
      which contains 512 ASCII zeros possibly divided on various
      lines, a cleartomark operator, and possibly something else.
      """
  
      # Cleartext part: just find the eexec and skip whitespace
      idx = data.index(b"eexec")
      idx += len(b"eexec")
      while data[idx] in b" \t\r\n":
          idx += 1
      len1 = idx
  
      # Encrypted part: find the cleartomark operator and count
      # zeros backward
      idx = data.rindex(b"cleartomark") - 1
      zeros = 512
      while zeros and data[idx] in b"0" or data[idx] in b"\r\n":
          if data[idx] in b"0":
              zeros -= 1
          idx -= 1
      if zeros:
          # this may have been a problem on old implementations that
          # used the zeros as necessary padding
          _log.info("Insufficiently many zeros in Type 1 font")
  
      # Convert encrypted part to binary (if we read a pfb file, we may end
      # up converting binary to hexadecimal to binary again; but if we read
      # a pfa file, this part is already in hex, and I am not quite sure if
      # even the pfb format guarantees that it will be in binary).
      idx1 = len1 + (
          (idx - len1 + 2) & ~1
      )  # ensure an even number of bytes
      binary = binascii.unhexlify(data[len1:idx1])
  
      return data[:len1], binary, data[idx + 1 :]
  
imports: import binascii
  import functools
  import logging
  import re
  import string
  import struct
  import numpy
  from matplotlib.cbook import _format_approx
  from .None import _api
label_desc: Use image node_id 3 for calling the Type1Font obj's underlying member method code with example usage: obj._split(data) and returns: data,  binary,  data