Commit c032a715 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

renamed from style_font_get_width and set to return pts.

2001-09-18  Jody Goldberg <jgoldberg@home.com>

	* src/style.c (style_font_get_width_pts) : renamed from
	  style_font_get_width and set to return pts.
parent b3731e36
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
style_font_get_width and set to return pts.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : implemenent a bit of just in time
......
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
style_font_get_width and set to return pts.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : implemenent a bit of just in time
......
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
style_font_get_width and set to return pts.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : implemenent a bit of just in time
......
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/style.c (style_font_get_width_pts) : renamed from
style_font_get_width and set to return pts.
2001-09-18 Jody Goldberg <jgoldberg@home.com>
* src/cell-draw.c (cell_draw) : implemenent a bit of just in time
......
......@@ -81,7 +81,7 @@ rendered_value_new (Cell *cell, MStyle const *mstyle, gboolean dynamic_width)
style_format_is_general (cell->format))) {
StyleFont *style_font =
scg_get_style_font (sheet, mstyle);
float const font_width = style_font_get_width (style_font);
float const font_width = style_font_get_width_pts (style_font);
style_font_unref (style_font);
if (font_width > 0.) {
......
......@@ -157,12 +157,17 @@ style_font_get_height (StyleFont const * const sf)
return gnome_display_font_height (sf->dfont);
}
/**
* style_font_get_width_pts
*
* Return our guestimate of the average width in pts.
*/
float
style_font_get_width (StyleFont const *sf)
style_font_get_width_pts (StyleFont const *sf)
{
g_return_val_if_fail (sf != NULL, 0);
return sf->approx_width.pixels;
return sf->approx_width.pts;
}
void
......
......@@ -68,7 +68,7 @@ StyleFont *style_font_new_simple (const char *font_name,
gboolean bold, gboolean italic);
GdkFont *style_font_gdk_font (StyleFont const *sf);
int style_font_get_height (StyleFont const *sf);
float style_font_get_width (StyleFont const *sf);
float style_font_get_width_pts(StyleFont const *sf);
void style_font_ref (StyleFont *sf);
void style_font_unref (StyleFont *sf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment