Also you can use this:

assuming that you have a fixed size figure such as a pdf page:

\definesymbol[Bsymbol][{\scale[width=1.6ex]{\externalfigure[myfile.pdf][page=1]}}]
\define\mysym{\kern 0.2em \symbol[Bsymbol] \kern 0.3em}

\starttext
this is a sample\mysym text.
\tfa{this is a sample\mysym text.}
\stoptext

On Mon, Jun 10, 2024 at 7:18 AM Gerion Entrup <gerion.entrup@flump.de> 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
```

Best
Gerion

___________________________________________________________________________________
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
___________________________________________________________________________________