⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)
How to register fonts in Mac OS
I have a problem about install fonts on Mac OS. I have copied new font files to font folder system.
How to register for system detect that new fonts. In Qt framework, how to implement that?
Thanks any for help.
For Qt you can use QFontDatabase, but if you register the font with the system you won't need it.
A quick google search returns "this":http://www.guidingtech.com/6437/how-to-install-new-fonts-in-mac-os-x/ for font installation
Hi, I try to use QFontDatabase:
int main(int argc, char *argv)
QApplication a(argc, argv);
int kq = QFontDatabase::addApplicationFont("C:/src/Hawaii_Killer.ttf");
outputs is result: 0
But i check fonts folder system not found.
I try to test on Window OS.
Windows and OS X font management are not the same.
Why would 0 be a wrong value ? From the doc addApplicationFont returns -1 if the font could not be loaded.
I want add a new font to window system.
I try to use QFontDatabase but it's not add. I open control panel and check fonts folder. it's not visible.
Please tell me reason and resolve.
Then use the tools provided by your OS, Qt won't install system fonts for you.
Search for "install font windows" for example. This will get you the Microsoft guide to do it.
Not install new fonts when using Qt for Window and Mac OS, is it right?
Thank you very much.
I don't understand your last question.
With Qt you can use a custom font within your app loaded for it or any of the font already installed. BUT you cannot install new fonts in the system with it out of the box.
My app is copy fonts files to window and mac system using Qt framework.
I don't know. Can Qt support to do it? If capacity how to do that?
You have to use system specific solutions to do that
Thank you for your answer,
As me know, Qt support building a plugin for platforms.
I hope Qt add new feature install font in next version.