Browse Source

clean up register_font to have clearer flow

master
Caleb Hearon 9 years ago
parent
commit
1a8c00c64c
  1. 8
      src/register_font.cc

8
src/register_font.cc

@ -24,11 +24,13 @@ register_font(unsigned char *filepath) {
success = FcConfigAppFontAddFile(FcConfigGetCurrent(), (FcChar8 *)(filepath));
#endif
if (!success) return false;
// Tell Pango to throw away the current FontMap and create a new one. This
// has the effect of registering the new font in Pango by re-looking up all
// font families.
if (success) pango_cairo_font_map_set_default(NULL);
return success;
pango_cairo_font_map_set_default(NULL);
return true;
}

Loading…
Cancel
Save