From 749337205554adfc98e918a0adc903f4e53dca8b Mon Sep 17 00:00:00 2001 From: thinkpadmaster Date: Wed, 5 Jul 2023 16:25:23 -0500 Subject: Add DejaVu Sans font --- .../How_to_use_webfonts.html | 230 +++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 data/static/fonts/dejavu-sans-fontfacekit/How_to_use_webfonts.html (limited to 'data/static/fonts/dejavu-sans-fontfacekit/How_to_use_webfonts.html') diff --git a/data/static/fonts/dejavu-sans-fontfacekit/How_to_use_webfonts.html b/data/static/fonts/dejavu-sans-fontfacekit/How_to_use_webfonts.html new file mode 100644 index 0000000..653499c --- /dev/null +++ b/data/static/fonts/dejavu-sans-fontfacekit/How_to_use_webfonts.html @@ -0,0 +1,230 @@ + + + + + + + + + + +How to Use Webfonts + + + + +
+ +
+
+
+

Installing Webfonts

+ +

Webfonts are supported by all major browser platforms but not all in the same way. There are currently four different font formats that must be included in order to target all browsers. This includes TTF, WOFF, EOT and SVG.

+ +

1. Upload your webfonts

+

You must upload your webfont kit to your website. They should be in or near the same directory as your CSS files.

+ +

2. Include the webfont stylesheet

+

A special CSS @font-face declaration helps the various browsers select the appropriate font it needs without causing you a bunch of headaches. Learn more about this syntax by reading the Fontspring blog post about it. The code for it is as follows:

+ + + +@font-face{ + font-family: 'MyWebFont'; + src: url('WebFont.eot'); + src: url('WebFont.eot?iefix') format('eot'), + url('WebFont.woff') format('woff'), + url('WebFont.ttf') format('truetype'), + url('WebFont.svg#webfont') format('svg'); +} + +

We've already gone ahead and generated the code for you. All you have to do is link to the stylesheet in your HTML, like this:

+ <link rel="stylesheet" href="stylesheet.css" type="text/css" charset="utf-8" /> + +

3. Modify your own stylesheet

+

To take advantage of your new fonts, you must tell your stylesheet to use them. Look at the original @font-face declaration above and find the property called "font-family." The name linked there will be what you use to reference the font. Prepend that webfont name to the font stack in the "font-family" property, inside the selector you want to change. For example:

+p { font-family: 'MyWebFont', Arial, sans-serif; } + +

4. Test

+

Getting webfonts to work cross-browser can be tricky. Use the information in the sidebar to help you if you find that fonts aren't loading in a particular browser.

+
+ + +
+ +
+ +
+ + + + -- cgit v1.2.3