code: def test_2506():
      """Ensure expected font size across text writing angles."""
      doc = fitz.open()
      page = doc.new_page()
      point = fitz.Point(100, 300)  # insertion point
      fontsize = 11  # fontsize
      text = "Hello"  # text
      angles = (0, 30, 60, 90, 120)  # some angles
  
      # write text with different angles
      for angle in angles:
          page.insert_text(
              point,
              text,
              fontsize=fontsize,
              morph=(point, fitz.Matrix(angle)),
          )
  
      # ensure correct fontsize for get_texttrace() - forgiving rounding problems
      for span in page.get_texttrace():
          print(span["dir"])
          assert round(span["size"]) == fontsize
  
      # ensure correct fontsize for get_text() - forgiving rounding problems
      for block in page.get_text("dict")["blocks"]:
          for line in block["lines"]:
              print(line["dir"])
              for span in line["spans"]:
                  print(span["size"])
                  assert round(span["size"]) == fontsize
  
imports: import io
  import os
  import fitz
  import pickle
label_desc: Use image node_id 29 for calling a global function with example usage: test_2506() without return types