diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index aba2f7635..9135cfda8 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -749,6 +749,8 @@ _mfm: x4Description: "内容を究極に大きく表示します。" blur: "ぼかし" blurDescription: "内容をぼかすことができます。ポインターを上に乗せるとはっきり見えるようになります。" + font: "フォント" + fontDescription: "内容のフォントを指定することができます。" _reversi: reversi: "リバーシ" diff --git a/src/client/components/mfm.ts b/src/client/components/mfm.ts index 76399bf6f..1590e2914 100644 --- a/src/client/components/mfm.ts +++ b/src/client/components/mfm.ts @@ -141,6 +141,18 @@ export default defineComponent({ style = `font-size: 600%;`; break; } + case 'font': { + const family = + token.node.props.args.serif ? 'serif' : + token.node.props.args.monospace ? 'monospace' : + token.node.props.args.cursive ? 'cursive' : + token.node.props.args.fantasy ? 'fantasy' : + token.node.props.args.emoji ? 'emoji' : + token.node.props.args.math ? 'math' : + null; + if (family) style = `font-family: ${family};`; + break; + } case 'blur': { return h('span', { class: '_mfm_blur_', diff --git a/src/client/pages/mfm-cheat-sheet.vue b/src/client/pages/mfm-cheat-sheet.vue index c66fbfb15..0d599e458 100644 --- a/src/client/pages/mfm-cheat-sheet.vue +++ b/src/client/pages/mfm-cheat-sheet.vue @@ -145,6 +145,16 @@ +
{{ $ts._mfm.fontDescription }}
+