Skip to content

Font ignored + "current font does not support math" #97

Closed

Description

@apoorvalal

This is a very interesting looking project, and I was hoping to start using it for some tasks locally. I downloaded it off the releases page and can run it from the command line. I'm running ubuntu 22.04 LTS.

For some reason, the default font is a monospace one that I don't recognise, a #set text() call to set font does not seem to be working, and including any math produces the following error. The font is installed on my system (included in the screenshot is the fonts page preview).

Any idea what might be going on?

image

Activity

  1. Andriamanitra commented on Mar 21, 2023

    @Andriamanitra

    I also immediately ran into this error after building from source and trying the example from README.md.

    I think this error message could be improved by

    1. Saying what the font that doesn't work for math is
    2. Suggesting an alternative font that would work, and how to use it.

    In the longer term it would be nice to have proper error codes and something like Rust's error index with lengthier explanations and examples.

  2. xkevio commented on Mar 21, 2023

    @xkevio
    SponsorContributor

    The math font is a separate one called "New Computer Modern Math" and should be under assets/fonts. Though, they are considering just embedding some default fonts into the binary.

  3. laurmaedje commented on Mar 21, 2023

    @laurmaedje
    Member

    I have pushed a commit that embeds the standard fonts for text, math, and code by default. You can turn that off with a feature flag in the cli crate. It would be great if you could let me know if it works for you now.

  4. apoorvalal commented on Mar 21, 2023

    @apoorvalal
    Author

    It does; thanks for the prompt update!
    I also discovered the typst --fonts command and system fonts + fonts in ~/.fonts show up now and work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions