{"id":19218332,"url":"https://github.com/greggman/font-utils","last_synced_at":"2026-05-16T15:34:21.133Z","repository":{"id":140563760,"uuid":"165802792","full_name":"greggman/font-utils","owner":"greggman","description":"Some font utils I wrote to generate fonts for gamemaker","archived":false,"fork":false,"pushed_at":"2023-11-17T22:16:47.000Z","size":3454,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T22:52:12.298Z","etag":null,"topics":["deltarune","fonts","gamemaker","gamemaker-studio-2"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greggman.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}},"created_at":"2019-01-15T07:10:12.000Z","updated_at":"2023-11-18T03:41:17.000Z","dependencies_parsed_at":"2023-11-18T00:09:26.567Z","dependency_job_id":null,"html_url":"https://github.com/greggman/font-utils","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/greggman%2Ffont-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greggman%2Ffont-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greggman%2Ffont-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greggman%2Ffont-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greggman","download_url":"https://codeload.github.com/greggman/font-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292387,"owners_count":19778311,"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":["deltarune","fonts","gamemaker","gamemaker-studio-2"],"created_at":"2024-11-09T14:26:14.710Z","updated_at":"2025-11-14T15:07:34.354Z","avatar_url":"https://github.com/greggman.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Some font utils used in a gamemaker project\n\nNote I'm dumping these here as a place to back them up.\nIf you find them useful good for you but don't expect\nany support.\n\nThey will not work out of the box. In particular the fonts\nused are not included.\n\n# Gamemaker Issues\n\nThe problems with gamemaker and fonts\n\n1. gamemaker requires all glyphs to be the same height.\n\n   So a period (.) takes the same vertical space as the letter B\n\n2. gamemaker doesn't understand that glyphs can be larger than their font size\n\n   In other words you set a font size for 20 pixels but some glyphs might actually\n   extend above the top of a 20 pixel tall area as well as below\n\nThe tools below, you give them a font-size (the size the render the glyphs),\na glyph-height (the size to make the box the glyph will be put inside),\nand a y-offset (how many pixels down from the top of the box to start rendering)\n\nThere's an option passed in, error-on-crop, that basically makes the generator\nfail if any glyph extends out of the box. Looking at the error messages you can\ntell if you need more space above (in which case make y-offset bigger) or more\nspace below (in which case make glyph-height bigger). Of course whenever you\nmake y-offset bigger you move all the glyphs down in their box so you probably\nhave to make glyph-height bigger on those cases.\n\nThe only other thing I think is not clear maybe is font-index. Some .ttf files have\nmultiple fonts inside. Here they are references by index. If you double click a .ttf\nfile a viewer will come up and you can prev/next to see the fonts and figure out\nthe index.\n\n\n# prerequisites\n\n* Windows 10 (otherwise you need to build font-altas-generator-freetype2)\n* Install node.js from https://nodejs.org\n* setup your folders like this\n\n        +-somefolder\n          +-fonts (contents of fonts.zip)\n          +-build-new/yourproject (gamemaker project)\n\n* open a node command prompt (or some command prompt with node.js in your path)\n\n        cd fonts/gen-font\n        npm install\n        cd ../fonts/make-fonts\n        npm install\n\n# To generate the fonts\n\n        cd fonts\n        node make-fonts/make-fonts.js\n\n  If you only want to generate some fonts you can add --font=substr as in\n\n        node make-fonts/make-fonts.js --font=tiny\n\n  which will only generate fonts with the word \"tiny\" in them\n\n# make-fonts/make-fonts.js\n\n  This is effectively just a batch file but using JavaScript so I can filter etc.\n  It calls `node ../gen-font/gen-font.js\n\n  If you look inside you'll see settings for each font. Example\n\n\n        {\n          fontName: \"Name of Font\",\n          font: \"Fonts-for-Gregg/Name Of Font.ttf\",\n          glyphHeight: 14,\n          fontSize: 10,\n          yOffset: 1,\n          light: true,\n          alphaMin: 10,\n          alphaMax: 144,\n          debugColor: \"0x0000FF\",\n          outputName: \"fnt_ja_small\",\n        },\n\n  Most of the options are passed to gen-font.js an so are more documented there\n\n# gen-font/gen-font.js\n\n  This calls the font generator, read the output and copies the results into\n  the gamemaker folders.\n\n# font-atlas-generator-freetype2\n\n  This is a C/C++ app that uses FreeType2 (a font library) to try to generate a font.\n  It saves out a .png file and a .json file with data about the glphys it wrote.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreggman%2Ffont-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreggman%2Ffont-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreggman%2Ffont-utils/lists"}