Limit comparison of pixel sizes to the height only

In wxMSW wxFont::GetPixelSize() returns the size that the font was
originally created from while in the other ports it returns the actual
size being used.

wxMSW behaviour is probably wrong and should be changed, but for now
just restrict the comparison to the vertical component to avoid the test
failures.
This commit is contained in:
Vadim Zeitlin 2023-01-14 15:22:01 +00:00
parent 85079ee9da
commit e9b4b9f7e1

View file

@ -492,7 +492,7 @@ TEST_CASE("wxFontList::FindOrCreate", "[font][fontinfo][fontlist]")
INFO("Font from font list:" << DumpFont(font1));
if ( info.IsUsingSizeInPixels() )
CHECK(font1->GetPixelSize() == pixelSize);
CHECK(font1->GetPixelSize().y == pixelSize.y);
else
CHECK(font1->GetFractionalPointSize() == pointSize);