From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 08 10:38:40 2023 Received: (at submit) by debbugs.gnu.org; 8 Mar 2023 15:38:40 +0000 Received: from localhost ([127.0.0.1]:49977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZvsG-0007qq-7g for submit@debbugs.gnu.org; Wed, 08 Mar 2023 10:38:40 -0500 Received: from lists.gnu.org ([209.51.188.17]:53228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZt55-0002TY-DY for submit@debbugs.gnu.org; Wed, 08 Mar 2023 07:39:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZt53-0006Vi-Oo for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2023 07:39:41 -0500 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZt51-0003pi-EN for bug-gnu-emacs@gnu.org; Wed, 08 Mar 2023 07:39:41 -0500 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-536b7ffdd34so302121157b3.6 for ; Wed, 08 Mar 2023 04:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zonu-me.20210112.gappssmtp.com; s=20210112; t=1678279177; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=tuweGAp9n+2hs8QMcW4AcZZ54F0ayEIMuVpL095JHGU=; b=OZx9msIC3ncYgqnKpB95kWwyRET4nFJu5KC0AiVVmum1rFT4XedrVu2MhXv3zI++bk EOoD0iAuDX7ALiUyQzwa73rtsg1ThHpHPTUmUFWmSn8ErPFjWWBZ3NqyXSry5PRiQg5J ZCybXrNeYNC5Od8a+q+untDjyAJ5/MfUzisgN4DhEiFEOVROW6890s96S3X92y7+2mqg zZGMxs7qSkOfmHsnfJjkvRQWYXVnl6Tfd5x+/CJ6fcCjdoCJ1is6Y0g0A4hcJUNYngYp V/NMZkj0RWE9PlJ0gcAM2cw+I5bl0x6w+XFyOhZDLhZsjgTFV6SyLX/dQMN9tvtDdHwj bZyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678279177; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tuweGAp9n+2hs8QMcW4AcZZ54F0ayEIMuVpL095JHGU=; b=Afn6VhsziSmbdIzhPKpkyPJv/aEPc8qhgSEiDFbFrPZDBWQRCAmIv3eOErzU8j0ha/ HueQ9yYdssvG3NH7ACsCwUNEpaDXdlkZEVGq/56VHR9CDuMbv+hQhORDePX/3+U0WMFh fn2+M2oZlXF+jkD3ICP8MxO3EJsA3fAQMMSVlJcVIA8w72GbFfAiVaYAt2yXuvcOdMYR oWUzf8CYqbBhIhFiF/ZSnNSiEc13qDGvdxnB2e8dS1gP4pr9F62kbzs0f37uXOvrXOL3 7lofOBw5tY98s2ZvMs5SXR57pHJwOg87SLJKqx8LRJYpVtsE/H+hkx8TvN3gPS7V999s 5K5g== X-Gm-Message-State: AO0yUKWjfNfY0pZTGYAh4JgrwBJYVvjMGGdDMo93M/iO6Z7MV18vg7Mu LFETRaPmxGW1K622hqL0AJpH9SenKQ9zSpcWCc9EzcPyf4zMtFOOPfs= X-Google-Smtp-Source: AK7set8u1sNGiXfWXUXnFTpY387PMK/SUYPShMHzogXjAZ5ykh9SRMDCrMzUhCEPGP/5+67oO1Jw3ZaOdLfuFXd7Lt8= X-Received: by 2002:a81:a947:0:b0:535:be11:5fe0 with SMTP id g68-20020a81a947000000b00535be115fe0mr11098054ywh.1.1678279177259; Wed, 08 Mar 2023 04:39:37 -0800 (PST) MIME-Version: 1.0 From: Kenta USAMI Date: Wed, 8 Mar 2023 21:39:26 +0900 Message-ID: Subject: Problem with CSS font-family exported by htmlfontify To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary="00000000000032725305f662d203" Received-SPF: none client-ip=2607:f8b0:4864:20::112a; envelope-from=zonuexe@zonu.me; helo=mail-yw1-x112a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 08 Mar 2023 10:38:37 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --00000000000032725305f662d203 Content-Type: multipart/alternative; boundary="00000000000032725005f662d201" --00000000000032725005f662d201 Content-Type: text/plain; charset="UTF-8" First, I use a font called "Migu 2M" in Emacs. When I run M-x htmlfontify-buffer in one buffer, the exported HTML contains lines like: ``` body, pre { text-decoration: none; font-family: Migu 2M; font-stretch: normal; font-weight: 500; font-style: normal; color: #ffffff; background: #000000; font-size: 15pt; } ``` Standards-compliant web browsers should ignore this font-family. MDN Web Docs says: https://developer.mozilla.org/en-US/docs/Web/CSS/font-family > Valid family names > Font family names must either be given quoted as strings, or unquoted as a sequence of one or more identifiers. This means that punctuation characters and digits at the start of each token must be escaped in unquoted font family names. > > It is a good practice to quote font family names that contain white space, digits, or punctuation characters other than hyphens. An unquoted font-family is valid as long as it doesn't start with a digit, but MDN Web Docs also says: > The following example is technically valid but is not recommended: > font-family: Gill Sans Extrabold, sans-serif; So it makes sense to quote all font-family. The attached patch file fixes that issue. Thank you for reading. --00000000000032725005f662d201 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
First, I use a font called "Migu 2M" in Emacs.

When I run M-x htmlfontify-buffer in one buffer, the = exported HTML contains lines like:

```
body, pre { text-decoration: none; =C2=A0font-family: Migu 2M; =C2=A0fon= t-stretch: normal; =C2=A0font-weight: 500; =C2=A0font-style: normal; =C2=A0= color: #ffffff; =C2=A0background: #000000; =C2=A0font-size: 15pt; }
```

Standards-compliant web browsers should= ignore this font-family.

MDN Web Docs says:

>=C2=A0Valid family names
> F= ont family names must either be given quoted as strings, or unquoted as a s= equence of one or more identifiers. This means that punctuation characters = and digits at the start of each token must be escaped in unquoted font fami= ly names.
>
>=C2=A0It is a good practice to quote= font family names that contain white space, digits, or punctuation charact= ers other than hyphens.

An unquoted font-family is= valid as long as it doesn't start with a digit, but MDN Web Docs also = says:

>=C2=A0The following example is techn= ically valid but is not recommended:
> font-family: Gill Sans = Extrabold, sans-serif;

So it makes sense to quote = all font-family.

The attached patch file fixes tha= t issue. Thank you for reading.

--00000000000032725005f662d201-- --00000000000032725305f662d203 Content-Type: application/octet-stream; name="0001-Fix-hfy-family.patch" Content-Disposition: attachment; filename="0001-Fix-hfy-family.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_leznhqym0 RnJvbSAxM2YwOGNhZWFlM2ZjNTYyYjkyYzkyMjlhODBlNTY1NmMxZDdkZDY1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBVU0FNSSBLZW50YSA8dGFkc2FuQHpvbnUubWU+CkRhdGU6IFdl ZCwgOCBNYXIgMjAyMyAyMToxMzozNyArMDkwMApTdWJqZWN0OiBbUEFUQ0hdIEZpeCBoZnktZmFt aWx5CgotLS0KIGxpc3AvaHRtbGZvbnRpZnkuZWwgfCA0ICsrKy0KIDEgZmlsZSBjaGFuZ2VkLCAz IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL2h0bWxmb250 aWZ5LmVsIGIvbGlzcC9odG1sZm9udGlmeS5lbAppbmRleCAxYWIzM2NjNjQxLi5mMGUzODI0MmU0 IDEwMDY0NAotLS0gYS9saXNwL2h0bWxmb250aWZ5LmVsCisrKyBiL2xpc3AvaHRtbGZvbnRpZnku ZWwKQEAgLTc1Nyw3ICs3NTcsOSBAQCBoZnktdHJpcGxldAogICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDI1NSkpCiAgICAgICAgICAgICAgICAgICAgICAgICcoMCAxIDIpKSkpKSkKIAotKGRl ZnVuIGhmeS1mYW1pbHkgKGZhbWlseSkgKGxpc3QgKGNvbnMgImZvbnQtZmFtaWx5IiAgZmFtaWx5 KSkpCisoZGVmdW4gaGZ5LWZhbWlseSAoZmFtaWx5KQorICAobGlzdCAoY29ucyAiZm9udC1mYW1p bHkiCisgICAgICAgICAgICAgIChmb3JtYXQgIlwiJXNcIiIgKHN0cmluZy1yZXBsYWNlICJcIiIg IlxcXFxcIiIgZmFtaWx5KSkpKSkKIChkZWZ1biBoZnktYmdjb2wgIChjb2xvcikgKGxpc3QgKGNv bnMgImJhY2tncm91bmQiICAgKGhmeS10cmlwbGV0IGNvbG9yKSkpKQogKGRlZnVuIGhmeS1jb2xv ciAoY29sb3IpIChsaXN0IChjb25zICJjb2xvciIgICAgICAgIChoZnktdHJpcGxldCBjb2xvcikp KSkKIChkZWZpbmUtb2Jzb2xldGUtZnVuY3Rpb24tYWxpYXMgJ2hmeS1jb2xvdXIgIydoZnktY29s b3IgIjI3LjEiKQotLSAKMi4zOS4yCgo= --00000000000032725305f662d203-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 16 03:46:52 2023 Received: (at 62054-done) by debbugs.gnu.org; 16 Mar 2023 07:46:53 +0000 Received: from localhost ([127.0.0.1]:41110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pciK4-0002RB-H0 for submit@debbugs.gnu.org; Thu, 16 Mar 2023 03:46:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pciK2-0002Qz-Mx for 62054-done@debbugs.gnu.org; Thu, 16 Mar 2023 03:46:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pciJw-0006SB-PL; Thu, 16 Mar 2023 03:46:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZtVfLehnZWTBOKNmu3WxYQAypYPLhxQTzVpCg2nEsTs=; b=UFCEj95cC7Ho yPtNepc0CEtZP/LyVEAiANlu5zurx88AksrrZVzy+Q89Z0H0QLjwZmAQt0uW2vRaCt7wrLttLGNk0 ritALCN+Ru8FRI8t71fuYXNdFHlRjRFIk41JQgEGvdv9oIUrmt1K4m6CPX0/EXm0S1TsNHG8Pp/n7 I/u9xAWv3izdnHRCrNvuU/tfpfGpo7cNlJG0nUpky5nO9mP4p6Hm43eF2FC5Z7U1bZM7aCdll93JS N39n7MSDLvcKujz/c3Ezoi0/h+NXqh/UVcYf1y1RfQcTASeasykri8PjgySD9Tdq75faFyZbyn9kC m0RFA9aHZN4v7mRsxa9vgA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pciJw-0007Sc-6E; Thu, 16 Mar 2023 03:46:44 -0400 Date: Thu, 16 Mar 2023 09:46:42 +0200 Message-Id: <83a60dqgt9.fsf@gnu.org> From: Eli Zaretskii To: Kenta USAMI In-Reply-To: (message from Kenta USAMI on Wed, 8 Mar 2023 21:39:26 +0900) Subject: Re: bug#62054: Problem with CSS font-family exported by htmlfontify References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62054-done Cc: 62054-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Kenta USAMI > Date: Wed, 8 Mar 2023 21:39:26 +0900 > > First, I use a font called "Migu 2M" in Emacs. > > When I run M-x htmlfontify-buffer in one buffer, the exported HTML contains > lines like: > > ``` > body, pre { text-decoration: none; font-family: Migu 2M; font-stretch: > normal; font-weight: 500; font-style: normal; color: #ffffff; > background: #000000; font-size: 15pt; } > ``` > > Standards-compliant web browsers should ignore this font-family. > > MDN Web Docs says: > https://developer.mozilla.org/en-US/docs/Web/CSS/font-family > > > Valid family names > > Font family names must either be given quoted as strings, or unquoted as > a sequence of one or more identifiers. This means that punctuation > characters and digits at the start of each token must be escaped in > unquoted font family names. > > > > It is a good practice to quote font family names that contain white > space, digits, or punctuation characters other than hyphens. > > An unquoted font-family is valid as long as it doesn't start with a digit, > but MDN Web Docs also says: > > > The following example is technically valid but is not recommended: > > font-family: Gill Sans Extrabold, sans-serif; > > So it makes sense to quote all font-family. > > The attached patch file fixes that issue. Thank you for reading. Thanks, I installed this on the emacs-29 branch, and I'm closing this bug. From unknown Fri Aug 15 18:53:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 13 Apr 2023 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator