Skip to content

Indent guides are wrong with proportional fonts. #24

Description

@matj1

I have some code typeset with a proportional font, and I would like to give it indentation guides. But indent guides are too far when they are enabled.

See this document:

#import "@preview/algo:0.3.4": code
#show raw: set text(font: "Fira Sans")

#code(
  indent-guides: 1pt + gray,
  tab-size: 4
)[```rust
pub fn minimal_closed_subspaces(network: &BooleanNetwork) {
    loop {
        match state {
            Some(ref subspace) => {
                let greater = greater_subspaces(subspace, &closed.var_set);
                closed.bdd = closed.bdd.and(&greater.not());
                state = next_sat_val(&closed.bdd, subspace); }
            None => break } }
    Ok(closed) }
```]

Image

tab-size is set correctly, but the indent guides are too far like if a wrong width was used to calculate the indentation.

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