Description
■使用方法
フォント判定したい文字列を選択し、右クリックで「Rendered Font」をクリック。
※選択文字列の最初の一文字が判定対象となります。
■ブラウザのフォント適用ロジックについて
フォントはfont-familyに指定された順番で優先的に適用されます。また、フォントに該当の文字列が格納されていない場合は次の優先順位のフォントが適用され、いずれも適用できるフォントが無い場合はブラウザに設定されたデフォルトのフォントが適用されます。
つまり同じ文章でも一文字単位で違うフォントが適用される可能性があるため、フォント判定は任意の一文字を対象にする必要があります。
■フォントの判定プロセス(概要)
< 判定対象文字列の指定 >
1.ブラウザ上で判定対象となる文字列を選択し、右クリックで「Rendered Font」をクリック。選択文字列の最初の一文字が判定対象となります。
< font-familyの取得 >
2.文字列を格納するDOM要素を取得し、window.getComputedStyleで要素に指定されているfont-familyを取得。
< 判定対象の文字列にfont-family中のどのフォントが適用されているかを調べる >
3.テスト用DOM要素を作成し、判定対象の1文字を10個(任意)ほど格納する。
4.まずは2で取得したfont-familyをそのまま適用したときの要素のwidthとheightを調べる
5.次にfont-familyに設定されたフォント名をそれぞれ単独で適用したときのwidthとheightを調べ、4の値と比較し、値が一致したフォントが実際に適用されているフォントであると判定します。
Reviews
Loading reviews...
Permissions (2)
Permissions
activeTabℹ Can access the current tab when you click the extension contextMenusℹ Can add items to the right-click menu
Details
| Version | 0.0.3 |
| Updated | Apr 27, 2025 |
| Size | 26.92KiB |
| First Seen | Mar 31, 2026 |
More by newsnepia
Popular in tools
Zotero Connector
by Zotero
8M
★ 3.96
tools
8M
★ 3.96
tools
Browsec VPN - Free VPN for Chrome
by Browsec
7M
★ 4.44
tools
7M
★ 4.44
tools
AnyDoc Translator - Translate Web and PDF
by www.wps.com
7M
★ 4.58
tools
7M
★ 4.58
tools
WPS PDF - Read, Edit, Fill, Convert, and AI Chat PDF with Ease
by www.wps.com
7M
★ 4.45
tools
7M
★ 4.45
tools
Video DownloadHelper
by Aclap
5M
★ 4.43
tools
5M
★ 4.43
tools
Popular Extensions
Adobe Acrobat: PDF edit, convert, sign tools
by Adobe Inc.
331M
★ 4.40
workflow
331M
★ 4.40
workflow
AdBlock — block ads across the web
by AdBlock
63M
★ 4.48
workflow
63M
★ 4.48
workflow
迅雷下载支持
by Shenzhen Xunlei Network Technology Co., Ltd.
59M
★ 2.77
workflow
59M
★ 2.77
workflow
Grammarly: AI Writing Assistant and Grammar Checker App
by Grammarly
42M
★ 4.50
communication
42M
★ 4.50
communication
Adblock Plus - free ad blocker
by eyeo GmbH
41M
★ 4.39
workflow
41M
★ 4.39
workflow