Oh wow! Thanks, I never considered that the font itself could be part of the problem. Once I commented the font styling out and added 20px of padding, it works as expected again. I don’t suppose there’s a way to have different CSS apply to different OS’s?
For anyone else running into this in the future, it turns out the native Mac OS font for Khmer (appears to be Khmer Sangam MN) doesn’t render ញ៉ាំ properly:
Noto Serif Khmer renders that fine, but then the bottom gets lopped off for words like បច្ចុប្បន្ន , no matter how much bottom padding I give it. This appears to be partially the font’s fault for not accurately reporting the height of the text.
I finally found that the Battambang font renders all the examples (ម៉ោង ញ៉ាំ បច្ចុប្បន្ន) correctly:
This seems to be something specific to the combination of Mac OS and Qt6, since all these fonts (except for the system one) render fine in Pages on the Mac, or on Anki on other OS’s.