Re: [PATCH] Fix relative font units in hippo-canvas
- From: "Marco Pesenti Gritti" <mpgritti gmail com>
- To: "Owen Taylor" <otaylor redhat com>
- Cc: Online Desktop <online-desktop-list gnome org>
- Subject: Re: [PATCH] Fix relative font units in hippo-canvas
- Date: Tue, 3 Jun 2008 15:55:15 +0200
On Tue, Jun 3, 2008 at 3:43 PM, Owen Taylor <otaylor redhat com> wrote:
> 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.
Good catch. Checking in with that change...
Marco
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]