From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id DABC62BD68 for ; Mon, 4 Nov 2024 18:44:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id DB0E0484BB4 for ; Mon, 4 Nov 2024 18:41:55 +0100 (CET) Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=ntg.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntg.nl; h= content-type:content-type:list-unsubscribe:list-subscribe :list-post:list-owner:list-help:list-archive:archived-at:list-id :subject:subject:reply-to:precedence:in-reply-to:from:from :content-language:references:user-agent:mime-version:date:date :message-id:received:received:received:received:received :received; s=cgl; t=1730742115; x=1733334116; bh=429kUvdDHjTZWC0 rZ002NyEV/8xy26+Rhd8/RcdFhUQ=; b=OCDrkI39nUpcOchZljtwUxcUB5BfCHm E7w5cMVzJa4NmsSJ+F5Nfntzwg5TirJJb5vDFfY3aki/q69itKs6TUBolhIL7RxV UbQsTzejk3hueBUMyqTjSqyRZywdYiYYlS7UvjOjjPdXfevRvUqAGDJiuCoaujFd wGJSnPh1KSF8= X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32A0jCOjkeqG for ; Mon, 4 Nov 2024 18:41:55 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 0B936484C53 for ; Mon, 4 Nov 2024 18:40:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id BC50548059C for ; Mon, 4 Nov 2024 18:39:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id deXQH5pLrQ0v for ; Mon, 4 Nov 2024 18:39:27 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=166.84.1.89; helo=mailbackend.panix.com; envelope-from=context@rik.users.panix.com; receiver= Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 21BA748058E for ; Mon, 4 Nov 2024 18:39:26 +0100 (CET) Received: from [192.168.5.71] (syn-024-194-002-237.res.spectrum.com [24.194.2.237]) by mailbackend.panix.com (Postfix) with ESMTPSA id 4XhzHK42dmz4nwm for ; Mon, 4 Nov 2024 12:39:25 -0500 (EST) Message-ID: <37c51fb8-4024-478a-bb7b-da19e10c5f8e@rik.users.panix.com> Date: Mon, 4 Nov 2024 12:39:25 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: ntg-context@ntg.nl References: <9169ea95-51e5-4fd3-ae09-076037570800@rik.users.panix.com> Content-Language: en-US From: Rik Kabel In-Reply-To: Message-ID-Hash: 34JSAQMJI5CGQHBEJGYXUS4WYLHAKCXP X-Message-ID-Hash: 34JSAQMJI5CGQHBEJGYXUS4WYLHAKCXP X-MailFrom: ConTeXt@rik.users.panix.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Zigzag left margin with italics List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============5151430714360587855==" This is a multi-part message in MIME format. --===============5151430714360587855== Content-Type: multipart/alternative; boundary="------------BxoUAFzRlhkcTnAGsPQXdoRC" Content-Language: en-US This is a multi-part message in MIME format. --------------BxoUAFzRlhkcTnAGsPQXdoRC Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2024-11-04 10:55, Wolfgang Schuster wrote: > Mikael Sundqvist schrieb am 04.11.2024 um 07:35: >> Hi, >> >> You can try this below (from test suite), but then, as you see, also >> upright T will move out. Not sure how/if you can control that. >> >> \startluacode >> >> local classes =3D fonts.protrusions.classes >> local vectors =3D fonts.protrusions.vectors >> >> classes.rik =3D { >> =C2=A0=C2=A0=C2=A0=C2=A0 vector =3D 'rik', >> =C2=A0=C2=A0=C2=A0=C2=A0 factor =3D 1, >> } >> >> vectors.rik =3D table.merged ( >> =C2=A0=C2=A0=C2=A0=C2=A0 vectors.quality, >> =C2=A0=C2=A0=C2=A0=C2=A0 { >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [0x0054] =3D { 0.35, 0 }, -- T >> =C2=A0=C2=A0=C2=A0=C2=A0 }) >> >> \stopluacode >> >> \definefontfeature >> =C2=A0=C2=A0 [default] >> =C2=A0=C2=A0 [default] >> =C2=A0=C2=A0 [protrusion=3Drik,expansion=3Dquality] > > Define a feature which sets only the custom protrusion values: > > \definefontfeature [rik] [protrusion=3Dquality] > > and create a new typeface where you apply the new feature to the=20 > italic/slanted style: > > \definefontfamily [riktimes] [rm] [TeX Gyre Termes]=20 > [sl=3Dfeatures:{default,rik}] > > Afterwards use \seupbodyfont[riktimes] to access the new typeface. > > Wolfgang > _______________________________________________________________________= ____________=20 > Looking a bit more, the problem is not protrusion but the bounding box.=20 Look at the left side of the italic T and W, and to a lesser degree C,=20 O, and Q, produced by the following. \usetypescript[libertinus] \setupbodyfont[libertinus] \starttext =C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x= ,y,z} {\it\recursestring\tf=C2=A6}\par =C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x= ,y,z} {\recursestring=C2=A6} =C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x= ,y,z} {\WORD{\it\recursestring}\tf=C2=A6}\par =C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x= ,y,z} {\WORD{\recursestring}=C2=A6} \stoptext This may be an issue for the font maintainer, but is there anything that=20 could be done within context? --=20 Rik --------------BxoUAFzRlhkcTnAGsPQXdoRC Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 2024-11-04 10:55, Wolfgang Schuster wrote:
Mikael Sundqvist schrieb am 04.11.2024 um 07:35:
Hi,

You can try this below (from test suite), but then, as you see, also
upright T will move out. Not sure how/if you can control that.

\startluacode

local classes =3D fonts.protrusions.classes
local vectors =3D fonts.protrusions.vectors

classes.rik =3D {
=C2=A0=C2=A0=C2=A0=C2=A0 vector =3D 'rik',
=C2=A0=C2=A0=C2=A0=C2=A0 factor =3D 1,
}

vectors.rik =3D table.merged (
=C2=A0=C2=A0=C2=A0=C2=A0 vectors.quality,
=C2=A0=C2=A0=C2=A0=C2=A0 {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [0x0054] =3D { 0.35, 0 }, --= T
=C2=A0=C2=A0=C2=A0=C2=A0 })

\stopluacode

\definefontfeature
=C2=A0=C2=A0 [default]
=C2=A0=C2=A0 [default]
=C2=A0=C2=A0 [protrusion=3Drik,expansion=3Dquality]

Define a feature which sets only the custom protrusion values:

\definefontfeature [rik] [protrusion=3Dquality]

and create a new typeface where you apply the new feature to the italic/slanted style:

\definefontfamily [riktimes] [rm] [TeX Gyre Termes] [sl=3Dfeatures:{default,rik}]

Afterwards use \seupbodyfont[riktimes] to access the new typeface.

Wolfgang
_________________________________________________________________________= __________

Looking a bit more, the problem is not protrusion but the bounding box. Look at the left side of the italic T and W, and to a lesser degree C, O, and Q, produced by the following.

\usetypescript[libertinus]
\setupbodyfont[libertinus]
\starttext
=C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z= }
{\it\recursestring\tf=C2=A6}\par
=C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z= }
{\recursestring=C2=A6}

=C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z= }
{\WORD{\it\recursestring}\tf=C2=A6}\par
=C2=A6\doloopoverlist{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z= }
{\WORD{\recursestring}=C2=A6}
\stoptext

This may be an issue for the font maintainer, but is there anything that could be done within context?

--
Rik


--------------BxoUAFzRlhkcTnAGsPQXdoRC-- --===============5151430714360587855== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============5151430714360587855==--