unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master f34f474e386: Properly instruct compound glyphs with compound components
       [not found] ` <20231222022630.A2591C00613@vcs2.savannah.gnu.org>
@ 2023-12-22 16:19   ` Stefan Kangas
  2023-12-22 16:28     ` Stephen Berman
  2023-12-23  0:04     ` Po Lu
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Kangas @ 2023-12-22 16:19 UTC (permalink / raw)
  To: Po Lu, emacs-devel

Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:

> branch: master
> commit f34f474e386b662114e6ee4ebd8c37f4cb66db71
> Author: Po Lu <luangruo@yahoo.com>
> Commit: Po Lu <luangruo@yahoo.com>
>
>     Properly instruct compound glyphs with compound components
>
>     * src/sfnt.c (sfnt_interpret_compound_glyph_2): Don't grow the
>     compound decomposition context for saving compound points into,
>     since the space for them already exists.
> ---
>  src/sfnt.c | 34 ++++++++++------------------------
>  1 file changed, 10 insertions(+), 24 deletions(-)
>
> diff --git a/src/sfnt.c b/src/sfnt.c
> index 62ed27b4311..1397e341aa8 100644
> --- a/src/sfnt.c
> +++ b/src/sfnt.c
> @@ -12618,15 +12618,14 @@ sfnt_interpret_compound_glyph_2 (struct sfnt_glyph *glyph,
>    struct sfnt_interpreter_zone *zone;
>    struct sfnt_interpreter_zone *volatile preserved_zone;
>    volatile bool zone_was_allocated;
> -  int rc;
>    sfnt_f26dot6 *x_base, *y_base;
> -  size_t *contour_base;
> -  unsigned char *flags_base;
>
> -  /* Figure out how many points and contours there are to
> -     instruct.  */
> +  /* Figure out how many points and contours there are to instruct.  A
> +     minimum of two points must be present, to wit the origin and
> +     advance phantom points.  */

Does "to wit" here mean "to know"?  If so, could we install something
like the below?

Merriam Webster tells me that "wit" used as a verb is "archaic", so I'd
propose avoiding that word completely.

diff --git a/src/sfnt.c b/src/sfnt.c
index 1397e341aa8..f30279fd283 100644
--- a/src/sfnt.c
+++ b/src/sfnt.c
@@ -12621,7 +12621,7 @@ sfnt_interpret_compound_glyph_2 (struct
sfnt_glyph *glyph,
   sfnt_f26dot6 *x_base, *y_base;

   /* Figure out how many points and contours there are to instruct.  A
-     minimum of two points must be present, to wit the origin and
+     minimum of two points must be present, to know the origin and
      advance phantom points.  */
   num_points = context->num_points - base_index;
   num_contours = context->num_end_points - base_contour;


>    num_points = context->num_points - base_index;
>    num_contours = context->num_end_points - base_contour;
> +  assert (num_points >= 2);
>
>    /* Nothing to instruct! */
>    if (!num_points && !num_contours)
> @@ -12740,27 +12739,14 @@ sfnt_interpret_compound_glyph_2 (struct sfnt_glyph *glyph,
>        context->y_coordinates[base_index + i] = zone->y_current[i];
>      }
>
> -  /* Grow various arrays to fit the phantom points.  */
> -  rc = sfnt_expand_compound_glyph_context (context, 0, 2,
> -					   &x_base, &y_base,
> -					   &flags_base,
> -					   &contour_base);
> -
> -  if (rc)
> -    {
> -      if (zone_was_allocated)
> -	xfree (zone);
> -
> -      return "Failed to expand arrays for phantom points";
> -    }
> -
> -  /* Copy over the phantom points.  */
> +  /* Return the phantom points after instructing completes to the
> +     context's coordinate arrays.  */
> +  x_base    = &context->x_coordinates[i - 2];
> +  y_base    = &context->y_coordinates[i - 2];
>    x_base[0] = zone->x_current[num_points - 2];
>    x_base[1] = zone->x_current[num_points - 1];
>    y_base[0] = zone->y_current[num_points - 2];
>    y_base[1] = zone->y_current[num_points - 1];
> -  flags_base[0] = zone->flags[num_points - 2];
> -  flags_base[1] = zone->flags[num_points - 1];
>
>    /* Free the zone if needed.  */
>    if (zone_was_allocated)
> @@ -20573,8 +20559,8 @@ main (int argc, char **argv)
>        return 1;
>      }
>
> -#define FANCY_PPEM 12
> -#define EASY_PPEM  12
> +#define FANCY_PPEM 14
> +#define EASY_PPEM  14
>
>    interpreter = NULL;
>    head = sfnt_read_head_table (fd, font);



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: master f34f474e386: Properly instruct compound glyphs with compound components
  2023-12-22 16:19   ` master f34f474e386: Properly instruct compound glyphs with compound components Stefan Kangas
@ 2023-12-22 16:28     ` Stephen Berman
  2023-12-23  0:04     ` Po Lu
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2023-12-22 16:28 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Po Lu, emacs-devel

On Fri, 22 Dec 2023 08:19:04 -0800 Stefan Kangas <stefankangas@gmail.com> wrote:

> Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:
>
>> branch: master
>> commit f34f474e386b662114e6ee4ebd8c37f4cb66db71
>> Author: Po Lu <luangruo@yahoo.com>
>> Commit: Po Lu <luangruo@yahoo.com>
>>
>>     Properly instruct compound glyphs with compound components
>>
>>     * src/sfnt.c (sfnt_interpret_compound_glyph_2): Don't grow the
>>     compound decomposition context for saving compound points into,
>>     since the space for them already exists.
>> ---
>>  src/sfnt.c | 34 ++++++++++------------------------
>>  1 file changed, 10 insertions(+), 24 deletions(-)
>>
>> diff --git a/src/sfnt.c b/src/sfnt.c
>> index 62ed27b4311..1397e341aa8 100644
>> --- a/src/sfnt.c
>> +++ b/src/sfnt.c
>> @@ -12618,15 +12618,14 @@ sfnt_interpret_compound_glyph_2 (struct sfnt_glyph *glyph,
>>    struct sfnt_interpreter_zone *zone;
>>    struct sfnt_interpreter_zone *volatile preserved_zone;
>>    volatile bool zone_was_allocated;
>> -  int rc;
>>    sfnt_f26dot6 *x_base, *y_base;
>> -  size_t *contour_base;
>> -  unsigned char *flags_base;
>>
>> -  /* Figure out how many points and contours there are to
>> -     instruct.  */
>> +  /* Figure out how many points and contours there are to instruct.  A
>> +     minimum of two points must be present, to wit the origin and
>> +     advance phantom points.  */
>
> Does "to wit" here mean "to know"?  If so, could we install something
> like the below?
>
> Merriam Webster tells me that "wit" used as a verb is "archaic", so I'd
> propose avoiding that word completely.
>
> diff --git a/src/sfnt.c b/src/sfnt.c
> index 1397e341aa8..f30279fd283 100644
> --- a/src/sfnt.c
> +++ b/src/sfnt.c
> @@ -12621,7 +12621,7 @@ sfnt_interpret_compound_glyph_2 (struct
>
> sfnt_glyph *glyph,
>    sfnt_f26dot6 *x_base, *y_base;
>
>    /* Figure out how many points and contours there are to instruct.  A
> -     minimum of two points must be present, to wit the origin and
> +     minimum of two points must be present, to know the origin and
>       advance phantom points.  */
>    num_points = context->num_points - base_index;
>    num_contours = context->num_end_points - base_contour;

No, "to wit" is an adverbial expression meaning the same as "namely",
"that is" or "i.e.".

Steve Berman



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master f34f474e386: Properly instruct compound glyphs with compound components
  2023-12-22 16:19   ` master f34f474e386: Properly instruct compound glyphs with compound components Stefan Kangas
  2023-12-22 16:28     ` Stephen Berman
@ 2023-12-23  0:04     ` Po Lu
  1 sibling, 0 replies; 3+ messages in thread
From: Po Lu @ 2023-12-23  0:04 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> Does "to wit" here mean "to know"?  If so, could we install something
> like the below?
>
> Merriam Webster tells me that "wit" used as a verb is "archaic", so I'd
> propose avoiding that word completely.

"wit" is only archiac as a verb, not in the set phrase "to wit", whose
meaning is much like viz. or namely.  Here is one example of its use:

  https://www.nytimes.com/2000/06/23/world/a-letter-to-the-president-a-lesson-in-style.html

  Westerners cap the salutations of their business letters with a colon,
  to wit: Dear Mr. Doe:. Not so Russians, who fire off important
  missives with gunpowder, as with ''Respected Rodion Romanovich!'' or
  ''Dear Mrs. Raskolnikov!''



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-23  0:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <170321199032.636.13637031264083721013@vcs2.savannah.gnu.org>
     [not found] ` <20231222022630.A2591C00613@vcs2.savannah.gnu.org>
2023-12-22 16:19   ` master f34f474e386: Properly instruct compound glyphs with compound components Stefan Kangas
2023-12-22 16:28     ` Stephen Berman
2023-12-23  0:04     ` Po Lu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).