Skip to content

Text is vertically off-center with highlight(s) in Typst 0.15.0 #131

Description

@FelixBronnhuber

Problem

When compiling the following example via typst 0.15.0 as PDF the highlighted text is noticeably off-center compared to the rest.

Screenshot of the PDF with typst 0.15

Highlighted text is vertically off-center.

Image

Screenshot of the PDF with typst 0.14.2

Looks good, the highlighted part is at the same height as the rest of the line:

Image

Minimal reproducible example

#import "@preview/codly:1.3.0": *;
#show: codly-init.with()

#codly(highlights: (
  (line: 3, start: 3, end: 10, fill: orange),
))
```rust
pub fn main() {
  println!("Hello, world!");
  println!("Hello, world!");
}
```

I compiled this with the current version of typst.app.
You can configure the compiler version in the project settings.

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