Permalink
Browse files

unicode-range tests

  • Loading branch information...
1 parent f9133d4 commit 7bd2c933046bd5eed6f63752c7f8620f5a569b8c Jake Archibald committed May 3, 2011
Showing with 130 additions and 0 deletions.
  1. +5 −0 download-order/index.php
  2. +47 −0 download-order/with-unicode-range.php
  3. +38 −0 fallbacks/unicode-range.php
  4. +37 −0 fallbacks/unicode-range2.php
  5. +3 −0 index.php
View
@@ -38,6 +38,11 @@
</style>
</head>
<body>
+ <script>
+ window.onload = function() {
+ document.body.appendChild( document.createTextNode('window.onload') );
+ };
+ </script>
<p class="josefin">Hello!</p>
<p><?php throttle_lipsum(15000, 0.2, 500) ?></p>
<p class="bangers-cabinsketch">ab</p>
@@ -0,0 +1,47 @@
+<?php include '../includes/lib.php' ?><!DOCTYPE html>
+<html lang="en" class="ie-lte-8">
+<head>
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <title></title>
+ <style>
+ @font-face {
+ font-family: 'josefin';
+ src: url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.eot');
+ src: url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.eot#iefix') format('embedded-opentype'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.woff') format('woff'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.ttf') format('truetype'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.svg#svgFontName') format('svg');
+ }
+ @font-face {
+ font-family: 'bangers-a';
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.eot');
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.eot#iefix') format('embedded-opentype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.woff') format('woff'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.ttf') format('truetype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.svg#svgFontName') format('svg');
+ unicode-range: U+61;
+ }
+ @font-face {
+ font-family: 'cabinsketch-b';
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=cabinsketch-b-only/cabinsketch-bold-webfont.eot');
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=cabinsketch-b-only/cabinsketch-bold-webfont.eot#iefix') format('embedded-opentype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=cabinsketch-b-only/cabinsketch-bold-webfont.woff') format('woff'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=cabinsketch-b-only/cabinsketch-bold-webfont.ttf') format('truetype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=cabinsketch-b-only/cabinsketch-bold-webfont.svg#svgFontName') format('svg');
+ unicode-range: U+62;
+ }
+ .josefin {
+ font: normal 4em/1 josefin, sans-serif;
+ }
+ .bangers-cabinsketch {
+ font: normal 4em/1 bangers-a, cabinsketch-b, sans-serif;
+ }
+ </style>
+</head>
+<body>
+ <p class="josefin">Hello!</p>
+ <p><?php throttle_lipsum(15000, 0.2, 500) ?></p>
+ <p class="bangers-cabinsketch">ab</p>
+</body>
+</html>
@@ -0,0 +1,38 @@
+<?php include '../includes/lib.php' ?><!DOCTYPE html>
+<html lang="en" class="ie-lte-8">
+<head>
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <title></title>
+ <style>
+ @font-face {
+ font-family: 'josefin';
+ src: url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.eot');
+ src: url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.eot#iefix') format('embedded-opentype'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.woff') format('woff'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.ttf') format('truetype'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.svg#svgFontName') format('svg');
+ unicode-range: U+62-66;
+ }
+ @font-face {
+ font-family: 'bangers-a';
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.eot');
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.eot#iefix') format('embedded-opentype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.woff') format('woff'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.ttf') format('truetype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.svg#svgFontName') format('svg');
+ unicode-range: U+61;
+ }
+ p {
+ margin: 10px 0;
+ }
+ .josefin-bangers {
+ font: normal 3em/1 josefin, bangers-a, sans-serif;
+ }
+ </style>
+</head>
+<body>
+ <p>The next paragraph should use a different font for the first char</p>
+ <p class="josefin-bangers">abcdef</p>
+</body>
+</html>
@@ -0,0 +1,37 @@
+<?php include '../includes/lib.php' ?><!DOCTYPE html>
+<html lang="en" class="ie-lte-8">
+<head>
+ <meta charset="utf-8"/>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
+ <title></title>
+ <style>
+ @font-face {
+ font-family: 'josefin';
+ src: url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.eot');
+ src: url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.eot#iefix') format('embedded-opentype'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.woff') format('woff'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.ttf') format('truetype'),
+ url('../fonts/throttle.php?f=josefinfull/josefinslab-bold-webfont.svg#svgFontName') format('svg');
+ unicode-range: U+62-66;
+ }
+ @font-face {
+ font-family: 'bangers-a';
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.eot');
+ src: url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.eot#iefix') format('embedded-opentype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.woff') format('woff'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.ttf') format('truetype'),
+ url('../fonts/throttle.php?chunk_size=250&sleep=0.3&f=bangers-a-only/bangers-webfont.svg#svgFontName') format('svg');
+ unicode-range: U+61;
+ }
+ p {
+ margin: 10px 0;
+ }
+ .josefin-bangers {
+ font: normal 3em/1 josefin, bangers-a, sans-serif;
+ }
+ </style>
+</head>
+<body>
+ <p class="josefin-bangers">bcdef</p>
+</body>
+</html>
View
@@ -15,6 +15,7 @@
<li><a href="download-order/">Fonts used</a></li>
<li><a href="download-order/no-usage.php">No usage</a></li>
<li><a href="download-order/no-format.php">No format</a></li>
+ <li><a href="download-order/with-unicode-range.php">With unicode range</a></li>
</ul>
<p>
A page that defines 3 fonts.
@@ -58,6 +59,8 @@
<h1>Fallbacks</h1>
<ul>
<li><a href="fallbacks/">Various tests</a></li>
+ <li><a href="fallbacks/unicode-range.php">Fallback forced with unicode-range</a></li>
+ <li><a href="fallbacks/unicode-range2.php">Fallback forced with unicode-range, first font not used</a></li>
</ul>
<p>
Testing how fonts fallback from one font to another.

0 comments on commit 7bd2c93

Please sign in to comment.