> From: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
> Date: Fri, 30 Sep 2022 01:27:01 +0530
> Cc: emacs-devel@gnu.org
>
> Before you modify display_line, you need to decide how will the
> vertical-layout display produce glyphs.
>
> Can you please expand more on this?
> How to produce glyphs in a column wise order?
I did that in the original message. Quoting myself:
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 looked at gui_produce_glyphs and that led me to append_glyph, but I could not figure out how the glyphs are
> produced.
> There is also draw_glyphs but I think working with that will require editing the low level *term files (if it even is
> the right function)
I didn't mean gui_produce_glyphs and its subroutines, I mean the logic
of how glyphs are produced, as described above, in display_line
itself. The current code in display_line produces glyph of a single
screen line, in visual order, from left to right. Above I suggested
to write a similar display_column function, which will produce glyphs
of a single column, top to bottom, and will make the decisions
regarding when the column is full and should be terminated, like
display_line does with respect to screen lines. Does this sounds like
a good approach to you?
If the approach sounds good, but something in my description is
unclear, please ask more specific questions about those unclear parts
of what I wrote.