def register_font(font_name, font_metrics, font_pdf_object, font_cmap = nil)
      new_font = Font.new
      new_font.name = font_name
      new_font.metrics = font_metrics
      new_font.cmap = font_cmap
      new_font[:is_reference_only] = true
      new_font[:referenced_object] = font_pdf_object
      FONTS_LIBRARY_MUTEX.synchronize do
        FONTS_LIBRARY[new_font.name] = new_font
      end
      new_font
    end
def register_font(font_name, font_metrics, font_pdf_object, font_cmap = nil)
      new_font = Font.new
      new_font.name = font_name
      new_font.metrics = font_metrics
      new_font.cmap = font_cmap
      new_font[:is_reference_only] = true
      new_font[:referenced_object] = font_pdf_object
      FONTS_LIBRARY_MUTEX.synchronize do
        FONTS_LIBRARY[new_font.name] = new_font
      end
      new_font
    end
adds a correctly formatted font object to the font library.
 font_name:: a Symbol with the name of the font. if the fonts name exists, the font will be overwritten!
 font_metrics:: a Hash of ont metrics, of the format char => {wx: char_width, boundingbox: [left_x, bottom_y, right_x, top_y]} where i == character code (i.e. 32 for space). The Hash should contain a special value :missing for the metrics of missing characters. an optional :wy will be supported in the future, for up to down fonts.
 font_pdf_object:: a Hash in the internal format recognized by CombinePDF, that represents the font object.
 font_cmap:: a CMap dictionary Hash) which maps unicode characters to the hex CID for the font (i.e. {"a" => "61", "z" => "7a" }).