From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: ** X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,PDS_OTHER_BAD_TLD,T_TVD_MIME_EPI autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 6516 invoked from network); 9 Aug 2021 23:08:38 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 9 Aug 2021 23:08:38 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 40f5380f for ; Mon, 9 Aug 2021 18:08:35 -0500 (EST) Received: from tarta.nabijaczleweli.xyz (139-28-40-42.artus.net.pl [139.28.40.42]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 7aa76528 for ; Mon, 9 Aug 2021 18:08:35 -0500 (EST) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id EF43E360ED0; Tue, 10 Aug 2021 01:08:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nabijaczleweli.xyz; s=202006; t=1628550513; bh=AFE2P2CUrSKo1oFKCGKB1JBczsaNp3szqcSn2phlb2w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=utFqR5JU2pJrkwV2njdg0WwzM2iw0FVfy99drwhchax29z/+XCnBdtD+r3Ceh5XYZ Bdvj1nNxXV9KlLD5p7UmDJAbb9DI5Qj+tOH6v5HXUMaDu+i7gW0g+zRMQ9KQByHY7W E2eq9n7Xneh5SkDNH7r9kTPgkraAnUcM+NLLVBwZMoZBw+qsHHcRWbmzf578lHQ7rU m2bWqlmcirNlTqN9/bx7LIjq2uJB2dOR24lEiMvI9mY/laMXfoaXmKbt8tJCnsnFdc AsSczvoclLlf0405xUDmwuFFcO8OeoJCvlfJ33hgtvnS6XNJu6c8jYtnQ6Ua+LsyPs s4TMWmyCCIdOg== Date: Tue, 10 Aug 2021 01:08:31 +0200 From: =?utf-8?B?0L3QsNCx?= To: Ingo Schwarze Cc: tech@mandoc.bsd.lv, 992002@bugs.debian.org Subject: Re: [PATCH][Debian#992002] tbl: allow two-character fonts and format fonts in -Thtml Message-ID: <20210809230831.7lwnchffsqds42ax@tarta.nabijaczleweli.xyz> Mail-Followup-To: Ingo Schwarze , tech@mandoc.bsd.lv, 992002@bugs.debian.org References: <20210808111135.zisbfzlqqdsq35om@tarta.nabijaczleweli.xyz> <20210808124919.hevbw4gv6pis72pq@tarta.nabijaczleweli.xyz> <20210808132452.bekkztprjqoup3pa@tarta.nabijaczleweli.xyz> <20210809085819.GA81032@athene.usta.de> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cx7lt76colzzicyr" Content-Disposition: inline In-Reply-To: <20210809085819.GA81032@athene.usta.de> User-Agent: NeoMutt/20210205 --cx7lt76colzzicyr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 09, 2021 at 10:58:19AM +0200, Ingo Schwarze wrote: > Nab wrote on Sun, Aug 08, 2021 at 03:24:53PM +0200: > > tbl's -Thtml ignores font requests; > Not in CVS HEAD; see https://cvsweb.bsd.lv/mandoc/tbl_html.c revision 1.3= 4, > committed on May 16 earlier this year. Oh, indeed. I tested and based my patch on 1.14.5 from Debian, didn't realise that's almost two years old by now. Will use the CVS next time. > I started from your patch and changed a few aspects: > * You couldn't possibly know that i'm trying to work towards a > unified system for identifying fonts using the mandoc.h > enum mandoc_esc ESCAPE_FONT* identifiers. Having different > font identifiers for each output module is not good. > So i added ESCAPE_FONTCB and ESCAPE_FONTCI and used those. > A nice side effect is that CB and CI now work in HTML > for all of \f, .ft, and tbl(7) f and that tbl(7) fBI > now also works for terminal output. > > text > > text > > text > These become: > text > text This is great news! A bunch of my pages use C[BI] and the HTML renders look much better, thanks! > * GNU tbl(1) appears to ignore space characters between the f > modifier and the font name, so "lf B" is the same as "lfB". Huh, so it does! That's not explicitly mentioned by the manual and so I didn't think to test it. Now, tbl(1) says Key characters can be separated by spaces or tabs. so consider the following document: -- >8 -- =2ETS lfBI lf BI lf BI . a b c =2ETE -- >8 -- (In order, none, space, tab follow 'f'; base64: LlRTCmxmQkkJbGYgQkkJbGYJQkkJLgphCWIJYwouVEUK) groff renders it with a, b, and c as BI, but mandoc with your patch with a+b as BI and c as R, with -Tlint: mandoc: ./q.1:2:14: WARNING: unknown font, skipping request: TS f BI . If you change tbl_layout.c L171 to match L75: -- >8 -- - while (p[*pos] =3D=3D ' ') + while (p[*pos] =3D=3D ' ' || p[*pos] =3D=3D '\t') -- >8 -- and L187: -- >8 -- - if (strchr(" .", p[*pos + isz]) =3D=3D NULL) + if (strchr(" \t.", p[*pos + isz]) =3D=3D NULL) -- >8 -- The document renders correctly. > > Renders to a teletype with the expected fonts: > > b, ul, bul; b, ul, bul; normal, b, ul > Not quite. The expected output for lbi is ul, not bul. > The i overrides the b rather than add to it. > So lbi is the same as lfI, not as lfBI. Indeed, it looks like I got confused by the groff parsing and thought it'd accumulate instead. > Could you please check out from CVS (instead of the last release), > apply the following patch, and tell me whether it looks reasonable > and works for you? Yeah, save for the tab thing above, I haven't managed to fault it, in tests or real pages. > When this gets committed, i will credit you for reporting the > missing feature. Do i understand correctly that "Nabija" is your > first name and "Czleweli" your last name? They aren't, but either "=D0=BD=D0=B0=D0=B1" or "nabijaczleweli" is fine. Best, =D0=BD=D0=B0=D0=B1 --cx7lt76colzzicyr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmERtW0ACgkQvP0LAY0m WPFEqg//bfs7TR/YcIchIfBAELYsJYXJzYldZidL7+E8Bqfx73Dr1CIES8KDRVCW SAfSd7PkoZfaffe132R0I2er9auTjKNMPW1ELRE/yF0scjK4wXcqtGqqiYJE0lq1 DgGGKNur7dYXFwcv9an8OEX1IE/23q8Xj4ldOb0VTMp/cv3C3/DIf2OqjV8g9X7w VHdR+Xg6VjeZevqISp+q8WrWbrG1HtEn8uY7gWd42LDKr+8fGN80KWwaWWiFRMFG R3HBpDLS0A2/8RLNInN/OOLRHqPs8cV60i/7DEmV3TbcroLhD+jE73pCY06KY1s8 ouKjxHKnNrV7ZpFhLInInmF7qMCmeU20XnJy2VuXXGe2lti71Uf2Fjm0PtMbeMrA 2WfL4aDSTHNH0m/46n6xCZMO2ox5A06488RNXOyF/UprN6NTTRSQgAhgE+r7JgJy Lmeef+mhVIncyrPdTENv5etYauspM7AS7awezNBfCqFtY/af1tuLR+0/R6qW2ukl JSSf/HSD5iqgLLel4oohX4XsyaWNT8TZaisLCrb+aYq+3LsQcwKkWTi2WHsVp8Sp k60stGPrHvI5xE0HHGzhScUU/DW4ZYx9oUa1OoetYrBz03mZfKd5B2vztaQIQzSO U56QnzjuvFvzV5fmEabxeebPfPUbyeyrZOlJjA9gx06YyZR79u4= =II0c -----END PGP SIGNATURE----- --cx7lt76colzzicyr-- -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv