Skip to content

Commit

Permalink
Major update
Browse files Browse the repository at this point in the history
Cyrillic updated per consultant feedback. All glyphs hinted. Nerd Fonts integrated in two flavors, Powerline only, and Nerd Fonts complete (almost!). Cleaned up the files. Many other little fixes.
  • Loading branch information
aaronbell committed Nov 19, 2019
1 parent 4eb7c02 commit 8d3a90a
Show file tree
Hide file tree
Showing 1,976 changed files with 45,140 additions and 41,131 deletions.
133 changes: 11 additions & 122 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,74 +18,13 @@ Clicking on the Cascadia.ttf file will download it to your machine. From there,

👉 **Note:** If you have previously installed a version of Cascadia Code, please uninstall the previous version *prior* to installing a new version. Not doing so can result in improper rendering.

# Contributing
For more details and app-specific instructions, please check the wiki.

This project welcomes contributions and suggestions. Most contributions require you to
agree to a Contributor License Agreement (CLA) declaring that you have the right to,
and actually do, grant us the rights to use your contribution. For details, visit
https://cla.microsoft.com.
# Get involved
Instructions on how to modify and submit an update to the Cascadia Code source is available in the wiki.

When you submit a pull request, a CLA-bot will automatically determine whether you need
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

# Getting Started

## Modifying the Font

The font is currently available as a (Unified Font Object) UFO + designspace file. This is a universal format that can be opened / exported from all major typeface design tools (Glyphs, Robofont, Fontlab VI, Fontforge). An understanding of [Microsoft VTT](https://docs.microsoft.com/en-us/typography/tools/vtt/) (Windows) and [FontTools](https://github.com/fonttools/fonttools) is also recommended for modification of the font's hinting. A Glyphs source is also provided in the 'releases' tab for your convenience.

Please note that the hinting code is point order and glyph order specific. As a result, be aware that glyph modifications may require necessitate corrections to the hinting to ensure proper rendering.


### Building the font from source

While the UFO can be edited and OTF / TTF exported directly from any of the aforementioned typeface design tools, you may want to build the font with hinting included, or with Nerd fonts integrated. This process requires the use of [Microsoft VTT](https://docs.microsoft.com/en-us/typography/tools/vtt/) (to compile the hints) and [FontTools](https://github.com/fonttools/fonttools).

1) Download the source code for Cascadia Code via the "download" button, or from the command line:
'git clone https://github.com/microsoft/cascadia-code.git'

2) Install [Python 3](https://realpython.com/installing-python/). If you're on a Windows machine, you may also need to install `pip`; [https://bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py)

3) While not necessary, we recommend creating a virtual environment

```
# create new virtual environment called e.g. 'fonttools-venv', or anything you like
python3 -m venv fonttools-venv
# source the `activate` shell script to enter the environment; to exit, just type `deactivate`
. fonttools-venv/bin/activate
# to activate the virtual environment in Windows `cmd.exe`, do
fonttools-venv\Scripts\activate.bat
```

4) Install required font libraries. Navigate to the Cascadia Code folder downloaded in step 1.

```
pip3 install -r requirements.txt
pip3 install git+https://github.com/daltonmaag/vttLib.git
```


5) Build the font from source:

```
python3 build.py sources
```

This will build the TTF font in the "build" folder.

6) Open CascadiaCode.ttf in VTT. Select the "ship font" command to produce a compiled TTF font with the manual hints.

Assuming everything has worked without issue, a new version of the font, "CascadiaCode-ship.ttf" should have been created in the same folder that is ready to go!


## Creating a Pull Request

At the moment, we do not have a testing framework for verifying proper character creation. When creating a pull request, please heavily document the steps you took along with images displaying your changes. Additionally, please provide images of the updated character(s) at different screen sizes to validate proper hinting.

## Communicating with the Team
# Communicating with the Team

