23#include <wx/filename.h>
37 fontFile.RemoveLastDir();
38 fontFile.AppendDir( wxT(
"resources" ) );
39 fontFile.AppendDir( wxT(
"fonts" ) );
40 fontFile.SetFullName( aFileName );
42 return fontFile.GetFullPath();
55 std::vector<wxString> embeddedFonts{ fontPath };
63 FT_Face face = outline->
GetFace();
71 std::vector<std::unique_ptr<KIFONT::GLYPH>> glyphs;
75 BOOST_REQUIRE_EQUAL( glyphs.size(), 2 );
78 double widthA = glyphs[0]->BoundingBox().GetWidth();
79 double widthB = glyphs[1]->BoundingBox().GetWidth();
81 BOOST_CHECK_GT( widthA, 0.0 );
82 BOOST_CHECK_GT( widthB, 0.0 );
83 BOOST_CHECK_GT( widthA, widthB );
93 std::vector<wxString> embeddedFonts{ fontPath };
101 FT_Face face = outline->
GetFace();
106 BOOST_CHECK( FT_Get_Char_Index( face,
'A' ) != 0 );
FONT is an abstract base class for both outline and stroke fonts.
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
virtual bool IsOutline() const
Class OUTLINE_FONT implements outline font drawing.
VECTOR2I GetTextAsGlyphs(BOX2I *aBoundingBox, std::vector< std::unique_ptr< GLYPH > > *aGlyphs, const wxString &aText, const VECTOR2I &aSize, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle, bool aMirror, const VECTOR2I &aOrigin, TEXT_STYLE_FLAGS aTextStyle) const override
Convert text string to an array of GLYPHs.
const FT_Face & GetFace() const
static constexpr EDA_ANGLE ANGLE_0
std::string GetTestDataRootDir()
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
static wxString getTestFontPath(const wxString &aFileName)
BOOST_AUTO_TEST_CASE(SymbolFontRendersAsciiGlyphs)
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I