[Qt-interest] embedding fonts and using them rather than OS ones

Jason H scorp1us at yahoo.com
Mon Apr 18 23:10:51 CEST 2011


I don't know how QFont handles adding fonts, but windows does have a win32 call 
(i forget its name) to make the font available to programs without the need for 
a reboot. I'd expect that QFont would call it on windows. But I suspect the call 
only is seeing a similarly named font and mapping it back to the OS installed 
font. 






----- Original Message ----
From: Felipe Ferreri Tonello <eu at felipetonello.com>
To: qt-interest at qt.nokia.com
Sent: Mon, April 18, 2011 5:03:42 PM
Subject: [Qt-interest] embedding fonts and using them rather than OS ones

Hi,

I'm installing some fonts with 
QFontDatabase::addApplicationFont(":/resource/fonts/times.ttf"); from a 
resource file.

after that I want to use this Times New Roman front with QFont instead 
of the OS Times New Roman.

In Linux it seems to work ok, since I'm printing a PDF and printing 
directly to a printer and both fonts are the same. The problem is in 
Windows, the PDF version is bolder(Times New Roman) than the printed 
edition(which is exactly the same as Linux PDF and printed versions)

Any thoughts?

- Felipe Tonello
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list