divi255 / sphinxcontrib.asciinema

Easily embed asciinema videos into Sphinx documentation
MIT License
21 stars 12 forks source link

Add font-family option for asciinema player #19

Closed PierreMarchand20 closed 11 months ago

PierreMarchand20 commented 2 years ago

Looking at the documentation of the asciinema player : https://github.com/asciinema/asciinema-player#terminalfontfamily it should be possible to change font-family the same way we can change font-size. But it does not seem to work via this sphinx extension, and looking quickly at the source code, the option font-size does appear here but not font-family. Would it be possible to add this option?

divi255 commented 2 years ago

Hi,

Will look on this soon

divi255 commented 2 years ago

Sorry for the delay, have a lot of tasks last time. It seems it is enough to enable the font-family in option_spec. Try 0.3.4, should work

PierreMarchand20 commented 2 years ago

Do I need to do something special to update it ? I just used pip3 install sphinxcontrib.asciinema --upgrade, but my sphinx project does not seem able to set the option.

It does not work when I try to set it and here's autocompletion only showing font-size:

image
divi255 commented 2 years ago

make sure you have 0.3.4 pip3 list|grep sphinxcontrib.asciinema

PierreMarchand20 commented 2 years ago

Ok, so I think the issue is that the feature was added in asciinema-player recently (https://github.com/asciinema/asciinema-player/pull/175) with v3.0, and the version shipped with your extension is <3.0.

PierreMarchand20 commented 2 years ago

I guess it should be fairly doable to update it, it was done here for a go/hugo module for example.