Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Word boundary search update #5788

Merged
merged 1 commit into from
Jul 13, 2019
Merged

Word boundary search update #5788

merged 1 commit into from
Jul 13, 2019

Conversation

durga598
Copy link
Contributor

@durga598 durga598 commented Jul 2, 2019

Update to check in grapheme text rather to normal text

Update to check in grapheme text rather to normal text
@asturur
Copy link
Member

asturur commented Jul 2, 2019

can you help me figure out what is broken and how we are fixing it? what kind of text was failing the word search?

@durga598
Copy link
Contributor Author

durga598 commented Jul 3, 2019

Check this jsfiddle

@asturur
Copy link
Member

asturur commented Jul 13, 2019

Ok seems good to me.
I do not understand this language ( hindi? ) and i do not now what is the expected user effect.

Take this grapheme cluster:
image

It has 2 cursor positions, one at the start and one at the middle, if you press space, it moves as a single block.
I think this is a fabricJs error, or the grapheme splitter you use is not working as expected?

Other example:
image

Then I press backspace to delete it:

image

I delete a grapheme piece and i get another grapheme, to me this is expected. and is fine.

Then i do it again:

image

Another piece goes away, fine.

Now my point is, on a real writing application ( libreoffice writer ) what does it happen, can you press spacebar in the middle of that grapheme cluster and split it in something else?

@durga598
Copy link
Contributor Author

Yes it is Hindi, and most of Indian language works like that way. In google doc/notepad I tried, it works like you have mentioned. It removes one piece at a time, as the complex letter comprised of three letters.
letters
And while moving cursor it takes as single letter
text
But using fabricjs, it takes another step in between, is it because of grapheme splitter?
fabric text

@asturur
Copy link
Member

asturur commented Jul 13, 2019

probably because of the grapheme splitter used that is consodering it 2 pieces ( you can inspect the _text array i suppose

@asturur
Copy link
Member

asturur commented Jul 13, 2019

going to merge this, should not break anything

@asturur asturur merged commit 312eae6 into fabricjs:master Jul 13, 2019
@asturur asturur mentioned this pull request Jul 14, 2019
thiagocunha pushed a commit to thiagocunha/fabric.js that referenced this pull request Nov 18, 2019
Update to check in grapheme text rather to normal text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants