From cd13c979453864482930c496f7c4c4d2da891a7a Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 22 Apr 2014 16:37:22 +0200 Subject: Restore ability to insert a font-family that is not on system or a font-fallback list. (bzr r13296) --- src/widgets/text-toolbar.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 349fefa12..7b59fa633 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -146,6 +146,13 @@ static void sp_text_fontfamily_value_changed( Ink_ComboBoxEntry_Action *act, GOb std::cout << " New active: " << act->active << std::endl; #endif if( new_family.compare( fontlister->get_font_family() ) != 0 ) { + // Changed font-family + + if( act->active == -1 ) { + // New font-family, not in document, not on system (could be fallback list) + fontlister->insert_font_family( new_family ); + act->active = 0; // New family is always at top of list. + } std::pair ui = fontlister->set_font_family( act->active ); // active text set in sp_text_toolbox_selection_changed() -- cgit v1.2.3