pourmand1376 / obsidian-custom-font

A plugin to set custom font for obsidian
https://obsidian.md/plugins?id=custom-font-loader
MIT License
60 stars 1 forks source link

Bold Font is not supported #15

Open pourmand1376 opened 2 months ago

pourmand1376 commented 2 months ago

Currently, I don't support setting up fonts with Bold, ExtraBold (and other weights from 100 to 700).

One of the solutions can be adding a variable font or creating a variable font. But that overall is something I should consider.

pourmand1376 commented 2 months ago

I've found that If your font is variable, you can use it with the plugin as you would normally and It would just work.

Basically, a variable font contains all of the weights in itself. It has all the combined weights altogether.

Use this site to see if your font is variable:

You would see something like this: CleanShot 2024-09-04 at 10 46 37

pourmand1376 commented 2 months ago

I should automatically import all fonts in the directory starting with "font-name" as try to assign weights to them.

https://stackoverflow.com/questions/47897685/how-do-i-specify-which-font-weights-are-available-for-a-given-font- family

https://github.com/pourmand1376/obsidian-custom-font/blob/9f7126697c4ea2220387424634209cdd2b2bcd9e/main.ts#L181-L184