Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

font-measure

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-measure - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

3

index.js

@@ -8,2 +8,5 @@ 'use strict'

document.body.appendChild(measure.canvas)
measure.canvas.style.background = 'gray'
function measure (font, o) {

@@ -10,0 +13,0 @@ if (!o) o = {}

2

package.json
{
"name": "font-measure",
"version": "1.2.0",
"version": "1.2.1",
"description": "Calculate metrics of a font",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,23 +8,24 @@ 'use strict'

let fix = {
alphabetic: 1.03125,
ascent: 0.28125,
baseline: 1.03125,
bottom: 1.3125,
capHeight: 0.703125,
descent: 1.234375,
hanging: 0.203125,
ideographic: 1.296875,
lineHeight: 1.3125,
lower: 0.515625,
median: 0.640625,
middle: 0.640625,
overshoot: 0.015625,
tittle: 0.28125,
top: 0,
upper: 0.328125,
xHeight: 0.515625
top:0,
bottom:1.125,
lineHeight:1.125,
alphabetic:0.890625,
baseline:0.890625,
middle:0.546875,
median:0.546875,
hanging:0.171875,
ideographic:1.109375,
upper:0.1875,
capHeight:0.703125,
lower:0.375,
xHeight:0.515625,
tittle:0.1875,
ascent:0.1875,
descent:1.09375,
overshoot:0.015625
}
a.deepEqual(m('Roboto', {fontSize: 64}), fix)
a.deepEqual(m('Roboto', {fontSize: 64, fontWeight: '700', fontStyle: 'italic'}), fix)
a.equal(m('Roboto', {fontSize: 64, origin: 'baseline'}).baseline, 0)
let res = m('sans-serif', {fontSize: 64})
a.deepEqual(m('sans-serif', {fontSize: 64}), fix)
a.deepEqual(m('sans-serif', {fontSize: 64, fontWeight: '700', fontStyle: 'italic'}), fix)
a.equal(m('sans-serif', {fontSize: 64, origin: 'baseline'}).baseline, 0)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc