A collection of open webfonts hosted on a multi-region CDN. Available for direct use. https://fonts.diegoenriquezserrano.dev

adds README.md

authored by diegoenriquezserrano.dev and committed by

Tangled 98cde13e 70a1c40d

+106
+106
README.md
··· 1 + # open-fonts 2 + 3 + A collection of open source fonts. Served from a multi-region CDN and available for direct use. Served from https://fonts.diegoenriquezserrano.dev 4 + 5 + 6 + ## Index 7 + 8 + - [Requirements](#requirements) 9 + - [Installation](#installation) 10 + - [Running development server](#running-the-application) 11 + - [Building target files](#building-target-files) 12 + - [License](#license) 13 + 14 + 15 + ## Requirements 16 + 17 + - dart-sass 18 + - pigz 19 + - yarn 20 + 21 + 22 + ## Installation 23 + 24 + ### Dependencies 25 + 26 + #### dart-sass 27 + 28 + 1. Go to the [official dart-sass releases page](https://github.com/sass/dart-sass/releases) and download the most recent package that corresponds to your system. 29 + 30 + 2. Extract the contents into the directory you want to execute it from. example: 31 + 32 + ```bash 33 + # Check for or create target directory 34 + [ -d ~/.local/src/ ] || mkdir ~/.local/src/ 35 + # Assuming package downloaded to Downloads directory 36 + cd ~/Downloads/ 37 + # Decompress and extract source files to target dir 38 + # Update accordingly for current version if necessary 39 + tar -xf dart-sass-1.93.2-linux-x64.tar.gz -C ~/.local/src/ 40 + ``` 41 + 42 + 3. Add the dart-sass directory to your `$PATH`. eg. Add a `export PATH="$HOME/.local/src/dart-sass:$PATH"` line to your `.bashrc` file. 43 + 44 + --- 45 + #### pigz 46 + 47 + 1. Install using your typical system package manager. example 48 + 49 + ```bash 50 + # Debian/Ubuntu based Linux distributions 51 + sudo apt update && sudo apt install pigz -y; 52 + ``` 53 + 54 + --- 55 + #### yarn 56 + 57 + 1. If you already have `Node.js` and `npm` installed on your machine, proceed to step 2. Otherwise follow the official recommended installation instructions here: https://nodejs.org/en/download 58 + 59 + 2. Install `yarn`. 60 + 61 + ```bash 62 + npm i --global yarn 63 + ``` 64 + 65 + --- 66 + 67 + 68 + ### Development environment 69 + 70 + The build tools include `prettier` for formatting, `css-minify` for minifying target CSS files, and `vite` to spin up a local server with HMR for ease while developing. 71 + 72 + 1. Clone the .git repository 73 + ```bash 74 + git clone https://tangled.org/@diegoenriquezserrano.dev/open-fonts 75 + cd ./open-fonts 76 + ``` 77 + 78 + 2. Install packages 79 + ```bash 80 + yarn 81 + ``` 82 + 83 + 84 + ## Running development server 85 + 86 + The development environment includes a vite server so that you can view live updates to `index.html` at `http://localhost:3150/`. To use it run the vite script. 87 + 88 + ```bash 89 + yarn dev 90 + ``` 91 + 92 + 93 + ## Building target files 94 + 95 + Running the build script will run prettier on your `/scss` directory. It will then run sass-dart to compile the scss files into the `/css` directory. After that, it will run css-minify to minimize your css into the `/min` directory, and finally, it will run `/compress.sh` to gzip your minimized files into the `/gz` directory. 96 + 97 + You can run the build script with yarn: 98 + 99 + ```bash 100 + yarn build 101 + ``` 102 + 103 + 104 + ## License 105 + 106 + This project is licensed under the MIT License. See the COPYING file for details.