feat: Add Cascadia font (#465)

* adding cascadia font

* adding font file
This commit is contained in:
wei 2020-01-20 07:12:12 -08:00 committed by Christopher Chedeau
parent 2918a28bf0
commit 37e082fcdc
4 changed files with 15 additions and 1 deletions

BIN
public/Cascadia.ttf Normal file

Binary file not shown.

View File

@ -55,6 +55,13 @@
type="font/ttf" type="font/ttf"
crossorigin="anonymous" crossorigin="anonymous"
/> />
<link
rel="preload"
href="https://uploads.codesandbox.io/uploads/user/5f5b1ecd-ac15-4c7f-803e-e11ff53ea4ce/z1tp-Cascadia.ttf"
as="font"
type="font/ttf"
crossorigin="anonymous"
/>
<script <script
async async

View File

@ -248,7 +248,7 @@ export const actionChangeFontFamily: Action = {
options={[ options={[
{ value: "Virgil", text: "Hand-drawn" }, { value: "Virgil", text: "Hand-drawn" },
{ value: "Helvetica", text: "Normal" }, { value: "Helvetica", text: "Normal" },
{ value: "Courier", text: "Code" } { value: "Cascadia", text: "Code" }
]} ]}
value={getSelectedAttribute( value={getSelectedAttribute(
elements, elements,

View File

@ -7,6 +7,13 @@
font-display: swap; font-display: swap;
} }
/* https://github.com/microsoft/cascadia-code */
@font-face {
font-family: "Cascadia";
src: url("https://uploads.codesandbox.io/uploads/user/5f5b1ecd-ac15-4c7f-803e-e11ff53ea4ce/z1tp-Cascadia.ttf");
font-display: swap;
}
body { body {
margin: 0; margin: 0;
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;