Last change
on this file since 29468 was 29468, checked in by sjs49, 9 years ago |
Initial commit for editor.method.ac for flag design
|
-
Property svn:executable
set to
*
|
File size:
2.3 KB
|
Line | |
---|
1 | <!DOCTYPE HTML>
|
---|
2 | <html lang="en-En">
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>SVG @font-face Test</title>
|
---|
6 | </head>
|
---|
7 | <body>
|
---|
8 | <h2>@font-face in SVG</h2>
|
---|
9 |
|
---|
10 | <p style="width: 500px"><strong>Problem:</strong> I'm trying trying to place an images in svg format with custom fonts. It works in <code>svg</code> but not in <code>img</code>. If you open the image in a new tab you will see it rendered with the proper font. The font is served from this same website in this directory.</p>
|
---|
11 |
|
---|
12 | <a href="test_ff.svg">Link to the test.svg</a>
|
---|
13 |
|
---|
14 | <table>
|
---|
15 | <tr><td>
|
---|
16 | <svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200">
|
---|
17 | <defs>
|
---|
18 | <style type="text/css">
|
---|
19 | @font-face {
|
---|
20 | font-family: 'Arvo';
|
---|
21 | font-style: normal;
|
---|
22 | font-weight: normal;
|
---|
23 | src: url(arvo-regular-webfont.woff) format('woff');
|
---|
24 | }
|
---|
25 | </style>
|
---|
26 | </defs>
|
---|
27 | <rect x="0" y="0" height="100" width="500" fill="#eee" />
|
---|
28 | <text x="20" y="50" font-family="Arvo" font-weight="normal" font-size="32">Text using CSS @font-face</text>
|
---|
29 | </svg>
|
---|
30 | </td>
|
---|
31 | <td>
|
---|
32 | <pre>
|
---|
33 | <svg width="500" height="200" version="1.1" xmlns = 'http://www.w3.org/2000/svg' xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 500 200">
|
---|
34 | <defs>
|
---|
35 | <style type="text/css">
|
---|
36 | @font-face {
|
---|
37 | font-family: 'Arvo';
|
---|
38 | font-style: normal;
|
---|
39 | font-weight: normal;
|
---|
40 | src: url(arvo-regular-webfont.woff) format('woff');
|
---|
41 | }
|
---|
42 | </style>
|
---|
43 | </defs>
|
---|
44 | <rect x="0" y="0" height="100" width="500" fill="#eee" />
|
---|
45 | <text x="20" y="50" font-family="Arvo" font-weight="normal" font-size="32">Text using CSS @font-face</text>
|
---|
46 | </svg>
|
---|
47 | </pre>
|
---|
48 | </td>
|
---|
49 | </tr>
|
---|
50 | <tr>
|
---|
51 | <td><img src="test_ff.svg" width="500" height="200" /></td>
|
---|
52 | <td style="verical-align: top;">
|
---|
53 | <pre>
|
---|
54 | <img src="test_ff.svg" width="500" height="200" />
|
---|
55 | </pre>
|
---|
56 | </td>
|
---|
57 | </tr>
|
---|
58 | </table>
|
---|
59 |
|
---|
60 |
|
---|
61 | </body>
|
---|
62 | </html>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.