While troubleshooting an issue with rendering Khmer text in PDFs generated by JasperReports it's been discovered even with properly embedded fonts like NotoSansKhmer or Hanuman, the output doesn't render correctly — vowel signs and glyphs are mispositioned or broken.
Here is some test text:
តើមានអ្វីកើតឡើងនៅពេលបន្ទាប់នេះបន្ទាប់ពីអ្នកធ្វើការប្ដឹងឧទ្ធរណ៍ យើងនឹងពិនិត្យករណីរបស់អ្នកឡើងវិញ ហើយផ្តល់សេចក្ដីសម្រេចដល់អ្នក។ ប្រសិនបើផលិតផលណាមួយដែលអ្នកបានស្នើសុំនៅតែត្រូវបានបដិសេធ អ្នកអាចស្នើសុំបណ្តឹងឧទ្ធរណ៍កម្រិតបន្ទាប់ ដែលជាការពិនិត្យឡើងវិញដោយឯករាជ្យលើករណីរបស់អ្នកដោយអ្នកត្រួតពិនិត្យនៅខាងក្រៅគម្រោងរបស់អ្នក។ ប្រសិនបើអ្នកមិនយល់ស្របនឹងសេចក្តីសម្រេចនោះ អ្នកនឹងមានសិទ្ធិប្តឹងឧទ្ធរណ៍បន្ថែមទៀត។ អ្នកនឹងទទួលបានដំណឹងអំពីសិទ្ធិប្តឹងឧទ្ធរណ៍របស់អ្នក ប្រសិនបើរឿងនេះកើតឡើង។
And a screenshot for a sample of the issue:

After isolating the problem, it appears the issue might stem from Java’s own text rendering — specifically the way it handles shaping and line breaking for complex scripts.
To help demonstrate this, I’ve put together a minimal project showing:
- A plain Java example that reproduces the shaping problem
- A JasperReports demo showing the issue in a real-world PDF export
- A version using ICU4J’s BreakIterator and GlyphVector, which produces correct output
Here’s the repository with everything:
🔗 https://github.com/your-username/khmer-java-rendering-issue
Thanks for the great tool — and for taking a look.
While troubleshooting an issue with rendering Khmer text in PDFs generated by JasperReports it's been discovered even with properly embedded fonts like NotoSansKhmer or Hanuman, the output doesn't render correctly — vowel signs and glyphs are mispositioned or broken.
Here is some test text:
តើមានអ្វីកើតឡើងនៅពេលបន្ទាប់នេះបន្ទាប់ពីអ្នកធ្វើការប្ដឹងឧទ្ធរណ៍ យើងនឹងពិនិត្យករណីរបស់អ្នកឡើងវិញ ហើយផ្តល់សេចក្ដីសម្រេចដល់អ្នក។ ប្រសិនបើផលិតផលណាមួយដែលអ្នកបានស្នើសុំនៅតែត្រូវបានបដិសេធ អ្នកអាចស្នើសុំបណ្តឹងឧទ្ធរណ៍កម្រិតបន្ទាប់ ដែលជាការពិនិត្យឡើងវិញដោយឯករាជ្យលើករណីរបស់អ្នកដោយអ្នកត្រួតពិនិត្យនៅខាងក្រៅគម្រោងរបស់អ្នក។ ប្រសិនបើអ្នកមិនយល់ស្របនឹងសេចក្តីសម្រេចនោះ អ្នកនឹងមានសិទ្ធិប្តឹងឧទ្ធរណ៍បន្ថែមទៀត។ អ្នកនឹងទទួលបានដំណឹងអំពីសិទ្ធិប្តឹងឧទ្ធរណ៍របស់អ្នក ប្រសិនបើរឿងនេះកើតឡើង។
And a screenshot for a sample of the issue:
After isolating the problem, it appears the issue might stem from Java’s own text rendering — specifically the way it handles shaping and line breaking for complex scripts.
To help demonstrate this, I’ve put together a minimal project showing:
Here’s the repository with everything:
🔗 https://github.com/your-username/khmer-java-rendering-issue
Thanks for the great tool — and for taking a look.