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

mpsuzuki at hiroshima-u.ac.jp mpsuzuki at hiroshima-u.ac.jp
Tue Apr 19 16:09:02 CEST 2011


I think the Win32 APIs that Jason mentioned are
AddFontResource(), AddFontResourceEx() and
AddFontMemResourceEx(). I can find that they are
used in qfontdatabase_win.cpp.

But I think the different boldness is not enough
to decide whether the font is installed /or not,
or whether the installed font is used /or not.

Sorry, I don't have sufficient time to investigate
this issue by myself.

On Mon, 18 Apr 2011 14:10:51 -0700 (PDT)
Jason H <scorp1us at yahoo.com> wrote:

>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
>
>_______________________________________________
>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