Allgemeiner umsetzen
Opened this issue · 0 comments
tbaddade commented
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Cap height calculator</title>
<style type="text/css">
@font-face {
font-family: "FontName";
src:url("/assets/fonts/FontName/FontName-Regular.woff") format("woff");
}
#title {
font-family: 'FontName';
}
</style>
</head>
<body>
<p id="title">Hej ~ Hakuna Matata!</p>
<script src="https://unpkg.com/lodash@4.17.4"></script>
<script src="/assets/cap-height.js"></script>
<script>
capHeight.setContainer(document.body);
WebFontConfig = {
custom: {
families: ['FontName']
}
};
console.log(capHeight.inspect(document.getElementById('title')));
(function(d) {
var wf = d.createElement('script'), s = d.scripts[0];
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
s.parentNode.insertBefore(wf, s);
})(document);
</script>
</body>
</html>