2 * Declarations of utilities to use for font manipulation
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * Utilities for font manipulation.
29 * There are two different fonts used:
30 * - the application font for menu's, dialog's and such
31 * - the user font for the packet panes
33 * The user font is also available in regular (m_r_font) and bold (m_b_font) versions.
36 #ifndef __FONT_UTILS_H__
37 #define __FONT_UTILS_H__
39 /** Init the application and user fonts at program start. */
40 extern void font_init(void);
42 /** Return value from font_apply() */
44 FA_SUCCESS
, /**< function succeeded */
45 FA_FONT_NOT_RESIZEABLE
, /**< the chosen font isn't resizable */
46 FA_FONT_NOT_AVAILABLE
/**< the chosen font isn't available */
49 /** Applies a new user font, corresponding to the preferences font name and recent zoom level.
50 * Will also redraw the screen.
52 * @return if the new font could be set or not
54 extern fa_ret_t
user_font_apply(void);
56 /** Test, if the given font name is available.
58 * @param font_name the font to test
59 * @return TRUE, if this font is available
61 extern gboolean
user_font_test(gchar
*font_name
);
63 /** Get the regular user font.
65 * @return the regular user font
67 extern PangoFontDescription
*user_font_get_regular(void);