「双方向テキスト」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎概念: 飜訳)
(→‎サポート: 一部翻訳)
22行目: 22行目:
 
== サポート ==
 
== サポート ==
   
  +
プログラムが Bidi テキストを完全にサポートするためには、以下の機能を持っている必要があります。
In order for a program to fully support Bidi text, it must have:
 
   
 
; Letter rendering (RTL): able to correctly apply letter shaping and ligatures. See [[Wikipedia:Complex text layout|Complete Text Layout]]. This is often referred to shortly as RTL support.
 
; Letter rendering (RTL): able to correctly apply letter shaping and ligatures. See [[Wikipedia:Complex text layout|Complete Text Layout]]. This is often referred to shortly as RTL support.

2023年2月19日 (日) 22:00時点における版

双方向テキスト(そうほうこうテキスト、英: bi-directional text)とは、右から左(RTL)と左から右(LTR)の2つの方向性を持つテキストです。

概念

テキストの方向
テキスト編集では、テキストの方向を設定することで、テキストナビゲーション、テキスト選択、テキスト挿入の変更など、入力されたテキストとプログラムのやり取りが変更されます。
テキストアライメント
テキストアライメントは、テキストの表示方法とスタイルを変更するだけです。
フェイク Bidi
RTL 文脈を模倣して、完全に反転した英文を表示する偽ロケールです。これは、RTL 言語を話さない開発者が、RTL の問題に対処するのに役立ちます。例えば
This English sentence contains SDROW CIBARA EMOS and ends with English words.
プアマンズ bidi モード
通常の端末で視覚的な文字列を右から左へ自動入力するモード。
論理的なナビゲーション
単語を読みながらトラバースされます。
ビジュアルナビゲーション
単語が表示されながらトラバースされます。この GIF は、この 2 つの違いを示しています。

論理的なナビゲーションは、Bidi を完全にサポートするためにプログラムが実装すべき正しいナビゲーションの方法です。にもかかわらず、この 2 つの間のスイッチがあることが望ましいのです。

Unicode support
Unicode 制御文字は主に 3 つあります。Wikipedia:RLMWikipedia:LRMWikipedia:ALM です。
双方向アルゴリズム
テキストを正しい順序で表示するために適用される規則の集合である。

fribidi-gitAUR は Bidi アルゴリズムのオープンソース実装です。{AUR|python-bidi}} は関連する関数のための Python ライブラリです。

サポート

プログラムが Bidi テキストを完全にサポートするためには、以下の機能を持っている必要があります。

Letter rendering (RTL)
able to correctly apply letter shaping and ligatures. See Complete Text Layout. This is often referred to shortly as RTL support.
Switch text alignment (Bidi)
E.g: Firefox Ctrl+Shift+X shortcut.
Logical navigation
in a RTL text, with RTL text alignment, arrow keys should not cause reversed navigation.
Tag App Date RTL Bidi Nav Notes
browser chromium 2022-08-28 Yes No Yes Chromium is the engine of ElectronJS. Fixing this should resolve Electron Apps too.
browser firefox 2022-09-01 Yes No No
browser qtwebbrowser 2022-11-01 Yes No
browser webkit 2022-11-01 Yes No
editor AbiWord 2007-12-06 Yes
editor emacs 2019-06-31 Yes No With extension
editor kate 2016-06-20 Yes No
editor LibreOffice Yes Yes Yes fully supported. Enabled using Complex Text Layout from settings.
editor neovim 2014-04-17 No No see :set arabic
editor texworks 2009-03-01 Yes No
editor vim 2015-08-19 No No see :set arabic
other groff 2005-12-02 No No
other Wikipedia:HTML Yes Yes Yes
other latex Yes Yes Using LuaTeX or XeLaTeX with polyglossia
other wine 2002-04-21 Yes No
terminal alacritty 2017-07-15 No
terminal dvtm 2019-10-12 No
terminal gedit Yes No For Gedit <= 2.1, workaround by extension.
terminal irssi 2019-10-12 No
terminal kitty 2019-11-01 No
terminal konsole Yes No
terminal libvte Yes No including libvte-based like Gnome, sakura, xfce4...
terminal mltermAUR Yes No
terminal neatvi-gitAUR 2019-07-04 No
terminal pymux 2019-10-12 No
terminal qterminal Yes No
terminal radare2 2015-02-03 No
terminal tmux 2019-10-12 No won't fix
terminal wezterm 2021-05-11 No
terminal xstAUR 2018-10-26 No

トラブルシューティング

Verify UTF-8 Encoding is properly configured first. Make sure you install the fonts corresponding to your language: Arabic, Persian, Hebrew. For some terminal, (bicon-gitAUR) is required to properly display Arabic and Hebrew text.

一時的な回避策

参照

内部リンク

外部リンク