diff options
author | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-06-02 20:34:43 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-06-02 20:34:43 +0000 |
commit | bbb7d78b40297eb81bcb373fed63f0dea5cb7c10 (patch) | |
tree | f2ed2df9a2b6a72e2af9ad86990acb5c2798ebdb /libnautilus-extensions/nautilus-font-factory.h | |
parent | 9adeb1955d0012fc20c1d7201c7a6f27556ee854 (diff) | |
download | nautilus-bbb7d78b40297eb81bcb373fed63f0dea5cb7c10.tar.gz |
Task 667. Unhardcode font strings.
* libnautilus-extensions/nautilus-font-factory.c:
(nautilus_get_current_font_factory), (nautilus_font_factory_get),
(nautilus_font_factory_new), (nautilus_font_factory_initialize),
(nautilus_font_factory_initialize_class), (font_hash_node_alloc),
(font_hash_node_free), (font_hash_node_lookup),
(font_hash_node_lookup_with_insertion),
(nautilus_font_factory_get_font_by_family),
(nautilus_font_factory_get_font_from_preferences),
(nautilus_font_factory_get_fallback_font), (make_font_name_string):
* libnautilus-extensions/nautilus-font-factory.h:
New class to obtain fonts either by family or from preferences. A
specific size can be requested.
Right now its a pretty dumb class, but it can be enhanced to do
smart things like looking at gtkstyles and/or smarted choosing of
fonts if the specifically requested size is not avialable.
* components/hardware/nautilus-hardware-view.c: (setup_form_title):
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(setup_form_title):
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-icon-container.c:
(nautilus_icon_container_initialize):
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize):
* src/nautilus-sidebar-title.c: (nautilus_index_title_update_info):
Unhardcode xlfd font strings in all of these and use the font
factory instead.
Diffstat (limited to 'libnautilus-extensions/nautilus-font-factory.h')
-rw-r--r-- | libnautilus-extensions/nautilus-font-factory.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/libnautilus-extensions/nautilus-font-factory.h b/libnautilus-extensions/nautilus-font-factory.h new file mode 100644 index 000000000..e5f933581 --- /dev/null +++ b/libnautilus-extensions/nautilus-font-factory.h @@ -0,0 +1,49 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- + + nautilus-font-factory.h: Class for obtaining fonts. + + Copyright (C) 2000 Eazel, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + + Authors: Ramiro Estrugo <ramiro@eazel.com> +*/ + +#ifndef NAUTILUS_FONT_FACTORY_H +#define NAUTILUS_FONT_FACTORY_H + +#include <gdk/gdk.h> +#include <gtk/gtkobject.h> + +/* A There's a single NautilusFontFactory object. */ +GtkObject *nautilus_font_factory_get (void); + + +/* Get a font by familiy. */ +GdkFont * nautilus_font_factory_get_font_by_family (const char *family, + guint size_in_pixels); + + +/* Get a font according to the family set in preferences. */ +GdkFont * nautilus_font_factory_get_font_from_preferences (guint size_in_pixels); + + + +/* Get the fallback font */ +GdkFont * nautilus_font_factory_get_fallback_font (void); + + +#endif /* NAUTILUS_FONT_FACTORY_H */ |