使用带有连字功能的字体来显示十三世纪僧侣数字。
Making a font with ligatures to display thirteenth-century monk numerals

原始链接: https://digitalseams.com/blog/making-a-font-with-9999-ligatures-to-display-thirteenth-century-monk-numerals

冲洗并重复数千行。 “sub”序列贪婪地匹配字符,这就是为什么此列表从4位数字开始;如果从1到9开始,我们只会得到一堆个位数替换。 这也意味着对于5位或更多位数的数字,例如123456,字体将一次匹配4位数字并生成“1234”的字形,然后是“56”。 字形外观本身是使用Chris Heilmann的Cistercian数字生成器的SVG路径定义的。 感谢Chris!有关我用于生成Cistercian字体的完整代码,请参见GitHub仓库:bobbiec/cistercian-font。 请注意,代码大部分是由AI生成的——尽管我对其进行了审查,但我也没有专业知识来发现如果存在严重错误。 我在玩转演示时注意到,象限的顺序非常不寻常。 如果从最低有效数字(个位)到最高有效数字(千位)计数,你会得到这种反Z形:

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 工作 | 提交 登录 制作带有连字的字体来显示十三世纪僧侣数字 (digitalseams.com) 14 分,由 a7b3fa 2 小时前发布 | 隐藏 | 过去的 | 收藏 | 2 条评论 帮助 rjh29 24 分钟前 | 下一个 [–] 令人惊讶的是,没有比定义 10000 条连字配置行和 10000 个字形更好的方法。 我猜动态子字形组合是 Unicode 级别的事情?回复 samtheDamned 24 分钟前 | 上一个 [–] 非常酷地使用了我甚至不知道存在的技术!回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

…rinse and repeat for several thousand lines.

The “sub” sequence of characters matches greedily, which is why this list starts with 4-digit numbers; if it started from 1 to 9, then we’d just get a bunch of single-digit replacements. That also means that for 5+ digit numbers like 123456, the font will match 4 digits at a time and produce the glyph for “1234”, then “56”.

The glyph appearance itself is defined using the SVG paths from Chris Heilmann’s Cistercian numeral generator. Thanks Chris!

For the full code I used to generate the Cistercian font, see the GitHub repo: bobbiec/cistercian-font. Note that the code is largely AI-generated - though I reviewed it, I also wouldn’t have the expertise to notice if something is very wrong.

Something I noticed when playing around with the demo is that the quadrants are ordered in a rather unusual way. If you count from the least significant digit (ones) to the most significant digit (thousands), you get this backwards-Z shape:

联系我们 contact @ memedata.com