[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] multistring support in gui_label
From: |
Vladimir Testov |
Subject: |
Re: [PATCH] multistring support in gui_label |
Date: |
Wed, 17 Apr 2013 15:39:54 +0400 |
User-agent: |
KMail/4.9.5 (Linux/3.5.0-26-generic; KDE/4.9.5; x86_64; ; ) |
On Wednesday, April 17, 2013 01:02:44 PM Vladimir Testov wrote:
> O.k. Here it is.
>
> from grub-core/font/font.c line 1387 function blit_comb :
> > do_blit (combining_glyphs[i],
> >
> > main_glyph->device_width
> >
> > + combining_glyphs[i]->offset_x,
> > -(combining_glyphs[i]->height
> >
> > + combining_glyphs[i]->offset_y), &ctx);
> >
> > add_device_width (combining_glyphs[i]->device_width, &ctx);
> >
> > }
> >
> > }
> >
> > }
> >
> > add_device_width ((above_rightx >
> >
> > below_rightx ? above_rightx : below_rightx) -
> >
> > (main_glyph->offset_x + main_glyph->width), &ctx);
> >
> > add_device_width (above_leftx - main_glyph->offset_x, &ctx);
> > if (glyph && glyph->device_width < min_devwidth)
> >
> > glyph->device_width = min_devwidth;
> >
> > if (device_width && *device_width < min_devwidth)
> >
> > *device_width = min_devwidth;
>
> ***device_width is changed sometimes.
>
> from grub-core/font/font.c line 1458 function grub_font_construct_dry_run :
> > if (device_width)
> >
> > *device_width = main_glyph->device_width;
> >
> > if (!glyph_id->ncomb && !glyph_id->attributes)
> >
> > return main_glyph;
> >
> > combining_glyphs = grub_malloc (sizeof (combining_glyphs[0])
> >
> > * glyph_id->ncomb);
> >
> > if (glyph_id->ncomb && !combining_glyphs)
> >
> > {
> >
> > grub_errno = GRUB_ERR_NONE;
> > return main_glyph;
> >
> > }
> >
> > for (i = 0; i < glyph_id->ncomb; i++)
> >
> > combining_glyphs[i]
> >
> > = grub_font_get_glyph_with_fallback (main_glyph->font,
> >
> > glyph_id->combining[i].code);
> >
> > blit_comb (glyph_id, NULL, bounds, main_glyph, combining_glyphs,
> >
> > device_width);
> >
> > if (combining_glyphs_out)
> >
> > *combining_glyphs_out = combining_glyphs;
> >
> > else
> >
> > grub_free (combining_glyphs);
> >
> > return main_glyph;
>
> ***return value *device_width set to main_glyph->device_width before
> main_glyph->device_width is changed during execution of blit_comb
>
> If we want to get device_width of some glyph - we use function
> get_constructed_device_width. It returns device_width parameter of the asked
> glyph with parameter *device_width of the function
> grub_font_construct_dry_run.
>
> When we actually construct glyph, we take device_width from glyph-
>
> >device_width.
>
> The most adequate way to find device_width of grub_unicode_glyph is to call
> grub_font_get_constructed_device_width. But it is miscalculated in some
> cases.
>
> So these two values are different in some cases (This is all about problem
> 2)
>
> Suggested patch to fix this problem (second one) is attached.
>
> I will remake the patch for multistring support for the upstream version.
Looks like I've misunderstood something... Sorry. Can't see where the problem
is...
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
- Re: [PATCH] multistring support in gui_label, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/04/03
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/16
- Re: [PATCH] multistring support in gui_label, Andrey Borzenkov, 2013/04/16
- Re: [PATCH] multistring support in gui_label, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/04/17
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/17
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/17
- Re: [PATCH] multistring support in gui_label,
Vladimir Testov <=
- Re: [PATCH] multistring support in gui_label, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/04/17
- Re: [PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/23
- [RFC][PATCH] multistring support in gui_label, Vladimir Testov, 2013/04/23