summaryrefslogtreecommitdiffstats
path: root/src/widgets/font-selector.h
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2013-03-01 16:48:58 +0000
committertavmjong-free <tavmjong@free.fr>2013-03-01 16:48:58 +0000
commitf71eb7bbf5a09eb685c655762465cea23f5f9aee (patch)
treeaecebd436d44f1c2569d7a54c5a9dd7001b482a8 /src/widgets/font-selector.h
parentPatch generated locale Makefile to give correct installation folder (diff)
downloadinkscape-f71eb7bbf5a09eb685c655762465cea23f5f9aee.tar.gz
inkscape-f71eb7bbf5a09eb685c655762465cea23f5f9aee.zip
Convert font-selector, text-edit, glyphs to use updated font-lister (use fontspec rather than font).
(bzr r12164)
Diffstat (limited to 'src/widgets/font-selector.h')
-rw-r--r--src/widgets/font-selector.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/widgets/font-selector.h b/src/widgets/font-selector.h
index 80e8b1e4d..66715f048 100644
--- a/src/widgets/font-selector.h
+++ b/src/widgets/font-selector.h
@@ -7,9 +7,11 @@
* Authors:
* Chris Lahey <clahey@ximian.com>
* Lauris Kaplinski <lauris@kaplinski.com>
+ * Tavmjong Bah <tavmjong@free.fr>
*
* Copyright (C) 1999-2001 Ximian, Inc.
* Copyright (C) 2002 Lauris Kaplinski
+ * Copyright (C) 1999-2013 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
@@ -22,7 +24,24 @@ struct SPFontSelector;
#define SP_FONT_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SP_TYPE_FONT_SELECTOR, SPFontSelector))
#define SP_IS_FONT_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SP_TYPE_FONT_SELECTOR))
-class font_instance;
+/*
+ * The routines here create and manage a font selector widget with three parts,
+ * one each for font-family, font-style, and font-size.
+ *
+ * It is used by the TextEdit and Glyphs panel dialogs. The FontLister class is used
+ * to access the list of font-families and their associated styles for fonts either
+ * on the system or in the document. The FontLister class is also used by the Text
+ * toolbar. Fonts are kept track of by their "fontspecs" which are the same as the
+ * strings that Pango generates.
+ *
+ * The main functions are:
+ * Create the font-seletor widget.
+ * Update the lists when a new text selection is made.
+ * Update the Style list when a new font-family is selected, highlighting the
+ * best match to the original font style (as not all fonts have the same style options).
+ * Emit a signal when any change is made so that the Text Preview can be updated.
+ * Provide the currently selected values.
+ */
/* SPFontSelector */
@@ -30,13 +49,11 @@ GType sp_font_selector_get_type (void);
GtkWidget *sp_font_selector_new (void);
-void sp_font_selector_set_font (SPFontSelector *fsel, font_instance *font, double size);
+void sp_font_selector_set_fontspec (SPFontSelector *fsel, Glib::ustring fontspec, double size);
+Glib::ustring sp_font_selector_get_fontspec (SPFontSelector *fsel);
-font_instance *sp_font_selector_get_font (SPFontSelector *fsel);
double sp_font_selector_get_size (SPFontSelector *fsel);
-unsigned int sp_font_selector_get_best_style (font_instance *font, GList *list);
-
#endif // SP_FONT_SELECTOR_H
/*