#43447 makes shaping take the lang attribute into account, but this only works for language tags with a primary language subtag only, not those with a region subtag too. this can be relevant for chinese text.
using the example from the figure in Han unification on english wikipedia:
<!doctype html><meta charset="utf-8">
<body style="font-size: 7em;">
<div>
<span>返</span>
<span lang="zh-CN">返</span>
<span lang="zh-TW">返</span>
<span lang="zh-HK">返</span>
<span lang="ja-JP">返</span>
<span lang="ko-KR">返</span>
</div>
<div>
<span>返</span>
<span lang="zh">返</span>
<span lang="zh">返</span>
<span lang="zh">返</span>
<span lang="ja">返</span>
<span lang="ko">返</span>
</div>
<style>
/* not relevant to the test case */
span::before {
display: inline-block;
width: 0;
white-space: nowrap;
position: relative;
top: 2rem;
font-size: 1rem;
content: attr(lang);
}
</style>
|
|
| Firefox 142 |
 |
| Servo 0.1.0 |
 |
#43447 makes shaping take the lang attribute into account, but this only works for language tags with a primary language subtag only, not those with a region subtag too. this can be relevant for chinese text.
using the example from the figure in Han unification on english wikipedia: