原理是通过读取字体度量表中的 ascent ,descent 与 units-per-em 推导字体的 baseline ratio 计算当前字号的基线的偏移量,然后将文本基线对齐到 vertical rhythm 的网格上,实现印刷排版级别的精度。并且不同字体,不同字号混合排版,drop cap 等等都能轻松处理。

项目地址: https://github.com/p233/rhythm-gpui
原 sass 版本也一并做了更新,地址: https://github.com/p233/rhythm-sass
有写 markdown editor 的一些设想,下周尝试一下,能走通就继续,走不通就放弃。

