{"id":19417810,"url":"https://github.com/bradsec/fontconvert","last_synced_at":"2025-04-24T13:33:56.308Z","repository":{"id":158277829,"uuid":"561544098","full_name":"bradsec/fontconvert","owner":"bradsec","description":"A bash shell script for batch conversion of font files using fontforge. Supports both TrueType Font (TTF) and OpenType Font (OTF). Convert from either format.","archived":false,"fork":false,"pushed_at":"2023-08-04T07:44:47.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T06:06:09.588Z","etag":null,"topics":["bash-script","batch-processing","conversion","converter","fontforge","otf-fonts","shell-script","ttf-fonts"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bradsec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-03T23:26:27.000Z","updated_at":"2024-09-28T14:11:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"370de8a4-0728-49fd-8912-9d46aac1f072","html_url":"https://github.com/bradsec/fontconvert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Ffontconvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Ffontconvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Ffontconvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradsec%2Ffontconvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradsec","download_url":"https://codeload.github.com/bradsec/fontconvert/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250636432,"owners_count":21463075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-script","batch-processing","conversion","converter","fontforge","otf-fonts","shell-script","ttf-fonts"],"created_at":"2024-11-10T13:11:27.903Z","updated_at":"2025-04-24T13:33:56.267Z","avatar_url":"https://github.com/bradsec.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FONTCONVERT\n\nA bash shell script for batch conversion of font files using fontforge. Supports both TrueType Font (TTF) and OpenType Font (OTF). Convert from either format. \n\n`.ttf` files will be converted to `.otf`  \n`.otf` files will be converted to `.ttf`\n\nBy default new converted file names will be changed to lowercase and cleaned up to include only alpha-numeric characters. If you don't want the filename changed set `config[cleanName]=false` in the config array.  \n\nAny font files which cannot be converted due to being invalid, bad or corrupt files will be moved to the configured `config[badDir]` directory which by default is `./bad`.\n\nTo enable a recursive search of the source directory increase the `config[maxDepth]` from 1.\n\n### Usage\n```terminal\nFONTCONVERT (for use with fontforge)\n\nUsage:\n\n    Run script using: ./fontconvert.sh or bash fontconvert.sh\n\n    Source files to be converted need to be in [.../fontconvert/src].\n\n    .ttf files will be converted to .otf\n    .otf files will be converted to .ttf\n\n    New files will be saved in [.../fontconvert/dst].\n\n    Bad or corrupt source files will be moved to [.../fontconvert/bad].\n```\n\n### Script Setup\n\n1. Clone the repo\n```terminal\ncd ~\ngit clone https://github.com/bradsec/fontconvert.git\ncd fontconvert\n```\n2. Make script executable\n```terminal\nchmod +x fontconvert.sh\n```\n3. **Copy fonts to be converted into the `/fontconvert/src` directory.**\n\n4. Run the script\n```terminal\n./fontconvert.sh\n```\n\nThe files will be converted and saved in the `/fontconvert/dst` directory.\n\n### Requirements\n\nThe fontforge package must be installed. Visit https://fontforge.org or https://github.com/fontforge/fontforge for more information.\n\n- Debian/Ubuntu Linux install\n```terminal\nsudo apt install fontforge\n```\n- macOS install (using homebrew)\n```terminal\nbrew install fontforge\n```\n- macOS may also require bash to be upgraded if running \u003c bash v4\n```terminal\nbrew install bash\nexec bash\n```\n\n\n### Troubleshooting\n\nCorrupt or bad font files will be prefixed by [FAIL]. The script will continue to process any remaining files. To view the full error of a failed file try running fontforge manually on the problem font file with the command below. Change the last two names `fontin.ttf` and `fontout.otf` to the applicable file name.\n\n```terminal\nfontforge -lang=ff -c 'Open($1); Generate($2); Close();' fontin.ttf fontout.otf\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradsec%2Ffontconvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradsec%2Ffontconvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradsec%2Ffontconvert/lists"}