|
← 判断力与美学 ← Judgment & Aesthetics
SAE 判断力与美学 · 余项之美
SAE Judgment & Aesthetics · Beauty of the Remainder
2026-05-28

当被遗弃的曲线语言复活在马拉雅拉姆文字里

When an Abandoned Curve Language Resurrects Inside Malayalam Script

Han Qin (秦汉)

Santhosh Thottingal是一个马拉雅拉姆语计算和字体设计的实践者,Wikimedia的工程师,住在印度喀拉拉邦。从2020年开始,他做了一件几乎没有人会做的事情:他用MetaPost——一个1980年代的绘图语言,Donald Knuth的MetaFont的后继者——来设计现代可变字体。MetaPost用数学公式描述每一条曲线、每一个字母部件。没有GUI。没有鼠标拖拽贝塞尔控制点。输入是代码,输出是字形。他用这个方法创造了Nupuram,一个具备重量、宽度、倾斜和柔软度四个可变轴的马拉雅拉姆文字体族。

为什么这是余项之美?因为这里有一个三层凿构循环。第一层:MetaFont/MetaPost是Knuth为参数化字体设计建造的构——用程序定义字母的形状,改变参数就能改变整套字体。这个构在1990年代被GUI字体编辑器(Fontographer, FontLab, Glyphs)彻底凿掉了。类型设计界几乎遗忘了程序化方法。MetaPost成了一具化石,写在WEB文学编程语言里,编译成Pascal,工具链近乎不可扩展。它是字体工程历史的余项——一条被放弃的路径。第二层:可变字体技术(OpenType 1.8, 2016)是现代网络字体的构。但它的设计假设是:设计师用GUI画出多个"主版"(thin, regular, bold),然后在主版之间插值。没有人打算让一个1980年代的编程语言直接生成可变字体。当Thottingal用MetaPost的参数化输出来生成可变字体时,他在两个时代的构之间找到了一条缝隙——两个系统都没有为这种用法留位置。第三层:马拉雅拉姆文字。拉丁字母的字体设计工具链隐含着一个从未说出的前提:字母是由直线和简单曲线组成的。马拉雅拉姆文字的弧线极度复杂,流畅的连笔要求曲率连续性(G2甚至G3),直角极少。这种书写系统是拉丁中心字体技术的余项——它不断地暴露工具的不足。Thottingal的螺旋样条(Manjari字体使用的Raph Levien的螺旋样条)和现在的双参数曲线拟合,都是为了解决这个余项而发明的。

2026年2月,他走得更远。他开始在Rust中构建自己的曲线拟合系统,基于Raph Levien的双参数曲线族——一种比Hobby曲线更现代的平滑曲线拟合方法。他用这个系统实现了可变宽度笔画的可插值轮廓线。问题极其精确:可变字体要求所有主版的点数和路径数完全一致,但可变宽度笔画的平行曲线生成过程天然地产生不确定数量的点。他的解决方案是线性扰动法——用骨架曲线加上方向场乘以宽度函数来生成轮廓,保证点数恒定。段落接合处出现的G1连续性失败(方向跳变)由一个多阶段误差修正系统处理:从轮廓中提取角点、用骨架信息校正误分类、检测并修复切线不连续处。整个过程是工程近似——他自己说"这是一个工程师的近似"——但正是在精确数学与工程妥协之间的缝隙里,曲线获得了它的审美品质。美是优化过程的余项。

命名间隙在这里极宽。字体设计界不认识MetaPost("那不是我们的工具")。MetaPost社区几乎已经灭绝。曲线数学研究者(Levien, Hobby)不做字体。Rust/Kurbo生态系统是通用图形库,不是字体工具。马拉雅拉姆语社区需要字体但不了解参数化设计理论。没有一个现有领域能完整命名Thottingal正在做的事:用一门1980年代的死语言的数学内核,通过Rust重写,生成一种非拉丁复杂书写系统的现代可变字体。他把它叫做"非传统字体设计方法"。这个名字是临时的,因为逻辑还在生长——他明确说下一步是构建一个专用的领域特定语言(DSL),不再是MetaPost本身,而是一个继承了MetaPost精神但聚焦于字体设计的新系统。当一个实践者在积极地凿掉自己上一个阶段的构、向着一个还无法命名的下一阶段前进时,我们看到的就是余项之美。

thottingal.in ↗

Santhosh Thottingal is a practitioner of Malayalam computing and type design, an engineer at Wikimedia, based in Kerala, India. Since 2020, he has been doing something almost nobody else does: he uses MetaPost — a 1980s drawing language, the successor to Donald Knuth's MetaFont — to design modern variable fonts. MetaPost describes every curve, every glyph component, with mathematical formulas. No GUI. No dragging Bézier handles with a mouse. Input is code; output is letterform. With this method he created Nupuram, a Malayalam typeface superfamily with four variable axes: weight, width, slant, and softness.

Why is this the beauty of the remainder? Because there is a triple chisel-construct cycle at work. First layer: MetaFont/MetaPost was Knuth's construct for parametric type design — define letter shapes programmatically, change parameters to change the entire font. This construct was chiseled away by GUI font editors (Fontographer, FontLab, Glyphs) in the 1990s. The type design world nearly forgot programmatic approaches. MetaPost became a fossil, written in WEB literate programming language, compiled to Pascal, its toolchain nearly impossible to extend. It is the remainder of type engineering history — an abandoned path. Second layer: variable font technology (OpenType 1.8, 2016) is the modern construct of web typography. But its design assumption is clear: designers draw multiple "masters" (thin, regular, bold) by hand in GUI tools, then the system interpolates between them. Nobody planned for a 1980s programming language to directly generate variable fonts. When Thottingal uses MetaPost's parametric output to produce variable fonts, he finds a crevice between two eras of construct — neither system made room for this use. Third layer: Malayalam script itself. The toolchain of Latin type design carries an unspoken assumption: letters are composed of straight lines and simple curves. Malayalam's arcs are extraordinarily complex, its fluid conjuncts demand curvature continuity (G2 or even G3), with very few right angles. This writing system is the remainder of Latin-centric font technology — it relentlessly exposes the tools' insufficiency. Thottingal's spiral splines (used in the Manjari typeface, based on Raph Levien's research) and now his two-parameter curve fitting are inventions driven by this remainder.

In February 2026, he went further. He began building his own curve fitting system in Rust, based on Raph Levien's two-parameter curve family — a more modern smooth curve fitting approach than Hobby's algorithm. He used this system to produce variable-width stroke outlines that remain interpolatable for variable fonts. The problem is exquisitely precise: variable fonts require all masters to have exactly the same number of points and paths, but generating parallel curves from variable-width strokes naturally produces an unpredictable number of points. His solution is linear perturbation — offset the skeleton curve by a direction field multiplied by a width function, guaranteeing constant point count. G1 continuity failures (tangent jumps) at segment joins are handled by a multi-stage error correction system: extract corners from the outline, correct misclassifications using skeleton information, detect and repair tangent discontinuities. The entire process is an engineering approximation — he says so himself. But it is precisely in the gap between exact mathematics and engineering compromise that the curves acquire their aesthetic quality. Beauty is the remainder of the optimization process.

The naming gap here is enormous. The type design community does not recognize MetaPost ("that's not our tool"). The MetaPost community is nearly extinct. Curve mathematics researchers (Levien, Hobby) do not make fonts. The Rust/Kurbo ecosystem is a general-purpose graphics library, not a font tool. The Malayalam language community needs fonts but does not know parametric design theory. No existing field can fully name what Thottingal is doing: using the mathematical kernel of a dead 1980s language, rewritten in Rust, to generate modern variable fonts for a complex non-Latin writing system. He calls it "non-conventional type design." The name is provisional, because the logic is still growing — he explicitly states that the next step is building a dedicated domain-specific language (DSL), no longer MetaPost itself, but a new system inheriting MetaPost's spirit while focusing on type design. When a practitioner is actively chiseling away the construct of their own previous stage, advancing toward a next stage that cannot yet be named, what we are looking at is the beauty of the remainder.

thottingal.in ↗