chiark / gitweb /
Extract @font-face rules into their own CSS file.
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 22 Apr 2018 18:59:24 +0000 (19:59 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 22 Apr 2018 18:59:24 +0000 (19:59 +0100)
This seems sensible, since the @font-face rules should be grneric to all
uses of Bedstead in CSS.

bedstead-faces.css [new file with mode: 0644]
bedstead.css

diff --git a/bedstead-faces.css b/bedstead-faces.css
new file mode 100644 (file)
index 0000000..f73170f
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * This file defines @font-face rules to make the various standard
+ * Bedstead fonts available in CSS.
+ */
+
+@font-face {
+    font-family: Bedstead;
+    font-stretch: expanded;
+    src: url(bedstead-extended.otf) format("opentype");
+}
+
+@font-face {
+    font-family: Bedstead;
+    font-stretch: normal;
+    src: url(bedstead.otf) format("opentype");
+}
+
+@font-face {
+    font-family: Bedstead;
+    font-stretch: semi-condensed;
+    src: url(bedstead-semicondensed.otf) format("opentype");
+}
+
+@font-face {
+    font-family: Bedstead;
+    font-stretch: condensed;
+    src: url(bedstead-condensed.otf) format("opentype");
+}
+
+@font-face {
+    font-family: Bedstead;
+    font-stretch: extra-condensed;
+    src: url(bedstead-extracondensed.otf) format("opentype");
+}
+
+@font-face {
+    font-family: Bedstead;
+    font-stretch: ultra-condensed;
+    src: url(bedstead-ultracondensed.otf) format("opentype");
+}
index 194fe53919914f3070bdfcc1415cbdfba1f9cd75..6f46de23c170d8c3c22337aabc271c8c902f44e0 100644 (file)
@@ -1,3 +1,8 @@
+/* This is the stylesheet for the Bedstead Web pages. */
+
+/* Make Bedstead usable through font-* properties. */
+@import url(bedstead-faces.css);
+
 /* Use Bedstead with proportional spacing for everything. */
 body {
     font-family: Bedstead;
@@ -28,39 +33,3 @@ h1, h2 {
 ul {
     list-style-type: "\2022  ";
 }
-
-@font-face {
-    font-family: Bedstead;
-    font-stretch: expanded;
-    src: url(bedstead-extended.otf) format("opentype");
-}
-
-@font-face {
-    font-family: Bedstead;
-    font-stretch: normal;
-    src: url(bedstead.otf) format("opentype");
-}
-
-@font-face {
-    font-family: Bedstead;
-    font-stretch: semi-condensed;
-    src: url(bedstead-semicondensed.otf) format("opentype");
-}
-
-@font-face {
-    font-family: Bedstead;
-    font-stretch: condensed;
-    src: url(bedstead-condensed.otf) format("opentype");
-}
-
-@font-face {
-    font-family: Bedstead;
-    font-stretch: extra-condensed;
-    src: url(bedstead-extracondensed.otf) format("opentype");
-}
-
-@font-face {
-    font-family: Bedstead;
-    font-stretch: ultra-condensed;
-    src: url(bedstead-ultracondensed.otf) format("opentype");
-}