static void update_font(void){ const char *new_font_name = gtk_font_selection_dialog_get_font_name((GtkFontSelectionDialog*)font_selector); struct Tracker_Windows *window=root->song->tracker_windows; pango_font_description_free(font_description); font_description = pango_font_description_from_string(new_font_name); #if FONT_THICKNESS_CONFIG pango_font_description_set_weight(font_description, font_thickness); #endif pango_layout_set_font_description (pango_layout, font_description); setFontValues(window); printf("new_font_name: \"%s\". font_name: \"%s\". height: %d, width: %d\n",new_font_name,font_name,window->fontheight,window->fontwidth); font_name = new_font_name; DO_GFX_BLT({ UpdateAllWBlockWidths(window); DrawUpTrackerWindow(window); });
void SelectEditFont( struct Tracker_Windows *window ){ struct WBlocks *wblock=window->wblock; char *font = GFX_SelectEditFont(window); if(font==NULL) return; window->leftslider.width=window->fontwidth; UpdateAllWBlockWidths(window); UpdateReallinesDependens(window,wblock); window->blt.clear_do=false; window->must_redraw = true; printf("font: -%s-\n",font); // Saved last in case the font crashes radium SETTINGS_write_string("font",font); }