refactor: FONT_FAMILY and related helpers

This commit is contained in:
dwelle 2023-08-25 21:05:45 +02:00
parent de1ebad755
commit ffa4cea61c
23 changed files with 130 additions and 115 deletions

View file

@ -10,13 +10,13 @@ import { FONT_FAMILY } from "@excalidraw/excalidraw";
`FONT_FAMILY` contains all the font families used in `Excalidraw` as explained below
| Font Family | Description |
| ----------- | ---------------------- |
| `Virgil` | The `handwritten` font |
| `Helvetica` | The `Normal` Font |
| `Cascadia` | The `Code` Font |
| Font Family | Description |
| ------------ | ------------------------------------------- |
| `HAND_DRAWN` | The handwritten font (by default, `Virgil`) |
| `NORMAL` | The regular font (by default, `Helvetica`) |
| `CODE` | The code font (by default, `Cascadia`) |
Defaults to `FONT_FAMILY.Virgil` unless passed in `initialData.appState.currentItemFontFamily`.
Defaults to `HAND_DRAWN` unless passed in `initialData.appState.currentItemFontFamily`.
### THEME