From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/111628 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christoph Reller Newsgroups: gmane.comp.tex.context Subject: Modify ToUnicode with Goodies Date: Thu, 3 Jun 2021 11:25:57 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5978869750396427504==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40101"; mail-complaints-to="usenet@ciao.gmane.io" To: ntg-context Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 03 11:26:52 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lojcp-000AC2-Ug for gctc-ntg-context-518@m.gmane-mx.org; Thu, 03 Jun 2021 11:26:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DA6D8284192; Thu, 3 Jun 2021 11:26:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4s09g2yRcLDZ; Thu, 3 Jun 2021 11:26:18 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6860A284190; Thu, 3 Jun 2021 11:26:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 485B728418C for ; Thu, 3 Jun 2021 11:26:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tuvyflsWNl1c for ; Thu, 3 Jun 2021 11:26:15 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.53; helo=mail-lf1-f53.google.com; envelope-from=christoph.reller@gmail.com; receiver= Original-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id CD352284188 for ; Thu, 3 Jun 2021 11:26:14 +0200 (CEST) Original-Received: by mail-lf1-f53.google.com with SMTP id v22so6459897lfa.3 for ; Thu, 03 Jun 2021 02:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=EeDKdPgj946bxgQaqlBMI2bm5W++Xbu+oRfpQwPrBqQ=; b=e2my0teWJqvd6nEuZ6oR0pLgxtSDVwaLa738iLkPmqJvXxoUCPbY1awe4JNxwqCK90 XgK5OiOO54vPcFbEbo+/F3POmb4vNbXB9Od/Qg17/P47Wpg+/IsI5kTeIDux9yYYDPIr Axtu2ya3Ntu47t1DHf0JgRCO5dYdqa9k2nynDdDkN0Wr8Un0CCbTM/+yqjDnU1asA7DK wbGwcqviHHybvLSFwz0J+G82zfJHAp7oYl0T0c9C48ikDYxKVnQ2gepsA6wbi/cfRfgg uaG9rAJoBERRI8ojqIHk+VUBfeUwf933Q3ocNRxQdpma0MT40NXLu5bnkAsi+2ZWAfvr wSkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=EeDKdPgj946bxgQaqlBMI2bm5W++Xbu+oRfpQwPrBqQ=; b=pfoezh1UD/9/a4y2KPxXJrGlFcMGw1U2UnZ/F3FnvMAVV/l/K9SIotqebg2jXcHxIM prND88wTCIIXCf3rlG7eYCZbLJkoO2xD+LItj4yf84nnZpqR0yVIKwYQjNHKpAYgHIQR FYWM1eN1qWuFMv0SSru24MWHkVYIlFTBneuGotq+mlxAsBwQqPN/hync+UM1XmtCzRha sBW7QKA0hdPn35tvVJWR3vaVM2GNBrHefA/bOm5avEjMhMxJazV3Kma/N1LMW1SHw919 WxqEbVQzI4B9DWLfLz/9X/bc/PedmNIx0FfccZOtlqhcjxO5dadPEiLQgbr9tPhlImI3 qQcg== X-Gm-Message-State: AOAM533FQkGqatI7zath2e5iH8GEiJ5v4WbWQptxbqLK+KWKKNiuuEhn E4KJ4dgbb7gpwlCvTb0GkEKR8NDTK2ZXQ2Rd9d6w3QCVRTc= X-Google-Smtp-Source: ABdhPJxsCvSk0pB5qflspXkaFontt1fnNaxpbqshf6ph/FICuXqXdBnqfwTW1G5vX8lCckYdzTW5xvimMV+rRV+27DI= X-Received: by 2002:a05:6512:3b08:: with SMTP id f8mr4742184lfv.11.1622712373804; Thu, 03 Jun 2021 02:26:13 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:111628 Archived-At: --===============5978869750396427504== Content-Type: multipart/alternative; boundary="0000000000009d01fc05c3d92a62" --0000000000009d01fc05c3d92a62 Content-Type: text/plain; charset="UTF-8" Hi, On Windows, we have the consola font. Consider the MWE: \starttext \definedfont[name:consola*default at 12 pt] - \stoptext The output PDF is correctly generated with recent versions of ConTeXt LMTX. The hyphen is, however, mapped to a soft hyphen by means of the ToUnicode table which contains: beginbfchar <015E> <00AD> endbfchar Consequently, when copying the text from the PDF and pasting in an editor or a console, the soft hyphen is pasted. I would like to change the ToUnicode information to an ordinary hyphen-minus : beginbfchar <015E> <002D> endbfchar I have tried with a goodies file, and an updated MWE: --- 8< ------------------------------------------ return { name = "consola", version = "1.00", comment = "", author = "", copyright = "", remapping = { tounicode = true, unicodes = { hyphen = 0x002D, }, }, } --- 8< ------------------------------------------ \definefontfeature[consola][mode=base, goodies=consola, unicoding=yes] \starttypescript[mono][consolas] \definefontsynonym[ConsolasRegular][file:consola][features=consola] \stoptypescript \starttypescript[mono][consolas] \definefontsynonym[Mono][ConsolasRegular] \stoptypescript \definetypeface[Body][tt][mono][consolas][default] \setupbodyfont[Body, ss, 10pt] \starttext \tt - \stoptext --- 8< ------------------------------------------ Unfortunately, this has no effect. Please tell me how to correctly update ToUnicode information with a goodies file. Cheers, Christoph --0000000000009d01fc05c3d92a62 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Windows, we have = the consola font. Consider the MWE:

