Detect the script in the harfbuzz buffer automatically