The easiest way to communicate with the team is via GitHub issues. Please file new issues, feature requests and suggestions, but **DO search for similar open/closed pre-existing issues before you do**.

Expand All @@ -99,64 +38,14 @@ Kayla Cinnamon, Program Manager: [@cinnamon_msft](https://twitter.com/cinnamon_m

Rich Turner, Program Manager: [@richturn_ms](https://twitter.com/richturn_ms)

# Roadmap

This is the planned roadmap for Cascadia Code. Please be aware that the delivery dates are estimates and the features may arrive slightly earlier or later than predicted. This roadmap will continuously be updated as further features come along.

| Delivery Date | Feature | Description |
| ------------- | ------- | ----------- |
| November 2019 | Conversion of GitHub Pipeline/Workflow | Converting the GitHub pipeline to UFO to allow for users who don't have Macs to contribute to the source code. |
| November 2019 | Character Set Extensions | The addition of Greek, Cyrillic, and Vietnamese, and other characters to the main character set. |
| March 2020 | Weight Axis | Converting Cascadia Code into a variable font with milestone light and bold weights. |
| March 2020 | Arabic and Hebrew Characters | The addition of Arabic and Hebrew characters to the main character set. |

# Installing Cascadia Code in VS Code

1. Go to `File > Preferences` or hit `Ctrl + ,` in VS Code.
2. Enter "Font Face" in search field.
3. Enter following in Font Face option: `'Cascadia Code', Consolas, 'Courier New', monospace`.
4. Enable `Font Ligatures` option available just below 'Font Face'.
5. Press `Enter` and you're good to go.

> Note: If you've installed font and it does not get applied in VS Code, try restarting VS Code.
![VS Code Settings](images/vscode-ligature-settings.png "VS Code Ligatures Setting")

# Setting Cascadia Code in Visual Studio 2019

1. Go to `Tools > Options` in Visual Studio 2019.
2. Enter "Fonts and Colors" in search field or go to `Environment > Fonts and Colors`.
3. Select `Text Editor` in `Show settings for:`.
4. In the `Fonts` Dropdown select `Cascadia Code`.
5. Press `Ok` and you're good to go.

> Note: If you've installed the font and it does not get applied in Visual Studio 2019, try restarting Visual Studio 2019.
![Visual Studio 2019 Settings](images/vs2019-font-settings.png "Visual Studio 2019 Font Settings")

# Setting Cascadia Code in Windows Terminal (Preview)

1. Go to the Dropdown `Preferences` or hit `Ctrl + ,` in Windows Terminal (Preview).
2. Open the `profiles.json` in an editor like VS Code.
3. Scroll down to the `"profiles"` Property.
4. Look for your desired profile.
5. Change the `"fontFace"` attribute to `"fontFace": "Cascadia Code"`.

![Windows Terminal (Preview) Settings](images/windows-terminal-preview-font-settings.png "Windows Terminal (Preview) Font Settings")

![Windows Terminal (Preview) Settings](images/windows-terminal-preview-font-settings-json.png "Windows Terminal (Preview) Font Settings")

# Setting Cascadia Code in IntelliJ IDE 2019

1. Go to the Dropdown `File > Settings` or hit `Ctrl + Alt + S` in IntelliJ IDE 2019.
2. Enter "Appearance" in search field or go to `Editor > Font`.
4. Select `Cascadia Code` in the Dropdown.
5. Select Enable Font Ligatures
6. Press Ok and you're good to go.

![IntelliJ IDE 2019 Settings](images/intellij-ide-2019-font-settings.png "IntelliJ IDE 2019 Font Settings")
_Special thanks_ to:
Fira Code – OpenType code for the coding ligatures – [github](https://github.com/tonsky/FiraCode)
Nerd Fonts - Centralizing app iconography - [github](https://github.com/ryanoasis/nerd-fonts)
Viktoriya Grabowska – Cyrillic Consultant - [@vika_grabowska](https://twitter.com/vika_grabowska)
Gerry Leonidas – Greek Consultant – [@gerryleonidas](https://twitter.com/gerryleonidas)
Donny Trương – Vietnamese Consultant – [Vietnamese Typography](https://vietnamesetypography.com)

# Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
12 changes: 11 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,17 @@
instanceNF_noLIG_font = ufo2ft.compileTTF(instanceNF_noLIG, removeOverlaps=True, inplace=True)
instancePL_noLIG_font = ufo2ft.compileTTF(instancePL_noLIG, removeOverlaps=True, inplace=True)

# 7. Save
#7. Merge VTT hinting code
print ("Adding VTT Code")
vtt_data_file = (INPUT_DIR / "vtt_data" / "CascadiaCode.ttx")
vttLib.transfer.merge_from_file(instance_font, vtt_data_file)
vttLib.transfer.merge_from_file(instanceNF_font, vtt_data_file)
vttLib.transfer.merge_from_file(instancePL_font, vtt_data_file)
vttLib.transfer.merge_from_file(instance_noLIG_font, vtt_data_file)
vttLib.transfer.merge_from_file(instanceNF_noLIG_font, vtt_data_file)
vttLib.transfer.merge_from_file(instancePL_noLIG_font, vtt_data_file)

# 8. Save
print ("Saving")
OUTPUT_DIR.mkdir(exist_ok=True)
instance_font.save(file_path.with_name("Cascadia.ttf"))
Expand Down
Binary file modified build/Cascadia.ttf
Binary file not shown.
Binary file modified build/CascadiaMono.ttf
Binary file not shown.
Binary file modified build/CascadiaMonoNF.ttf
Binary file not shown.
Binary file modified build/CascadiaMonoPL.ttf
Binary file not shown.
Binary file modified build/CascadiaNF.ttf
Binary file not shown.
Binary file modified build/CascadiaPL.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion sources/CascadiaCode-Regular.ufo/features.fea
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ sub zero by zero.zero;
table GDEF {
# automatic
GlyphClassDef
[A Aacute Abreve Abreveacute Abrevedotbelow Abrevegrave Abrevehookabove Abrevetilde Acircumflex Acircumflexacute Acircumflexdotbelow Acircumflexgrave Acircumflexhookabove Acircumflextilde Adieresis Adotbelow Agrave Ahookabove Amacron Aogonek Aring Aringacute Atilde AE AEacute B C Cacute Ccaron Ccedilla Ccircumflex Cdotaccent D Eth Dcaron Dcroat E Eacute Ebreve Ecaron Ecircumflex Ecircumflexacute Ecircumflexdotbelow Ecircumflexgrave Ecircumflexhookabove Ecircumflextilde Edieresis Edotaccent Edotbelow Egrave Ehookabove Emacron Eogonek Etilde F G Gbreve Gcaron Gcircumflex Gcommaaccent Gdotaccent H Hbar Hcircumflex I Iacute Ibreve Icircumflex Idieresis Idotaccent Idotbelow Igrave Ihookabove Imacron Iogonek Itilde J Jcircumflex K Kcommaaccent L Lacute Lcaron Lcommaaccent Ldot Lslash M N Nacute Ncaron Ncommaaccent Eng Nhookleft Ntilde O Oacute Obreve Ocircumflex Ocircumflexacute Ocircumflexdotbelow Ocircumflexgrave Ocircumflexhookabove Ocircumflextilde Odieresis Odotbelow Ograve Ohookabove Ohorn Ohornacute Ohorndotbelow Ohorngrave Ohornhookabove Ohorntilde Ohungarumlaut Omacron Oogonek Oslash Oslashacute Otilde OE P Thorn Q R Racute Rcaron Rcommaaccent S Sacute Scaron Scedilla Scircumflex Scommaaccent T Tbar Tcaron Tcedilla Tcommaaccent U Uacute Ubreve Ucircumflex Udieresis Udotbelow Ugrave Uhookabove Uhorn Uhornacute Uhorndotbelow Uhorngrave Uhornhookabove Uhorntilde Uhungarumlaut Umacron Uogonek Uring Utilde V W Wacute Wcircumflex Wdieresis Wgrave X Y Yacute Ycircumflex Ydieresis Ydotbelow Ygrave Yhookabove Ymacron Ytilde Z Zacute Zcaron Zdotaccent Cacute.loclPLK Nacute.loclPLK Oacute.loclPLK Sacute.loclPLK Zacute.loclPLK a aacute abreve abreveacute abrevedotbelow abrevegrave abrevehookabove abrevetilde acircumflex acircumflexacute acircumflexdotbelow acircumflexgrave acircumflexhookabove acircumflextilde adieresis adotbelow agrave ahookabove amacron aogonek aring aringacute atilde ae aeacute b c cacute ccaron ccedilla ccircumflex cdotaccent d dcroat e eacute ebreve ecaron ecircumflex ecircumflexacute ecircumflexdotbelow ecircumflexgrave ecircumflexhookabove ecircumflextilde edieresis edotaccent edotbelow egrave ehookabove emacron eogonek etilde schwa f g gbreve gcaron gcircumflex gcommaaccent gdotaccent h hbar hcircumflex i idotless iacute ibreve icircumflex idieresis idotbelow igrave ihookabove imacron iogonek itilde jdotless jcircumflex k kcommaaccent l lacute lcaron lcommaaccent ldot lslash m n nacute napostrophe ncaron ncommaaccent ntilde o oacute obreve ocircumflex ocircumflexacute ocircumflexdotbelow ocircumflexgrave ocircumflexhookabove ocircumflextilde odieresis odotbelow ograve ohookabove ohorn ohornacute ohorndotbelow ohorngrave ohornhookabove ohorntilde ohungarumlaut omacron oogonek oslash oslashacute otilde oe p q r racute rcaron rcommaaccent s sacute scaron scedilla scircumflex scommaaccent longs t tbar tcaron tcedilla tcommaaccent u uacute ubreve ucircumflex udieresis udotbelow ugrave uhookabove uhorn uhornacute uhorndotbelow uhorngrave uhornhookabove uhorntilde uhungarumlaut umacron uogonek uring utilde v w wacute wcircumflex wdieresis wgrave x y yacute ycircumflex ydieresis ydotbelow ygrave yhookabove ymacron ytilde z zacute zcaron zdotaccent cacute.loclPLK nacute.loclPLK oacute.loclPLK sacute.loclPLK zacute.loclPLK ordmasculine A-cy Ve-cy Ge-cy Gje-cy Ie-cy Iegrave-cy Io-cy Ii-cy Iishort-cy Iigrave-cy Ka-cy Kje-cy Em-cy En-cy O-cy Er-cy Es-cy Te-cy U-cy Ushort-cy Ha-cy Dze-cy E-cy Ereversed-cy I-cy Yi-cy Je-cy Ghestroke-cy Endescender-cy Ustraight-cy Ustraightstroke-cy Hadescender-cy Palochka-cy Imacron-cy Obarred-cy Umacron-cy a-cy ge-cy gje-cy ie-cy iegrave-cy io-cy ii-cy iishort-cy iigrave-cy ka-cy kje-cy o-cy er-cy es-cy u-cy ushort-cy ha-cy dze-cy e-cy ereversed-cy i-cy yi-cy ghestroke-cy kadescender-cy hadescender-cy shha-cy palochka-cy schwa-cy imacron-cy obarred-cy umacron-cy de-cy.loclBGR ii-cy.loclBGR iishort-cy.loclBGR iigrave-cy.loclBGR pe-cy.loclBGR te-cy.loclBGR tse-cy.loclBGR Alpha Beta Gamma Epsilon Zeta Eta Theta Iota Kappa Mu Nu Omicron Rho Tau Upsilon Chi Alphatonos Iotadieresis Upsilondieresis epsilon eta iota omicron upsilon omega iotatonos iotadieresis iotadieresistonos upsilontonos upsilondieresis upsilondieresistonos omicrontonos omegatonos epsilontonos etatonos baht cedi cent colonsign dollar dong franc guarani kip naira peseta peso ruble tugrik won yen], # Base
[A Aacute Abreve Abreveacute Abrevedotbelow Abrevegrave Abrevehookabove Abrevetilde Acircumflex Acircumflexacute Acircumflexdotbelow Acircumflexgrave Acircumflexhookabove Acircumflextilde Adieresis Adotbelow Agrave Ahookabove Amacron Aogonek Aring Aringacute Atilde AE AEacute B C Cacute Ccaron Ccedilla Ccircumflex Cdotaccent D Eth Dcaron Dcroat E Eacute Ebreve Ecaron Ecircumflex Ecircumflexacute Ecircumflexdotbelow Ecircumflexgrave Ecircumflexhookabove Ecircumflextilde Edieresis Edotaccent Edotbelow Egrave Ehookabove Emacron Eogonek Etilde F G Gbreve Gcaron Gcircumflex Gcommaaccent Gdotaccent H Hbar Hcircumflex I Iacute Ibreve Icircumflex Idieresis Idotaccent Idotbelow Igrave Ihookabove Imacron Iogonek Itilde J Jcircumflex K Kcommaaccent L Lacute Lcaron Lcommaaccent Ldot Lslash M N Nacute Ncaron Ncommaaccent Eng Nhookleft Ntilde O Oacute Obreve Ocircumflex Ocircumflexacute Ocircumflexdotbelow Ocircumflexgrave Ocircumflexhookabove Ocircumflextilde Odieresis Odotbelow Ograve Ohookabove Ohorn Ohornacute Ohorndotbelow Ohorngrave Ohornhookabove Ohorntilde Ohungarumlaut Omacron Oogonek Oslash Oslashacute Otilde OE P Thorn Q R Racute Rcaron Rcommaaccent S Sacute Scaron Scedilla Scircumflex Scommaaccent T Tbar Tcaron Tcedilla Tcommaaccent U Uacute Ubreve Ucircumflex Udieresis Udotbelow Ugrave Uhookabove Uhorn Uhornacute Uhorndotbelow Uhorngrave Uhornhookabove Uhorntilde Uhungarumlaut Umacron Uogonek Uring Utilde V W Wacute Wcircumflex Wdieresis Wgrave X Y Yacute Ycircumflex Ydieresis Ydotbelow Ygrave Yhookabove Ymacron Ytilde Z Zacute Zcaron Zdotaccent Cacute.loclPLK Nacute.loclPLK Oacute.loclPLK Sacute.loclPLK Zacute.loclPLK a aacute abreve abreveacute abrevedotbelow abrevegrave abrevehookabove abrevetilde acircumflex acircumflexacute acircumflexdotbelow acircumflexgrave acircumflexhookabove acircumflextilde adieresis adotbelow agrave ahookabove amacron aogonek aring aringacute atilde ae aeacute b c cacute ccaron ccedilla ccircumflex cdotaccent d dcroat e eacute ebreve ecaron ecircumflex ecircumflexacute ecircumflexdotbelow ecircumflexgrave ecircumflexhookabove ecircumflextilde edieresis edotaccent edotbelow egrave ehookabove emacron eogonek etilde schwa f g gbreve gcaron gcircumflex gcommaaccent gdotaccent h hbar hcircumflex i idotless iacute ibreve icircumflex idieresis idotbelow igrave ihookabove imacron iogonek itilde jdotless jcircumflex k kcommaaccent l lacute lcaron lcommaaccent ldot lslash m n nacute napostrophe ncaron ncommaaccent ntilde o oacute obreve ocircumflex ocircumflexacute ocircumflexdotbelow ocircumflexgrave ocircumflexhookabove ocircumflextilde odieresis odotbelow ograve ohookabove ohorn ohornacute ohorndotbelow ohorngrave ohornhookabove ohorntilde ohungarumlaut omacron oogonek oslash oslashacute otilde oe p q r racute rcaron rcommaaccent s sacute scaron scedilla scircumflex scommaaccent longs t tbar tcaron tcedilla tcommaaccent u uacute ubreve ucircumflex udieresis udotbelow ugrave uhookabove uhorn uhornacute uhorndotbelow uhorngrave uhornhookabove uhorntilde uhungarumlaut umacron uogonek uring utilde v w wacute wcircumflex wdieresis wgrave x y yacute ycircumflex ydieresis ydotbelow ygrave yhookabove ymacron ytilde z zacute zcaron zdotaccent cacute.loclPLK nacute.loclPLK oacute.loclPLK sacute.loclPLK zacute.loclPLK ordmasculine A-cy Ve-cy Ie-cy Iegrave-cy Io-cy Ii-cy Iishort-cy Iigrave-cy Em-cy En-cy O-cy Er-cy Es-cy Te-cy U-cy Ushort-cy Ha-cy Dze-cy E-cy Ereversed-cy I-cy Yi-cy Je-cy Endescender-cy Ustraight-cy Ustraightstroke-cy Hadescender-cy Palochka-cy Imacron-cy Obarred-cy Umacron-cy a-cy ge-cy gje-cy ie-cy iegrave-cy io-cy ii-cy iishort-cy iigrave-cy ka-cy kje-cy o-cy er-cy es-cy u-cy ushort-cy ha-cy dze-cy e-cy ereversed-cy i-cy yi-cy ghestroke-cy kadescender-cy hadescender-cy shha-cy palochka-cy schwa-cy imacron-cy obarred-cy umacron-cy de-cy.loclBGR ii-cy.loclBGR iishort-cy.loclBGR iigrave-cy.loclBGR pe-cy.loclBGR te-cy.loclBGR Alpha Beta Epsilon Zeta Eta Theta Iota Kappa Mu Nu Omicron Rho Tau Upsilon Chi Alphatonos Iotadieresis Upsilondieresis epsilon eta iota omicron upsilon omega iotatonos iotadieresis iotadieresistonos upsilontonos upsilondieresis upsilondieresistonos omicrontonos omegatonos epsilontonos etatonos baht cedi cent colonsign dollar dong franc guarani kip naira peseta peso ruble tugrik won yen], # Base
, # Liga
[dieresiscomb dotaccentcomb gravecomb acutecomb hungarumlautcomb circumflexcomb caroncomb brevecomb ringcomb tildecomb macroncomb hookabovecomb commaturnedabovecomb horncomb dotbelowcomb commaaccentcomb cedillacomb ogonekcomb dieresiscomb.case dotaccentcomb.case gravecomb.case acutecomb.case hungarumlautcomb.case circumflexcomb.case caroncomb.case brevecomb.case ringcomb.case tildecomb.case macroncomb.case hookabovecomb.case horncomb.case acutecomb.loclPLK acutecomb.case.loclPLK brevecomb-cy brevecomb-cy.case], # Mark
;
Expand Down
6 changes: 2 additions & 4 deletions sources/CascadiaCode-Regular.ufo/fontinfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
<integer>4</integer>
</array>
<key>openTypeOS2Type</key>
<array>
<integer>3</integer>
</array>
<array/>
<key>openTypeOS2VendorID</key>
<string>SAJA</string>
<key>postscriptBlueValues</key>
Expand Down Expand Up @@ -237,7 +235,7 @@ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
<key>versionMajor</key>
<integer>1911</integer>
<key>versionMinor</key>
<integer>150</integer>
<integer>200</integer>
<key>xHeight</key>
<integer>1060</integer>
</dict>
Expand Down

This file was deleted.

Loading

0 comments on commit 8d3a90a

Please sign in to comment.