QSvgHandler: Extract Method parseFontStyle()


The parseFont() function is way too large for proper analysis, so
start to break it down into pieces that are much easier to check for
correctness.

Start at a random place, with font-style.

Comparison with [1] then immediately shows that we're good (but v4
will greatly extend this).

Move the parse call to the front of the function, so we can
eventually, when all are ported, fix the discrepancy between what is
being checked for the early return at the start of the function
(isEmpty()) vs.what each individual block inside the remainder of the
function checks (isEmpty() || == inherit). As speculated in the Jira
ticket, this could lead to resource over-consumption if an SVG file
uses explicit inherit a lot, because we create empty filter objects in
that case vs. none for empty attributes.

Amends the start of the git history in this module.

[1] https://www.w3.org/TR/2018/REC-css-fonts-3-20180920/#font-style-prop

Pick-to: 6.11 6.8
Task-number: QTBUG-146726
Change-Id: Ib0a4b9ab7c60ffbf05f5dba6b014d4188731abd5
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
commit25cae41692e3a8673f4492c3a8721782284c351f
parent62ad506e7a752f142757cf4cee8c8ffa37fc4b9c
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeMon, 18 May 2026 16:19:19 +0000