nk2028 / tshet-uinh-autoderiver

An automatic extrapolation tool based on the Tshet-uinh phonological system
https://nk2028.shn.hk/tshet-uinh-autoderiver/
Creative Commons Zero v1.0 Universal
41 stars 17 forks source link

Line breaking rules are being ignored in the output due to `display: flex` of `<ruby>` wrappers #21

Open graphemecluster opened 2 years ago

graphemecluster commented 2 years ago

無論新版還是舊版也有這個標點符號換行(禁則処理)問題。刪除這行的一些 consequences 是:

新版

https://github.com/nk2028/qieyun-autoderiver/blob/e06b116690f1995d710b78337468c8656e9c2509/src/Components/TooltipChar.tsx#L43

舊版

https://github.com/nk2028/qieyun-autoderiver/blob/0aa83ddb796ce743aefcf6d0a800f57f8f931e2d/src/App.scss#L319

graphemecluster commented 2 years ago

css-line-break 之類的 library 來人手計算也不是不行啦,但這會導致執行速度變慢,而且綾香曾經説過希望讓這些東西留給 rendering engine。

graphemecluster commented 1 week ago

The problem is that many of these libraries are outdated; I can’t find any UAX 14 implementations that align with Unicode 16.0 in npm. The ideal solution would be a polyfill of https://github.com/tc39/proposal-intl-segmenter-v2, but there doesn’t seem to be one at the moment.