Mercurial > octave
comparison libinterp/corefcn/ft-text-renderer.cc @ 28483:98889de398dd stable
* ft-text-renderer.cc: Allow build to succeed if HAVE_FONTCONFIG is undefined.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 16 Jun 2020 10:12:00 -0400 |
parents | 768ae9b1a67c |
children | 26cfccfee9a0 0a5b15007766 |
comparison
equal
deleted
inserted
replaced
28481:1be719d8b375 | 28483:98889de398dd |
---|---|
196 { | 196 { |
197 static octave_map font_map; | 197 static octave_map font_map; |
198 | 198 |
199 if (font_map.isempty ()) | 199 if (font_map.isempty ()) |
200 { | 200 { |
201 #if defined (HAVE_FONTCONFIG) | |
201 FcConfig *config = FcConfigGetCurrent(); | 202 FcConfig *config = FcConfigGetCurrent(); |
202 FcPattern *pat = FcPatternCreate (); | 203 FcPattern *pat = FcPatternCreate (); |
203 FcObjectSet *os = FcObjectSetBuild (FC_FAMILY, FC_SLANT, FC_WEIGHT, | 204 FcObjectSet *os = FcObjectSetBuild (FC_FAMILY, FC_SLANT, FC_WEIGHT, |
204 FC_CHARSET, nullptr); | 205 FC_CHARSET, nullptr); |
205 FcFontSet *fs = FcFontList (config, pat, os); | 206 FcFontSet *fs = FcFontList (config, pat, os); |
267 font_map.assign ("suitable", suitable); | 268 font_map.assign ("suitable", suitable); |
268 | 269 |
269 if (fs) | 270 if (fs) |
270 FcFontSetDestroy (fs); | 271 FcFontSetDestroy (fs); |
271 } | 272 } |
273 #endif | |
272 } | 274 } |
273 | 275 |
274 return font_map; | 276 return font_map; |
275 } | 277 } |
276 | 278 |