diff options
author | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-09-07 07:49:52 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2000-09-07 07:49:52 +0000 |
commit | e38dfd4fc3a7dc6166195173a27117e44f3dc032 (patch) | |
tree | f10c73c6a5b239d19c099d4df0afc5ad70caaa98 /libnautilus-private/nautilus-scalable-font.c | |
parent | 6896aa7ca307bba182d8f97c33bacb4bd0c1a067 (diff) | |
download | nautilus-e38dfd4fc3a7dc6166195173a27117e44f3dc032.tar.gz |
Make the empty line height 1/2 of the font size to cram more stuff into
* libnautilus-extensions/nautilus-icon-factory.c: (embed_text):
Make the empty line height 1/2 of the font size to cram more stuff
into the embedded text.
* libnautilus-extensions/nautilus-label.c:
(nautilus_label_size_request), (render_buffer_pixbuf),
(label_get_empty_line_height),
(label_get_total_text_and_line_offset_height),
(label_recompute_line_geometries):
Update for scalable font changes.
* libnautilus-extensions/nautilus-scalable-font.c:
(nautilus_scalable_font_measure_text_lines),
(nautilus_scalable_font_draw_text_lines_with_dimensions),
(nautilus_scalable_font_draw_text_lines):
* libnautilus-extensions/nautilus-scalable-font.h:
Add empty_line_height argument to text line measuring and drawing
functions. Use this in both measure and drawing computations.
* test/test-nautilus-font.c: (gdk_pixbuf_draw_rectangle),
(draw_rectangle_around), (main):
Update for scalable font changes. Also draw a box around area
that is being clipped (or measured) to determine whether things
work precisely.
Diffstat (limited to 'libnautilus-private/nautilus-scalable-font.c')
-rw-r--r-- | libnautilus-private/nautilus-scalable-font.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libnautilus-private/nautilus-scalable-font.c b/libnautilus-private/nautilus-scalable-font.c index 29e458eb3..476e2661a 100644 --- a/libnautilus-private/nautilus-scalable-font.c +++ b/libnautilus-private/nautilus-scalable-font.c @@ -801,6 +801,7 @@ nautilus_scalable_font_measure_text_lines (const NautilusScalableFont *font, guint font_height, const char *text, guint num_text_lines, + double empty_line_height, guint text_line_widths[], guint text_line_heights[], guint *max_width_out, @@ -851,7 +852,7 @@ nautilus_scalable_font_measure_text_lines (const NautilusScalableFont *font, /* Deal with empty lines */ if (length == 0) { text_line_widths[i] = 0; - text_line_heights[i] = font_height; + text_line_heights[i] = empty_line_height; } else { nautilus_scalable_font_measure_text (font, @@ -896,6 +897,7 @@ nautilus_scalable_font_draw_text_lines_with_dimensions (const NautilusScalableFo const guint *text_line_heights, GtkJustification justification, guint line_offset, + double empty_line_height, guint32 color, guchar overall_alpha) { @@ -948,7 +950,7 @@ nautilus_scalable_font_draw_text_lines_with_dimensions (const NautilusScalableFo /* Deal with empty lines */ if (length == 0) { - y += font_height; + y += (line_offset + text_line_heights[i]); } else { int text_x; @@ -1015,6 +1017,7 @@ nautilus_scalable_font_draw_text_lines (const NautilusScalableFont *font, const char *text, GtkJustification justification, guint line_offset, + double empty_line_height, guint32 color, guchar overall_alpha) { @@ -1049,6 +1052,7 @@ nautilus_scalable_font_draw_text_lines (const NautilusScalableFont *font, font_height, text, num_text_lines, + empty_line_height, text_line_widths, text_line_heights, NULL, @@ -1067,6 +1071,7 @@ nautilus_scalable_font_draw_text_lines (const NautilusScalableFont *font, text_line_heights, justification, line_offset, + empty_line_height, color, overall_alpha); |