Svelte is an amazing front-end framework, which gives much better developer experience over other frameworks like Vue or React. To enjoy the super handy auto-format on save feature in VS Code, a little setup is needed at time of writing, here is how:
The first line let VS Code triggers auto-format on save, and the second line tells VS Code to use the Svelte extension as the default formatter for svelte files. Reload VS Code, you should be able to auto-format .svelte files on save from now on.
Note that Svelte extension internally uses prettier-plugin-svelt for auto formatting. It has no relationship with the Prettier extension in VS Code. That means, it dis-regards the Prettier extension settings in VS Code.
So what if you want to tweak the Prettier settings, such as using single quote, removing semi colon at line end … etc? You have to add a .prettierrc file in your project root in order to configure the Prettier plugin behavoir, a sample config file as follow:
this is the location of matplotlib config file, you will get something like …/matplotlib/mpl-data/matplotlibrc
The font folder is …/matplotlib/mpl-data/fonts/ttf , put your ttf file there.
2. Get ttf from ttc file (skip if you have ttf file already)
For macOS, the system Chinese fonts is Heiti, which is embed in a ttc file (ttc is a collection of multiple ttf files). Get the system ttc file in /System/Library/Fonts/STHeiti Medium.ttc Copy this file out and convert it to ttf. Here is an online ttc converter: