Skip to content

Instantly share code, notes, and snippets.

View codelogic's full-sized avatar
💭
Pixels by day. Bytes by night.

Paul Rohde codelogic

💭
Pixels by day. Bytes by night.
View GitHub Profile
@codelogic
codelogic / TypeSetter.js
Created October 7, 2011 16:06
Typesetting Baseline Grid Script
// Query the device pixel ratio.
//-------------------------------
function getDevicePixelRatio() {
if(window.devicePixelRatio === undefined) return 1; // No pixel ratio available. Assume 1:1.
return window.devicePixelRatio;
}
var typeSet = function() {
var baselineStartItem = $('article p');