nautilus/libnautilus-private/nautilus-font-factory.h
Ramiro Estrugo 1479770a30 reviewed by: Pavel Cisler <pavel@eazel.com>
Fix bug 5763 - Largest fitting font logic in Sidebar title causes
	font criticals.  Cleanup some related stuff in the process.

	* libnautilus-extensions/nautilus-font-factory.h:
	* libnautilus-extensions/nautilus-font-factory.c:
	(nautilus_font_factory_get_font_by_family),
	(nautilus_font_factory_get_font_from_preferences):
	Move these functions to nautilus-gdk-font-extensions.[ch].

	* libnautilus-extensions/nautilus-gdk-font-extensions.h:
	* libnautilus-extensions/nautilus-gdk-font-extensions.c:
	(nautilus_gdk_font_get_largest_fitting), Rewrite the function to
	not depend on any hard coded font sizes or XLFD names.
	(nautilus_gdk_font_get_name), New function.
	(nautilus_gdk_font_get_size_in_pixels), (unref_fixed_font),
	(nautilus_gdk_font_get_fixed),
	(nautilus_gdk_font_xlfd_string_new), Move these 2 here from
	nautilus-font-factory.
	(nautilus_self_check_ellipsize_start),
	(nautilus_self_check_gdk_font_extensions):
	* libnautilus-extensions/nautilus-scalable-font.h:
	* libnautilus-extensions/nautilus-scalable-font.c:
	(parse_font_description_file), (font_compare),
	(font_family_find_font), (font_family_lookup),
	(font_family_lookup_with_insertion), (font_family_table_add_fonts),
	(nautilus_scalable_font_new),
	(nautilus_scalable_font_measure_text),
	(nautilus_scalable_font_text_width),
	(nautilus_scalable_font_draw_text),
	(nautilus_scalable_font_measure_text_lines),
	(nautilus_scalable_font_draw_text_lines_with_dimensions),
	(nautilus_scalable_font_draw_text_lines),
	(nautilus_scalable_font_largest_fitting_font_size), Rewrite this
	function to work just like nautilus_gdk_font_get_largest_fitting()
	for greater consistency.
	(font_family_table_for_each_append),
	(font_family_table_for_each_free),
	(nautilus_scalable_font_query_font), (text_layout_free_row),
	(nautilus_text_layout_new), (nautilus_text_layout_paint):
	Use signed integers for dimensions.  Lots of cleanup to comply
	with the Nautilus coding style.

	* libnautilus-extensions/nautilus-string-list.h:
	* libnautilus-extensions/nautilus-string-list.c:
	(nautilus_string_list_new_from_tokens),
	(nautilus_string_list_get_index_for_string),
	(nautilus_string_list_as_concatenated_string),
	(nautilus_string_list_get_longest_string),
	(nautilus_string_list_get_longest_string_length),
	(nautilus_self_check_string_list):
	Use signed integers instead of guint.

	* src/nautilus-sidebar-title.c: (update_font):
	Update for largest fitting font api changes.  Get rid of the hard
	coded list of font sizes.
2001-01-31 01:39:24 +00:00

43 lines
1.5 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);
#endif /* NAUTILUS_FONT_FACTORY_H */