如何使iOS Broswers的垂直LR传统蒙古文本正确地进行分析?

发布于 2025-01-25 07:25:14 字数 1486 浏览 2 评论 0原文

使用写作模式设置为vertical-lr,包含传统蒙古人的文本框在iOS上不正确显示,如下图第一幅的第一部分所示。如果写作模式水平-TB,则文本显示正常。如何在iOS/iPados上正确显示Vertical-LR模式中的蒙古文本?不过,垂直和水平模式可用于桌面浏览器。可以重现数字的HTML是:

<!DOCTYPE html>
<html>
<head>
<style>
    @font-face {
      font-family:'hawang';
      src: url('A Traditional Mongolian Font File; Removed because of data sensitivity');
    }
    .mongol-text-vertical {
      writing-mode: vertical-lr;
      font-family: "hawang";
    }
    .mongol-text-horizontal {
      writing-mode: horizontal-tb;
      font-family: "hawang";
    }
    
</style>
</head>
<body>
<h2>Vertical mode; wrong display</h2>
<div class="mongol-text-vertical">
<p>
ᠠᠷᠪᠠᠨ ᠬᠤᠶᠠᠷ ᠵᠢᠯ <br>
ᠮᠤᠡᠭᠭᠤᠯ ᠠᠷᠠᠳ ᠤᠨ ᠲᠠᠭᠤᠤ  
</p>
</div>
<h2>Horizontal mode; wrong display</h2>
<div class="mongol-text-horizontal">
<p>
ᠠᠷᠪᠠᠨ ᠬᠤᠶᠠᠷ ᠵᠢᠯ <br>
ᠮᠤᠡᠭᠭᠤᠯ ᠠᠷᠠᠳ ᠤᠨ ᠲᠠᠭᠤᠤ  
</p>
</div>
</body>
</html>

iPados上Firefox中的网页。

编辑:在桌面浏览器中添加了页面。

Windows 11上的Firefox中的网页。

With the writing-mode set to be vertical-lr, a text box containing traditional Mongolian doesn't display correctly on iOS as shown in the first part of the first figure below. If the writing-mode is horizontal-tb, the text displays just fine. How can I make the Mongolian text in the vertical-lr mode display correctly on iOS/iPadOS? The vertical and horizontal modes work fine for desktop browsers, though. The html that can reproduce the figures is:

<!DOCTYPE html>
<html>
<head>
<style>
    @font-face {
      font-family:'hawang';
      src: url('A Traditional Mongolian Font File; Removed because of data sensitivity');
    }
    .mongol-text-vertical {
      writing-mode: vertical-lr;
      font-family: "hawang";
    }
    .mongol-text-horizontal {
      writing-mode: horizontal-tb;
      font-family: "hawang";
    }
    
</style>
</head>
<body>
<h2>Vertical mode; wrong display</h2>
<div class="mongol-text-vertical">
<p>
ᠠᠷᠪᠠᠨ ᠬᠤᠶᠠᠷ ᠵᠢᠯ <br>
ᠮᠤᠡᠭᠭᠤᠯ ᠠᠷᠠᠳ ᠤᠨ ᠲᠠᠭᠤᠤ  
</p>
</div>
<h2>Horizontal mode; wrong display</h2>
<div class="mongol-text-horizontal">
<p>
ᠠᠷᠪᠠᠨ ᠬᠤᠶᠠᠷ ᠵᠢᠯ <br>
ᠮᠤᠡᠭᠭᠤᠯ ᠠᠷᠠᠳ ᠤᠨ ᠲᠠᠭᠤᠤ  
</p>
</div>
</body>
</html>

The webpage in Firefox on iPadOS.
Firefox on iPadOS

Edit: added the page in a desktop browser.

The webpage in Firefox on Windows 11.
Firefox on Windows

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦旅人picnic 2025-02-01 07:25:14

事实证明,我必须将文本定位设置为侧向,以使蒙古脚本在iOS/iPados上的浏览器中正确显示。我怀疑问题是iOS上的浏览器不支持垂直脚本,因此text-cortirientation混合)的默认值只是不起作用,因为浏览器don' t知道如何自然地列出垂直脚本的字符(由MDN引用)。

https://developer.mozilla.orgg/en-us/文档/Web/css/Text-Arientation

文本取向属性被指定为来自
下面的列表。

混合

旋转水平脚本的字符90°
顺时针。自然地列出垂直脚本的字符。
默认值。

侧面

导致字符被布置为
水平,但整个线顺时针旋转90°。

It turned out that I had to set text-orientation as sideways so as to make the Mongolian script show correctly in browsers on iOS/iPadOS. I suspect the problem is that browsers on iOS don't support vertical scripts so the default value of text-orientation (mixed) just doesn't work since the browsers don't know how to Lays out the characters of vertical scripts naturally (quoted from MDN).

https://developer.mozilla.org/en-US/docs/Web/CSS/text-orientation

The text-orientation property is specified as a single keyword from
the list below.

Values

mixed

Rotates the characters of horizontal scripts 90°
clockwise. Lays out the characters of vertical scripts naturally.
Default value.

sideways

Causes characters to be laid out as they would be
horizontally, but with the whole line rotated 90° clockwise.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文