Skip to content

MLR115: Literal font_size is zero or negative

qual reports MLR115 when a literal font_size keyword on a knowledge-resolved text constructor (Text, MarkupText, Tex, MathTex, SingleStringMathTex) is <= 0.

  • Default severity: error
  • Minimum confidence: certain
  • Implementation phase: 1
  • Fix: none

Text and TeX mobjects scale their glyphs by font_size; zero or negative sizes produce empty or inverted geometry and can raise during layout. Non-literal sizes (variables, expressions) never fire.

Wrong:

Text("hello", font_size=0)
MathTex("x", font_size=-12)

Right:

Text("hello", font_size=48)
MathTex("x", font_size=size)  # non-literal: not reported