Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.8.2
-
None
Description
The <font> tag in HTML is deprecated: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/font
Since the same functionality can be obtained by setting CSS attributes on the desired element (and all 3 <font> attributes supported have equivalents in CSS) there is no need to have a <font> tag. It adds nothing semantically as an HTML tag (since all text has a font by definition) and discourages consistent styling across apps (unlike CSS classes).
From the docs (https://doc.qt.io/qt-6/qml-qtquick-text.html#textFormat-prop), the two textFormats:
Text.StyledText | optimized basic rich text as in HTML 3.2 |
Text.RichText | a subset of HTML 4 |
HTML 3.2 is 29 years old, HTML 4 is 28. Might make sense to put both on 4 at least.
IDEs that allow language injection will complain that <font> is deprecated and it's very unlikely that they support downgrading their HTML LSP to a version that supports it. RichText supports all the CSS attributes required to substitute <font>:
https://doc.qt.io/qt-6/richtext-html-subset.html
Not clear if StyledText does as well but if not, it probably should.
First of all the examples from the documentation should be removed.