27#include <wx/filename.h>
41 fontFile.RemoveLastDir();
42 fontFile.AppendDir( wxT(
"resources" ) );
43 fontFile.AppendDir( wxT(
"fonts" ) );
44 fontFile.SetFullName( aFileName );
46 return fontFile.GetFullPath();
59 std::vector<wxString> embeddedFonts{ fontPath };
67 FT_Face face = outline->
GetFace();
75 std::vector<std::unique_ptr<KIFONT::GLYPH>> glyphs;
79 BOOST_REQUIRE_EQUAL( glyphs.size(), 2 );
82 double widthA = glyphs[0]->BoundingBox().GetWidth();
83 double widthB = glyphs[1]->BoundingBox().GetWidth();
85 BOOST_CHECK_GT( widthA, 0.0 );
86 BOOST_CHECK_GT( widthB, 0.0 );
87 BOOST_CHECK_GT( widthA, widthB );
97 std::vector<wxString> embeddedFonts{ fontPath };
105 FT_Face face = outline->
GetFace();
110 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