From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: web@dpdk.org
Subject: [dpdk-web] [PATCH] use cached fonts
Date: Thu, 26 May 2016 12:40:48 +0200 [thread overview]
Message-ID: <1464259248-17946-1-git-send-email-thomas.monjalon@6wind.com> (raw)
Accelerate page loading by downloading fonts from the CDN.
Note that it is a cross-domain resource request (CORS).
It is solved by adding the following header when serving fonts:
Access-Control-Allow-Origin *
---
fonts.css | 60 ++++++++++++++++++++++++++++++------------------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/fonts.css b/fonts.css
index 7a2ba0d..2260dfd 100644
--- a/fonts.css
+++ b/fonts.css
@@ -1,61 +1,61 @@
@font-face {
font-family: 'opensans';
- src: url('/fonts/opensans-regular.eot');
- src: url('/fonts/opensans-regular.eot?#iefix') format('embedded-opentype'),
- url('/fonts/opensans-regular.woff') format('woff'),
- url('/fonts/opensans-regular.ttf') format('truetype'),
- url('/fonts/opensans-regular.svg#open_sansregular') format('svg');
+ src: url('http://fast.dpdk.org/fonts/opensans-regular.eot');
+ src: url('http://fast.dpdk.org/fonts/opensans-regular.eot?#iefix') format('embedded-opentype'),
+ url('http://fast.dpdk.org/fonts/opensans-regular.woff') format('woff'),
+ url('http://fast.dpdk.org/fonts/opensans-regular.ttf') format('truetype'),
+ url('http://fast.dpdk.org/fonts/opensans-regular.svg#open_sansregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'opensans';
- src: url('/fonts/opensans-semibold.eot');
- src: url('/fonts/opensans-semibold.eot?#iefix') format('embedded-opentype'),
- url('/fonts/opensans-semibold.woff') format('woff'),
- url('/fonts/opensans-semibold.ttf') format('truetype'),
- url('/fonts/opensans-semibold.svg#open_sanssemibold') format('svg');
+ src: url('http://fast.dpdk.org/fonts/opensans-semibold.eot');
+ src: url('http://fast.dpdk.org/fonts/opensans-semibold.eot?#iefix') format('embedded-opentype'),
+ url('http://fast.dpdk.org/fonts/opensans-semibold.woff') format('woff'),
+ url('http://fast.dpdk.org/fonts/opensans-semibold.ttf') format('truetype'),
+ url('http://fast.dpdk.org/fonts/opensans-semibold.svg#open_sanssemibold') format('svg');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'opensans';
- src: url('/fonts/opensans-italic.eot');
- src: url('/fonts/opensans-italic.eot?#iefix') format('embedded-opentype'),
- url('/fonts/opensans-italic.woff') format('woff'),
- url('/fonts/opensans-italic.ttf') format('truetype'),
- url('/fonts/opensans-italic.svg#open_sansitalic') format('svg');
+ src: url('http://fast.dpdk.org/fonts/opensans-italic.eot');
+ src: url('http://fast.dpdk.org/fonts/opensans-italic.eot?#iefix') format('embedded-opentype'),
+ url('http://fast.dpdk.org/fonts/opensans-italic.woff') format('woff'),
+ url('http://fast.dpdk.org/fonts/opensans-italic.ttf') format('truetype'),
+ url('http://fast.dpdk.org/fonts/opensans-italic.svg#open_sansitalic') format('svg');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'exo2';
- src: url('/fonts/exo2-regular.eot');
- src: url('/fonts/exo2-regular.eot?#iefix') format('embedded-opentype'),
- url('/fonts/exo2-regular.woff') format('woff'),
- url('/fonts/exo2-regular.ttf') format('truetype'),
- url('/fonts/exo2-regular.svg#exo_2.0regular') format('svg');
+ src: url('http://fast.dpdk.org/fonts/exo2-regular.eot');
+ src: url('http://fast.dpdk.org/fonts/exo2-regular.eot?#iefix') format('embedded-opentype'),
+ url('http://fast.dpdk.org/fonts/exo2-regular.woff') format('woff'),
+ url('http://fast.dpdk.org/fonts/exo2-regular.ttf') format('truetype'),
+ url('http://fast.dpdk.org/fonts/exo2-regular.svg#exo_2.0regular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'exo2';
- src: url('/fonts/exo2-bold.eot');
- src: url('/fonts/exo2-bold.eot?#iefix') format('embedded-opentype'),
- url('/fonts/exo2-bold.woff') format('woff'),
- url('/fonts/exo2-bold.ttf') format('truetype'),
- url('/fonts/exo2-bold.svg#exo_2.0bold') format('svg');
+ src: url('http://fast.dpdk.org/fonts/exo2-bold.eot');
+ src: url('http://fast.dpdk.org/fonts/exo2-bold.eot?#iefix') format('embedded-opentype'),
+ url('http://fast.dpdk.org/fonts/exo2-bold.woff') format('woff'),
+ url('http://fast.dpdk.org/fonts/exo2-bold.ttf') format('truetype'),
+ url('http://fast.dpdk.org/fonts/exo2-bold.svg#exo_2.0bold') format('svg');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'exo2';
- src: url('/fonts/exo2-blackitalic.eot');
- src: url('/fonts/exo2-blackitalic.eot?#iefix') format('embedded-opentype'),
- url('/fonts/exo2-blackitalic.woff') format('woff'),
- url('/fonts/exo2-blackitalic.ttf') format('truetype'),
- url('/fonts/exo2-blackitalic.svg#exo_2.0black_italic') format('svg');
+ src: url('http://fast.dpdk.org/fonts/exo2-blackitalic.eot');
+ src: url('http://fast.dpdk.org/fonts/exo2-blackitalic.eot?#iefix') format('embedded-opentype'),
+ url('http://fast.dpdk.org/fonts/exo2-blackitalic.woff') format('woff'),
+ url('http://fast.dpdk.org/fonts/exo2-blackitalic.ttf') format('truetype'),
+ url('http://fast.dpdk.org/fonts/exo2-blackitalic.svg#exo_2.0black_italic') format('svg');
font-weight: bold;
font-style: italic;
}
--
2.7.0
next reply other threads:[~2016-05-26 10:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 10:40 Thomas Monjalon [this message]
2016-05-26 12:35 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464259248-17946-1-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=web@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).