Use G_TEST_DIST to build the path of math test fonts
This commit is contained in:
parent
8d58e3433e
commit
722e620f20
|
@ -83,6 +83,8 @@ TESTS_ENVIRONMENT = \
|
||||||
G_DEBUG=gc-friendly \
|
G_DEBUG=gc-friendly \
|
||||||
G_SLICE=always-malloc \
|
G_SLICE=always-malloc \
|
||||||
srcdir=$(srcdir) \
|
srcdir=$(srcdir) \
|
||||||
|
G_TEST_SRCDIR=$(abs_srcdir) \
|
||||||
|
G_TEST_BUILDDIR=$(abs_builddir) \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,12 +54,16 @@ cleanupFreeType (void)
|
||||||
static void
|
static void
|
||||||
openFont(const char* fontFile)
|
openFont(const char* fontFile)
|
||||||
{
|
{
|
||||||
|
gchar* path = g_test_build_filename(G_TEST_DIST, fontFile, NULL);
|
||||||
|
|
||||||
FT_Error ft_error;
|
FT_Error ft_error;
|
||||||
if ((ft_error = FT_New_Face (ft_library, fontFile, 0, &ft_face)))
|
if ((ft_error = FT_New_Face (ft_library, path, 0, &ft_face))) {
|
||||||
|
g_free(path);
|
||||||
abort();
|
abort();
|
||||||
|
}
|
||||||
|
g_free(path);
|
||||||
|
|
||||||
#define fontSize 1000
|
#define fontSize 1000
|
||||||
|
|
||||||
if ((ft_error = FT_Set_Char_Size (ft_face, fontSize, fontSize, 0, 0)))
|
if ((ft_error = FT_Set_Char_Size (ft_face, fontSize, fontSize, 0, 0)))
|
||||||
abort();
|
abort();
|
||||||
hb_font = hb_ft_font_create (ft_face, NULL);
|
hb_font = hb_ft_font_create (ft_face, NULL);
|
||||||
|
|
Loading…
Reference in New Issue