tonsky / FiraCode

Free monospaced font with programming ligatures
SIL Open Font License 1.1
77.26k stars 3.1k forks source link

Document complete list of stylistic sets and character variants #1203

Open thaliaarchi opened 3 years ago

thaliaarchi commented 3 years ago

Ever since the first stylistic sets were introduced in 2.0, I've maintained a table stylistic sets in my editor settings so I can preview font differences when selecting stylistic sets. With the upcoming 6.0 release, there's two additional stylistic sets and 30 character variants. It would help if the new ones were documented in the README with "on" and "off" variants.

I had issues describing i, l, and the various less than/greater than combinations. I also don't know the name of the Prolog :- and Clojure .- operators.

I have also wanted to see a specimen sheet of all characters in the font. Trivially, a-zA-Z0-9 are not pictured. Are other characters not pictured?

"editor.fontFamily": "'Fira Code', JuliaMono, 'Cascadia Code PL', 'SF Mono', Monaco, Menlo, Consolas, 'Courier New', Courier, monospace",
"editor.fontLigatures": "'ss06', 'ss07', 'ss09', 'ss10', 'cv14', 'cv26', 'cv27', 'cv28', 'cv30'",
// Fira Code stylistic sets:
//   ss01  r                  Sans-serif r
//   ss02  <= >=              Less than/greater than with horizontal bar
//   ss03  &                  Traditional ampersand
//   ss04  $                  Lightweight dollar sign
//   ss05  @                  Traditional at sign
//   ss06  \\                 Thin backslash
//   ss07  =~ !~              Regexp matching operator
//   ss08  == === != !==      Gaps in double/triple equals
//   ss09  >>= <<= ||= |=     Compound assignments
//   ss10  Fl Tl fi fj fl ft  Full ligatures
//   zero  0                  Dotted zero
//   onum  0123456789         Old-style figures
// Variants:
//   cv01  a      Single-storey a
//   cv02  g      Single-storey g
//   cv03  i      Sans-serif i
//   cv04  i      i without base
//   cv05  i      i with flat tail
//   cv06  i      i with curved tail
//   cv07  l      Sans-serif l
//   cv08  l      l without base
//   cv09  l      l with flat tail
//   cv10  l      l with curved tail (same as default?)
//   cv11  0      Plain zero
//   cv12  0      Slashed zero
//   cv13  0      Dotted zero
//   cv14  3      3 with flat top
//   cv15  *      Top-aligned asterisk
//   cv16  *      Hexagonal asterisk
//   cv17  ~      Top-aligned tilde
//   cv18  %      Percent with filled dots
//   cv19  <=     Lte with horizontal bar (< =)
//   cv20  <=     Left arrow              (< =)
//   cv21  =<     Lte                     (= <)
//   cv22  =<     Lte with horizontal bar (= <)
//   cv23  >=     Gte with horizontal bar (> =)
//   cv24  /=     Not equal               (/ =)
//   cv25  .-     Clojure .-
//   cv26  :-     Prolog :-
//   cv27  []     Box square brackets
//   cv28  {. .}  Nim pragma
//   cv29  {}     Rounded curly braces
//   cv30  |      Long vertical bar
kenmcd commented 3 years ago

Where are you getting all these Character Variants? I only see cv15, cv16, and cv19-cv28 in the source code /features/ folder.

Tough to document this before the fonts which actually include the features are generated.

thaliaarchi commented 3 years ago

You can see all the character variants with grep -Eo '(ss|cv)\d\d' FiraCode.glyphs | sort | uniq. It lists ss01-10 and cv01-30. They are also mentioned in the changelog.

I pulled my descriptions from the changelog and extras/stylistic_sets.png and filled in the gaps by building the fonts with Docker via make and examining each variant myself. I wanted to use the font before the release, so I built it myself.

kenmcd commented 3 years ago

Ahhh, I did not even look in the .glyphs file. Exported the fonts from there and now all can see all the variants. Thanks.

Here is the Character Set in its current state: Fira.Code.Regular.Character.Set.v6-pre-release.2021-02-18.pdf

thaliaarchi commented 3 years ago

How'd you export the character set? I notice that it's missing all ligatures.

tonsky commented 3 years ago

That’s probably because ligatures have no Unicode codepoint. There were some plans to assign reserved codepoints to them (see #211), but I didn’t get to it yet. Presumably it should help with Emacs compatibilty too.

As for documenting all variants, all will be there for 6.0 release.

thaliaarchi commented 3 years ago

If the ligatures had assigned codepoints, wouldn't there potentially be infinite codepoints for the infinite arrows?

kenmcd commented 3 years ago

I notice that it's missing all ligatures.

Character Set = Unicode character code points. Most ligatures have no code points.

Sounds like you expected a Glyph Set. I may be able to print that tomorrow (setting-up a new laptop so kinda in flux right now).

tonsky commented 3 years ago

@andrewarchi no :) each different segment would, though

kenmcd commented 3 years ago

OK, here is the Glyph List. Too big for GitHub 10MB limit.
Fira.Code.Glyph.List.v6-pre-release.2021-02-18.pdf (31MB, PDF)
https://workupload.com/file/2YxjzsmmA7s

thaliaarchi commented 3 years ago

Thanks!