Closed ghost closed 7 years ago
It looks like this isn't seen until it falls through to certain fonts, like in this case: Courier
.
font-feature-settings: "kern", "liga";
should probably be font-feature-settings: "kern", "liga" 0;
.
Also @StephenTaylor-Kx, you don't need to use fenced_code
if you are using pymdownx.superfences
. The latter replaces the former. extra
also includs fenced_code
. I would check out http://facelessuser.github.io/pymdown-extensions/usage_notes/.
I imagine it is just working for you, so maybe there are no issues, but it looks like you are probably including fences
twice and then including superfences
. When mixing pymdownx-extensions
with the default extra
, it is usually better to just include what you need out of extra
individually, and then include what you need out of pymdownx-extensions
. That is what I do: https://github.com/facelessuser/pymdown-extensions/blob/master/mkdocs.yml#L43.
That's interesting, I didn't know that there are monospace fonts with ligatures. It's indeed a bug. I will provide a fix that removes the "liga" font-feature-setting
for code sections.
Fixed in #326, will be released as 1.6.2 shortly.
Description
A ligature is a typographer’s solution to the blurring effect of juxtaposing certain characters. For example, in
fi
the bar of thef
can occlude the dot of thei
, so the character pair is replaced with a ligature – a glyph – representing their fusion.This aid to legibility has no place in fixed-width typefaces, and by replacing two characters with one, damages horizontal alignment.
The Markdown
terrific official flat fissures
renders in MkDocs with ligatures forfi
,ff
andfl
.A similar effect can be observed in the fenced code block. Also see online at code.kx.com.
Expected behavior
The text rendered without ligatures
Actual behavior
The text rendered with ligatures
Steps to reproduce the bug
terrific official flat fissures
in a Markdown source file.Notes
Source files for this MkDocs project are online at GitHub: KxSystems/docs.
The bug does not appear when Chrome or Safari render the attached file ligature.txt.
ligatures.txt
The bug does not appear when Chrome or Safari render
The bug disappears when you comment out in the YML:
theme: 'material'
.The bug survives commenting out in the YML:
extra_css
extra_javascript
markdown_extensions
Package versions
Project configuration
System information