From: Hans Hagen <j.hagen@xs4all.nl>
To: "Hamid,Idris" <Idris.Hamid@ColoState.EDU>,
mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Inconsistent behavior: \addfontfeature and CLD local function
Date: Sun, 20 Aug 2023 17:45:10 +0200 [thread overview]
Message-ID: <7bd5c213-c57c-78e8-60a6-e4c8099a06cf@xs4all.nl> (raw)
In-Reply-To: <a20b95b3-7d75-49d2-bcb3-8e9f45fd21b0@Spark>
On 8/20/2023 5:33 PM, Hamid,Idris wrote:
> Dear gang,
>
> For \addfeature and the like, a virtual font feature defined in terms of a CLD local function behaves differently from other font features. MWE:
>
> ==============
> \startluacode
> local function squeeze(tfmdata)
> for k, v in next, tfmdata.characters do
> v.width = 1.75 * (v.height or 0)
> v.depth = 1.75 * (v.depth or 0)
> end
> end
>
> local specification = {
> name = "sqtfm",
> description = "test",
> manipulators = {
> base = squeeze,
> node = squeeze,
> }
> }
because much more has to be done to satisfy the backend (liek advance
with and such) .. you cannot just change dimensions on the fly for
characters that could potentially be shared just as you can't change
glyph dimension mid document
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2023-08-20 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-20 15:33 [NTG-context] " Hamid,Idris
2023-08-20 15:45 ` Hans Hagen [this message]
2023-08-20 19:10 ` [NTG-context] " Hamid,Idris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7bd5c213-c57c-78e8-60a6-e4c8099a06cf@xs4all.nl \
--to=j.hagen@xs4all.nl \
--cc=Idris.Hamid@ColoState.EDU \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).