3

Is it possible in TeX or MetaFont etc. to generate a "character" that displays as a single letter at one scale but as a different character or even an entire alphabet at different scales?

So at standard scale, the character "A" would be indistinguishable from a normal solid regular A. But then when zoomed in the character "A" would look like a pointillist painting of a bunch of tiny As in the shape of a big A; or ABCDEG formatted in the shape of A; or even a bunch of tiny Bs? And from there, we might zoom in to a single tiny B such that it would be a look like a normal solid B (but could zoom in further for other letters).

  • What would be the best way to arrange a tiny string of letters to imitate a single big letter, e.g. the shape of a Unicode character, so that it is a perfect visual replica of it (not just "kinda" like the outline of a character but virtually 1:1 in terms of shape, font-size, kerning, etc.)?

  • For efficiency, would generating fractal letters like this be better implemented in an entirely new language or would something like a Python or LaTeX script suffice? Ideally, I'd want the
    fractal/recursive attribute coded into a single "character" such that any given letter or symbol will be able to be zoomed in and out of,
    but without requiring too many resources.

  • 2
    Welcome to TeX.SE! I am not saying that this is necessarily the way to go, but what you are describing here sounds a bit like a Lindenmayer system, see section 55.2 of the pgfmanual. – user121799 Sep 18 '18 at 4:29
  • 1
    This post may also be of interest for you. – user121799 Sep 18 '18 at 4:42
  • 2
    Wow, those are really, really helpful. For others interested in this question, the Lindenmayer named in section 55.2 has a freely available book that uses LaTex to model plant biology with fractals: The Algorithmic Beauty of Plants – Academc Sep 18 '18 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.