skills/creative/manim-video/references/visual-design.md
self.wait(1.5) minimum after showing something new.One main element centered, title above, note below. Best for: single equations, single diagrams, title cards.
Two elements side by side at x=-3.5 and x=3.5. Best for: equation + visual, before/after, comparison.
Main element at y=1.5, supporting content at y=-1.5. Best for: concept + examples, theorem + cases.
Multiple elements via arrange_in_grid().
Best for: comparison matrices, multi-step processes.
Elements appear one at a time, arranged DOWN with aligned_edge=LEFT. Best for: algorithms, proofs, step-by-step processes.
Central diagram with floating labels connected by arrows. Best for: architecture diagrams, annotated figures.
BG="#1C1C1C"; PRIMARY=BLUE; SECONDARY=GREEN; ACCENT=YELLOW; HIGHLIGHT=RED
BG="#2D2B55"; PRIMARY="#FF6B6B"; SECONDARY="#FFD93D"; ACCENT="#6BCB77"
BG="#0A0A0A"; PRIMARY="#00F5FF"; SECONDARY="#FF00FF"; ACCENT="#39FF14"
Use monospace fonts for all text. Manim's Pango text renderer produces broken kerning with proportional fonts (Helvetica, Inter, SF Pro, Arial) at all sizes and resolutions. Characters overlap and spacing is inconsistent. This is a fundamental Pango limitation, not a Manim bug.
Monospace fonts have fixed character widths — zero kerning issues by design.
| Use case | Font | Fallback |
|---|---|---|
| All text (default) | "Menlo" | "Courier New", "DejaVu Sans Mono" |
| Code, labels | "JetBrains Mono", "SF Mono" | "Menlo" |
| Math | Use MathTex (renders via LaTeX, not Pango) | — |
MONO = "Menlo" # define once at top of file
title = Text("Fourier Series", font_size=48, color=PRIMARY, weight=BOLD, font=MONO)
label = Text("n=1: (4/pi) sin(x)", font_size=20, color=BLUE, font=MONO)
note = Text("Convergence at discontinuities", font_size=18, color=DIM, font=MONO)
# Math — always use MathTex, not Text
equation = MathTex(r"\nabla L = \frac{\partial L}{\partial w}")
Large title text (font_size >= 48) with short strings (1-3 words) can use proportional fonts without visible kerning issues. For anything else — labels, descriptions, multi-word text, small sizes — use monospace.
"Menlo" is the safest default — pre-installed on macOS, and Linux systems fall back to DejaVu Sans Mono.
Text() does not support letter_spacing or kerning parameters. For fine control, use MarkupText with Pango attributes:
# Letter spacing (Pango units: 1/1024 of a point)
MarkupText('<span letter_spacing="6000">HERMES</span>', font_size=18, font="Menlo")
# Bold specific words
MarkupText('This is <b>important</b>', font_size=24, font="Menlo")
# Color specific words
MarkupText('Red <span foreground="#FF6B6B">warning</span>', font_size=24, font="Menlo")
font_size=18 is the minimum for readable text at any resolution. Below 18, characters become blurry at -ql and barely readable even at -qh.
For every frame: