Skip to content

Commit 5763394

Browse files
authored
Merge pull request #307 from w3c/separating-css-fonts-per-formats
The original font-face test turned into four tests, one font format each
2 parents 8e22e78 + 4f5a851 commit 5763394

File tree

30 files changed

+235
-61
lines changed

30 files changed

+235
-61
lines changed

tests/cnt-css-fonts.epub

-124 KB
Binary file not shown.

tests/cnt-css-fonts/EPUB/content_001.xhtml

Lines changed: 0 additions & 51 deletions
This file was deleted.

tests/cnt-css-fonts_ot.epub

34.6 KB
Binary file not shown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
2+
<head>
3+
<title>CSS support for font resource in OpenType format</title>
4+
<style>
5+
6+
@font-face {
7+
font-family: 'Franky Toys';
8+
src: url(fonts/FrankyToys.otf) format('opentype');
9+
}
10+
11+
.font-opentype {
12+
font-family: 'Franky Toys';
13+
}
14+
15+
</style>
16+
</head>
17+
<body>
18+
<p>Test passes if the item below is rendered in unusual font.</p>
19+
<ul>
20+
<li class="font-opentype">This should be an unusual font in OpenType format.</li>
21+
</ul>
22+
</body>
23+
</html>
File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en">
2+
<head>
3+
<title>CSS support for font resource in OpenType format</title>
4+
</head>
5+
<body>
6+
<nav epub:type="toc">
7+
<ol>
8+
<li><a href="content_001.xhtml">Link to main page</a></li>
9+
</ol>
10+
</nav>
11+
</body>
12+
</html>
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
<package xmlns="http://www.idpf.org/2007/opf" xmlns:epub="http://www.idpf.org/2007/ops" version="3.0" xml:lang="en" unique-identifier="pub-id">
22
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
33
<dc:coverage id="coverage">Content Documents</dc:coverage>
4-
<meta refines="#coverage" property="schema:version">3.3</meta>
4+
<meta refines="#coverage" property="schema:version">3.4</meta>
55
<dc:creator>Dan Lazin</dc:creator>
6+
<dc:creator>Ivan Herman</dc:creator>
67
<dc:date>2022-05-13</dc:date>
7-
<dc:description>TrueType, OpenType, WOFF, and WOFF2 font resources are referenced from @font-face rules.</dc:description>
8-
<dc:identifier id="pub-id">cnt-css-fonts</dc:identifier>
8+
<dc:description>Using a font resource in OpenType format via a CSS @font-face.</dc:description>
9+
<dc:identifier id="pub-id">cnt-css-fonts_ot</dc:identifier>
910
<dc:language>en</dc:language>
1011
<dc:publisher>W3C</dc:publisher>
11-
<dc:title>cnt-css-fonts</dc:title>
12+
<dc:title>cnt-css-fonts_ot</dc:title>
1213
<link rel="dcterms:rights" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document"/>
1314
<link rel="dcterms:rightsHolder" href="https://www.w3.org"/>
1415
<meta property="dcterms:isReferencedBy">https://www.w3.org/TR/epub-rs/#confreq-css-rs-fonts</meta>
15-
<meta property="dcterms:modified">2022-05-13T00:00:00Z</meta>
16+
<meta property="dcterms:modified">2025-05-28T00:00:00Z</meta>
1617
</metadata>
1718
<manifest>
1819
<item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml"/>
1920
<item id="font_opentype" href="fonts/FrankyToys.otf" media-type="font/otf"/>
20-
<item id="font_truetype" href="fonts/Lobster.ttf" media-type="font/ttf"/>
21-
<item id="font_woff" href="fonts/Pacifico.woff" media-type="font/woff"/>
22-
<item id="font_woff2" href="fonts/Macondo.woff2" media-type="font/woff2"/>
2321
<item id="nav" properties="nav" href="nav.xhtml" media-type="application/xhtml+xml"/>
2422
</manifest>
2523
<spine>
2624
<itemref idref="content_001"/>
2725
</spine>
28-
</package>
26+
</package>
File renamed without changes.

tests/cnt-css-fonts_tt.epub

43.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)