this post was submitted on 29 Sep 2023
27 points (96.6% liked)

Linux

48212 readers
695 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

My day job involves a fair bit of coding and I do most of the stuff in the terminal. But there is one sore spot that still bugs me to this day. All terminal emulators I've used don't have complex text layout support.

CTL is something required by Arabic and Brahmic scripts. I'm from Myanmar and Myanmar script is one of the Brahmic family of scripts. I've seen Indians also having this problem with their Devanagari script as well. I mean I don't need it too often but when I do, I have to open up a GUI text editor to edit.

I just want to know if there's something inherently fundamental in terminal emulators that makes it hard to support CTL? Is there even a terminal emulator with CTL support?

top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 1 year ago

Konsole from the KDE suite has CTL support: https://docs.kde.org/trunk5/en/konsole/konsole/complex-text-rendering.html

I think mlterm has too. And likely others.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

I mean, it's a terminal emulator, not a text processor...

But there are TE made for arabic/indic writing, like alFaseeh, elokab. Others like Gnome terminal support it, just googe it. I think a minimal requirement is UTF-8?

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Leave ‘em behind.

What should be and why it is, two diff questions…

A terminal renders a single glyph in a grid. That’s it. This stems from the days from before - when there was no graphics instruction to render anything different, and link speeds could be, on bad days, slower than typing speeds.

Terminal rendering evolved to include ANSI instruction to manipulate the rendering-color, grid position, etc.

However, at its core, is this limitation…a glyph in a grid…and this limitation is due to how slow terminals are.

Terminals originally operated at a serial baud rate where one could nearly type faster than the transmission speed.

X windows…was designed…to not have these limits.

Terminal emulation is handy, but … it is limited. By definition retro. If a terminal doesn’t work…move on…and make something that does :)

[–] [email protected] 3 points 1 year ago

Try kitty, it's the most powerful terminal emulator imo

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

Emacs has CTL support using libharfbuz as the text shaping engine.

But more importantly, Emacs has a "shell" app that lets you interact with a shell using the same textual interface that you would use when writing prose or code. To be sure, this is not a terminal emulator (although Emacs also has a terminal emulator app as well, called "term"), rather "shell" is a way of launching a POSIX process and interacting with it through the STDIN and STDOUT/STDERR channels. It is extremely useful, but does not always render the ANSI terminal escape codes cleanly, so colors and box drawing can sometimes end up garbled.

Still, I find this much more useful than an ordinary terminal emulator, especially when dealing with Chinese/Japanese script, or in your case with CTL.

[–] [email protected] 3 points 1 year ago (2 children)

Yeah, I've tried Emacs actually. Since it's like a full GUI app, there's support. I just got too invested in Vim and don't wanna switch.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

If you want CTL text layout support but want to use Vim, you can use a version of Emacs with Vim emulation extensions pre-installed. The easiest way to do this is to install Doom Emacs or Spacemacs which do all the tricky configuration things necessary to make it work and feel more consistently like Vim, and it just works out of the box.

[–] [email protected] 3 points 1 year ago

I tried it a few years back but gave up because I couldn't get it to work the way my vim setup used to. May be I should give it a try again sometime.

[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

Tried a lot of neovim GUIs. The only one that sort of works is Onivim2. It just has some spacing issues. It really looks promising. Super fast compared to VSCode variants.

[–] [email protected] 2 points 1 year ago (1 children)
[–] [email protected] 2 points 1 year ago

Will give it a try