Aloxaf / silicon

Create beautiful image of your source code.
MIT License
3.09k stars 82 forks source link

Consider add more font examples and usage examples #132

Open Dentrax opened 3 years ago

Dentrax commented 3 years ago

Currently, none of below are working as expected. I could not understand how to use --font flag in correct way. The fonts that described in README is built-in fonts? Can not we give custom font if it already installed?

Custom fonts:

And please describe what the purpose of ; in -f flag. (i.e: -f "Hack; SourceCodePro") What Hack; means? What else can be used there? Like, -f "Nerd; JetBrainsMono=15" are correct?

You give an example in font.rs but it is not included in fonts folder. It would be great if you create a new flag called: --list-available-fonts.

Aloxaf commented 3 years ago

Currently, none of below are working as expected. I could not understand how to use --font flag in correct way. The fonts that described in README is built-in fonts? Can not we give custom font if it already installed?

* `silicon --from-clipboard -l yaml -f "SourceCodePro"`

* `silicon --from-clipboard -l yaml -f "SourceCodePro=15"`

* `silicon --from-clipboard -l yaml -f "SourceCodePro:15"`

Custom fonts:

* `silicon --from-clipboard -l yaml -f "./Downloads/my-custom-font.tff"`

Both the first and the second should work. What do you mean "not working as expected"? What's the output of these two commands?

Silicon can use custom fonts. But currently, they need to be installed into the system first. I will improve this.

And please describe what the purpose of ; in -f flag. (i.e: -f "Hack; SourceCodePro")

Just a delimiter.

What Hack; means?

It's the built-in font of silicon.

It would be great if you create a new flag called: --list-available-fonts.

That's a good idea. Thanks for your advice.