squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.92k stars 3.54k forks source link

Ligatures being rendered on inline/block code elements #4381

Closed layoaster closed 2 years ago

layoaster commented 2 years ago

Contribution guidelines

I've found a bug and checked that ...

Description

The issue got fixed long time ago but it's happening again. It affects both block & inline code elements.

Expected behaviour

Have monospaced fonts rendered without ligatures like on github:

<region>-realtime
Druid datasource
<region>-realtime

Actual behaviour

Ligatures are being rendered:

image

Steps to reproduce

  1. Using JetBrains Mono for code elements.
  2. Input any pair of characters like -> or -< ligature in a block of code or inline.

Package versions

Configuration

site_name: "EA"
site_url: null
repo_name: null
repo_url: null
edit_uri: null

theme:
  name: material
  # Colors
  palette:
    - scheme: default
      toggle:
        icon: material/lightbulb-outline
        name: Switch to dark mode
      primary: indigo
      accent: blue
    - scheme: slate
      toggle:
        icon: material/lightbulb
        name: Switch to light mode
      primary: brown
      accent: orange
  # Fonts
  font:
    text: Roboto
    code: JetBrains Mono

  features:
    - navigation.instant
    - navigation.sections
    - navigation.tabs
    - navigation.expand
    - navigation.top
    - search.suggest
    - search.highlight
    - toc.integrate

System information

squidfunk commented 2 years ago

Thanks for reporting. Indeed, that's unintended. Fixed in dcab57dd1.

squidfunk commented 2 years ago

By the way, funnily, monospace fonts still have no "liga" set on font-feature-settings:

https://github.com/squidfunk/mkdocs-material/blob/dcab57dd1cced4b77875c1aa1b53467c62709d31/src/assets/stylesheets/main/_typeset.scss#L56

So, effectively, we changed nothing for the last 5 years 😅

squidfunk commented 2 years ago

Released as part of 8.5.3.