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

Arabic letters not connecting when on Safari #5909

Open
2 tasks done
ZiadAlbitar opened this issue Sep 22, 2024 · 4 comments
Open
2 tasks done

Arabic letters not connecting when on Safari #5909

ZiadAlbitar opened this issue Sep 22, 2024 · 4 comments
Labels
bug Something isn't working waiting for update Pull requests or issues that require changes/comments before continuing

Comments

@ZiadAlbitar
Copy link

ZiadAlbitar commented Sep 22, 2024

Did you clear cache before opening an issue?

  • I have cleared my cache

Is there an existing issue for this?

  • I have searched the existing issues

Does the issue happen when logged in?

Yes

Does the issue happen when logged out?

Yes

Does the issue happen in incognito mode when logged in?

Yes

Does the issue happen in incognito mode when logged out?

Yes

Account name

ZiadA

Account config

No response

Current Behavior

The arabic letters are not joining like they are supposed to when there are characters next to them. Making it very unreadable. Like so:

Screenshot 2024-09-22 at 20 40 09

Expected Behavior

The letters are supposed to join like so:

Screenshot 2024-09-22 at 20 40 53

The way I managed to get the word to render correctly is by using safari's inspect element tool and adding a zero width joiner before the letter in the beginning of the word, before and after the letter in them middle, and after the word in the end. However, I have no idea if that is a good solution.

Steps To Reproduce

  1. Go to monkeytype.com on safari on a mac computer.
  2. Change the language to Arabic.

Environment

  • OS: MacOS Sonoma 14.4.1
  • Browser: Safari
  • Browser Version: 17.4.1

Anything else?

This might be considered a bug in safari instead of a bug in monkeytype, I am not sure.

@ZiadAlbitar ZiadAlbitar added the bug Something isn't working label Sep 22, 2024
@ZiadAlbitar ZiadAlbitar changed the title Arabic letters not connecting when on Safarai Arabic letters not connecting when on Safari Sep 23, 2024
@Miodec
Copy link
Member

Miodec commented Sep 23, 2024

Can you try different font settings in monkeytype to see if that helps?

@NadAlaba
Copy link
Contributor

NadAlaba commented Sep 23, 2024

Zero-width joiners fix the issue only if you know the text before hand. If you don't, you may get characters trying to join when they shouldn't, e.g, ر‍ا‍ح
went
AFAIK it is only safari's webkit that has this breaking text behavior, and the w3c says this is not standard:

Text shaping must not be broken across inline box boundaries when there is no effective change in formatting, or if the only formatting changes do not affect the glyphs (as in applying text decoration).

On MT, letter stylings do not affect the glyphs (there is only color changes), so there should not be a break, but safari does what safari wants.
So for now, you may want to stick to other browsers when typing cursive languages on MT. However, it may be fixed in the future, there's a bug report filed 19 years ago.

@Miodec
Copy link
Member

Miodec commented Oct 7, 2024

So for now, you may want to stick to other browsers when typing cursive languages on MT. However, it may be fixed in the future, there's a bug report filed 19 years ago.

19 year old bug - fantastic 😵‍💫

@Miodec
Copy link
Member

Miodec commented Oct 7, 2024

Ah, wait - can you make sure you select "arabic" language in the options first, and then go to custom mode? There are some CSS classes that are only applied if the language is set to arabic.

@Miodec Miodec added the waiting for update Pull requests or issues that require changes/comments before continuing label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for update Pull requests or issues that require changes/comments before continuing
Projects
None yet
Development

No branches or pull requests

3 participants