Test environment for rendering Asian fonts. Select the correct scriptag of 173 scripts and then the correct language tag for one of the 634 possible languages used.
pdf.set_text_shaping(use_shaping_engine=True, script="khmr", language="khm")
With Noto fonts the returned width does not match with the actual font width after being processed by a font shaper like harfbuzz. A result with NotoSansKhmer-regular looks like this:
The expected result is shown here with a Google font in Khmer regular:
Getting there ...