Thai upper vowels (tone marks) overlap when using Noto Sans Thai (No GPOS support)
Author: dsiteinthCreated Jul 21, 2026Updated Jul 21, 2026
Labelsfont-handlingi18n
Describe the bug When rendering Thai text using DOMPDF with the Noto Sans Thai font, the upper tone marks (e.g., ไม้โท) overlap directly with the upper vowels (e.g., สระอี) on the same consonant.
This issue is known in Thai typography as 'สระจม/วรรณยุกต์ลอย' (overlapping tone marks). It seems DOMPDF does not process OpenType GPOS tables for standard Unicode Thai fonts, resulting in the tone mark being placed at its default Y-coordinate instead of being shifted upwards to accommodate the vowel below it.
To Reproduce
- Load Noto Sans Thai font in DOMPDF.
- Render the word 'หนี้'
- Observe the upper mark (ไม้โท) will overlap and sit directly on top of the vowel (สระอี).
Expected behavior
The upper tone mark should be shifted upwards automatically based on the font's internal GPOS tables, so the characters do not overlap.
Source: dompdf/dompdf