adobe-type-tools / opentype-svg

Tools and sample files for making OpenType-SVG fonts
MIT License
212 stars 17 forks source link

it is not a valid folder path #29

Closed RePlayer2 closed 4 months ago

RePlayer2 commented 4 months ago

I use the OTF (Zebrawood. otf) file from the font file and the SVG file from the test file to run the code in the Command Line Window, which shows that it is not a valid folder path 微信截图_20240511215750

miguelsousa commented 4 months ago

svg_folder_path and input_path are positional arguments, not optional arguments, therefore the paths should not be preceded by any arguments. Try the following command instead:

python addsvg.py "H:\test_py\opentypesvg\" "H:\test_py\opentypesvg\Zebrawood.otf"
RePlayer2 commented 4 months ago

Thank you for answering my question,but i used your method the Command line Window still show”is not valid folder path“, I think ,I may need other ways to use the "addsvg.py" file image

miguelsousa commented 4 months ago

@RePlayer2 what output do you get when you run this command:

addsvg --help

Don't add anything to the command above. If opentypesvg was installed via pip you should be able to run the command above from any directory.

RePlayer2 commented 4 months ago

@miguelsousa This is my command used "addsvg --help“ image the English means is roughly ‘addsvg’ is not an internal or external command, nor is it a runnable program or bathc file however, I sure "pip instal opentypesvg"and "pip install -u pip" this is result image

but my PyCharm is run this issue‘s code ,in the picture below image "the libeary is pip install opentypesvg"

add to used library of opentypesvg succeed run my code,my pythons version is 3.8 ,ued venv all contain opentype-svg but is not use "addsvg --help" or "run code addsvg in pycharm",Whether it's "pip install opentype svg" or "addsvg code" the troubel is feel at a loss for me image

image

miguelsousa commented 4 months ago

OK, let's go step by step:

  1. Create a virtual environment
    python -m venv ot-svg
  2. Activate the virtual environment
    ot-svg\Scripts\activate.bat
  3. Install opentypesvg package
    python -m pip install opentypesvg
  4. Get the help for addsvg tool
    addsvg --help
RePlayer2 commented 4 months ago

It looks like it worked image

image it's greate ,Thank you for your Patient help, image i can used addsvg to generate fonts show in word