swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.58k stars 10.36k forks source link

[SR-6633] Ligature font for code snippets #49182

Open 7156ccc1-d3b8-4460-882a-3f5802920f8f opened 6 years ago

7156ccc1-d3b8-4460-882a-3f5802920f8f commented 6 years ago
Previous ID SR-6633
Radar None
Original Reporter @DevAndArtist
Type Improvement
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Project Infrastructure | |Labels | Improvement | |Assignee | najacque (JIRA) | |Priority | Medium | md5: 2c60cd422f77b814e5cdb52ea484fcab

Issue Description:

If possible allow the user to set the font for text snippets or propose globally a ligature font for code snippets on the forum.

It would be great if the snippets were rendered with with `FiraCode`

https://github.com/tonsky/FiraCode

Raw representation of the snippets remains untouched, only the visual representation is modified for better readability.

belkadan commented 6 years ago

I personally hate ligature code fonts, and they aren't standard on the internet, so it would have to be an opt-in thing. :-) I suspect we're not messing much with the Discourse CSS at all, though. On the flip side, it should be easy enough to add through a browser plugin, since Discourse has pretty obvious places to write CSS rules (.cooked pre code).

belkadan commented 6 years ago

najacque (JIRA User), anything to add?

swift-ci commented 6 years ago

Comment by Nicole Jacque (JIRA)

Yeah, I don't think we'd want to make this change universally. I'll see if the Discourse folks have any suggestions.