notofonts / khmer

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

Noto Sans Khmer UI variable font has the diacritics shift problem #20

Closed hrhatada closed 7 years ago

hrhatada commented 7 years ago

STEPS TO REPRODUCE

  1. On the device A, replace the Noto Sans Khmer font to Noto Sans Khmer variable font and modify the fonts.xml file
  2. On the device B, replace the Noto Sans Khmer fonts to the phase III Noto Sans Khmer fonts
  3. Reboot both devices and compare the UIs

RESULT : Some of the variable font's diacritics position shift is slightly shifted to the left. Please refer to the attached screenshot.

image

hrhatada commented 7 years ago

The above sample text is below:

នៅ​ពេល​ដែល​មុខងារ​នេះ​បើក អ្នក​អាច​បញ្ជូន​មាតិកា​កម្មវិធី​ទៅ​ឧបករណ៍​ដែល​អាច​ប្រើ NFC ផ្សេង​ទៀត​ដោយ​ដាក់​ឧបករណ៍​ផ្ទប់​គ្នា។ ឧទាហរណ៍៖ អ្នក​អាច​បញ្ជូន​គេហទំព័រ, វីដេអូ YouTube, ទំនាក់ទំនង និង​មាតិកា​ជា​ច្រើន​ទៀត។

គ្រាន់​តែ​ដាក់​ឧបករណ៍ផ្ទប់​គ្នា (តាម​ធម្មតា​ខ្នង​ទល់​ខ្នង) បន្ទាប់​មក​ប៉ះ​អេក្រង់​របស់​អ្នក​ជា​ការ​ស្រេច។ កម្មវិធី​នេះ​នឹង​កំណត់​របស់​ដែល​ត្រូវ​បញ្ជូន។

punchcutter commented 7 years ago

There's definitely something wrong with the mark positioning on the right side, but the right is the document font and the left is the UI font so this isn't exactly a comparison of static vs variable.

hrhatada commented 7 years ago

Yes, I found the mistake for my fonts.xml, and corrected, but still see the diacritics shift

image

marekjez86 commented 7 years ago

Summary: while I can see the difference in the images above, my tests on the fonts itself show no difference. Conjecture: the above environment has something that causes the above. This could be the (1) version of fonts itself, (2) fonts.xml, (3) harfbuzz implementation. In other words: not a font, but the execution environment where the font is presented needs debugging and/or fixing.

Test case

<html lang="khm">
    <p style="font-size: 4em; font-weight: 90;"></p>
    <p style="font-size: 4em; font-weight: 90;">នៅ​ពេល​ដែល​មុខងារ​នេះ​បើក អ្នក​អាច​បញ្ជូន​មាតិកា​កម្មវិធី​ទៅ​ឧបករណ៍​ដែល​អាច​ប្រើ NFC ផ្សេង​ទៀត​ដោយ​ដាក់​ឧបករណ៍​ផ្ទប់​គ្នា។ ឧទាហរណ៍៖ អ្នក​អាច​បញ្ជូន​គេហទំព័រ, វីដេអូ YouTube, ទំនាក់ទំនង និង​មាតិកា​ជា​ច្រើន​ទៀត។</p>
    <p style="font-size: 4em; font-weight: 90;"></p>
    <p style="font-size: 4em; font-weight: 90;">គ្រាន់​តែ​ដាក់​ឧបករណ៍ផ្ទប់​គ្នា (តាម​ធម្មតា​ខ្នង​ទល់​ខ្នង) បន្ទាប់​មក​ប៉ះ​អេក្រង់​របស់​អ្នក​ជា​ការ​ស្រេច។ កម្មវិធី​នេះ​នឹង​កំណត់​របស់​ដែល​ត្រូវ​បញ្ជូន។</p>
    <p style="font-size: 4em; font-weight: 90;"></p>
</html>

static font used: https://github.com/googlei18n/noto-fonts/blob/master/alpha/from-pipeline/unhinted/ttf/sans/NotoSansKhmerUI-Regular.ttf variable font used: https://github.com/googlei18n/noto-fonts/blob/master/alpha/from-pipeline/unhinted/variable-ttf/sans/NotoSansKhmerUI-VF.ttf

I used fontdiff tool from https://github.com/googlei18n/fontdiff to compare the fonts

The results from comparison show that there's no difference between static and variable fonts. For example these two show no shift: no-shift

Full test results for the test text above are located in the following PDF file: khm-shift-test-Khmer-Sans-UIRegular-UIVF.pdf

marekjez86 commented 7 years ago

@hrhatada : did you get the fonts from static font: https://github.com/googlei18n/noto-fonts/blob/master/alpha/from-pipeline/unhinted/ttf/sans/NotoSansKhmerUI-Regular.ttf variable font: https://github.com/googlei18n/noto-fonts/blob/master/alpha/from-pipeline/unhinted/variable-ttf/sans/NotoSansKhmerUI-VF.ttf ? If not then could you test with the above fonts?

hrhatada commented 7 years ago

Hi marekjez86, yes I got the fonts from the location you mentioned above. Also, I didn't see the diacritics shift problem when I tested on OSX with the FontView tool. The shift occurs on the Android device.

marekjez86 commented 7 years ago

@hrhatada : could you try swapping the devices (ie. on device B place the variable fonts and on device A static fonts) and see it the problem described here and in https://github.com/googlei18n/noto-fonts/issues/874 occurs on the device A only? Just trying to find more possibilities.

hrhatada commented 7 years ago

@marekjez86 : I swiped the devices as you requested, and I still see the same result, the variant fonts' diacritics shifting problem.

xiangyexiao commented 7 years ago

@hrhatada you mentioned that the diacritics shifting issue is gone offline. could you confirm and close the bug?

hrhatada commented 7 years ago

Yes, diacritics problem had gone on the different OS.