How to explore fonts, formats etc inside an imported template?

I imported the “may” theme in my text file

#import "@preview/may:0.1.2": *
#show: may-sans

typst complains about missing fonts, even though I have installed some of them.

So my next steps would be

  • find out which font styles are defined where
  • find out how I can change the 3 font styles of the template (and potentially more to my liking)

Apart from browsing through the repo of the theme (as I was not able to find the theme locally), how can I list the defined fonts, styles and their custom names? Some font groups like “code-font” seem to be abstractions, so changing those might change multiple fonts, which is preferred


Leaving out the “explore interactively” part (which might simply not be a thing)

Is there a way to change the values of a set of variables / font groups, without modifying the underlying package?

A use case might be, if my font has a different name, or if I simply want to keep updating the package but with different colors, fonts etc.

The default example showed how to change all fonts it seems. Can I just put in the variable I want there and change it?

Being able to configure the fonts within a template is possible, but the template must expose a way to do that. From my brief look at may, this would be the only way to achieve what you want:

#import "@preview/may:0.1.2": *
#show: _may.with(
  font: /*your font*/,
  code-font: /*your code font*/,
)

Functions starting with _ are typically only intended to be used locally (within the template in this case). So this may be an unintended way of using the template.


Looking at the code, there are two lines that define what fonts will be used (for the may-sans variant):
may.typ:198:

#show: may-elements.with(code-font: "Maple Mono")

may.typ:217:

font: ("Libertinus Sans", "LXGW Wenkai"),

You mentioned that you’ve installed some of them. As far as I can tell, if you’ve installed these three, then it should work fine.