插入HTML标签在阿拉伯语中断词连接(草书) [英] Inserting HTML tag in the middle of Arabic word breaks word connection (cursive)

查看:318
本文介绍了插入HTML标签在阿拉伯语中断词连接(草书)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自维基百科:


Cursive(来自拉丁语curro,currere,cucurri,cursum,to run,hasten)这是设计用于手写快速书写笔记和信件。在阿拉伯语,拉丁语和西里尔语写作系统中,单词中的字母是连接的,使一个单词成为一个单一的复杂笔划。

Cursive (from Latin curro, currere, cucurri, cursum, to run, hasten) is any style of handwriting that is designed for writing notes and letters quickly by hand. In the Arabic, Latin, and Cyrillic writing systems, the letters in a word are connected, making a word one single complex stroke.

在上面的语言中,当我们想使用eg来格式化一个单词时< span> 标记来应用自定义CSS样式,它打破字连接,所以有任何解决方案。

In the above languages when we want to format one single word with e.g. <span> tag to apply custom css style it breaks word conection, so is there any solution for this.

例如这是正常的阿拉伯语字符:

كتب


,但是当我们要使用span标记其他颜色的最后一个字母时,得到这样:

example this is for example normal arabic word:

كتب

but when we want to color last letter in other color using the span tag get this:

因为前两个字母在一个标签中,最后一个是

because first two letter are in one tag and last is in other to color it.

有什么我可以做的,以避免单词中断。

Is there something I can do to avoid word breaks.

以下是完整的html:

<p>كت<span style="color: Red;">ب</span></p>


推荐答案

我不确定是否有任何HTML方式但可以通过在开头span标记之前添加零宽度joiner Unicode字符来修复此问题: / p>

I'm not sure if there's any HTML way to do it, but you can fix it by adding a zero-width joiner Unicode character before the opening span tag:

<p>كت&#x200d;<span style="color: Red;">ب</span></p>

当然,你可以使用实际的Unicode字符代替HTML字符实体, t在这里可见。或者可以使用更漂亮的& zwj; 实体。

You can use the actual Unicode character instead of the HTML character entity, of course, but that wouldn't be visible here. Or you can use the prettier &zwj; entity.

code>< b> 标签,因为我不能在这里做颜色),而没有joiner:

Here it is in action (using an invisible <b> tag, since I can't do color here), without the joiner:

与加入者:

根据我的理解,这是应该工作没有joiner,而且它在一些浏览器,不是全部。

It's supposed to work without the joiner as far as I understand it, though, and it does in some browsers, but clearly not all of them.

这篇关于插入HTML标签在阿拉伯语中断词连接(草书)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