Re: [PATCH] Fix relative font units in hippo-canvas
- From: Owen Taylor <otaylor redhat com>
- To: Marco Pesenti Gritti <mpgritti gmail com>
- Cc: Online Desktop <online-desktop-list gnome org>
- Subject: Re: [PATCH] Fix relative font units in hippo-canvas
- Date: Tue, 03 Jun 2008 09:43:30 -0400
On Tue, 2008-06-03 at 14:43 +0200, Marco Pesenti Gritti wrote:
> Hello,
>
> I was working on making bigboard use relative font sizes (em) and I
> found that size calculation is broken in hippo-canvas. The attached
> patch fixes it. I couldn't find satisfactory documentation about units
> in pango_font_description_get_size_is_absolute and
> pango_font_description_get_size other than this email:
>
> http://mail.gnome.org/archives/gtk-devel-list/2006-October/msg00168.html
http://library.gnome.org/devel/pango/stable/pango-Fonts.html#pango-font-description-set-size
Describes it fairly well. The patch looks ok, except that
font_size = pango_font_description_get_size(desc) / PANGO_SCALE;
Would be better a:
font_size = (double)pango_font_description_get_size(desc) / PANGO_SCALE;
To prevent trunctation on an integer / integer division.
- Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]