Skip to content

Math fonts are rendered bolder than text fonts #2981

Closed
@marcin-serwin

Description

Description

When math and text fonts are set to use matching fonts, the math glyphs are rendered as slightly bolder. For example, the following code:

#set page(margin: 0pt, width: auto, height: auto)

#set text(font: "Latin Modern Roman")
#show math.equation: set text(font: "Latin Modern Math")

1$1$

produces this image, in which the second 1 is noticeably bolder:
image

Compare this to the latex output (using lualatex) of:

\documentclass{standalone}

\usepackage{unicode-math}

\setmainfont{Latin Modern Roman}
\setmathfont{Latin Modern Math}

\begin{document}
1$1$
\end{document}

Here both 1s are identical
image

Typst version: 0.10.0 (70ca0d25)

Reproduction URL

No response

Operating system

Linux

Typst version

  • I am using the latest version of Typst

Activity

Enivex

Enivex commented on Dec 16, 2023

@Enivex
Collaborator

They're likely just defaulting to different font weights (which you can adjust).

Regardless, you should be using New Computer Modern instead of Latin Modern. It has significant improvement.

Alternatively it's a case of #576 . In either case I'll convert this to a discussion.

removed
bugSomething isn't working
on Dec 16, 2023
converted this issue into a discussion #2982 on Dec 16, 2023
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

      Math fonts are rendered bolder than text fonts · Issue #2981 · typst/typst