text-stroke

Outline effect to text in Arabic using CSS

左心房为你撑大大i 提交于 2021-01-28 04:19:43
问题 I want to add an outline to text that works well in Arabic. One possible solution is to use text-stroke : body { background-color: pink; } h1 { color: white; text-align: center; -webkit-text-stroke: 1px black; text-stroke: 1px black; } <h1>Experiment</h1> <h1>تجربة</h1> This is how it renders for me: As you can see, this works well in English, but not in Arabic. In Arabic, letters are often connected to each other, and the outline should not appear between connected letters. To quote W3: When