add wxGetLinuxDistributionInfo() and wxPlatformInfo::GetLinuxDistribution() functions; also add to wxPlatformInfo the GetOperatingSystemDescription(), GetDesktopEnvironment(), GetOperatingSystemDirectory() functions to group in the same class (wxPlatformInfo) all available platform-detection functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -113,6 +113,18 @@ void FontTestCase::GetSet()
|
||||
// consider adding another branch to this #if
|
||||
#if defined(__WXMSW__) || defined(__WXOSX__)
|
||||
static const char *knownGoodFaceName = "Arial";
|
||||
#elif defined(__LINUX__)
|
||||
static const char *knownGoodFaceName;
|
||||
wxString distroname = wxGetLinuxDistributionInfo().Id;
|
||||
|
||||
if (distroname.Contains("Ubuntu"))
|
||||
knownGoodFaceName = "FreeSerif";
|
||||
// ttf-freefont and ttf-dejavu packages are installed by default on [X,K]Ubuntu systems
|
||||
else if (distroname == "Debian")
|
||||
knownGoodFaceName = "Fixed";
|
||||
else
|
||||
knownGoodFaceName = "DejaVu Sans";
|
||||
// this is very popular in many linux distro...
|
||||
#else
|
||||
static const char *knownGoodFaceName = "Fixed";
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user