[6/6] d3dx9: Add tests for basic ID3DXFont functions

Tony Wasserka tony.wasserka at freenet.de
Wed Jun 17 14:00:13 CDT 2009


Roderick Colenbrander schrieb:
> Hi Tony,
>
> +    hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE,
> DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH,
> "Arial", &font);
>
> A bunch of font tests all use Arial. On Windows this font is always
> around, what happens on Wine when this font isn't around? Perhaps the
> function fails on fonts which aren't around, so this could potentially
> result in a lot of test failures on Wine. Not sure what should be done
> if this is the case though (perhaps check at run time if the font is
> around or perhaps use a font which is always around as a fallback).
>
> Regards,
> Roderick
>
>
>   
Hi,
Very good point, indeed. I guess just passing NULL in most tests would
be the best solution then, as both D3DXCreateFont and GDI's CreateFont
just chose the first font which fits the other parameters best in that case.

Uhm.. Come to think of it... I think GDI's CreateFont just picks some
other font if Arial isn't available. I once tried calling D3DXCreateFont
(which just calls CreateFont with unmodified parameters) with some
surely nonexistent facenames (e.g. "iocbavgco") and it still worked, so
the tests would be okay anyways. I'll recheck that tomorrow, too, though.

The best would probably be just adding a test to this patch which
exactly tries what I've done "unofficially" ;)

Best regards, Tony




More information about the wine-devel mailing list