Skip to content

Language-dependant font configuration #794

@zylthinking

Description

@zylthinking

Say, if typ file is using unicode, it is possible to know which language any character belongs to.
Then can typst provide a method to set different font for different language.

The code seems does not work even for texts explicitly specified language:

#show text.where(lang: "zh"): text.with(font: "Hiragino Sans GB",  size: 6pt)
#text(lang: "zh")[ 汉语 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions