Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

[1.9.0] Problem with highlighting RTL language text #12282

Closed
morajabi opened this issue Aug 2, 2016 · 22 comments
Closed

[1.9.0] Problem with highlighting RTL language text #12282

morajabi opened this issue Aug 2, 2016 · 22 comments

Comments

@morajabi
Copy link

morajabi commented Aug 2, 2016

Description

After upgrading to the new version (from 1.8 to 1.9) I can't correctly select Persian text and it won't highlight it.
I use Operator Mono font but i tried Monaco with no luck.

Steps to Reproduce

  1. Type some Persian/ Arabic text
  2. try to select it! (by double click or regular selecting)
  3. You can't!

Expected behavior: Should be highlighted as En text

https://i.imgsafe.org/05a5625be9.png
EN text selecting

https://i.imgsafe.org/05a55ccc06.png
bad FA/ARABIC text selection in 1.9 version

Actual behavior: But it highlights only 1 character.

Versions

atom 1.9.0
OSX El Captian 10.11.5

@morajabi
Copy link
Author

morajabi commented Aug 3, 2016

Any news? It's a terrible bug for those who write Right-to-Left in atom, please take look ASAP.

@50Wliu
Copy link
Contributor

50Wliu commented Aug 3, 2016

@nathansobo @as-cii

@as-cii
Copy link
Contributor

as-cii commented Aug 5, 2016

Hi @morajabi, apologies for this rendering bug but unfortunately we don't officially support RTL characters for now. This is due to the text-selection routine that we currently employ which assumes glyphs have a left-to-right layout and, therefore, doesn't work properly when dealing with text that is rendered in the inverse direction. We plan to do so in the future and provide better overall internationalization support in Atom. In the meantime I'll share this with the team too. 👍

Thanks for the report! 🙇

@morajabi
Copy link
Author

morajabi commented Sep 1, 2016

Don't atom team want to do something with this soon? I'm sure so many people are leaving Sublime Text and joining Atom community just for bad support for RTL in ST, same as all of my friends.

@Ojvar

This comment has been minimized.

@50Wliu
Copy link
Contributor

50Wliu commented Dec 16, 2016

I believe @farnabaz is working on this, and we've already merged a related PR: #13194.

@Ojvar
Copy link

Ojvar commented Dec 16, 2016 via email

@iraniamir

This comment has been minimized.

@salehmosleh

This comment has been minimized.

@amzaf
Copy link

amzaf commented Jul 1, 2017

Why you guys build something on the assumption that you'll never ever encounter RTL and now you have an ecosystem built around something that is too risky or too late to fix.

@farnabaz
Copy link
Contributor

farnabaz commented Oct 6, 2017

Hi
Is there any way that we can create a global grammar in atom, in order to wrap all RTL chars inside a node?
Atom uses binary search to find cursor position in screen, If we can wrap RTL chars in a TextNode we can create another RTL binary search and find correct position of cursor in RTL text

@as-cii @50Wliu @nathansobo

@nathansobo
Copy link
Contributor

@farnabaz I don't have enough context to really answer to your question. We will get to this someday, but right now we just don't have the bandwidth to take it on. If you or another community member is interested in doing some deep research around what it would take to accomplish this, that would be helpful. I'm worried that it goes beyond just measurement issues at the DOM level.

@saeedhei

This comment has been minimized.

@PascalPixel
Copy link

@as-cii In case you don't have internal statistics regarding rtl usage in atom; a little over 1.5 billion people use rtl languages, or about 20% of the world population

I imagine this happened due to your new C++ editor for bigger files?

I too can attest to personal experiences of long-time sublime users moving to atom for its rtl support.

@hakamaq

This comment has been minimized.

@morajabi

This comment has been minimized.

@hakamaq

This comment has been minimized.

@fariszaher
Copy link

Quite ridiculous that this isn't prioritised. Any estimate for when it gets selected?

@morajabi
Copy link
Author

@fariszaher The maintainers who work on the project, have the control to prioritise what's most important based on user needs. If it's very important for you, you can always start working on it if you prefer! 👍

@stale
Copy link

stale bot commented May 19, 2019

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of Atom
  2. Comment that the issue is still reproducible and include:
    • What version of Atom you reproduced the issue on
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

Issues that are labeled as triaged will not be automatically marked as stale.

@stale stale bot added the stale label May 19, 2019
@stale stale bot closed this as completed Jun 5, 2019
@lajmikhalil
Copy link

lajmikhalil commented Nov 5, 2019

I'm still encountering this issue.

Atom V. 1.41.0
macOs 10.14.6

You can simply reproduce the issue while selecting syntax on any file containing both RTL and RTL languages. This is most common within .json translated content files. More and more apps are being localized to RTL and I'm seeing teams switch editor cause of this.

@lock
Copy link

lock bot commented May 5, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests