notofonts / khmer

Noto Khmer
SIL Open Font License 1.1
2 stars 0 forks source link

some Khmer character sequences go outside UI box for Noto Sans Khmer UI (by a tiny amount) #3

Closed marekjez86 closed 1 year ago

marekjez86 commented 7 years ago

some Khmer character sequences go outside UI box for Noto Sans Khmer UI (by a tiny amount) and they shouldn't

yMax for UI fonts is 1069 the following string " ​ ឹះ ,ស្រៈ" reaches 1070: u' \u200b \u17b9\u17c7 ,\u179f\u17d2\u179a\u17c8' the following string " គឺ​សំឡេង(អ៊) ឧទាហរណ៍ ងា ងិ ងី ញោ ញៅ ទុំ ទាំ ទះ.... ។ បើ​ផ្សំ​ជា​មួយ​នឹង​ព្យញ្ជនៈ" reaches 1071: u' \u1782\u17ba\u200b\u179f\u17c6\u17a1\u17c1\u1784(\u17a2\u17ca) \u17a7\u1791\u17b6\u17a0\u179a\u178e\u17cd \u1784\u17b6 \u1784\u17b7 \u1784\u17b8 \u1789\u17c4 \u1789\u17c5 \u1791\u17bb\u17c6 \u1791\u17b6\u17c6 \u1791\u17c7.... \u17d4 \u1794\u17be\u200b\u1795\u17d2\u179f\u17c6\u200b\u1787\u17b6\u200b\u1798\u17bd\u1799\u200b\u1793\u17b9\u1784\u200b\u1796\u17d2\u1799\u1789\u17d2\u1787\u1793\u17c8' the following string "x" reaches 1071: u' \u17bd \u17bf \u1793\u17b7\u1784 \u17c0 \u1791\u17c4\u17c7\u200b\u1782\u17c1\u200b\u1799\u1780\u200b\u1791\u17c5\u200b\u1795\u17d2\u179f\u17c6\u200b\u1793\u17b9\u1784\u200b\u1796\u17d2\u1799\u1789\u17d2\u1787\u1793\u17c8' the following string reaches 1071: u' \u17c5 \u1798\u17b6\u1793\u200b\u178f\u17c2\u200b\u179a\u17bc\u1794 \u1793\u17b7\u1784\u200b\u179f\u17c6\u17a1\u17c1\u1784\u200b\u1795\u17d2\u179f\u17c6 \u178f\u17c2\u200b\u1796\u17bb\u17c6\u200b\u1798\u17b6\u1793\u200b\u179f\u17b6\u179a\u17c8' the following string reaches 1071: u'\u200b\u1780\u17d2\u178f\u17b8 \u1794\u17c9\u17bb\u1793\u17d2\u178f\u17c2\u200b\u1794\u17d2\u179a\u179f\u17b7\u1793\u200b\u1794\u17be\u200b\u1782\u17c1\u200b\u1799\u1780\u200b\u1791\u17c5\u200b\u1795\u17d2\u179f\u17c6\u200b\u1787\u17b6\u200b\u1798\u17bd\u1799\u200b\u1793\u17b9\u1784\u200b\u1796\u17d2\u1799\u1789\u17d2\u1787\u1793\u17c8' the following string reaches 1070: u'\u200b\u1793\u17b7\u179f\u17d2\u179f\u17d0\u1799\u200b\u1798\u17b6\u1793 \u17e2\u17e1 \u178f\u17bd \u178f\u17b6\u1798\u200b\u1780\u17b6\u179a\u200b\u1780\u17c6\u178e\u178f\u17cb\u200b\u179a\u1794\u179f\u17cb\u200b\u1780\u17d2\u1794\u17bd\u1793\u200b\u1796\u17b8\u200b\u1798\u17bb\u1793\u200b\u1793\u17c4\u17c7\u200b\u1782\u17ba \u17d2\u200b \u17b6 \u17b7 \u17b8 \u17b9 \u17ba \u17bb \u17bc \u17bd \u17be \u17bf \u17c0 \u17c1 \u17c2 \u17c3 \u17c4 \u17c5 \u17bb\u17c6 \u17c6 \u17b6\u17c6 \u17c7 \u17d4 \u1794\u17c9\u17bb\u1793\u17d2\u178f\u17c2\u200b\u17a2\u179f\u17cb\u200b\u179b\u17c4\u1780\u200b\u17a2\u17d2\u1793\u1780\u200b\u17a2\u1780\u17d2\u179f\u179a\u179f\u17b6\u179f\u17d2\u179a\u17d2\u178f\u200b\u1780\u17d2\u179a\u17c4\u1799\u200b\u1798\u1780\u179f\u1793\u17d2\u1798\u178f\u200b\u1790\u17b6 \u1798\u17b6\u1793\u200b\u178f\u17c2\u17e2\u17e0\u178f\u17bd\u179c\u17b7\u1789 \u1796\u17d2\u179a\u17c4\u17c7\u200b\u1790\u17b6 \u179f\u17d2\u179a\u17c8'

testing was done by running

for i in ls ../../noto-source/test/Khmer; do echo ======= $i ======= ; ./test_vertical_extents.py ~/newrel/noto-source/instance_ttf/NotoSansKhmerUI-Regular.ttf Khmer < ../../noto-source/test/Khmer/$i ; done

where noto-source/test/Khmer has the content of https://github.com/googlei18n/noto-source/tree/master/test/Khmer

test_vertical_extents.py is a test program from https://github.com/googlei18n/nototools/tree/master/nototools

NotoSansKhmerUI-Regular.ttf is the font built by the pipeline

it is enough to take only https://github.com/googlei18n/noto-source/blob/master/test/Khmer/khm-sample-20170228.html as the input (all of the above cases will be present there)

punchcutter commented 7 years ago

Something got weird in the GPOS lookups so it's causing some marks to get pushed out too far. It looks correct in harfbuzz so I didn't notice there. I'll need to rewrite a couple of these lookups to fix it.

marekjez86 commented 7 years ago

@punchcutter : Do you have a Regular UI font that you made without fontmake? It might be an issue with the fontmake that causes it. see https://github.com/googlei18n/fontmake/issues/264 In my opinion, please treat it just as a note for now. The difference is tiny and if I can rule out influence of fontmake here, it might disappear. If you cannot provide me with non-fontmake Regular UI TTF font then, let's wait until https://github.com/googlei18n/fontmake/issues/264 is resolved.

simoncozens commented 1 year ago

Since this bug is six years old and affects Android, I presume there isn't a problem here any more or else I would have heard a lot more noise about it...