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

Function textlen

src_classic/utils.py:4332–4336  ·  view source on GitHub ↗

Return length of a string.

(x)

Source from the content-addressed store, hash-verified

4330 font = Font("helv")
4331
4332 def textlen(x):
4333 """Return length of a string."""
4334 return font.text_length(
4335 x, fontsize=fontsize, small_caps=small_caps
4336 ) # abbreviation
4337
4338 def char_lengths(x):
4339 """Return list of single character lengths for a string."""

Callers 4

fill_textboxMethod · 0.85
output_justifyMethod · 0.85
fill_textboxFunction · 0.85
output_justifyFunction · 0.85

Calls 1

text_lengthMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…