unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "समीर सिंह Sameer Singh" <lumarzeli30@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Implementing Vertical Text support in Emacs
Date: Thu, 08 Sep 2022 22:05:39 +0300	[thread overview]
Message-ID: <838rmtelfg.fsf@gnu.org> (raw)
In-Reply-To: <CAOR1sLwNA8Fu3H595i6TR3TibfbOiapefyuJg3H3n0X4hGAryQ@mail.gmail.com> (message from समीर सिंह Sameer Singh on Fri, 9 Sep 2022 00:14:45 +0530)

> From: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
> Date: Fri, 9 Sep 2022 00:14:45 +0530
> Cc: emacs-devel@gnu.org
> 
> Well after getting some free time I started to work on this for a week or so and I have to say I am quite a bit
> lost :( 
> 
> Right now I don't care about harfbuzz or correct character composition, I only want to display rows vertically,
> but
> I don't know where to start, does modifying only display_line and move_it_in_display_line_to work?
> Even if this is the case, I don't know how to parse the huge display_line function and find the area of interest
> among the lines of wrap and hscroll code? where is the code where the matrix is filled?

display_line is the relatively low level which produces a single
screen line of a window, i.e. a single row of characters, images, and
other "display elements" that occupy a single visual line.

Before you modify display_line, you need to decide how will the
vertical-layout display produce glyphs.  The easiest would be to
produce them in column-wise order, because that basically processes
the buffer in the order of character positions, like Emacs does now.
This will allow you to leave the lower levels, which walk the buffer
and deliver characters, mostly intact.

So perhaps you should have a display_column function, which will look
like display_line, but instead of advancing the X coordinate, it will
advance the Y coordinate, and produce a single column, top to bottom.
Then the basic calculations should be the same as in display_line,
except the column ends when it reaches last_visible_y instead of
last_visible_x.  IOW, the glyph matrices will be made of glyph columns
instead of glyph rows.  Basically, the roles of the X and the Y
coordinates will be swapped.

I suggest to invest some time in reading the code of display_line and
studying its main ideas and tasks.  Because the hypothetical
display_column will have to do something very similar, just vertically
instead of horizontally.  Ask questions where you cannot figure stuff
out.  Then design your display_column in a similar way.

> Regrettably my inexperience  is causing hurdles therefore any guidance would be a huge help.

Don't give up.  And thanks for working on this.



  reply	other threads:[~2022-09-08 19:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 15:29 Implementing Vertical Text support in Emacs समीर सिंह Sameer Singh
2022-06-13 16:16 ` [External] : " Drew Adams
2022-06-13 16:30 ` Eli Zaretskii
2022-06-15 10:08   ` Richard Stallman
2022-06-15 10:22     ` Po Lu
2022-06-15 11:09       ` समीर सिंह Sameer Singh
2022-06-16 22:48         ` Richard Stallman
2022-06-17  1:43           ` समीर सिंह Sameer Singh
2022-06-17  6:12             ` Eli Zaretskii
2022-09-08 18:44               ` समीर सिंह Sameer Singh
2022-09-08 19:05                 ` Eli Zaretskii [this message]
2022-09-10 15:53                   ` समीर सिंह Sameer Singh
2022-09-10 16:17                     ` Eli Zaretskii
2022-09-29 19:57                       ` समीर सिंह Sameer Singh
2022-09-30  6:30                         ` Eli Zaretskii
2022-11-20 11:18                           ` समीर सिंह Sameer Singh
2022-11-20 11:43                             ` Eli Zaretskii
2022-11-20 12:08                               ` समीर सिंह Sameer Singh
2022-11-24 11:39                                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838rmtelfg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lumarzeli30@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).