Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since Qt 6.8, misc/fonts/dmstext.ttf has to be registered separately #814

Open
MaartenHilferink opened this issue Oct 17, 2024 · 2 comments
Assignees
Labels
dataView Mapview, tableview, layercontrol optimization Qt Eventlog, layout detailpage, main menu, knoppen, treeview

Comments

@MaartenHilferink
Copy link
Collaborator

MaartenHilferink commented Oct 17, 2024

main_qt.cpp does:

        int id = QFontDatabase::addApplicationFont(":/res/fonts/dmstext.ttf");
        QString family = QFontDatabase::applicationFontFamilies(id).at(0);
        QFont dms_text_font(family, 25);

Since 6.8.0 this seems to result in exceptions in the text rendering of the splash-screen and further not having Nono Sans Medium in the DataViews of shv.dll that uses Windows GDI CreateFont and DrawText functions.

The latter DataView issue has been mitigated by shipping misc/fonts/dmstext.ttf in the program file folder, which is a duplicate of 1.2 MB of the application font, linked into the qt executable.

Desired solution: let Qt and Windows GDI use the same font, i.e. either Windows uses the Qt resource, or, Qt uses the %exeDir%/misc/fonts/dmstext.ttf

@MaartenHilferink MaartenHilferink added Qt Eventlog, layout detailpage, main menu, knoppen, treeview optimization dataView Mapview, tableview, layercontrol labels Oct 17, 2024
@MaartenHilferink
Copy link
Collaborator Author

@jipclaassens
Copy link
Member

En beziet deze "Trying GDI." code: exceptie -> DeleteObject(hFont).

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dataView Mapview, tableview, layercontrol optimization Qt Eventlog, layout detailpage, main menu, knoppen, treeview
Projects
None yet
Development

No branches or pull requests

3 participants