\starttext
= \definedfont[name:consola*default at 12 pt]
-
\stoptext

The output PDF is correctly generated with recent versions = of ConTeXt LMTX. The hyphen is, however, mapped to a soft hyphen=C2=A0by means of the ToUnicode tab= le which contains:
=C2=A0 =C2=A0 beginbfchar
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 <015E> <00AD>
=C2=A0 =C2=A0 endbfchar

Consequently, when copying the text from the PDF and past= ing in an editor or a console, the soft hyphen is pasted.

I would like to change the ToUnicode information to an ordinary hyphen-minus:
=C2=A0 =C2=A0 beginbfchar
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <015E> <= ;002D>
=C2=A0 =C2=A0 endbfchar

I have tr= ied with a goodies file, and an updated MWE:

--- 8= < ------------------------------------------
return {
=C2= =A0 =C2=A0name =3D "consola",
=C2=A0 =C2=A0version =3D "1= .00",
=C2=A0 =C2=A0comment =3D "",
=C2=A0 =C2=A0author= =3D "",
=C2=A0 =C2=A0copyright =3D "",
=C2=A0 = =C2=A0remapping =3D {
=C2=A0 =C2=A0 =C2=A0 tounicode =3D true,
=C2=A0= =C2=A0 =C2=A0 unicodes =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hyphen = =3D 0x002D,
=C2=A0 =C2=A0 =C2=A0 },
=C2=A0 =C2=A0},
}
--- 8< -----------------------------------------= -
\definefontfeature[consola][mode=3Dbase, goodies=3Dconsola, uni= coding=3Dyes]
\starttypescript[mono][consolas]
=C2=A0 \definefontsyno= nym[ConsolasRegular][file:consola][features=3Dconsola]
\stoptypescript\starttypescript[mono][consolas]
=C2=A0 \definefontsynonym[Mono][Conso= lasRegular]
\stoptypescript
\definetypeface[Body][tt][mono][consolas]= [default]
\setupbodyfont[Body, ss, 10pt]

\starttext
\tt -
\= stoptext
--- 8< -------------------------------------= -----

Unfortunately, this has no effect.

Please tell me how to correctly update ToUnicode informatio= n with a goodies file.

Cheers,
Christoph=
--0000000000009d01fc05c3d92a62-- --===============5978869750396427504== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============5978869750396427504==--