Extensions inspire

Rendered Font

5

Details

Author:
newsnepia

Category:
Productivity

Version:
0.0.1

Users:
67

Rating:
5

Size:
21.82KiB

Price:
Free

Updated:
January 21, 2018

Webstore Link:
https://chrome.google.com/webstore/detail/rendered-font/keddhhgbmgaoliichbaikplccgefgpep

Download

version 0.0.1  - Download ZIP file

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の値と比較し、値が一致したフォントが実際に適用されているフォントであると判定します。

Top Extensions

 
(10943)
 
(50577)
 
(98995)
 
(25231)
 
(8324)
 
(1434)
 
(11367)

What has inspired us?

Extore is a team of professionals who are passionate about creating extensions for web browsers. This devotion also gives us opportunity to appreciate work of other people. We get inspired by useful, open source extensions made by developers all over the world. Our strong belief is that one should share helpful add-ons with others. That’s why we’d like to present you our ever-growing list of favourite extensions that have inspired us. Moreover, as you probably have already learned, sometimes struggling for the best brings an end to the good. Talking about add-ons it often turns out that an upgrade is worse then previous version. Also it can become really tricky to get back to the beloved version of your favourite extension. That’s why we’re going to make not only the latest, but all versions of our favourite (and we hope yours too) add-ons available for download. No more compromises, just stick to the version you really like!