Skip to content

Commit

Permalink
Merge pull request #2 from drunsinn/HersheyFonts
Browse files Browse the repository at this point in the history
Add support for Hershey Font files
  • Loading branch information
drunsinn authored Sep 18, 2021
2 parents f8ab62c + b7d763c commit 8ab94e8
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 61 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ installed on your system:
- [scipy](https://www.scipy.org) \>=0.19.0
- [freetype-py](https://github.com/rougier/freetype-py) \>=1.1
- argparse \>=1.4.0
- [Hershey-Fonts](https://github.com/apshu/HersheyFonts) \>= 2.1.0

### Install from Python Packaging Index

Expand All @@ -75,12 +76,17 @@ installed. For Windows, follow the instructions on [this github repo](https://g
- <http://www.fontspace.com/category/open>
- <https://www.theleagueofmoveabletype.com/>

The library for reading Hershey Fonts comes bundled with a set of
fonts. The GUI lets you select them individually as files or all by
enabling the option "Include Default Hershey Fonts".

- Make sure you have the necessary rights to use the font.

- Open a command prompt and run python3 type2nc.py or double-click the
`type2nc.py` file

- Select one or more font files
- Select one or more font files and/or select the option to use the default
Hersehy fonts

- create and select an output folder for the results

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
install_requires=['numpy>=1.6.2',
'scipy>=0.19.0',
'freetype-py>=1.1',
'argparse>=1.4.0'],
'argparse>=1.4.0',
'Hershey-Fonts>=2.1.0'],
scripts=['type2nc/type2nc.py'],
)
26 changes: 4 additions & 22 deletions type2nc/locales/de/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,91 +17,73 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: type2nc.py:326 type2nc.py:464
msgid "Select Font File"
msgstr "Schrift-Datei"

#: type2nc.py:340 type2nc.py:479
msgid "Select Destination Folder"
msgstr "Zielordner"

#: type2nc.py:354
msgid "Include Default Hershey Fonts"
msgstr "Standart Hershey Fonts ausgeben"

msgid "Select Step Size"
msgstr "Schrittweite"

#: type2nc.py:369
msgid "Create Demo Files"
msgstr "Demo-Datei erstellen"

#: type2nc.py:409
msgid "Include Empty Label"
msgstr "Leere LBL DEF erstellen"

#: type2nc.py:380
msgid "Generate"
msgstr "Erstellen"

#: type2nc.py:397
msgid "ASCII 0x20-0x7E and Latin1 0x80-0xFF"
msgstr "ASCII 0x20-0x7E und Latin1 0x80-0xFF"

#: type2nc.py:409
msgid "General Punctuation 0x2000-0x206F"
msgstr "Allgemeine Satzzeichen 0x2000-0x206F"

#: type2nc.py:421
msgid "IPA Extension 0x0250-0x02AF"
msgstr "IPA Extension 0x0250-0x02AF"

#: type2nc.py:433
msgid "Symbols 0x2190-0x23FF & 0x2600-0x27BF"
msgstr "Symbole 0x2190-0x23FF & 0x2600-0x27BF"

#: type2nc.py:445
msgid "Lang 0x0370-0x077F & 0x4E00-0x9FFF"
msgstr "Sprachen 0x0370-0x077F & 0x4E00-0x9FFF"

#: type2nc.py:472
#, python-format
msgid "%d files selected"
msgstr "%d Dateien ausgewählt"

#: type2nc.py:484
msgid "No folder selected"
msgstr "Kein Ordner ausgewählt"

#: type2nc.py:494
msgid "Step Size"
msgstr "Schrittweite"

#: type2nc.py:494
msgid ""
"Step Size between 0.001 (very fine) and 0.2 (very coarse) for converting "
"Splines"
msgstr ""
"Schrittweite zwischen 0.001 (sehr fein) and 0.2 (sehr grob) für Wandlung von "
"Splines"

#: type2nc.py:497
msgid "No step size selected"
msgstr "Keine Schrittweite eingegeben"

#: type2nc.py:509 type2nc.py:513 type2nc.py:517
msgid "Missing parameter"
msgstr "Fehlender Parameter"

#: type2nc.py:509
msgid "No font files selected"
msgstr "Keine Schriftart asugewählt"
msgstr "Keine Schriftart ausgewählt"

#: type2nc.py:513
msgid "No output folder selected"
msgstr "Kein Zielordner ausgewählt"

#: type2nc.py:563
msgid "Finished"
msgstr "Fertig"

#: type2nc.py:563
msgid "Finished processing all font files"
msgstr "Umwandlung aller Dateien abgeschlossen"
24 changes: 3 additions & 21 deletions type2nc/locales/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,91 +17,73 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: type2nc.py:326 type2nc.py:464
msgid "Select Font File"
msgstr "Select Font File"

#: type2nc.py:340 type2nc.py:479
msgid "Include Default Hershey Fonts"
msgstr "Include Default Hershey Fonts"

msgid "Select Destination Folder"
msgstr "Select Destination Folder"

#: type2nc.py:354
msgid "Select Step Size"
msgstr "Select Step Size"

#: type2nc.py:369
msgid "Create Demo Files"
msgstr "Create Demo Files"

#: type2nc.py:409
msgid "Include Empty Label"
msgstr "Include Empty Label"

#: type2nc.py:380
msgid "Generate"
msgstr "Generate"

#: type2nc.py:397
msgid "ASCII 0x20-0x7E and Latin1 0x80-0xFF"
msgstr "ASCII 0x20-0x7E and Latin1 0x80-0xFF"

#: type2nc.py:409
msgid "General Punctuation 0x2000-0x206F"
msgstr "General Punctuation 0x2000-0x206F"

#: type2nc.py:421
msgid "IPA Extension 0x0250-0x02AF"
msgstr "IPA Extension 0x0250-0x02AF"

#: type2nc.py:433
msgid "Symbols 0x2190-0x23FF & 0x2600-0x27BF"
msgstr "Symbols 0x2190-0x23FF & 0x2600-0x27BF"

#: type2nc.py:445
msgid "Lang 0x0370-0x077F & 0x4E00-0x9FFF"
msgstr "Lang 0x0370-0x077F & 0x4E00-0x9FFF"

#: type2nc.py:472
#, python-format
msgid "%d files selected"
msgstr "%d files selected"

#: type2nc.py:484
msgid "No folder selected"
msgstr "No folder selected"

#: type2nc.py:494
msgid "Step Size"
msgstr "Step Size"

#: type2nc.py:494
msgid ""
"Step Size between 0.001 (very fine) and 0.2 (very coarse) for converting "
"Splines"
msgstr ""
"Step Size between 0.001 (very fine) and 0.2 (very coarse) for converting "
"Splines"

#: type2nc.py:497
msgid "No step size selected"
msgstr "No step size selected"

#: type2nc.py:509 type2nc.py:513 type2nc.py:517
msgid "Missing parameter"
msgstr "Missing parameter"

#: type2nc.py:509
msgid "No font files selected"
msgstr "No font files selected"

#: type2nc.py:513
msgid "No output folder selected"
msgstr "No output folder selected"

#: type2nc.py:563
msgid "Finished"
msgstr "Finished"

#: type2nc.py:563
msgid "Finished processing all font files"
msgstr "Finished processing all font files"
Loading

0 comments on commit 8ab94e8

Please sign in to comment.