Version info: report all font libraries
This commit is contained in:
parent
f866d15154
commit
6196f2bdf0
|
@ -136,6 +136,8 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
|
||||
|
||||
aMsg << indent4 << "FreeType " << KIFONT::OUTLINE_FONT::FreeTypeVersion() << eol;
|
||||
aMsg << indent4 << "HarfBuzz " << KIFONT::OUTLINE_FONT::HarfBuzzVersion() << eol;
|
||||
aMsg << indent4 << "FontConfig " << KIFONT::OUTLINE_FONT::FontConfigVersion() << eol;
|
||||
|
||||
if( !aBrief )
|
||||
aMsg << indent4 << GetKicadCurlVersion() << eol;
|
||||
|
|
|
@ -37,6 +37,12 @@ inline static FcChar8* wxStringToFcChar8( const wxString& str )
|
|||
}
|
||||
|
||||
|
||||
wxString FONTCONFIG::Version()
|
||||
{
|
||||
return wxString::Format( "%d.%d.%d", FC_MAJOR, FC_MINOR, FC_REVISION );
|
||||
}
|
||||
|
||||
|
||||
FONTCONFIG::FONTCONFIG()
|
||||
{
|
||||
(void) FcInitLoadConfigAndFonts();
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <limits>
|
||||
#include <pgm_base.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <harfbuzz/hb.h>
|
||||
#include <harfbuzz/hb-ft.h>
|
||||
#include <bezier_curves.h>
|
||||
#include <geometry/shape_poly_set.h>
|
||||
|
@ -61,7 +62,25 @@ wxString OUTLINE_FONT::FreeTypeVersion()
|
|||
FT_Library_Version( m_freeType, &major, &minor, &patch );
|
||||
|
||||
return wxString::Format( "%d.%d.%d", major, minor, patch );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
wxString OUTLINE_FONT::HarfBuzzVersion()
|
||||
{
|
||||
return wxString::FromUTF8( HB_VERSION_STRING );
|
||||
}
|
||||
|
||||
|
||||
wxString OUTLINE_FONT::FontConfigVersion()
|
||||
{
|
||||
return fontconfig::FONTCONFIG::Version();
|
||||
}
|
||||
|
||||
|
||||
wxString OUTLINE_FONT::FontLibraryVersion()
|
||||
{
|
||||
return wxString::Format( "FreeType %s HarfBuzz %s", FreeTypeVersion(), HarfBuzzVersion() );
|
||||
}
|
||||
|
||||
|
||||
OUTLINE_FONT* OUTLINE_FONT::LoadFont( const wxString& aFontName, bool aBold, bool aItalic )
|
||||
|
|
|
@ -34,6 +34,8 @@ class FONTCONFIG
|
|||
public:
|
||||
FONTCONFIG();
|
||||
|
||||
static wxString Version();
|
||||
|
||||
/**
|
||||
* Given a fully-qualified font name ("Times:Bold:Italic") find the closest matching font
|
||||
* and return its filepath in \a aFontFile.
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include FT_FREETYPE_H
|
||||
#include FT_OUTLINE_H
|
||||
//#include <gal/opengl/opengl_freetype.h>
|
||||
#include <harfbuzz/hb.h>
|
||||
#include <font/font.h>
|
||||
#include <font/glyph.h>
|
||||
#include <font/outline_decomposer.h>
|
||||
|
@ -52,8 +51,14 @@ class OUTLINE_FONT : public FONT
|
|||
public:
|
||||
OUTLINE_FONT();
|
||||
|
||||
static wxString FontConfigVersion();
|
||||
|
||||
static wxString FreeTypeVersion();
|
||||
|
||||
static wxString HarfBuzzVersion();
|
||||
|
||||
static wxString FontLibraryVersion();
|
||||
|
||||
bool IsOutline() const override { return true; }
|
||||
|
||||
bool IsBold() const override
|
||||
|
|
Loading…
Reference in New Issue