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 1313 'with_jpeg%' : '<!(./util/has_lib.sh jpeg)' ,
1414 'with_gif%' : '<!(./util/has_lib.sh gif)' ,
1515 # disable pango as it causes issues with freetype.
16- 'with_pango%' : 'false ' ,
16+ 'with_pango%' : '<!(./util/has_lib.sh pangocairo) ' ,
1717 'with_freetype%' : '<!(./util/has_cairo_freetype.sh)'
1818 }
1919 }]
Original file line number Diff line number Diff line change 66
77#include " FontFace.h"
88
9+ #include < fontconfig/fontconfig.h>
10+
911Persistent<FunctionTemplate> FontFace::constructor;
1012
1113/*
@@ -79,6 +81,14 @@ NAN_METHOD(FontFace::New) {
7981 return NanThrowError (" Could not load font file" );
8082 }
8183
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+
8292 // Create new cairo font face.
8393 crFace = cairo_ft_font_face_create_for_ft_face (ftFace, 0 );
8494
You can’t perform that action at this time.
0 commit comments