emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tick Reduction


From: Lars Ingebrigtsen
Subject: Re: Tick Reduction
Date: Sun, 21 Nov 2021 21:41:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> (defconst org-table-separator-space
>   (propertize " " 'display '(space :relative-width 1))

This is apparently the code?  It talks about a `glyph' property?  But...
only in the comments?  

  else if (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0)
    {
      /* Relative width `:relative-width FACTOR' specified and valid.
         Compute the width of the characters having the `glyph'
         property.  */
      struct it it2;
      unsigned char *p = BYTE_POS_ADDR (IT_BYTEPOS (*it));

      it2 = *it;
      if (it->multibyte_p)
        it2.c = it2.char_to_display = string_char_and_length (p, &it2.len);
      else
        {
          it2.c = it2.char_to_display = *p, it2.len = 1;
          if (! ASCII_CHAR_P (it2.c))
            it2.char_to_display = BYTE8_TO_CHAR (it2.c);
        }

      it2.glyph_row = NULL;
      it2.what = IT_CHARACTER;
      PRODUCE_GLYPHS (&it2);
      width = NUMVAL (prop) * it2.pixel_width;
    }

and

   2. `:relative-width FACTOR' specifies that the width of the stretch
   should be computed from the width of the first character having the
   `glyph' property, and should be FACTOR times that width.

Hm...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]