mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update CSS tests to revision 0698c2aa9ead844b6d7d10eafb096cb1118e13ef
This commit is contained in:
parent
9aa1b1e408
commit
35c74aecc2
11290 changed files with 92400 additions and 49214 deletions
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
|
||||
@font-feature-values libertine {
|
||||
@styleset {
|
||||
@styleset {
|
||||
crossed-doubleu: 5;
|
||||
somethingElse: 4;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
.seven {font-family: monospace,serif;}
|
||||
]]></style>
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-family-prop" title="15.3 Font family: the 'font-family' property"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-family-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-family-prop"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="a">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-family-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p class="four">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-style-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
</head>
|
||||
<body>
|
||||
<p class="five">
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-style-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p class="six">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-style-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
</head>
|
||||
<body>
|
||||
<p class="seven">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-family-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-style-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
</head>
|
||||
<body>
|
||||
<p class="eight">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-style-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
</head>
|
||||
<body>
|
||||
<p class="nine">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-family-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
</head>
|
||||
<body>
|
||||
<p class="ten">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-style-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-size-prop"/>
|
||||
</head>
|
||||
<body>
|
||||
<p class="eleven">
|
||||
|
|
|
@ -1274,7 +1274,7 @@
|
|||
<tr id="font-weight-applies-to-004-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-004.xht">font-weight-applies-to-004</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: run-in' elements
|
||||
<ul class="assert">
|
||||
|
@ -1285,7 +1285,7 @@
|
|||
<tr id="font-weight-applies-to-005-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-005.xht">font-weight-applies-to-005</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: inline-block' elements
|
||||
<ul class="assert">
|
||||
|
@ -1296,7 +1296,7 @@
|
|||
<tr id="font-weight-applies-to-006-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-006.xht">font-weight-applies-to-006</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: table' elements
|
||||
<ul class="assert">
|
||||
|
@ -1307,7 +1307,7 @@
|
|||
<tr id="font-weight-applies-to-007-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-007.xht">font-weight-applies-to-007</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: inline-table' elements
|
||||
<ul class="assert">
|
||||
|
@ -1318,7 +1318,7 @@
|
|||
<tr id="font-weight-applies-to-008-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-008.xht">font-weight-applies-to-008</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: table-row-group' elements
|
||||
<ul class="assert">
|
||||
|
@ -1329,7 +1329,7 @@
|
|||
<tr id="font-weight-applies-to-009-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-009.xht">font-weight-applies-to-009</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: table-header-group' elements
|
||||
<ul class="assert">
|
||||
|
@ -1340,7 +1340,7 @@
|
|||
<tr id="font-weight-applies-to-010-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-010.xht">font-weight-applies-to-010</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: table-footer-group' elements
|
||||
<ul class="assert">
|
||||
|
@ -1351,7 +1351,7 @@
|
|||
<tr id="font-weight-applies-to-011-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-011.xht">font-weight-applies-to-011</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: table-row' elements
|
||||
<ul class="assert">
|
||||
|
@ -1362,7 +1362,7 @@
|
|||
<tr id="font-weight-applies-to-014-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-014.xht">font-weight-applies-to-014</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: table-cell' elements
|
||||
<ul class="assert">
|
||||
|
@ -1373,7 +1373,7 @@
|
|||
<tr id="font-weight-applies-to-015-3.2" class="">
|
||||
<td>
|
||||
<a href="font-weight-applies-to-015.xht">font-weight-applies-to-015</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-weight and 'display: table-caption' elements
|
||||
<ul class="assert">
|
||||
|
|
|
@ -594,7 +594,7 @@
|
|||
<tr id="font-variant-applies-to-001-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-001.xht">font-variant-applies-to-001</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: inline' elements
|
||||
<ul class="assert">
|
||||
|
@ -605,7 +605,7 @@
|
|||
<tr id="font-variant-applies-to-002-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-002.xht">font-variant-applies-to-002</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: block' elements
|
||||
<ul class="assert">
|
||||
|
@ -627,7 +627,7 @@
|
|||
<tr id="font-variant-applies-to-004-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-004.xht">font-variant-applies-to-004</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: run-in' elements
|
||||
<ul class="assert">
|
||||
|
@ -638,7 +638,7 @@
|
|||
<tr id="font-variant-applies-to-005-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-005.xht">font-variant-applies-to-005</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: inline-block' elements
|
||||
<ul class="assert">
|
||||
|
@ -649,7 +649,7 @@
|
|||
<tr id="font-variant-applies-to-006-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-006.xht">font-variant-applies-to-006</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: table' elements
|
||||
<ul class="assert">
|
||||
|
@ -660,7 +660,7 @@
|
|||
<tr id="font-variant-applies-to-007-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-007.xht">font-variant-applies-to-007</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: inline-table' elements
|
||||
<ul class="assert">
|
||||
|
@ -671,7 +671,7 @@
|
|||
<tr id="font-variant-applies-to-008-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-008.xht">font-variant-applies-to-008</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: table-row-group' elements
|
||||
<ul class="assert">
|
||||
|
@ -682,7 +682,7 @@
|
|||
<tr id="font-variant-applies-to-009-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-009.xht">font-variant-applies-to-009</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: table-header-group' elements
|
||||
<ul class="assert">
|
||||
|
@ -693,7 +693,7 @@
|
|||
<tr id="font-variant-applies-to-010-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-010.xht">font-variant-applies-to-010</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: table-footer-group' elements
|
||||
<ul class="assert">
|
||||
|
@ -704,7 +704,7 @@
|
|||
<tr id="font-variant-applies-to-011-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-011.xht">font-variant-applies-to-011</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: table-row' elements
|
||||
<ul class="assert">
|
||||
|
@ -715,7 +715,7 @@
|
|||
<tr id="font-variant-applies-to-014-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-014.xht">font-variant-applies-to-014</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: table-cell' elements
|
||||
<ul class="assert">
|
||||
|
@ -726,7 +726,7 @@
|
|||
<tr id="font-variant-applies-to-015-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-015.xht">font-variant-applies-to-015</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: table-caption' elements
|
||||
<ul class="assert">
|
||||
|
@ -748,7 +748,7 @@
|
|||
<tr id="font-variant-applies-to-017-6.11" class="">
|
||||
<td>
|
||||
<a href="font-variant-applies-to-017.xht">font-variant-applies-to-017</a></td>
|
||||
<td></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td></td>
|
||||
<td>Font-variant and 'display: inherit' elements
|
||||
<ul class="assert">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<meta content="The inherit keyword value cannot mix with other subproperty values" name="assert" />
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
div
|
||||
div
|
||||
{
|
||||
background-color: red;
|
||||
color: white;
|
||||
|
|
|
@ -24,15 +24,15 @@
|
|||
span.block-descendant
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the 2 lines of "Filler Text" match.</p>
|
||||
<div>Filler Text</div>
|
||||
<div id="div1">
|
||||
<span class="block-descendant">Filler Text</span>
|
||||
<span class="block-descendant"> </span>
|
||||
<span class="block-descendant">Filler Text</span>
|
||||
<span class="block-descendant"> </span>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -22,15 +22,15 @@
|
|||
{
|
||||
color: white;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there is a small black square.</p>
|
||||
|
||||
<div>I
|
||||
<span class="block-descendant">B</span>
|
||||
<span class="block-descendant">B</span>
|
||||
<span class="block-descendant">B</span>
|
||||
<span class="block-descendant">B</span>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
div#parent {font-size: 40px;}
|
||||
|
||||
div#test {font-size: 20px;}
|
||||
|
||||
div#control, div#test {font-size: 2.5ex;}
|
||||
|
||||
div#control, div#test {font-size: 2.5ex;}
|
||||
|
||||
div#control2 {font-size: 80px;}
|
||||
]]></style>
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
<p>Test passes if the 3 black squares have <strong>the same width and the same height</strong>.</p>
|
||||
|
||||
<div id="parent">
|
||||
<div id="parent">
|
||||
|
||||
<div id="control">C</div>
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: inline' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: block' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: run-in' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: inline-block' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: table' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: inline-table' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: table-row-group' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property does not applies to 'display: table-header-group' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: table-footer-group' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: table-row' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: table-cell' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: table-caption' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-variant" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#small-caps" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-variant-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_smallcaps.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="The 'font-variant' property applies to 'display: inherit' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: run-in' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: inline-block' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: table' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: inline-table' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: table-row-group' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Verifies that font-weight does not applies to 'display: table-header-group' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: table-footer-group' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: table-row' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: table-cell' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight" />
|
||||
<link rel="help" href="http://www.w3.org/TR/CSS21/fonts.html#font-boldness" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-fonts-3/#font-weight-prop" />
|
||||
<link rel="match" href="reference/pass_if_filler_text_match_bold.xht" />
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="Font weights apply to 'display: table-caption' elements." />
|
||||
<style type="text/css">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
position: absolute;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
|
||||
div
|
||||
{
|
||||
border-top: lime solid 1px;
|
||||
|
@ -39,7 +39,7 @@
|
|||
<body>
|
||||
|
||||
<p id="expected-results">A thin green horizontal line should appear at exactly 200px<img src="support/ruler-v-100px-200px-300px.png" width="55" height="350" alt="Image download support must be enabled" /></p>
|
||||
|
||||
|
||||
<div></div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
position: absolute;
|
||||
top: 42px;
|
||||
}
|
||||
|
||||
|
||||
div
|
||||
{
|
||||
border-left: lime solid 1px;
|
||||
|
@ -39,7 +39,7 @@
|
|||
<body>
|
||||
|
||||
<p id="expected-results">A thin green vertical line should appear at exactly 400px<img src="support/ruler-h-200px-400px.png" width="700" height="18" alt="Image download support must be enabled" /></p>
|
||||
|
||||
|
||||
<div></div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<p>Test passes if the 2 lines of "Filler Text" match.</p>
|
||||
|
||||
<div>Filler Text</div>
|
||||
|
||||
|
||||
<div>Filler Text</div>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<style type="text/css"><![CDATA[
|
||||
div
|
||||
{
|
||||
background-color: navy;
|
||||
background-color: navy;
|
||||
border: yellow solid medium;
|
||||
color: yellow;
|
||||
font: 900 2em "Courier New", Ahem, Marlett, Arial, sans-serif;
|
||||
color: yellow;
|
||||
font: 900 2em "Courier New", Ahem, Marlett, Arial, sans-serif;
|
||||
margin: 1em;
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
p {color: navy; font-size: 4em; margin: 0.25em;}
|
||||
|
||||
span.Times {font-family: "Times New Roman";}
|
||||
|
||||
|
||||
span.Arial {font-family: Arial;}
|
||||
|
||||
|
||||
span.CourierNew {font-family: "Courier New";}
|
||||
]]></style>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
body { font-size: 36px; }
|
||||
span#verify { font-family: CSSTest Verify; }
|
||||
p {
|
||||
font-family: "CSSTest FamilyName";
|
||||
font-family: "CSSTest FamilyName";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
margin-bottom: 10px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
|
||||
div#first {margin-top: 21px;}
|
||||
]]></style>
|
||||
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
font-size: xx-small;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
||||
span + span {font-size: x-small;}
|
||||
|
||||
|
||||
span + span + span {font-size: small;}
|
||||
|
||||
|
||||
span + span + span + span {font-size: medium;}
|
||||
|
||||
span + span + span + span + span {font-size: large;}
|
||||
|
||||
|
||||
span + span + span + span + span {font-size: large;}
|
||||
|
||||
span + span + span + span + span + span {font-size: x-large;}
|
||||
|
||||
span + span + span + span + span + span + span {font-size: xx-large;}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
line-height: 1;
|
||||
margin: 1em 0em;
|
||||
}
|
||||
|
||||
|
||||
span
|
||||
{
|
||||
font-family: Ahem;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
p {color: navy;}
|
||||
|
||||
span.Times {font-size: 4em; font-family: "Times New Roman";}
|
||||
|
||||
|
||||
span.Arial {font-size: 4em; font-family: Arial;}
|
||||
|
||||
|
||||
span.CourierNew {font-size: 4em; font-family: "Courier New";}
|
||||
]]></style>
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Reference rendering - pass if the lines of Filler Text below match</title>
|
||||
<link rel="author" title="Opera Software" href="https://opera.com" />
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the lines of "Filler Text" below match.</p>
|
||||
<div>Filler Text</div>
|
||||
<div>Filler Text</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Reference rendering - pass if the lines of Filler Text below match, bold</title>
|
||||
<link rel="author" title="Opera Software" href="https://opera.com" />
|
||||
<link rel="mismatch" href="reference/pass_if_filler_text_match.xht" />
|
||||
<style type="text/css">
|
||||
div {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the lines of "Filler Text" below match.</p>
|
||||
<div>Filler Text</div>
|
||||
<div>Filler Text</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Reference rendering - pass if the lines of Filler Text below match, small-caps</title>
|
||||
<link rel="author" title="Opera Software" href="https://opera.com" />
|
||||
<link rel="mismatch" href="reference/pass_if_filler_text_match.xht" />
|
||||
<style type="text/css">
|
||||
div {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the lines of "Filler Text" below match.</p>
|
||||
<div>Filler Text</div>
|
||||
<div>Filler Text</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/* This file is autogenerated by makegsubfonts.py */
|
||||
|
||||
/*
|
||||
/*
|
||||
Features defined in gsubtest fonts with associated base
|
||||
codepoints for each feature:
|
||||
|
||||
|
|
|
@ -59,38 +59,38 @@ def makeLookup1():
|
|||
f = open(tempShellSourcePath, "wb")
|
||||
f.write(ttxData)
|
||||
f.close()
|
||||
|
||||
|
||||
# compile the shell
|
||||
shell = TTFont(sfntVersion="OTTO")
|
||||
shell.importXML(tempShellSourcePath)
|
||||
shell.save(shellTempPath)
|
||||
os.remove(tempShellSourcePath)
|
||||
|
||||
|
||||
# load the shell
|
||||
shell = TTFont(shellTempPath)
|
||||
|
||||
|
||||
# grab the PASS and FAIL data
|
||||
hmtx = shell["hmtx"]
|
||||
glyphSet = shell.getGlyphSet()
|
||||
|
||||
|
||||
failGlyph = glyphSet["F"]
|
||||
failGlyph.decompile()
|
||||
failGlyphProgram = list(failGlyph.program)
|
||||
failGlyphMetrics = hmtx["F"]
|
||||
|
||||
|
||||
passGlyph = glyphSet["P"]
|
||||
passGlyph.decompile()
|
||||
passGlyphProgram = list(passGlyph.program)
|
||||
passGlyphMetrics = hmtx["P"]
|
||||
|
||||
|
||||
# grab some tables
|
||||
hmtx = shell["hmtx"]
|
||||
cmap = shell["cmap"]
|
||||
|
||||
|
||||
# start the glyph order
|
||||
existingGlyphs = [".notdef", "space", "F", "P"]
|
||||
glyphOrder = list(existingGlyphs)
|
||||
|
||||
|
||||
# start the CFF
|
||||
cff = shell["CFF "].cff
|
||||
globalSubrs = cff.GlobalSubrs
|
||||
|
@ -99,13 +99,13 @@ def makeLookup1():
|
|||
private = topDict.Private
|
||||
charStrings = topDict.CharStrings
|
||||
charStringsIndex = charStrings.charStringsIndex
|
||||
|
||||
|
||||
features = sorted(mapping)
|
||||
|
||||
# build the outline, hmtx and cmap data
|
||||
cp = baseCodepoint
|
||||
for index, tag in enumerate(features):
|
||||
|
||||
|
||||
# tag.pass
|
||||
glyphName = "%s.pass" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -119,14 +119,14 @@ def makeLookup1():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = passGlyphMetrics
|
||||
|
||||
|
||||
for table in cmap.tables:
|
||||
if table.format == 4:
|
||||
table.cmap[cp] = glyphName
|
||||
else:
|
||||
raise NotImplementedError, "Unsupported cmap table format: %d" % table.format
|
||||
cp += 1
|
||||
|
||||
|
||||
# tag.fail
|
||||
glyphName = "%s.fail" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -140,7 +140,7 @@ def makeLookup1():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = failGlyphMetrics
|
||||
|
||||
|
||||
for table in cmap.tables:
|
||||
if table.format == 4:
|
||||
table.cmap[cp] = glyphName
|
||||
|
@ -152,15 +152,15 @@ def makeLookup1():
|
|||
|
||||
# set the glyph order
|
||||
shell.setGlyphOrder(glyphOrder)
|
||||
|
||||
|
||||
# start the GSUB
|
||||
shell["GSUB"] = newTable("GSUB")
|
||||
gsub = shell["GSUB"].table = GSUB()
|
||||
gsub.Version = 1.0
|
||||
|
||||
|
||||
# make a list of all the features we will make
|
||||
featureCount = len(features)
|
||||
|
||||
|
||||
# set up the script list
|
||||
scriptList = gsub.ScriptList = ScriptList()
|
||||
scriptList.ScriptCount = 1
|
||||
|
@ -176,7 +176,7 @@ def makeLookup1():
|
|||
defaultLangSys.LookupOrder = None
|
||||
script.LangSysCount = 0
|
||||
script.LangSysRecord = []
|
||||
|
||||
|
||||
# set up the feature list
|
||||
featureList = gsub.FeatureList = FeatureList()
|
||||
featureList.FeatureCount = featureCount
|
||||
|
@ -191,7 +191,7 @@ def makeLookup1():
|
|||
feature.FeatureParams = None
|
||||
feature.LookupCount = 1
|
||||
feature.LookupListIndex = [index]
|
||||
|
||||
|
||||
# write the lookups
|
||||
lookupList = gsub.LookupList = LookupList()
|
||||
lookupList.LookupCount = featureCount
|
||||
|
@ -213,16 +213,16 @@ def makeLookup1():
|
|||
"%s.fail" % tag : "%s.pass" % tag,
|
||||
}
|
||||
lookup.SubTable.append(subtable)
|
||||
|
||||
|
||||
path = outputPath % 1 + ".otf"
|
||||
if os.path.exists(path):
|
||||
os.remove(path)
|
||||
shell.save(path)
|
||||
|
||||
|
||||
# get rid of the shell
|
||||
if os.path.exists(shellTempPath):
|
||||
os.remove(shellTempPath)
|
||||
|
||||
|
||||
def makeLookup3():
|
||||
# make a variation of the shell TTX data
|
||||
f = open(shellSourcePath)
|
||||
|
@ -233,38 +233,38 @@ def makeLookup3():
|
|||
f = open(tempShellSourcePath, "wb")
|
||||
f.write(ttxData)
|
||||
f.close()
|
||||
|
||||
|
||||
# compile the shell
|
||||
shell = TTFont(sfntVersion="OTTO")
|
||||
shell.importXML(tempShellSourcePath)
|
||||
shell.save(shellTempPath)
|
||||
os.remove(tempShellSourcePath)
|
||||
|
||||
|
||||
# load the shell
|
||||
shell = TTFont(shellTempPath)
|
||||
|
||||
|
||||
# grab the PASS and FAIL data
|
||||
hmtx = shell["hmtx"]
|
||||
glyphSet = shell.getGlyphSet()
|
||||
|
||||
|
||||
failGlyph = glyphSet["F"]
|
||||
failGlyph.decompile()
|
||||
failGlyphProgram = list(failGlyph.program)
|
||||
failGlyphMetrics = hmtx["F"]
|
||||
|
||||
|
||||
passGlyph = glyphSet["P"]
|
||||
passGlyph.decompile()
|
||||
passGlyphProgram = list(passGlyph.program)
|
||||
passGlyphMetrics = hmtx["P"]
|
||||
|
||||
|
||||
# grab some tables
|
||||
hmtx = shell["hmtx"]
|
||||
cmap = shell["cmap"]
|
||||
|
||||
|
||||
# start the glyph order
|
||||
existingGlyphs = [".notdef", "space", "F", "P"]
|
||||
glyphOrder = list(existingGlyphs)
|
||||
|
||||
|
||||
# start the CFF
|
||||
cff = shell["CFF "].cff
|
||||
globalSubrs = cff.GlobalSubrs
|
||||
|
@ -273,13 +273,13 @@ def makeLookup3():
|
|||
private = topDict.Private
|
||||
charStrings = topDict.CharStrings
|
||||
charStringsIndex = charStrings.charStringsIndex
|
||||
|
||||
|
||||
features = sorted(mapping)
|
||||
|
||||
# build the outline, hmtx and cmap data
|
||||
cp = baseCodepoint
|
||||
for index, tag in enumerate(features):
|
||||
|
||||
|
||||
# tag.pass
|
||||
glyphName = "%s.pass" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -293,7 +293,7 @@ def makeLookup3():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = passGlyphMetrics
|
||||
|
||||
|
||||
# tag.fail
|
||||
glyphName = "%s.fail" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -307,7 +307,7 @@ def makeLookup3():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = failGlyphMetrics
|
||||
|
||||
|
||||
# tag.default
|
||||
glyphName = "%s.default" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -321,14 +321,14 @@ def makeLookup3():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = passGlyphMetrics
|
||||
|
||||
|
||||
for table in cmap.tables:
|
||||
if table.format == 4:
|
||||
table.cmap[cp] = glyphName
|
||||
else:
|
||||
raise NotImplementedError, "Unsupported cmap table format: %d" % table.format
|
||||
cp += 1
|
||||
|
||||
|
||||
# tag.alt1,2,3
|
||||
for i in range(1,4):
|
||||
glyphName = "%s.alt%d" % (tag, i)
|
||||
|
@ -349,18 +349,18 @@ def makeLookup3():
|
|||
else:
|
||||
raise NotImplementedError, "Unsupported cmap table format: %d" % table.format
|
||||
cp += 1
|
||||
|
||||
|
||||
# set the glyph order
|
||||
shell.setGlyphOrder(glyphOrder)
|
||||
|
||||
|
||||
# start the GSUB
|
||||
shell["GSUB"] = newTable("GSUB")
|
||||
gsub = shell["GSUB"].table = GSUB()
|
||||
gsub.Version = 1.0
|
||||
|
||||
|
||||
# make a list of all the features we will make
|
||||
featureCount = len(features)
|
||||
|
||||
|
||||
# set up the script list
|
||||
scriptList = gsub.ScriptList = ScriptList()
|
||||
scriptList.ScriptCount = 1
|
||||
|
@ -376,7 +376,7 @@ def makeLookup3():
|
|||
defaultLangSys.LookupOrder = None
|
||||
script.LangSysCount = 0
|
||||
script.LangSysRecord = []
|
||||
|
||||
|
||||
# set up the feature list
|
||||
featureList = gsub.FeatureList = FeatureList()
|
||||
featureList.FeatureCount = featureCount
|
||||
|
@ -391,7 +391,7 @@ def makeLookup3():
|
|||
feature.FeatureParams = None
|
||||
feature.LookupCount = 1
|
||||
feature.LookupListIndex = [index]
|
||||
|
||||
|
||||
# write the lookups
|
||||
lookupList = gsub.LookupList = LookupList()
|
||||
lookupList.LookupCount = featureCount
|
||||
|
@ -415,16 +415,16 @@ def makeLookup3():
|
|||
"%s.alt3" % tag : ["%s.fail" % tag, "%s.fail" % tag, "%s.pass" % tag]
|
||||
}
|
||||
lookup.SubTable.append(subtable)
|
||||
|
||||
|
||||
path = outputPath % 3 + ".otf"
|
||||
if os.path.exists(path):
|
||||
os.remove(path)
|
||||
shell.save(path)
|
||||
|
||||
|
||||
# get rid of the shell
|
||||
if os.path.exists(shellTempPath):
|
||||
os.remove(shellTempPath)
|
||||
|
||||
|
||||
def makeJavascriptData():
|
||||
features = sorted(mapping)
|
||||
outStr = []
|
||||
|
@ -459,7 +459,7 @@ def makeJavascriptData():
|
|||
for tag in features:
|
||||
taglist.append("\"%s\": 0x%x" % (tag, cp))
|
||||
cp += 4
|
||||
|
||||
|
||||
outStr.append(textwrap.fill(", ".join(taglist), initial_indent=" ", subsequent_indent=" "))
|
||||
outStr.append("};");
|
||||
outStr.append("");
|
||||
|
@ -483,4 +483,4 @@ makeLookup3()
|
|||
# output javascript data
|
||||
|
||||
print "Making javascript data file..."
|
||||
makeJavascriptData()
|
||||
makeJavascriptData()
|
||||
|
|
|
@ -1072,6 +1072,102 @@
|
|||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-001" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: inline' elements">
|
||||
<a href="font-variant-applies-to-001.xht">font-variant-applies-to-001</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-002" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: block' elements">
|
||||
<a href="font-variant-applies-to-002.xht">font-variant-applies-to-002</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-004" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: run-in' elements">
|
||||
<a href="font-variant-applies-to-004.xht">font-variant-applies-to-004</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-005" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: inline-block' elements">
|
||||
<a href="font-variant-applies-to-005.xht">font-variant-applies-to-005</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-006" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: table' elements">
|
||||
<a href="font-variant-applies-to-006.xht">font-variant-applies-to-006</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-007" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: inline-table' elements">
|
||||
<a href="font-variant-applies-to-007.xht">font-variant-applies-to-007</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-008" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: table-row-group' elements">
|
||||
<a href="font-variant-applies-to-008.xht">font-variant-applies-to-008</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-009" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: table-header-group' elements">
|
||||
<a href="font-variant-applies-to-009.xht">font-variant-applies-to-009</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-010" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: table-footer-group' elements">
|
||||
<a href="font-variant-applies-to-010.xht">font-variant-applies-to-010</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-011" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: table-row' elements">
|
||||
<a href="font-variant-applies-to-011.xht">font-variant-applies-to-011</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-014" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: table-cell' elements">
|
||||
<a href="font-variant-applies-to-014.xht">font-variant-applies-to-014</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-015" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: table-caption' elements">
|
||||
<a href="font-variant-applies-to-015.xht">font-variant-applies-to-015</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-016" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="'font-variant' and 'display: none' elements">
|
||||
|
@ -1080,6 +1176,14 @@
|
|||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-applies-to-017" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-variant and 'display: inherit' elements">
|
||||
<a href="font-variant-applies-to-017.xht">font-variant-applies-to-017</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_smallcaps.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-variant-caps" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="feature value matching for font-variant-caps">
|
||||
|
@ -1136,6 +1240,86 @@
|
|||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-004" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: run-in' elements">
|
||||
<a href="font-weight-applies-to-004.xht">font-weight-applies-to-004</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-005" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: inline-block' elements">
|
||||
<a href="font-weight-applies-to-005.xht">font-weight-applies-to-005</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-006" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: table' elements">
|
||||
<a href="font-weight-applies-to-006.xht">font-weight-applies-to-006</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-007" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: inline-table' elements">
|
||||
<a href="font-weight-applies-to-007.xht">font-weight-applies-to-007</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-008" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: table-row-group' elements">
|
||||
<a href="font-weight-applies-to-008.xht">font-weight-applies-to-008</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-009" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: table-header-group' elements">
|
||||
<a href="font-weight-applies-to-009.xht">font-weight-applies-to-009</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-010" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: table-footer-group' elements">
|
||||
<a href="font-weight-applies-to-010.xht">font-weight-applies-to-010</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-011" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: table-row' elements">
|
||||
<a href="font-weight-applies-to-011.xht">font-weight-applies-to-011</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-014" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: table-cell' elements">
|
||||
<a href="font-weight-applies-to-014.xht">font-weight-applies-to-014</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-015" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: table-caption' elements">
|
||||
<a href="font-weight-applies-to-015.xht">font-weight-applies-to-015</a></td>
|
||||
<td><a href="reference/pass_if_filler_text_match_bold.xht">=</a> <a href="reference/pass_if_filler_text_match.xht">≠</a> </td>
|
||||
<td rowspan="1"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="font-weight-applies-to-016" class="">
|
||||
<tr>
|
||||
<td rowspan="1" title="Font-weight and 'display: none' elements">
|
||||
|
|
|
@ -130,7 +130,20 @@ font-style-applies-to-002.xht == reference/font-style-applies-to-001-ref.xht
|
|||
font-style-applies-to-016.xht == reference/no-red-on-blank-page-ref.xht
|
||||
font-style-applies-to-017.xht == reference/font-style-applies-to-001-ref.xht
|
||||
font-variant-001.xht == reference/font-variant-001-ref.xht
|
||||
font-variant-applies-to-001.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-002.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-004.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-005.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-006.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-007.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-008.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-009.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-010.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-011.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-014.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-015.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-applies-to-016.xht == reference/no-red-on-blank-page-ref.xht
|
||||
font-variant-applies-to-017.xht == reference/pass_if_filler_text_match_smallcaps.xht != reference/pass_if_filler_text_match.xht
|
||||
font-variant-caps.xht == reference/font-variant-caps-ref.xht
|
||||
font-variant-east-asian.xht == reference/font-variant-east-asian-ref.xht
|
||||
font-variant-ligatures.xht == reference/font-variant-ligatures-ref.xht
|
||||
|
@ -138,6 +151,16 @@ font-variant-numeric.xht == reference/font-variant-numeric-ref.xht
|
|||
font-variant-position.xht == reference/font-variant-position-ref.xht
|
||||
font-weight-applies-to-001.xht == reference/font-weight-bold-ref.xht
|
||||
font-weight-applies-to-002.xht == reference/font-weight-bold-ref.xht
|
||||
font-weight-applies-to-004.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-005.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-006.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-007.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-008.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-009.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-010.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-011.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-014.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-015.xht == reference/pass_if_filler_text_match_bold.xht != reference/pass_if_filler_text_match.xht
|
||||
font-weight-applies-to-016.xht == reference/no-red-on-blank-page-ref.xht
|
||||
font-weight-applies-to-017.xht == reference/font-weight-bold-ref.xht
|
||||
font-weight-rule-001.xht == reference/font-weight-normal-ref.xht
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/* This file is autogenerated by makegsubfonts.py */
|
||||
|
||||
/*
|
||||
/*
|
||||
Features defined in gsubtest fonts with associated base
|
||||
codepoints for each feature:
|
||||
|
||||
|
|
|
@ -59,38 +59,38 @@ def makeLookup1():
|
|||
f = open(tempShellSourcePath, "wb")
|
||||
f.write(ttxData)
|
||||
f.close()
|
||||
|
||||
|
||||
# compile the shell
|
||||
shell = TTFont(sfntVersion="OTTO")
|
||||
shell.importXML(tempShellSourcePath)
|
||||
shell.save(shellTempPath)
|
||||
os.remove(tempShellSourcePath)
|
||||
|
||||
|
||||
# load the shell
|
||||
shell = TTFont(shellTempPath)
|
||||
|
||||
|
||||
# grab the PASS and FAIL data
|
||||
hmtx = shell["hmtx"]
|
||||
glyphSet = shell.getGlyphSet()
|
||||
|
||||
|
||||
failGlyph = glyphSet["F"]
|
||||
failGlyph.decompile()
|
||||
failGlyphProgram = list(failGlyph.program)
|
||||
failGlyphMetrics = hmtx["F"]
|
||||
|
||||
|
||||
passGlyph = glyphSet["P"]
|
||||
passGlyph.decompile()
|
||||
passGlyphProgram = list(passGlyph.program)
|
||||
passGlyphMetrics = hmtx["P"]
|
||||
|
||||
|
||||
# grab some tables
|
||||
hmtx = shell["hmtx"]
|
||||
cmap = shell["cmap"]
|
||||
|
||||
|
||||
# start the glyph order
|
||||
existingGlyphs = [".notdef", "space", "F", "P"]
|
||||
glyphOrder = list(existingGlyphs)
|
||||
|
||||
|
||||
# start the CFF
|
||||
cff = shell["CFF "].cff
|
||||
globalSubrs = cff.GlobalSubrs
|
||||
|
@ -99,13 +99,13 @@ def makeLookup1():
|
|||
private = topDict.Private
|
||||
charStrings = topDict.CharStrings
|
||||
charStringsIndex = charStrings.charStringsIndex
|
||||
|
||||
|
||||
features = sorted(mapping)
|
||||
|
||||
# build the outline, hmtx and cmap data
|
||||
cp = baseCodepoint
|
||||
for index, tag in enumerate(features):
|
||||
|
||||
|
||||
# tag.pass
|
||||
glyphName = "%s.pass" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -119,14 +119,14 @@ def makeLookup1():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = passGlyphMetrics
|
||||
|
||||
|
||||
for table in cmap.tables:
|
||||
if table.format == 4:
|
||||
table.cmap[cp] = glyphName
|
||||
else:
|
||||
raise NotImplementedError, "Unsupported cmap table format: %d" % table.format
|
||||
cp += 1
|
||||
|
||||
|
||||
# tag.fail
|
||||
glyphName = "%s.fail" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -140,7 +140,7 @@ def makeLookup1():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = failGlyphMetrics
|
||||
|
||||
|
||||
for table in cmap.tables:
|
||||
if table.format == 4:
|
||||
table.cmap[cp] = glyphName
|
||||
|
@ -152,15 +152,15 @@ def makeLookup1():
|
|||
|
||||
# set the glyph order
|
||||
shell.setGlyphOrder(glyphOrder)
|
||||
|
||||
|
||||
# start the GSUB
|
||||
shell["GSUB"] = newTable("GSUB")
|
||||
gsub = shell["GSUB"].table = GSUB()
|
||||
gsub.Version = 1.0
|
||||
|
||||
|
||||
# make a list of all the features we will make
|
||||
featureCount = len(features)
|
||||
|
||||
|
||||
# set up the script list
|
||||
scriptList = gsub.ScriptList = ScriptList()
|
||||
scriptList.ScriptCount = 1
|
||||
|
@ -176,7 +176,7 @@ def makeLookup1():
|
|||
defaultLangSys.LookupOrder = None
|
||||
script.LangSysCount = 0
|
||||
script.LangSysRecord = []
|
||||
|
||||
|
||||
# set up the feature list
|
||||
featureList = gsub.FeatureList = FeatureList()
|
||||
featureList.FeatureCount = featureCount
|
||||
|
@ -191,7 +191,7 @@ def makeLookup1():
|
|||
feature.FeatureParams = None
|
||||
feature.LookupCount = 1
|
||||
feature.LookupListIndex = [index]
|
||||
|
||||
|
||||
# write the lookups
|
||||
lookupList = gsub.LookupList = LookupList()
|
||||
lookupList.LookupCount = featureCount
|
||||
|
@ -213,16 +213,16 @@ def makeLookup1():
|
|||
"%s.fail" % tag : "%s.pass" % tag,
|
||||
}
|
||||
lookup.SubTable.append(subtable)
|
||||
|
||||
|
||||
path = outputPath % 1 + ".otf"
|
||||
if os.path.exists(path):
|
||||
os.remove(path)
|
||||
shell.save(path)
|
||||
|
||||
|
||||
# get rid of the shell
|
||||
if os.path.exists(shellTempPath):
|
||||
os.remove(shellTempPath)
|
||||
|
||||
|
||||
def makeLookup3():
|
||||
# make a variation of the shell TTX data
|
||||
f = open(shellSourcePath)
|
||||
|
@ -233,38 +233,38 @@ def makeLookup3():
|
|||
f = open(tempShellSourcePath, "wb")
|
||||
f.write(ttxData)
|
||||
f.close()
|
||||
|
||||
|
||||
# compile the shell
|
||||
shell = TTFont(sfntVersion="OTTO")
|
||||
shell.importXML(tempShellSourcePath)
|
||||
shell.save(shellTempPath)
|
||||
os.remove(tempShellSourcePath)
|
||||
|
||||
|
||||
# load the shell
|
||||
shell = TTFont(shellTempPath)
|
||||
|
||||
|
||||
# grab the PASS and FAIL data
|
||||
hmtx = shell["hmtx"]
|
||||
glyphSet = shell.getGlyphSet()
|
||||
|
||||
|
||||
failGlyph = glyphSet["F"]
|
||||
failGlyph.decompile()
|
||||
failGlyphProgram = list(failGlyph.program)
|
||||
failGlyphMetrics = hmtx["F"]
|
||||
|
||||
|
||||
passGlyph = glyphSet["P"]
|
||||
passGlyph.decompile()
|
||||
passGlyphProgram = list(passGlyph.program)
|
||||
passGlyphMetrics = hmtx["P"]
|
||||
|
||||
|
||||
# grab some tables
|
||||
hmtx = shell["hmtx"]
|
||||
cmap = shell["cmap"]
|
||||
|
||||
|
||||
# start the glyph order
|
||||
existingGlyphs = [".notdef", "space", "F", "P"]
|
||||
glyphOrder = list(existingGlyphs)
|
||||
|
||||
|
||||
# start the CFF
|
||||
cff = shell["CFF "].cff
|
||||
globalSubrs = cff.GlobalSubrs
|
||||
|
@ -273,13 +273,13 @@ def makeLookup3():
|
|||
private = topDict.Private
|
||||
charStrings = topDict.CharStrings
|
||||
charStringsIndex = charStrings.charStringsIndex
|
||||
|
||||
|
||||
features = sorted(mapping)
|
||||
|
||||
# build the outline, hmtx and cmap data
|
||||
cp = baseCodepoint
|
||||
for index, tag in enumerate(features):
|
||||
|
||||
|
||||
# tag.pass
|
||||
glyphName = "%s.pass" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -293,7 +293,7 @@ def makeLookup3():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = passGlyphMetrics
|
||||
|
||||
|
||||
# tag.fail
|
||||
glyphName = "%s.fail" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -307,7 +307,7 @@ def makeLookup3():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = failGlyphMetrics
|
||||
|
||||
|
||||
# tag.default
|
||||
glyphName = "%s.default" % tag
|
||||
glyphOrder.append(glyphName)
|
||||
|
@ -321,14 +321,14 @@ def makeLookup3():
|
|||
charStrings=charStrings
|
||||
)
|
||||
hmtx[glyphName] = passGlyphMetrics
|
||||
|
||||
|
||||
for table in cmap.tables:
|
||||
if table.format == 4:
|
||||
table.cmap[cp] = glyphName
|
||||
else:
|
||||
raise NotImplementedError, "Unsupported cmap table format: %d" % table.format
|
||||
cp += 1
|
||||
|
||||
|
||||
# tag.alt1,2,3
|
||||
for i in range(1,4):
|
||||
glyphName = "%s.alt%d" % (tag, i)
|
||||
|
@ -349,18 +349,18 @@ def makeLookup3():
|
|||
else:
|
||||
raise NotImplementedError, "Unsupported cmap table format: %d" % table.format
|
||||
cp += 1
|
||||
|
||||
|
||||
# set the glyph order
|
||||
shell.setGlyphOrder(glyphOrder)
|
||||
|
||||
|
||||
# start the GSUB
|
||||
shell["GSUB"] = newTable("GSUB")
|
||||
gsub = shell["GSUB"].table = GSUB()
|
||||
gsub.Version = 1.0
|
||||
|
||||
|
||||
# make a list of all the features we will make
|
||||
featureCount = len(features)
|
||||
|
||||
|
||||
# set up the script list
|
||||
scriptList = gsub.ScriptList = ScriptList()
|
||||
scriptList.ScriptCount = 1
|
||||
|
@ -376,7 +376,7 @@ def makeLookup3():
|
|||
defaultLangSys.LookupOrder = None
|
||||
script.LangSysCount = 0
|
||||
script.LangSysRecord = []
|
||||
|
||||
|
||||
# set up the feature list
|
||||
featureList = gsub.FeatureList = FeatureList()
|
||||
featureList.FeatureCount = featureCount
|
||||
|
@ -391,7 +391,7 @@ def makeLookup3():
|
|||
feature.FeatureParams = None
|
||||
feature.LookupCount = 1
|
||||
feature.LookupListIndex = [index]
|
||||
|
||||
|
||||
# write the lookups
|
||||
lookupList = gsub.LookupList = LookupList()
|
||||
lookupList.LookupCount = featureCount
|
||||
|
@ -415,16 +415,16 @@ def makeLookup3():
|
|||
"%s.alt3" % tag : ["%s.fail" % tag, "%s.fail" % tag, "%s.pass" % tag]
|
||||
}
|
||||
lookup.SubTable.append(subtable)
|
||||
|
||||
|
||||
path = outputPath % 3 + ".otf"
|
||||
if os.path.exists(path):
|
||||
os.remove(path)
|
||||
shell.save(path)
|
||||
|
||||
|
||||
# get rid of the shell
|
||||
if os.path.exists(shellTempPath):
|
||||
os.remove(shellTempPath)
|
||||
|
||||
|
||||
def makeJavascriptData():
|
||||
features = sorted(mapping)
|
||||
outStr = []
|
||||
|
@ -459,7 +459,7 @@ def makeJavascriptData():
|
|||
for tag in features:
|
||||
taglist.append("\"%s\": 0x%x" % (tag, cp))
|
||||
cp += 4
|
||||
|
||||
|
||||
outStr.append(textwrap.fill(", ".join(taglist), initial_indent=" ", subsequent_indent=" "))
|
||||
outStr.append("};");
|
||||
outStr.append("");
|
||||
|
@ -483,4 +483,4 @@ makeLookup3()
|
|||
# output javascript data
|
||||
|
||||
print "Making javascript data file..."
|
||||
makeJavascriptData()
|
||||
makeJavascriptData()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
function fontProp(n, size, s1, s2) { return (s1 ? s1 + " " : "") + (s2 ? s2 + " " : "") + size + " " + n; }
|
||||
function font(n, size, s1, s2) { return "font: " + fontProp(n, size, s1, s2); }
|
||||
|
||||
|
||||
// testrules
|
||||
// namelist - font family list
|
||||
// invalid - true if declarations won't parse in either font-family or font
|
||||
|
@ -174,7 +174,7 @@ function testStyleRuleParse(decl, invalid) {
|
|||
assert_unreached("unexpected error with " + decl + " ==> " + e.name);
|
||||
}
|
||||
|
||||
assert_equals(sheet.cssRules.length, 1,
|
||||
assert_equals(sheet.cssRules.length, 1,
|
||||
"strange number of rules (" + sheet.cssRules.length + ") with " + decl);
|
||||
|
||||
var s = extractDecl(sheet.cssRules[0].cssText);
|
||||
|
@ -183,7 +183,7 @@ function testStyleRuleParse(decl, invalid) {
|
|||
assert_equals(s, "", "rule declaration shouldn't parse - " + rule + " ==> " + s);
|
||||
} else {
|
||||
assert_not_equals(s, "", "rule declaration should parse - " + rule);
|
||||
|
||||
|
||||
// check that the serialization also parses
|
||||
var r = ".test" + gTest++ + " { " + s + " }";
|
||||
while(sheet.cssRules.length > 0) {
|
||||
|
|
|
@ -178,8 +178,8 @@ var testrules = [
|
|||
|
||||
];
|
||||
|
||||
// test that invalid value declarations don't affect the parsing of surrounding
|
||||
// declarations. So before + invalid + after should match the serialization
|
||||
// test that invalid value declarations don't affect the parsing of surrounding
|
||||
// declarations. So before + invalid + after should match the serialization
|
||||
// given in s.
|
||||
|
||||
var gSurroundingTests = [
|
||||
|
@ -254,7 +254,7 @@ function testOneRule(testrule) {
|
|||
parseErr = true;
|
||||
}
|
||||
|
||||
test(function() {
|
||||
test(function() {
|
||||
assert_true(!parseErr || expectedErr, "unexpected syntax error");
|
||||
if (!parseErr) {
|
||||
assert_equals(sheet.cssRules.length, 1, "bad rule count");
|
||||
|
@ -297,13 +297,13 @@ function testOneRule(testrule) {
|
|||
if ("rulesrc" in testrule) {
|
||||
test(function() {
|
||||
var j, rulesrc = testrule.rulesrc;
|
||||
|
||||
|
||||
// invalid value definitions shouldn't affect the parsing of valid
|
||||
// definitions before or after an invalid one
|
||||
for (var j = 0; j < gSurroundingTests.length; j++) {
|
||||
var t = gSurroundingTests[j];
|
||||
var srulesrc = [];
|
||||
|
||||
|
||||
if ("between" in t) {
|
||||
srulesrc = srulesrc.concat(rulesrc);
|
||||
srulesrc = srulesrc.concat(t.between);
|
||||
|
@ -315,7 +315,7 @@ function testOneRule(testrule) {
|
|||
if (t.after != "")
|
||||
srulesrc = srulesrc.concat(t.after);
|
||||
}
|
||||
|
||||
|
||||
var result = testParse(srulesrc);
|
||||
assert_equals(valuesText(result), valuesText(t.s), "invalid declarations should not affect valid ones - ");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue