freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FreeType and WinAPI (Re: Freetype-devel Digest, Vol 145,


From: Hin-Tak Leung
Subject: Re: [ft-devel] FreeType and WinAPI (Re: Freetype-devel Digest, Vol 145, Issue 1)
Date: Wed, 1 Feb 2017 23:05:52 +0000 (UTC)

I
 tried cross-compiling it with both the 32-bit and 64-bit mingw 
toolchains, and running the results under 32-bit and 64 bit wine.

 - with the 64-bit toolchain (and only with the 64-bit toolchain), there
 is an error:

FTWinDemo.cpp: In function 'bool AssignWindow(AppInfo*)':
FTWinDemo.cpp:471:57: error: cast from 'AppInfo* {aka _AppInfo*}' to 
'LONG {aka long int}' loses precision [-fpermissive]
     SetWindowLongPtr( app->window, GWLP_USERDATA, (LONG)app );
                                                      ^~~

When running under either 32-bit or 64-bit wine, there are a couple of 
issues:

- Verdana.ttf is not shipped with wine, nor you should assume 
"c:/windows/fonts/Verdana.ttf" exist. It might be best to just bundle 
one of the smaller free fonts for demonstration, like liberation?

- I got a pop-up error message box saying "Not set LCD filter: 7 " . 7 
means "unimplemented feature", I looked it up. Maybe you can actually 
use a more user-friendly error strings from fterrdef.h  than the numeral
 7 ? That was against freetype 2.6.5 as shipped by fedora. I think LCD 
filter is a recent feature and depending on build options, etc? I see 
you are not using any special options, so it is maybe fedora shipping 
freetype which hasn't got it enabled. Best not to depend on it.

- the same with 'cannot open resource" for error 1, for not finding 
Verdana . "Font not load: 1" isn't helpful.

- after dismissing the pop-up box, the main window remain blank, until I
 minimize/maximize it. You may be missing a paint-on-? event somewhere? 
Or perhaps choosing background/forground color?

Anyway, well-done!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]