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.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE 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 1EB8B29D98 for ; Mon, 10 Jun 2024 13:58:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 641A5484E55 for ; Mon, 10 Jun 2024 13:58:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=xs4all.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 auubGtY-8aVQ for ; Mon, 10 Jun 2024 13:58:12 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 70DB2484CBA for ; Mon, 10 Jun 2024 13:57:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id A4CE1484C2C for ; Mon, 10 Jun 2024 13:57:41 +0200 (CEST) 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 PH3SgH7VXM-5 for ; Mon, 10 Jun 2024 13:57:41 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=195.121.94.169; helo=ewsoutbound.kpnmail.nl; envelope-from=j.hagen@xs4all.nl; receiver= Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.169]) (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 361C7484C2B for ; Mon, 10 Jun 2024 13:57:41 +0200 (CEST) X-KPN-MessageId: a3989ef5-2720-11ef-8845-005056abad63 Received: from smtp.kpnmail.nl (unknown [10.31.155.37]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id a3989ef5-2720-11ef-8845-005056abad63; Mon, 10 Jun 2024 13:57:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=xs4all01; h=content-type:from:to:subject:mime-version:date:message-id; bh=bwRDe8RChjdRAlYPJE9W/fqcoFY/NHmwjVWsvbVL0us=; b=neqgAG+hzs7OmfrjhJv7mW57cvoDKHvK9jWf5P2zuSDsgzJPcrraXs4UdsHLRTU+PRZk1UCub8zUU FbOdWek9kt4Bg07ej7ZG2elSFXRB8cb6i/uLjK9A+00KpFPZUZ7HDU1m5DLsJ+127LP9VIk6r9m0R8 fnnTT/h3nLGoCPNh3oF+Bx3PX/Pkm8aYtmEG3azNem/sPxlHwu6d9v1+/mCFOA6D4Yta/9q1tG7Wpy w0Ot+08MLH9BKfVbIt1UFvplIvSI3jd5xVgxm4JIl9znVJ7GG9JQwpsCtZa0Na1BusiPm5BgzUG4a2 +JCXMIeogQgZvckg1EuNURPLE51ap8w== X-KPN-MID: 33|Y+liAUDe7uC0iUgU+DeyHfYSBCAW7Dn+3XxuqHzO0eQPlL2fzkbTgujAV0RY55P BkYXVHvSM4hHPVVWLJiCNMi4TPIB7hMhgpy4l9/cqEzw= X-KPN-VerifiedSender: Yes X-CMASSUN: 33|61kUIMSSwn3tbX47QlSNBqN7oa6sjCu6OblOlfaL3Kq7DrzaiXZU33+Emk97WaW +SmEGYrO4GjSfZviET7noQA== X-Originating-IP: 213.125.29.162 Received: from [10.100.1.105] (d57d1da2.static.ziggozakelijk.nl [213.125.29.162]) by smtp.xs4all.nl (Halon) with ESMTPSA id a32c9885-2720-11ef-813c-005056ab1411; Mon, 10 Jun 2024 13:57:40 +0200 (CEST) Message-ID: Date: Mon, 10 Jun 2024 13:57:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ntg-context@ntg.nl References: <2640137.3ZeAukHxDK@falbala> From: Hans Hagen In-Reply-To: <2640137.3ZeAukHxDK@falbala> Message-ID-Hash: SDIQ5CHNTYC25VAE7KPYWXCIML5FWP4G X-Message-ID-Hash: SDIQ5CHNTYC25VAE7KPYWXCIML5FWP4G X-MailFrom: j.hagen@xs4all.nl 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.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Scale content to height of the font, measure font height List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit On 6/10/2024 1:16 PM, Gerion Entrup wrote: > Hi, > > I'd like to scale something (actually a symbol drawn in TikZ) to the exact > high of the char 'M'. I found the scale environment for it but struggle to > measure the correct font height. I found the "definemeasure/measure/measured" > commands but they define a dimension and are not for doing measurements on > rendered text. Is there a simple way to get the height a char as a dimension? > > MWE: > ``` > \starttext > % Is it possible to replace 1cm with a common expression? > This is the letter M. \scale[height=1cm]{a} should have the exact same size as > M. > > This should also be true {\tfc with a bigger M. \scale[height=1cm]{a}}. > \stoptext \the\dimexpr\fontcharht\font`M+\fontchardp\font`M\relax ----------------------------------------------------------------- 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://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 ___________________________________________________________________________________