Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
getCharNumAtPosition() は SVGTextContentElement インターフェイスのメソッドで、指定された座標の位置にテキストグリフがレンダリングされた文字を表します。文字とグリフの関係は一対一ではないため、関連するタイポグラフィ文字の最初の文字のみが返されます。
指定した位置で文字がみつからない場合は、 -1 が返されます。
DOMPoint オブジェクトです。ユーザー座標空間で文字の位置を調べる座標 (x, y) です。
long 型です。位置に対応する文字のインデックス。
| Scalable Vector Graphics (SVG) 2 # __svg__SVGTextContentElement__getCharNumAtPosition |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年4月1日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.