blob: 4288964d960bb37b7674f308a0cc279ad6c8db9a [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SVG Font Test</title>
<style>
/* Construct a font where glyph A-Z comes from Times, a-z from Courier, and 'o' from a SVG Font */
@font-face {
font-family: 'TestFont';
src: local('Times');
unicode-range: U+0041-005A; /* 'A' - 'Z' */
}
@font-face {
font-family: 'TestFont';
src: local('Courier New');
unicode-range: U+0061-007A; /* 'a' - 'z' */
}
@font-face {
font-family: 'TestFont';
src: url('#TestFont') format(svg);
unicode-range: U+6F; /* 'o' */
}
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none">
<defs>
<font id="TestFont">
<font-face font-family="TestFont" font-weight="normal" font-style="normal" font-variant="normal" font-stretch="normal" units-per-em="2048.000000" x-height="987.500000" cap-height="1558.500000" ascent="2127.000000" descent="532.000000"/>
<missing-glyph d="M 0.000000 0.000000 L 987.500000 0.000000 L 987.500000 1558.500000 L 0.000000 1558.500000 Z M 0.000000 0.000000 " horiz-adv-x="987.500000"/>
<glyph unicode="a" d="M 860.000000 974.000000 L 1086.000000 974.000000 L 1086.000000 0.000000 L 860.000000 0.000000 L 860.000000 102.000000 C 767.332886 15.332900 667.667175 -28.000000 561.000000 -28.000000 C 426.332672 -28.000000 315.000427 20.666180 227.000000 118.000000 C 139.666229 217.333832 96.000000 341.332581 96.000000 490.000000 C 96.000000 636.000732 139.666229 757.666199 227.000000 855.000000 C 314.333771 952.333801 423.666016 1001.000000 555.000000 1001.000000 C 668.333923 1001.000000 769.999573 954.333801 860.000000 861.000000 Z M 326.000000 490.000000 C 326.000000 396.666199 350.999756 320.666962 401.000000 262.000000 C 452.333588 202.666367 516.999634 173.000000 595.000000 173.000000 C 678.333740 173.000000 745.666382 201.666382 797.000000 259.000000 C 848.333618 318.333618 874.000000 393.666199 874.000000 485.000000 C 874.000000 576.333801 848.333618 651.666382 797.000000 711.000000 C 745.666382 769.000305 679.000427 798.000000 597.000000 798.000000 C 519.666260 798.000000 455.000275 768.666931 403.000000 710.000000 C 351.666412 650.666382 326.000000 577.333740 326.000000 490.000000 Z M 1228.000000 0.000000 " horiz-adv-x="1228"/>
<glyph unicode="o" d="M 96.000000 494.000000 C 96.000000 634.667358 146.332825 754.332825 247.000000 853.000000 C 347.667175 951.667175 470.332611 1001.000000 615.000000 1001.000000 C 760.334045 1001.000000 883.666138 951.333801 985.000000 852.000000 C 1085.000488 752.666199 1135.000000 630.667419 1135.000000 486.000000 C 1135.000000 339.999268 1084.667114 217.667160 984.000000 119.000000 C 882.666138 20.999510 758.334045 -28.000000 611.000000 -28.000000 C 464.999268 -28.000000 342.667145 21.999500 244.000000 122.000000 C 145.332840 220.667160 96.000000 344.665924 96.000000 494.000000 Z M 326.000000 490.000000 C 326.000000 392.666168 351.999725 315.666962 404.000000 259.000000 C 457.333588 201.666382 527.666260 173.000000 615.000000 173.000000 C 703.000427 173.000000 773.333069 201.333054 826.000000 258.000000 C 878.666931 314.666962 905.000000 390.332855 905.000000 485.000000 C 905.000000 579.667114 878.666931 655.333069 826.000000 712.000000 C 772.666382 769.333618 702.333740 798.000000 615.000000 798.000000 C 528.999573 798.000000 459.333588 769.333618 406.000000 712.000000 C 352.666412 654.666382 326.000000 580.667114 326.000000 490.000000 Z M 1231.000000 0.000000 " horiz-adv-x="1231"/>
<glyph unicode=" " d="M 632.000000 0.000000 " horiz-adv-x="632"/>
</font>
</defs>
</svg>
<!-- 'ABC' should be rendered using Times, 'def' using Courier, 'o' using the SVG Font, and 'O' again by Times -->
<p style='font-family: TestFont; font-size: 40px; '>ABCdefoooO</p>
</body>
</html>