Comments (6)
Hi Maciej!
What operating system are you using? It is possible to define this script so that it runs globally on your command line, but the approach differs by OS
from fontname.py.
Thank you for your answer!
I'm on Big Sur 11.3 (20E232)
from fontname.py.
I'm on Big Sur 11.3 (20E232)
I am on macOS too. The way that I approach it is to add scripts (shell, Python) to a scripts
directory under my home directory, and then add that directory to my system PATH. Here is an example of instructions to update your PATH on Big Sur:
https://wpbeaches.com/how-to-add-to-the-shell-path-in-macos-using-terminal/
My approach is the "permanent" approach in that article. I edit the PATH in the .zshrc
configuration file with the following line:
export PATH="/Users/chris/scripts:$PATH"
Take care to confirm that your paths are correct when you do this if you are not familiar with PATH editing. It is possible to interfere with access to system executables on your system if you do something like forget to add the $PATH
element in the line (this appends or prepends the existing PATH defintion based on the location where you place it in the string, this is how you define priority of executables that have the same name - if it points to a same name file that is first in order it takes precedence over one that is found in a dir path later in the PATH string).
Keep the fontname.py script in the top level of the directory that you add to your path. Make sure to run the source ~/.zshrc
step after you edit the .zshrc file and then you can run the script here with the following command on your command line from any working directory:
fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] <FONT PATH ...>
Note that you need to install the fonttools
Python package in order to do this. This is no different from the requirement when you use it with the syntax:
python3 fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] <FONT PATH ...>
If you want a simpler approach that does not involve PATH editing, you can always point the python interpreter at the script location on your system:
python3 path/to/directory/fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] <FONT PATH ...>
Let me know if this doesn't address your question.
from fontname.py.
It is also possible to remove the .py
file extension from the file if you prefer to use the syntax:
fontname [NEW FONT FAMILY NAME] [FONT PATH 1] <FONT PATH ...>
from fontname.py.
If you want a simpler approach that does not involve PATH editing, you can always point the python interpreter at the script location on your system:
python3 path/to/directory/fontname.py [NEW FONT FAMILY NAME] [FONT PATH 1] <FONT PATH ...>
Thank you for describing it so precisely!
The one quoted above seems like a solution for me. I will examine that.
Best!
from fontname.py.
Good luck!
from fontname.py.
Related Issues (8)
- Unicode decode error with checkmark (U+2713) glyph in print statement HOT 1
- "can't find '__main__' module" HOT 6
- Not renaming font family on MacOS HOT 22
- Error: Unable to detect the font style HOT 6
- FullName in CFF table is not changed HOT 4
- Support for localized names
- Name ID 3 also needs to be changed (unique identifier) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fontname.py.