styleName was added in Qt 5.6.
The docs state "If set, the font will be matched against style name instead of the font properties font.weight, font.bold and font.italic."
This however doesn't seem like correct behavior. It should still respond to those attributes as well.
Use the attached test application for reproducing the issue.
The application sets
And the font is not Font.Light.
Then it all becomes light. However, any text with embedded bold in it no longer works ("this has embedded bold"), and any text with bold: true is not bold.