movis icon indicating copy to clipboard operation
movis copied to clipboard

how to add custom fonts into it

Open Suv00m opened this issue 1 year ago • 1 comments

I've been trying to add custom fonts to it but due to some reasons it is not possible I don't know why

here is what I've tried :

from PySide6.QtGui import QFont, QFontDatabase, QFontMetrics
from PySide6.QtWidgets import QApplication, QWidget, QLabel

QFontDatabase.addApplicationFont("Bitlingvedas-Regular.ttf")

to add it into the system from which Pyside can access it but still, movis can't register it to the fonts list maybe it is the problem of threading I don't know please help me

and again the class is properly initiated in my code.

Suv00m avatar Oct 04 '24 12:10 Suv00m

The most likely reason it's failing is that a QApplication instance must exist before you call addApplicationFont(). Qt's font system needs an active application instance to register the font with.

Regarding your threading idea, it's a good thought! It's always best to do font loading on the main thread right after the QApplication is initialized.

immineal avatar Nov 03 '25 13:11 immineal