AA Code Block

approved

by azulika

Renders aa code blocks in MS PGothic 12pt so Japanese ASCII art keeps its original shape. - This plugin has not been manually reviewed by Obsidian staff.

12 downloadsUpdated 7d agoMIT

AA Code Block

```aa で囲んだコードブロックを MS Pゴシック 12pt で表示する Obsidian プラグインです。 2ch 系のアスキーアート(AA)を、作成時と同じ環境で崩さずに読むためのものです。

Renders fenced code blocks tagged aa with MS PGothic at 12pt — the environment Japanese ASCII art was originally drawn for. Kerning and ligatures are disabled so the art keeps its exact shape.

```aa
     ∧_∧
    ( ´∀`)
    (つ  つ
    | | |
    (__)_)
```

特徴

  • 閲覧ビュー: 対象ブロックにフォント・行間・折り返しを指定します。 Obsidian 標準のコピーボタンなどはそのまま使えます。
  • ライブプレビュー / ソースモード: 編集中のブロック内の行にも同じフォントを適用します(設定でオフ可)。
  • 字詰め・合字(kerning / ligature)を無効化しているので、フォント側の調整で AA がずれることがありません。
  • 長い行は折り返さず横スクロールするため、AA の形が保たれます。

使い方

コードブロックの言語タグに aa を指定します。

```aa
(ここに AA)
```

コマンドパレットの 「AA ブロックを挿入 / 選択範囲を囲む」 からも挿入できます。 選択範囲があればそれを ```aa で囲みます。

設定

項目既定値説明
対象の言語タグaaカンマ区切りで複数指定できます(例: aa, ascii, mona
フォント"MS Pゴシック", "MS PGothic", "IPAMonaPGothic", "Mona", sans-serifCSS の font-family にそのまま渡します
フォントサイズ12(pt)12pt = 16px。2ch 系 AA の標準サイズです
行の高さ1.12512pt 時に 18px となり、Windows での標準の行送りに一致します
長い行を折り返すオフオンにすると横スクロールせず折り返しますが、AA の形は崩れます
ライブプレビューにも適用オン編集画面のブロック内の行にも適用します

macOS / Linux で使う場合

MS Pゴシックは Windows 標準のフォントです。他の OS では IPAMonaPGothic や Mona フォントなどの AA 用フォントを OS にインストールしたうえで、設定の「フォント」に指定してください。 既定値にはこれらがフォールバックとして入っています。

インストール

設定 → コミュニティプラグイン → 閲覧 から AA Code Block を検索してインストールします。

手動で入れる場合は Releases から main.js / manifest.json / styles.css をダウンロードし、 Vault の .obsidian/plugins/aa-codeblock/ に置いて Obsidian を再読み込みしてください。

開発

npm install
npm run dev    # 監視ビルド
npm run build  # 本番ビルド

不具合や要望は Issues へどうぞ。

ライセンス

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.