From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?4KS44KSu4KWA4KSwIOCkuOCkv+CkguCkuSBTYW1lZXIgU2luZ2g=?= Newsgroups: gmane.emacs.devel Subject: Re: Implementing Vertical Text support in Emacs Date: Fri, 17 Jun 2022 07:13:33 +0530 Message-ID: References: <83r13sttj6.fsf@gnu.org> <87wndi6xau.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000079097805e19ae244" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="644"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , emacs-devel@gnu.org, Richard Stallman To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 17 03:44:48 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o212V-000AXx-MD for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 03:44:47 +0200 Original-Received: from localhost ([::1]:59494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o212U-00022x-5P for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Jun 2022 21:44:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o211Y-0001MU-UN for emacs-devel@gnu.org; Thu, 16 Jun 2022 21:43:49 -0400 Original-Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]:36601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o211W-0007qA-L1; Thu, 16 Jun 2022 21:43:48 -0400 Original-Received: by mail-qv1-xf29.google.com with SMTP id 43so4641663qvb.3; Thu, 16 Jun 2022 18:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gmjwdcH9kI3I32H33bLqrhsRKkSnNk4IDpBVaOfMJ/8=; b=W1pJHpNoFnC784sVh3OqGj/KExGb97XxclXA7XfwbWbO2EPGqdy85yxgisx0bQgSe0 6KEbsteOOZUm55uHOWLy2e6evITwXoKXt3P7QLuRrl7jZ+ELb9uT26r5N0Jaz8OrMpnW fRvjq5nOmKBj+agKPs1bH/69KRaJRH8IXnLSimVWhWNiSFMp630xuB40TA8H10xoPkUq jNZZcaPm0mTy6rFQQZkilHmKyYBYCJVbJvfxGToEs4warPgRU/iqr6kV0r565kPERQh3 sS9hIn1xXqmUzKYjhgALYzyCPBvZpPhmin3eX1nsivInZdBWdbrIdRpDBqov2ty7oiIy CURQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gmjwdcH9kI3I32H33bLqrhsRKkSnNk4IDpBVaOfMJ/8=; b=A2N79sWZILHxUQyZS8XkfUSLWyp0oRzYAPbhDEa4kqZWs00d/ebLShLTcTuHlRFCUd dVRWLTWpRj7rRvcInTuuVi60ir1mvfD2sopbBtdA76645dniMNqQduYui2XMSYFKGzFq cy66rkCeJQtyD6hFHbZSnpPNN44sQf//DPJB20g4fqG0a/xNtV99qc1Ma8mPazlGe6cn YUksgpNBja/Ow0iFbvk5ztqd4aCuZIbaSY2cto15LdaDHgBhhRGSu7xajlJLKMV+xRLN l0OelyNk32tfVZPs6ODnGaBnTb3K7Nr2vx7d0fvuqU6rGy0z4J0owmLhaI8uVwJAZk3X 8dmg== X-Gm-Message-State: AJIora8ZC4PFvWH7uQ8QbkAW25obuOwQeftCxLFcmE7EReTX1XLDe9Xs ZcVHW400RQ3BY4EmwtyBhxLpnZeYofi8YO0vn7oCMPezfCI= X-Google-Smtp-Source: AGRyM1tAjx+sJ8ZKvkuYR9aiN3V2Ug2NJX5X/seLF02peN+3msP7lDDLmI+pdDZhKjXvC/8D8MKrXzrnBjeNfFZSc80= X-Received: by 2002:a05:622a:1343:b0:304:fd82:122d with SMTP id w3-20020a05622a134300b00304fd82122dmr6554562qtk.676.1655430224348; Thu, 16 Jun 2022 18:43:44 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=lumarzeli30@gmail.com; helo=mail-qv1-xf29.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291261 Archived-At: --00000000000079097805e19ae244 Content-Type: text/plain; charset="UTF-8" Thanks for such a detailed response. Start by reading the large commentary at the beginning of xdisp.c, > which providers a general overview of the display engine and its basic > structure and algorithms. After you digest that, we'd need to talk > about the details, because they are non-trivial. Let me show you the > tip of the iceberg (and it could be that what I say below won't make > sense until you read that commentary). > I have read the full commentary and have understood it somewhat, but at least I can understand what you have written later. Maybe while writing the implementation it will make more sense. Then there will be issues with scrolling: do we swap horizontal and > vertical scrolling for vertical-layout text, or do we keep the scroll > direction (in which case we need to decide what it means to scroll up > or down)? > I think we should swap horizontal and vertical scrolling. For a reference see this website: wikibilig.mn/ AFAIU, some vertical scripts are written in rows left-to-right and > some right-to-left, so you actually have 2 different layouts on your > hands. > Scripts like Mongolian are written only in one direction: ltr, but CJK characters are bidirectional i.e. they can either be written from ltr or from rtl .How should we support that? This is an even tougher issue. Is support for such mixed scripts a > necessity without which the entire feature won't make sense? If not, > I'd suggest to limit yourself to either vertical or horizontal layout, > leaving the mix of the two unsupported for starters. If mixing them > is a must, everything I said above needs to be rethought, and it could > even be that the current design of the display engine simply cannot be > extended to support that. > Yeah, I should not mix them. Do vertical-layout scripts require complex text shaping > (a.k.a. "character composition")? If so, does HarfBuzz support such > scripts and their corresponding fonts? I don't know. We may need a > different shaping engine (if one exists). > Yes they require complex text shaping and Harfbuzz supports it. I even had a Mongolian patch ready but accidently deleted my emacs source directory. :( Also how would I test the new changes I would make in xdisp.c? Thanks. On Fri, Jun 17, 2022 at 4:18 AM Richard Stallman wrote: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > > Wouldn't it be better to support vertical text in Emacs, > > In a world in which we had an infinite supply of very good programmers > working on Emacs, it would be better to support vertical text. > > But in the actual world, we need to ask whether it is worth the cost, > and whether some other feature would be more worth while. > > -- > Dr Richard Stallman (https://stallman.org) > Chief GNUisance of the GNU Project (https://gnu.org) > Founder, Free Software Foundation (https://fsf.org) > Internet Hall-of-Famer (https://internethalloffame.org) > > > --00000000000079097805e19ae244 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for such a detailed response.

Start by reading= the large commentary at the beginning of xdisp.c,
which providers a general overview of the display engine and its basic
structure and algorithms.=C2=A0 After you digest that, we'd need to tal= k
about the details, because they are non-trivial.=C2=A0 Let me show you the<= br> tip of the iceberg (and it could be that what I say below won't make sense until you read that commentary).

I have read the full commentary and have understood it somewhat, but at l= east I can understand what you have written later.
Maybe while wr= iting the implementation it will make more sense.

Then there will be issues= with scrolling: do we swap horizontal and
vertical scrolling for vertical-layout text, or do we keep the scroll
direction (in which case we need to decide what it means to scroll up
or down)?

I think we should swap hori= zontal and vertical scrolling.
For a reference see this website: = wikibilig.mn/

AFAIU, some vertical scr= ipts are written in rows left-to-right and
some right-to-left, so you actually have 2 different layouts on your
hands.

Scripts like Mongolian are wri= tten only in one direction: ltr, but CJK characters are bidirectional i.e.<= /div>
they can either be written from ltr or from rtl .How should we su= pport that?

This is an even tougher issue.=C2=A0 Is support for such mixed = scripts a
necessity without which the entire feature won't make sense?=C2=A0 If n= ot,
I'd suggest to limit yourself to either vertical or horizontal layout,<= br> leaving the mix of the two unsupported for starters.=C2=A0 If mixing them is a must, everything I said above needs to be rethought, and it could
even be that the current design of the display engine simply cannot be
extended to support that.

Yeah, I should not mix them.

Do vertical-layo= ut scripts require complex text shaping
(a.k.a. "character composition")?=C2=A0 If so, does HarfBuzz supp= ort such
scripts and their corresponding fonts?=C2=A0 I don't know.=C2=A0 We may= need a
different shaping engine (if one exists).

Yes they require complex text shap= ing and Harfbuzz supports it.
I even had a Mongolian patch ready = but accidently deleted my emacs source directory. :(

Also how would I test the new changes I would make in xdisp.c?
=

Thanks.

<= div dir=3D"ltr" class=3D"gmail_attr">On Fri, Jun 17, 2022 at 4:18 AM Richar= d Stallman <rms@gnu.org> wrote:
[[[ To any NSA and= FBI agents reading my email: please consider=C2=A0 =C2=A0 ]]]
[[[ whether defending the US Constitution against all enemies,=C2=A0 =C2=A0= =C2=A0]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]<= br>
=C2=A0 > Wouldn't it be better to support vertical text in Emacs,
In a world in which we had an infinite supply of very good programmers
working on Emacs, it would be better to support vertical text.

But in the actual world, we need to ask whether it is worth the cost,
and whether some other feature would be more worth while.

--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)


--00000000000079097805e19ae244--