Skip to content

Commit

Permalink
jquery: switch font to self-hosted Cairo
Browse files Browse the repository at this point in the history
Fixes gh-446
  • Loading branch information
timmywil committed Dec 20, 2023
1 parent b9584b7 commit 69347bb
Show file tree
Hide file tree
Showing 16 changed files with 136 additions and 305 deletions.
60 changes: 42 additions & 18 deletions themes/jquery/css/base.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*! Copyright jQuery Foundation and other contributors
* Includes:
* - normalize.css v1.0.1 | MIT License | git.io/normalize
* - Font Awesome - http://fortawesome.github.com/Font-Awesome - CC BY 3.0
* - Font Awesome - https://fortawesome.github.com/Font-Awesome - CC BY 3.0
*/

/* ==========================================================================
Expand Down Expand Up @@ -111,12 +111,16 @@ body {
padding: 0.2em 0;
}

/* ==========================================================================
FontAwesome (https://fortawesome.github.com/Font-Awesome)
.ttf and .woff files were included in the FontAwesome download.
.woff2 file created with https://github.com/nfroidure/ttf2woff2
========================================================================== */

@font-face {
font-family: 'FontAwesome';
src: url('fonts/fontawesome-webfont.eot?v=3.0.2');
src: url('fonts/fontawesome-webfont.eot?#iefix&v=3.0.2') format('embedded-opentype'),
url('fonts/fontawesome-webfont.woff?v=3.0.2') format('woff'),
url('fonts/fontawesome-webfont.ttf?v=3.0.2') format('truetype');
font-family: "FontAwesome";
src: url("fonts/FontAwesome/fontawesome-webfont.woff2") format("woff2"),
url("fonts/FontAwesome/fontawesome-webfont.woff") format("woff");
font-weight: normal;
font-style: normal;
}
Expand Down Expand Up @@ -184,7 +188,7 @@ h6 {

h1, h2, h3, h4, h5, h6 {
font-weight: 700;
font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif !important;
font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif !important;
}
/*
* Addresses styling not present in IE 7/8/9, Safari 5, and Chrome.
Expand Down Expand Up @@ -676,14 +680,35 @@ table {
}

#content th {
font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
}

#content th,
#content td {
padding: .5em;
}

/* ==========================================================================
Cairo Font (https://github.com/Gue3bara/Cairo)
.ttf files downloaded from Google Fonts, but only used for conversion.
.woff files created with https://github.com/odemiral/woff2sfnt-sfnt2woff
.woff2 files created with https://github.com/nfroidure/ttf2woff2
========================================================================== */

@font-face {
font-family: Cairo;
src: url("fonts/Cairo/Cairo-Regular.woff2") format("woff2"),
url("fonts/Cairo/Cairo-Regular.woff") format("woff");
font-weight: normal;
}

@font-face {
font-family: Cairo;
src: url("fonts/Cairo/Cairo-Bold.woff2") format("woff2"),
url("fonts/Cairo/Cairo-Bold.woff") format("woff");
font-weight: 700;
}

/* ==========================================================================
Font Awesome
========================================================================== */
Expand Down Expand Up @@ -1624,14 +1649,14 @@ nav#main ul {

nav#main li {
float: left;
font: normal normal 16px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font: normal 700 16px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
margin-right: 2px;
}

nav#main li a {
color: #fff;
text-decoration: none;
padding: 6px 10px;
padding: 2px 10px;
display: block;
border: 1px solid transparent;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.76);
Expand Down Expand Up @@ -1824,7 +1849,7 @@ pre b {
height: 19px;
width: 19px;
padding-top: 0;
font: bold 11px/19px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font: bold 11px/19px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
border-radius: 12px;
}

Expand Down Expand Up @@ -1907,7 +1932,7 @@ pre b {

#content figcaption {
box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.20);
font: italic 700 12px/20px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font: italic 700 12px/20px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
padding: 10px 5px;
color: #737272;
clear: both;
Expand Down Expand Up @@ -1979,7 +2004,7 @@ pre b {

p.author {
color: #ababab;
font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-weight: 700;
margin-top: -20px;
}
Expand All @@ -1993,7 +2018,7 @@ p.author a {
padding-bottom: .5%;
margin-bottom: 20px;
font-weight: 700;
font-family: "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-family: Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
color: #666;
background: url(../images-foundation/gauze.png) #f0f0f0;
text-shadow: 0 1px 0 #ffffff;
Expand All @@ -2016,15 +2041,15 @@ p.author a {
}

#banner-large-image h1, #banner-large-image h2 {
font: bold 60px/60px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font: bold 60px/60px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
margin-bottom: 0;
color: #fff;
text-shadow: 0 0 4px rgba(0, 0, 0, 0.85);
}

#banner-large-image p {
color: #cccccc;
font: 700 normal 24px/36px "klavika-web", "Helvetica Neue", sans-serif;
font: 700 normal 24px/36px Cairo, "Helvetica Neue", sans-serif;
}

#banner-secondary {
Expand Down Expand Up @@ -2121,7 +2146,7 @@ input[type="submit"] {
color: #fff !important;
text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.35);
padding: 8px 15px;
font: bold 16px/16px "klavika-web", "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font: bold 16px/16px Cairo, "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
transition: all 0.2s;
background-color: #d18f4f;
float: left;
Expand Down Expand Up @@ -2508,7 +2533,6 @@ footer .books li a cite {
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
letter-spacing: 0;
border-radius: 5px 5px 0 0;
font-weight: normal;
margin-bottom: 0;
overflow: hidden;
}
Expand Down
Binary file added themes/jquery/css/fonts/Cairo/Cairo-Bold.ttf
Binary file not shown.
Binary file added themes/jquery/css/fonts/Cairo/Cairo-Bold.woff
Binary file not shown.
Binary file added themes/jquery/css/fonts/Cairo/Cairo-Bold.woff2
Binary file not shown.
Binary file added themes/jquery/css/fonts/Cairo/Cairo-Regular.ttf
Binary file not shown.
Binary file added themes/jquery/css/fonts/Cairo/Cairo-Regular.woff
Binary file not shown.
Binary file added themes/jquery/css/fonts/Cairo/Cairo-Regular.woff2
Binary file not shown.
93 changes: 93 additions & 0 deletions themes/jquery/css/fonts/Cairo/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2009 The Cairo Project Authors (https://github.com/Gue3bara/Cairo)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file removed themes/jquery/css/fonts/FontAwesome.otf
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file removed themes/jquery/css/fonts/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit 69347bb

Please sign in to comment.