Add FreeType version to version info.
Fixes https://gitlab.com/kicad/code/kicad/issues/10393
This commit is contained in:
parent
4ffea8aae4
commit
6dc8cd3f18
|
@ -27,6 +27,7 @@
|
|||
#include <config.h>
|
||||
#include <boost/version.hpp>
|
||||
#include <kiplatform/app.h>
|
||||
#include <font/outline_font.h>
|
||||
|
||||
// kicad_curl.h must be included before wx headers, to avoid
|
||||
// conflicts for some defines, at least on Windows
|
||||
|
@ -134,6 +135,8 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
|
||||
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
|
||||
|
||||
aMsg << indent4 << "FreeType " << KIFONT::OUTLINE_FONT::FreeTypeVersion() << eol;
|
||||
|
||||
if( !aBrief )
|
||||
aMsg << indent4 << GetKicadCurlVersion() << eol;
|
||||
|
||||
|
|
|
@ -51,6 +51,18 @@ OUTLINE_FONT::OUTLINE_FONT() :
|
|||
}
|
||||
|
||||
|
||||
wxString OUTLINE_FONT::FreeTypeVersion()
|
||||
{
|
||||
if( !m_freeType )
|
||||
FT_Init_FreeType( &m_freeType );
|
||||
|
||||
FT_Int major, minor, patch;
|
||||
FT_Library_Version( m_freeType, &major, &minor, &patch );
|
||||
|
||||
return wxString::Format( "%d.%d.%d", major, minor, patch );
|
||||
}
|
||||
|
||||
|
||||
OUTLINE_FONT* OUTLINE_FONT::LoadFont( const wxString& aFontName, bool aBold, bool aItalic )
|
||||
{
|
||||
OUTLINE_FONT* font = new OUTLINE_FONT();
|
||||
|
|
|
@ -52,6 +52,8 @@ class OUTLINE_FONT : public FONT
|
|||
public:
|
||||
OUTLINE_FONT();
|
||||
|
||||
static wxString FreeTypeVersion();
|
||||
|
||||
bool IsOutline() const override { return true; }
|
||||
|
||||
bool IsBold() const override
|
||||
|
|
Loading…
Reference in New Issue