ohos: give the platform theme a system font


QOhosPlatformTheme defines push button, list view and menu fonts but no
SystemFont, so QGuiApplication builds the application font from
defaultFont() on its own: at 12pt, so labels and line edits render
smaller than the 16pt controls beside them, and later than the widget
fonts, at whatever DPI is current then. Under QTEST_MAIN that is after
Qt::AA_Use96Dpi is set, so plain fonts measure at 96 dpi while widgets
measure at the screen's 72, failing every em/ex row of
tst_QStyleSheetStyle::iconSizes().

Add a system font at the 16pt the theme already uses for push buttons,
list views and menus and the body text size of the style specification
on QTBUG-150373. It is built with the other theme fonts, so it has
their DPI. A point size is kept on purpose: a pixel-sized application
font avoids the DPI question but makes QFont::pointSize() return -1,
which breaks QTextEdit zooming and QWizard titles.

Fixes: QTBUG-149732
Pick-to: 6.12
Change-Id: I6b981c59beecd356957a69dffa16e42312b704ed
Reviewed-by: SanthoshKumar Selvaraj <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
commit537c0040b0c1a1b3bae99e9edca827c9e3a16ee7
parent742fb780dd8490de8a43a7fe021e94167092b6c7
authorDawid Śliwa <dawid.sliwa@qt.io>
committerDawid Śliwa <dawid.sliwa@qt.io>
commit timeThu, 22 Oct 2026 01:41:48 +0000