nautilus/libnautilus-extensions/nautilus-font-factory.h
Ramiro Estrugo bbb7d78b40 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.
2000-06-02 20:34:43 +00:00

50 lines
1.6 KiB
C

/* -*- 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 */