====== Ligaturen ======
* [[https://de.wikipedia.org/wiki/Ligatur_(Typografie)]]
Ligaturen werden gerne zum Programmieren benutzt und können in vielen bekannten Editoren und IDEs aktiviert werden (z.B. [[visual_studio_code|Visual Studio Code]] und JetBrains IDEs)
Schriftarten, die Ligaturen unterstützen:
* [[https://github.com/tonsky/firacode|Fira Code]] (am beliebtesten)
* [[https://github.com/microsoft/cascadia-code|Cascadia Code]]
* [[https://github.com/jetbrains/jetbrainsmono|JetBrains Mono]]
* [[https://github.com/i-tu/hasklig|Hasklig]]
* [[https://github.com/rubjo/victor-mono|Victor Mono]]
Schriftarten mit Ligaturen können u.a. durch **Stylistic Sets (ss)** und **Character Variants (cv)** angepasst werden.
===== Installation =====
* benötigt die Paketquelle //universe//
sudo apt install fonts-firacode
===== Fira Code + VS Code =====
* [[https://github.com/tonsky/FiraCode#whats-in-the-box]]
* [[https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions]]
Übersicht der unterstützten Variationen (v6), einfach die Datei in VS Code öffnen und mit den Einstellungen spielen (siehe weiter unten)
{
"character variants": {
"cv01": "a",
"cv02": "g",
"cv03..06": "i",
"cv07..10": "l",
"cv11..13": "0",
"cv14": "3",
"cv15..16": "*",
"cv17": "~",
"cv18": "%",
"cv19..20": "<=",
"cv21..22": "=<",
"cv23": ">=",
"cv24": "/=",
"cv25": ".-",
"cv26": ":-",
"cv27": "[]",
"cv28": "{. .}",
"cv29": "{}",
"cv30": "|",
"cv31": "()",
"cv32": ".="
},
"others": {
"onum": "01234567890",
"zero": "0"
},
"stylistic sets": {
"ss01": "r",
"ss02": "<= >=",
"ss03": "&",
"ss04": "$",
"ss05": "@",
"ss06": "\\",
"ss07": "=~ !~",
"ss08": "== === != !==",
"ss09": ">>= <<= ||= |=",
"ss10": "Fl Tl fi fj fl ft"
}
}
VS Code Fira Code einstellen und Ligaturen aktivieren:
{
"editor.fontFamily": "'Fira Code', Consolas, 'Courier New', monospace",
"editor.fontLigatures": true
}
''%%"editor.fontLigatures"%%'' nimmt einen boolean (''true''/''false'') oder einen //custom string// (siehe folgende links)
* [[https://developer.mozilla.org/docs/Web/CSS/font-feature-settings]]
* [[https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures]]
* [[https://css-tricks.com/almanac/properties/f/font-feature-settings/]]
VS Code Ligaturen mit SS, CV usw. aktivieren (''%%'calt'%%'' wird benötigt um die alle Funktionen zu unterstützen):
{
"editor.fontLigatures": "'calt', 'zero', 'ss04', 'ss07', 'ss09', 'ss10', 'cv06', 'cv25', 'cv26', 'cv27', 'cv28', 'cv29', 'cv30', 'cv32'"
}