From: Debian Rust Maintainers Date: Thu, 4 Aug 2022 07:40:53 +0000 (+0100) Subject: d-rustdoc-disable-embedded-fonts X-Git-Tag: archive/raspbian/1.59.0+dfsg1-1_deb11u3+rpi1~1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d39771bae992551f4f111243b36a1f190617f665;p=rustc-mozilla.git d-rustdoc-disable-embedded-fonts Gbp-Pq: Name d-rustdoc-disable-embedded-fonts.patch --- diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 563f4ae73..bbdcecb7c 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -40,9 +40,6 @@ static FILES_UNVERSIONED: Lazy> = Lazy::new(|| { "SourceCodePro-Semibold.ttf.woff" => static_files::source_code_pro::SEMIBOLD, "SourceCodePro-It.ttf.woff" => static_files::source_code_pro::ITALIC, "SourceCodePro-LICENSE.txt" => static_files::source_code_pro::LICENSE, - "NanumBarunGothic.ttf.woff2" => static_files::nanum_barun_gothic::REGULAR2, - "NanumBarunGothic.ttf.woff" => 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, diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 83df3ac94..99b3a736c 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -75,14 +75,6 @@ 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"), - url("NanumBarunGothic.ttf.woff") format("woff"); - 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; diff --git a/src/librustdoc/html/static_files.rs b/src/librustdoc/html/static_files.rs index 56c5399d0..40972c4f9 100644 --- a/src/librustdoc/html/static_files.rs +++ b/src/librustdoc/html/static_files.rs @@ -160,37 +160,6 @@ crate mod source_code_pro { 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.woff --flavor=woff -/// ``` -/// ```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 -/// ``` -crate mod nanum_barun_gothic { - /// The file `NanumBarunGothic.ttf.woff`, the Regular variant of the Nanum Barun Gothic font. - crate static REGULAR: &[u8] = include_bytes!("static/fonts/NanumBarunGothic.ttf.woff"); - - /// The file `NanumBarunGothic.ttf.woff2`, the Regular variant of the Nanum Barun Gothic font. - crate static REGULAR2: &[u8] = include_bytes!("static/fonts/NanumBarunGothic.ttf.woff2"); - - /// The file `NanumBarunGothic-LICENSE.txt`, the license text of the Nanum Barun Gothic font. - crate static LICENSE: &[u8] = include_bytes!("static/fonts/NanumBarunGothic-LICENSE.txt"); -} - /// Files related to the sidebar in rustdoc sources. crate mod sidebar { /// File script to handle sidebar.