From 7d21972579011cf97d9d439699efae6244219835 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Mon, 29 Mar 2021 21:49:58 +0800 Subject: Wrap non-pre code blocks Fix #83550 regression --- src/librustdoc/html/static/rustdoc.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/librustdoc/html/static/rustdoc.css') diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 6c90fd7c9ee..f5a034a0d24 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -424,7 +424,9 @@ nav.sub { text-overflow: ellipsis; margin: 0; } -.docblock-short code { +/* Wrap non-pre code blocks (`text`) but not (```text```). */ +.docblock > :not(pre) > code, +.docblock-short > :not(pre) > code { white-space: pre-wrap; } -- cgit 1.4.1-3-g733a5 From 828179d687e0e6d75a1816c45bc866445d057e04 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 31 Mar 2021 22:13:47 +0200 Subject: Add a button to copy the "use statement" --- src/librustdoc/html/markdown.rs | 1 + src/librustdoc/html/render/print_item.rs | 1 + src/librustdoc/html/static/main.js | 25 +++++++++++++++++++++++++ src/librustdoc/html/static/noscript.css | 5 +++++ src/librustdoc/html/static/rustdoc.css | 23 ++++++++++++++++------- src/librustdoc/html/static/themes/ayu.css | 5 +++-- src/librustdoc/html/static/themes/dark.css | 5 +++-- src/librustdoc/html/static/themes/light.css | 5 +++-- 8 files changed, 57 insertions(+), 13 deletions(-) (limited to 'src/librustdoc/html/static/rustdoc.css') diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index b39f9f87892..eecdf6fe0ce 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -1354,6 +1354,7 @@ fn init_id_map() -> FxHashMap { map.insert("default-settings".to_owned(), 1); map.insert("rustdoc-vars".to_owned(), 1); map.insert("sidebar-vars".to_owned(), 1); + map.insert("copy-path".to_owned(), 1); // This is the list of IDs used by rustdoc sections. map.insert("fields".to_owned(), 1); map.insert("variants".to_owned(), 1); diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index cc93e55fc67..25314f87eb5 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -73,6 +73,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer) } } write!(buf, "{}", item.type_(), item.name.as_ref().unwrap()); + write!(buf, ""); buf.write_str(""); // in-band buf.write_str(""); diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index da2952bbebd..f2e62ee7b6b 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -3061,3 +3061,28 @@ function hideThemeButtonState() { window.onhashchange = onHashChange; setupSearchLoader(); }()); + +function copy_path(but) { + var parent = but.parentElement; + var path = []; + + onEach(parent.childNodes, function(child) { + if (child.tagName === 'A') { + path.push(child.textContent); + } + }); + + var el = document.createElement('textarea'); + el.value = 'use ' + path.join('::') + ';'; + el.setAttribute('readonly', ''); + // To not make it appear on the screen. + el.style.position = 'absolute'; + el.style.left = '-9999px'; + + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); + + but.textContent = '✓'; +} diff --git a/src/librustdoc/html/static/noscript.css b/src/librustdoc/html/static/noscript.css index c9fed989ec0..4d3332877c0 100644 --- a/src/librustdoc/html/static/noscript.css +++ b/src/librustdoc/html/static/noscript.css @@ -33,3 +33,8 @@ rules. /* Since there is no toggle (the "[-]") when JS is disabled, no need for this margin either. */ margin-left: 0 !important; } + +#copy-path { + /* It requires JS to work so no need to display it in this case. */ + display: none; +} diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 6c90fd7c9ee..6b2edf60f15 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -1316,20 +1316,29 @@ h4 > .notable-traits { outline: none; } +#theme-picker, #settings-menu, .help-button, #copy-path { + padding: 4px; + width: 27px; + height: 29px; + border: 1px solid; + border-radius: 3px; + cursor: pointer; +} + .help-button { right: 30px; font-family: "Fira Sans", Arial, sans-serif; text-align: center; font-size: 17px; + padding-top: 2px; } -#theme-picker, #settings-menu, .help-button { - padding: 4px; - width: 27px; - height: 29px; - border: 1px solid; - border-radius: 3px; - cursor: pointer; +#copy-path { + height: 30px; + font-size: 18px; + margin-left: 10px; + padding: 0 6px; + width: 28px; } #theme-choices { diff --git a/src/librustdoc/html/static/themes/ayu.css b/src/librustdoc/html/static/themes/ayu.css index 7374aee71f8..b24f4035ca8 100644 --- a/src/librustdoc/html/static/themes/ayu.css +++ b/src/librustdoc/html/static/themes/ayu.css @@ -498,7 +498,7 @@ kbd { box-shadow-color: #c6cbd1; } -#theme-picker, #settings-menu, .help-button { +#theme-picker, #settings-menu, .help-button, #copy-path { border-color: #5c6773; background-color: #0f1419; color: #fff; @@ -510,7 +510,8 @@ kbd { #theme-picker:hover, #theme-picker:focus, #settings-menu:hover, #settings-menu:focus, -.help-button:hover, .help-button:focus { +.help-button:hover, .help-button:focus, +#copy-path:hover, #copy-path:focus { border-color: #e0e0e0; } diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css index cf2d28bb43f..e863ed03f51 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -388,7 +388,7 @@ kbd { box-shadow-color: #c6cbd1; } -#theme-picker, #settings-menu, .help-button { +#theme-picker, #settings-menu, .help-button, #copy-path { border-color: #e0e0e0; background: #f0f0f0; color: #000; @@ -396,7 +396,8 @@ kbd { #theme-picker:hover, #theme-picker:focus, #settings-menu:hover, #settings-menu:focus, -.help-button:hover, .help-button:focus { +.help-button:hover, .help-button:focus, +#copy-path:hover, #copy-path:focus { border-color: #ffb900; } diff --git a/src/librustdoc/html/static/themes/light.css b/src/librustdoc/html/static/themes/light.css index 7bf6793809c..9335dd96d29 100644 --- a/src/librustdoc/html/static/themes/light.css +++ b/src/librustdoc/html/static/themes/light.css @@ -380,14 +380,15 @@ kbd { box-shadow-color: #c6cbd1; } -#theme-picker, #settings-menu, .help-button { +#theme-picker, #settings-menu, .help-button, #copy-path { border-color: #e0e0e0; background-color: #fff; } #theme-picker:hover, #theme-picker:focus, #settings-menu:hover, #settings-menu:focus, -.help-button:hover, .help-button:focus { +.help-button:hover, .help-button:focus, +#copy-path:hover, #copy-path:focus { border-color: #717171; } -- cgit 1.4.1-3-g733a5 From 1fe0fe47fcd88c67887b45293351a653b548e86a Mon Sep 17 00:00:00 2001 From: Camelid Date: Thu, 1 Apr 2021 13:31:55 -0700 Subject: rustdoc: Remove unused `spotlight` CSS I couldn't find any uses of this CSS. I think it was superseded by the `.notable-traits` CSS class and other similarly-named CSS classes. --- src/librustdoc/html/static/rustdoc.css | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/librustdoc/html/static/rustdoc.css') diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index 07dfb7f5cf0..f3ddd8ec6fa 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -173,13 +173,10 @@ code, pre, a.test-arrow { border-radius: 3px; padding: 0 0.1em; } -.docblock pre code, .docblock-short pre code, .docblock code.spotlight { +.docblock pre code, .docblock-short pre code { padding: 0; padding-right: 1ex; } -.docblock code.spotlight :last-child { - padding-bottom: 0.6em; -} pre { padding: 14px; } -- cgit 1.4.1-3-g733a5 From 29fed9aa4e8e3124bde9debcd139431594a7b26c Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Mon, 29 Mar 2021 18:33:22 +0200 Subject: Update Source Serif to release 4.004 Now the family name is Source Serif 4 (upstream issue 77) instead of Source Serif Pro. --- src/librustdoc/html/render/write_shared.rs | 8 +- src/librustdoc/html/static/COPYRIGHT.txt | 12 +-- .../html/static/SourceSerif4-Bold.ttf.woff | Bin 0 -> 110552 bytes .../html/static/SourceSerif4-It.ttf.woff | Bin 0 -> 78108 bytes src/librustdoc/html/static/SourceSerif4-LICENSE.md | 93 +++++++++++++++++++++ .../html/static/SourceSerif4-Regular.ttf.woff | Bin 0 -> 103604 bytes .../html/static/SourceSerifPro-Bold.ttf.woff | Bin 93248 -> 0 bytes .../html/static/SourceSerifPro-It.ttf.woff | Bin 36200 -> 0 bytes .../html/static/SourceSerifPro-LICENSE.md | 93 --------------------- .../html/static/SourceSerifPro-Regular.ttf.woff | Bin 88596 -> 0 bytes src/librustdoc/html/static/rustdoc.css | 16 ++-- src/librustdoc/html/static_files.rs | 21 +++-- .../print-unversioned-files/unversioned-files.txt | 8 +- 13 files changed, 125 insertions(+), 126 deletions(-) create mode 100644 src/librustdoc/html/static/SourceSerif4-Bold.ttf.woff create mode 100644 src/librustdoc/html/static/SourceSerif4-It.ttf.woff create mode 100644 src/librustdoc/html/static/SourceSerif4-LICENSE.md create mode 100644 src/librustdoc/html/static/SourceSerif4-Regular.ttf.woff delete mode 100644 src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff delete mode 100644 src/librustdoc/html/static/SourceSerifPro-It.ttf.woff delete mode 100644 src/librustdoc/html/static/SourceSerifPro-LICENSE.md delete mode 100644 src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff (limited to 'src/librustdoc/html/static/rustdoc.css') diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 59dc4ef9449..8fb6d68f3c6 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -26,10 +26,10 @@ crate static FILES_UNVERSIONED: Lazy> = Lazy::new(|| { "FiraSans-Regular.woff" => static_files::fira_sans::REGULAR, "FiraSans-Medium.woff" => static_files::fira_sans::MEDIUM, "FiraSans-LICENSE.txt" => static_files::fira_sans::LICENSE, - "SourceSerifPro-Regular.ttf.woff" => static_files::source_serif_pro::REGULAR, - "SourceSerifPro-Bold.ttf.woff" => static_files::source_serif_pro::BOLD, - "SourceSerifPro-It.ttf.woff" => static_files::source_serif_pro::ITALIC, - "SourceSerifPro-LICENSE.md" => static_files::source_serif_pro::LICENSE, + "SourceSerif4-Regular.ttf.woff" => static_files::source_serif_4::REGULAR, + "SourceSerif4-Bold.ttf.woff" => static_files::source_serif_4::BOLD, + "SourceSerif4-It.ttf.woff" => static_files::source_serif_4::ITALIC, + "SourceSerif4-LICENSE.md" => static_files::source_serif_4::LICENSE, "SourceCodePro-Regular.ttf.woff" => static_files::source_code_pro::REGULAR, "SourceCodePro-Semibold.ttf.woff" => static_files::source_code_pro::SEMIBOLD, "SourceCodePro-It.ttf.woff" => static_files::source_code_pro::ITALIC, diff --git a/src/librustdoc/html/static/COPYRIGHT.txt b/src/librustdoc/html/static/COPYRIGHT.txt index 24bdca6544d..16d79032fcc 100644 --- a/src/librustdoc/html/static/COPYRIGHT.txt +++ b/src/librustdoc/html/static/COPYRIGHT.txt @@ -33,14 +33,14 @@ included, and carry their own copyright notices and license terms: Licensed under the SIL Open Font License, Version 1.1. See SourceCodePro-LICENSE.txt. -* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, - SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): +* Source Serif 4 (SourceSerif4-Regular.ttf.woff, SourceSerif4-Bold.ttf.woff, + SourceSerif4-It.ttf.woff): - Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with - Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of - Adobe Systems Incorporated in the United States and/or other countries. + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. Licensed under the SIL Open Font License, Version 1.1. - See SourceSerifPro-LICENSE.txt. + See SourceSerif4-LICENSE.md. This copyright file is intended to be distributed with rustdoc output. diff --git a/src/librustdoc/html/static/SourceSerif4-Bold.ttf.woff b/src/librustdoc/html/static/SourceSerif4-Bold.ttf.woff new file mode 100644 index 00000000000..8ad41888e6e Binary files /dev/null and b/src/librustdoc/html/static/SourceSerif4-Bold.ttf.woff differ diff --git a/src/librustdoc/html/static/SourceSerif4-It.ttf.woff b/src/librustdoc/html/static/SourceSerif4-It.ttf.woff new file mode 100644 index 00000000000..2a34b5c42a8 Binary files /dev/null and b/src/librustdoc/html/static/SourceSerif4-It.ttf.woff differ diff --git a/src/librustdoc/html/static/SourceSerif4-LICENSE.md b/src/librustdoc/html/static/SourceSerif4-LICENSE.md new file mode 100644 index 00000000000..68ea1892406 --- /dev/null +++ b/src/librustdoc/html/static/SourceSerif4-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +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. diff --git a/src/librustdoc/html/static/SourceSerif4-Regular.ttf.woff b/src/librustdoc/html/static/SourceSerif4-Regular.ttf.woff new file mode 100644 index 00000000000..45a5521ab0c Binary files /dev/null and b/src/librustdoc/html/static/SourceSerif4-Regular.ttf.woff differ diff --git a/src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff b/src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff deleted file mode 100644 index ca254318fe9..00000000000 Binary files a/src/librustdoc/html/static/SourceSerifPro-Bold.ttf.woff and /dev/null differ diff --git a/src/librustdoc/html/static/SourceSerifPro-It.ttf.woff b/src/librustdoc/html/static/SourceSerifPro-It.ttf.woff deleted file mode 100644 index a287bbe6ed3..00000000000 Binary files a/src/librustdoc/html/static/SourceSerifPro-It.ttf.woff and /dev/null differ diff --git a/src/librustdoc/html/static/SourceSerifPro-LICENSE.md b/src/librustdoc/html/static/SourceSerifPro-LICENSE.md deleted file mode 100644 index 22cb755f2f1..00000000000 --- a/src/librustdoc/html/static/SourceSerifPro-LICENSE.md +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. - -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. diff --git a/src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff b/src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff deleted file mode 100644 index a3d55cfdf25..00000000000 Binary files a/src/librustdoc/html/static/SourceSerifPro-Regular.ttf.woff and /dev/null differ diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css index f3ddd8ec6fa..585b7459bd7 100644 --- a/src/librustdoc/html/static/rustdoc.css +++ b/src/librustdoc/html/static/rustdoc.css @@ -18,26 +18,26 @@ font-display: swap; } -/* See SourceSerifPro-LICENSE.txt for the Source Serif Pro license. */ +/* See SourceSerif4-LICENSE.md for the Source Serif 4 license. */ @font-face { - font-family: 'Source Serif Pro'; + font-family: 'Source Serif 4'; font-style: normal; font-weight: 400; - src: local('Source Serif Pro'), url("SourceSerifPro-Regular.ttf.woff") format('woff'); + src: local('Source Serif 4'), url("SourceSerif4-Regular.ttf.woff") format('woff'); font-display: swap; } @font-face { - font-family: 'Source Serif Pro'; + font-family: 'Source Serif 4'; font-style: italic; font-weight: 400; - src: local('Source Serif Pro Italic'), url("SourceSerifPro-It.ttf.woff") format('woff'); + src: local('Source Serif 4 Italic'), url("SourceSerif4-It.ttf.woff") format('woff'); font-display: swap; } @font-face { - font-family: 'Source Serif Pro'; + font-family: 'Source Serif 4'; font-style: normal; font-weight: 700; - src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.ttf.woff") format('woff'); + src: local('Source Serif 4 Bold'), url("SourceSerif4-Bold.ttf.woff") format('woff'); font-display: swap; } @@ -90,7 +90,7 @@ html { /* General structure and fonts */ body { - font: 16px/1.4 "Source Serif Pro", serif; + font: 16px/1.4 "Source Serif 4", serif; margin: 0; position: relative; padding: 10px 15px 20px 15px; diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs index 83d4a11e620..b3ac865d55e 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -89,20 +89,19 @@ crate mod fira_sans { crate static LICENSE: &[u8] = include_bytes!("static/FiraSans-LICENSE.txt"); } -/// Files related to the Source Serif Pro font. -crate mod source_serif_pro { - /// The file `SourceSerifPro-Regular.ttf.woff`, the Regular variant of the Source Serif Pro - /// font. - crate static REGULAR: &[u8] = include_bytes!("static/SourceSerifPro-Regular.ttf.woff"); +/// Files related to the Source Serif 4 font. +crate mod source_serif_4 { + /// The file `SourceSerif4-Regular.ttf.woff`, the Regular variant of the Source Serif 4 font. + crate static REGULAR: &[u8] = include_bytes!("static/SourceSerif4-Regular.ttf.woff"); - /// The file `SourceSerifPro-Bold.ttf.woff`, the Bold variant of the Source Serif Pro font. - crate static BOLD: &[u8] = include_bytes!("static/SourceSerifPro-Bold.ttf.woff"); + /// The file `SourceSerif4-Bold.ttf.woff`, the Bold variant of the Source Serif 4 font. + crate static BOLD: &[u8] = include_bytes!("static/SourceSerif4-Bold.ttf.woff"); - /// The file `SourceSerifPro-It.ttf.woff`, the Italic variant of the Source Serif Pro font. - crate static ITALIC: &[u8] = include_bytes!("static/SourceSerifPro-It.ttf.woff"); + /// The file `SourceSerif4-It.ttf.woff`, the Italic variant of the Source Serif 4 font. + crate static ITALIC: &[u8] = include_bytes!("static/SourceSerif4-It.ttf.woff"); - /// The file `SourceSerifPro-LICENSE.txt`, the license text for the Source Serif Pro font. - crate static LICENSE: &[u8] = include_bytes!("static/SourceSerifPro-LICENSE.md"); + /// The file `SourceSerif4-LICENSE.txt`, the license text for the Source Serif 4 font. + crate static LICENSE: &[u8] = include_bytes!("static/SourceSerif4-LICENSE.md"); } /// Files related to the Source Code Pro font. diff --git a/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt b/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt index befbdab0ad9..4b20cd5d745 100644 --- a/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt +++ b/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt @@ -10,7 +10,7 @@ SourceCodePro-It.ttf.woff SourceCodePro-LICENSE.txt SourceCodePro-Regular.ttf.woff SourceCodePro-Semibold.ttf.woff -SourceSerifPro-Bold.ttf.woff -SourceSerifPro-It.ttf.woff -SourceSerifPro-LICENSE.md -SourceSerifPro-Regular.ttf.woff +SourceSerif4-Bold.ttf.woff +SourceSerif4-It.ttf.woff +SourceSerif4-LICENSE.md +SourceSerif4-Regular.ttf.woff -- cgit 1.4.1-3-g733a5