Closed Vyvy-vi closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
ytcards | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 29, 2023 2:30am |
In the latest commit the ltr alignment looks perfect, the rtl alignment seems a bit too close to the edge still. I think it should be moved to the left about 10 more pixels.
I think changing line 27 instead of line 31 would make the math more straightforward, but if you do keep the change on line 31 instead, maybe it could be width - 22
or something similar instead of width - 12
?
Does this look better?
<g transform="translate({{ width - 12 if rtl_title else 10 }}, {{ height - title_height - 50 }})">
<text fill="{{ title_color }}" font-family="Roboto, Segoe UI, Ubuntu, Arial, sans-serif"
font-weight="600" font-size="15px" direction="{{ 'rtl' if rtl_title else 'ltr' }}">
{% for line in title_lines %}
<tspan x="0" dy="{{ title_line_height }}px">{{ line }}</tspan>
{% endfor %}
</text>
</g>
Thanks for contributing! :tada:
Summary
resolves #131
This PR adds support for RTL languages in the youtube card title text.
Type of change
How Has This Been Tested?