From: Gerion Entrup <gerion.entrup@flump.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Scale content to height of the font, measure font height
Date: Tue, 11 Jun 2024 23:18:18 +0200 [thread overview]
Message-ID: <6420420.UjTJXf6HLC@falbala> (raw)
In-Reply-To: <3000b74d-7c5d-c2d9-d43c-ea3ee547aaf4@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 992 bytes --]
Am Montag, 10. Juni 2024, 15:53:19 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 10.06.2024 um 13:16:
> > 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
> > ```
>
> \starttext
> M\scale[height=\heightofstring{M}]{a}M
> \stoptext
>
> Wolfgang
>
Thank you all! Added to the wiki: https://wiki.contextgarden.net/Dimensions
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2024-06-11 21:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 11:16 [NTG-context] " Gerion Entrup
2024-06-10 11:57 ` [NTG-context] " Hans Hagen
2024-06-10 12:07 ` seyal zavira
2024-06-10 13:53 ` Wolfgang Schuster
2024-06-11 21:18 ` Gerion Entrup [this message]
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=6420420.UjTJXf6HLC@falbala \
--to=gerion.entrup@flump.de \
--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).