Skip to content

How much formatting should we allow in the typst strings? #9

@henrik-wolf

Description

@henrik-wolf

In theory, a user could override all sensible presets that we prepare for them by putting a custom preamble into the typst string that they pass into their plotting command. While we (try to) take some styling into account by default (bold, italics using the * and _ modifiers in the typst string) we do not pass everything that you can do to a string in makie off to the backend, such as color or (global) rotation.

I think the approach we currently take, only pass the information that is important for layouting the glyphs (font and fontsize) and always adding the other styling options once we get the result back should work for most applications.

In theory, we could expand our preamble to take all font styling parameters that makie supports (as they should be a subset of everything that typst can do...) and the get all these parameters back from the renderer. This would require some additional work to figure out the correct way of specifying the typst preamble based on the passed rendering options, resolving all @inherit objects and so on, and then setting up the rendering backend to return all those information so that we can use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions