d-rustdoc-disable-embedded-fonts
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Thu, 14 Jul 2022 11:17:39 +0000 (13:17 +0200)
committerFabian Gruenbichler <debian@fabian.gruenbichler.email>
Sat, 14 Jan 2023 08:38:46 +0000 (08:38 +0000)
===================================================================

Gbp-Pq: Name d-rustdoc-disable-embedded-fonts.patch

src/librustdoc/html/render/write_shared.rs
src/librustdoc/html/static/css/rustdoc.css
src/librustdoc/html/static_files.rs

index 27ad91d09e0643c0daedbafaf625c9e5ce00126d..76382e9bb3a154d4e57302254cca94541ee6f5c2 100644 (file)
@@ -33,8 +33,6 @@ static FILES_UNVERSIONED: Lazy<FxHashMap<&str, &[u8]>> = Lazy::new(|| {
         "SourceCodePro-Semibold.ttf.woff2" => static_files::source_code_pro::SEMIBOLD,
         "SourceCodePro-It.ttf.woff2" => static_files::source_code_pro::ITALIC,
         "SourceCodePro-LICENSE.txt" => static_files::source_code_pro::LICENSE,
-        "NanumBarunGothic.ttf.woff2" => static_files::nanum_barun_gothic::REGULAR,
-        "NanumBarunGothic-LICENSE.txt" => static_files::nanum_barun_gothic::LICENSE,
         "LICENSE-MIT.txt" => static_files::LICENSE_MIT,
         "LICENSE-APACHE.txt" => static_files::LICENSE_APACHE,
         "COPYRIGHT.txt" => static_files::COPYRIGHT,
index b4b7790eebba1fa87431a8ec2f1fdd1451494998..19ae662a406034c8340e711745436e1cacce04ce 100644 (file)
        font-display: swap;
 }
 
-/* Avoid using legacy CJK serif fonts in Windows like Batang. */
-@font-face {
-       font-family: 'NanumBarunGothic';
-       src: url("NanumBarunGothic.ttf.woff2") format("woff2");
-       font-display: swap;
-       unicode-range: U+AC00-D7AF, U+1100-11FF, U+3130-318F, U+A960-A97F, U+D7B0-D7FF;
-}
-
 * {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
index 75f2b7e3570d5627e4b2d47d6b01a569b4081d5e..d763034b0910589e5e6c808c5009a25e967c323b 100644 (file)
@@ -138,29 +138,6 @@ pub(crate) mod source_code_pro {
     pub(crate) static LICENSE: &[u8] = include_bytes!("static/fonts/SourceCodePro-LICENSE.txt");
 }
 
-/// Files related to the Nanum Barun Gothic font.
-///
-/// These files are used to avoid some legacy CJK serif fonts in Windows.
-///
-/// Note that the Noto Sans KR font, which was used previously but was not very readable on Windows,
-/// has been replaced by the Nanum Barun Gothic font. This is due to Windows' implementation of font
-/// rendering that distorts OpenType fonts too much.
-///
-/// The font files were generated with these commands:
-///
-/// ```sh
-/// pyftsubset NanumBarunGothic.ttf \
-/// --unicodes=U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF \
-/// --output-file=NanumBarunGothic.ttf.woff2 --flavor=woff2
-/// ```
-pub(crate) mod nanum_barun_gothic {
-    /// The file `NanumBarunGothic.ttf.woff2`, the Regular variant of the Nanum Barun Gothic font.
-    pub(crate) static REGULAR: &[u8] = include_bytes!("static/fonts/NanumBarunGothic.ttf.woff2");
-
-    /// The file `NanumBarunGothic-LICENSE.txt`, the license text of the Nanum Barun Gothic font.
-    pub(crate) static LICENSE: &[u8] = include_bytes!("static/fonts/NanumBarunGothic-LICENSE.txt");
-}
-
 /// Files related to the sidebar in rustdoc sources.
 pub(crate) mod sidebar {
     /// File script to handle sidebar.