I'm actually not entirely happy with this patch.
Wine actually hardcodes the fallback fonts to Liberation Serif and Tahoma. So we could instead check that if on Wine and the Windows fonts are not installed then we get the fallback fonts.
It's a bit what the test was trying to do with Microsoft Sans Serif except that I also take exception with the todo_wine since the fix is not to change Wine but to install the missing font.
Changing the test as I described would let us detect when Microsoft decides to ship other fonts instead of these. We would also issue an error if neither font was found, such as on FreeBSD 8.1 for instance as it is a hint that we should find some other/additional fallback font.
It's a bit what the test was trying to do with Microsoft Sans Serif except that I also take exception with the todo_wine since the fix is not to change Wine but to install the missing font.
I'm not too concerned about what happens in this case, but one alternative would be to always test that the function successfully returns a font but only test that the font is what we expect when that font is installed.
Francois Gouget fgouget@free.fr writes:
I'm actually not entirely happy with this patch.
Wine actually hardcodes the fallback fonts to Liberation Serif and Tahoma. So we could instead check that if on Wine and the Windows fonts are not installed then we get the fallback fonts.
It's a bit what the test was trying to do with Microsoft Sans Serif except that I also take exception with the todo_wine since the fix is not to change Wine but to install the missing font.
I don't think the name of the family really matters here. By using Tahoma the Wine implementation is trying to make sure we always return something, and that's what we should check: that we get a family, and that it's valid for creating a font or something along those lines.
On Thu, 8 Sep 2011, Alexandre Julliard wrote: [...]
I don't think the name of the family really matters here. By using Tahoma the Wine implementation is trying to make sure we always return something, and that's what we should check: that we get a family, and that it's valid for creating a font or something along those lines.
We don't have a fallback for Monospace fonts so that if Courier New is not installed we return FontFamilyNotFound. What you're saying suggests that this is a bug. Does anyone have a font to recommend as the fallback?
On Thu, Sep 8, 2011 at 8:11 PM, Francois Gouget fgouget@free.fr wrote:
On Thu, 8 Sep 2011, Alexandre Julliard wrote: [...]
I don't think the name of the family really matters here. By using Tahoma the Wine implementation is trying to make sure we always return something, and that's what we should check: that we get a family, and that it's valid for creating a font or something along those lines.
We don't have a fallback for Monospace fonts so that if Courier New is not installed we return FontFamilyNotFound. What you're saying suggests that this is a bug. Does anyone have a font to recommend as the fallback?
I think that the fallback for Courier New should be Liberation Mono [1] as they both are monospace.