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

Adds right-to-left script option. #281

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

WicCaesar
Copy link

Summary

Implements right-to-left script (rtl) functionality to Typing SVG, meaning the animation will start from the right if true. Default is still false.
Useful for languages such as Arabic, Hebrew, Urdu, or simply for style. Testers wanted.

Type of change

  • New feature (added a non-breaking change which adds functionality).
  • Updated documentation (removed profiles that no longer use Typing SVG from the README, added my own, edited the table to include rtl, a very short description and its possible states).

How has this been tested?

  • Ran tests with composer test.

Implements right-to-left script (rtl) functionality to Typing SVG, meaning the animation will start from the right if true. Useful for languages such as Arabic, Hebrew, Urdu, or simply for style.
Implements right-to-left script (rtl) functionality to Typing SVG, meaning the animation will start from the right if true. Useful for languages such as Arabic, Hebrew, Urdu, or simply for style. Testers wanted.
Copy link
Owner

@DenverCoder1 DenverCoder1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -71,7 +69,6 @@ Below are links to profiles where you can see Readme Typing SVGs in action!
[![UlisesAlexanderAM](https://github.com/UlisesAlexanderAM.png?size=60)](https://github.com/UlisesAlexanderAM "UlisesAlexanderAM on GitHub")
[![SpookyJelly](https://github.com/SpookyJelly.png?size=60)](https://github.com/SpookyJelly "SpookyJelly on GitHub")
[![cfcife](https://github.com/cfcife.png?size=60)](https://github.com/cfcife "cfcife on GitHub")
[![majidtdeni666](https://github.com/majidtdeni666.png?size=60)](https://github.com/majidtdeni666 "majidtdeni666 on GitHub")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding/removing examples is off topic for this PR and preferably a separate branch/PR should be opened for unrelated changes

@@ -125,6 +123,7 @@ Feel free to [open a PR](https://github.com/DenverCoder1/readme-typing-svg/issue
| `background` | Background color of the text (default: `00000000`) | string | Hex code without # (eg. `FEFF4C`) |
| `center` | `true` to center text or `false` for left aligned (default: `false`) | boolean | `true` or `false` |
| `vCenter` | `true` to center vertically or `false`(default) to align above the center | boolean | `true` or `false` |
| `rtl` | `true` to use right-to-left script (Arabic, Hebrew…) (default: `false`) | boolean | `true` or `false` |
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if instead of having a parameter, it could determine the direction to display the text based on the directionality of the first unidirectional character (eg. if it starts with an English letter it's LTR, if it starts with Arabic it's RTL, standard punctuation is ignored)? Alternatively, it could be determined based on a count comparison of RTL vs LTR characters. By making it automatic, it could simplify configuration and the demo site.

Feel free to let me know what you think.

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.

None yet

2 participants