File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 13
13
'with_jpeg%' : '<!(./util/has_lib.sh jpeg)' ,
14
14
'with_gif%' : '<!(./util/has_lib.sh gif)' ,
15
15
# disable pango as it causes issues with freetype.
16
- 'with_pango%' : 'false ' ,
16
+ 'with_pango%' : '<!(./util/has_lib.sh pangocairo) ' ,
17
17
'with_freetype%' : '<!(./util/has_cairo_freetype.sh)'
18
18
}
19
19
}]
Original file line number Diff line number Diff line change 6
6
7
7
#include " FontFace.h"
8
8
9
+ #include < fontconfig/fontconfig.h>
10
+
9
11
Persistent<FunctionTemplate> FontFace::constructor;
10
12
11
13
/*
@@ -79,6 +81,14 @@ NAN_METHOD(FontFace::New) {
79
81
return NanThrowError (" Could not load font file" );
80
82
}
81
83
84
+ #if HAVE_PANGO
85
+ // Load the font file in fontconfig
86
+ FcBool ok = FcConfigAppFontAddFile (FcConfigGetCurrent (), (FcChar8 *)(*filePath));
87
+ if (!ok) {
88
+ return NanThrowError (" Could not load font in FontConfig" );
89
+ }
90
+ #endif
91
+
82
92
// Create new cairo font face.
83
93
crFace = cairo_ft_font_face_create_for_ft_face (ftFace, 0 );
84
94
You can’t perform that action at this time.
0 commit comments