MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / _adjust_font

Method _adjust_font

src/__init__.py:9046–9058  ·  view source on GitHub ↗

Ensure text_font is from our list and correctly spelled.

(self)

Source from the content-addressed store, hash-verified

9044 return f'Widget:(field_type={self.field_type_string} script={self.script})'
9045
9046 def _adjust_font(self):
9047 """Ensure text_font is from our list and correctly spelled.
9048 """
9049 if not self.text_font:
9050 self.text_font = "Helv"
9051 return
9052 valid_fonts = ("Cour", "TiRo", "Helv", "ZaDb")
9053 for f in valid_fonts:
9054 if self.text_font.lower() == f.lower():
9055 self.text_font = f
9056 return
9057 self.text_font = "Helv"
9058 return
9059
9060 def _checker(self):
9061 """Any widget type checks.

Callers 1

updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected