{"id":16138205,"url":"https://github.com/frozolotl/typst-font-compare","last_synced_at":"2025-03-18T16:30:49.676Z","repository":{"id":222577445,"uuid":"757791702","full_name":"frozolotl/typst-font-compare","owner":"frozolotl","description":"A tool to compare how Typst documents would look using different fonts or font variants.","archived":false,"fork":false,"pushed_at":"2024-04-23T20:50:17.000Z","size":87,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T10:52:26.336Z","etag":null,"topics":["cli","tools","typst"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frozolotl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-02-15T01:36:49.000Z","updated_at":"2024-11-06T01:43:31.000Z","dependencies_parsed_at":"2024-03-16T15:04:05.821Z","dependency_job_id":"8aa4bbcb-37c6-4a7c-8abb-994d48320ebd","html_url":"https://github.com/frozolotl/typst-font-compare","commit_stats":null,"previous_names":["frozolotl/typst-font-compare"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Ftypst-font-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Ftypst-font-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Ftypst-font-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frozolotl%2Ftypst-font-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frozolotl","download_url":"https://codeload.github.com/frozolotl/typst-font-compare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243940106,"owners_count":20372045,"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":["cli","tools","typst"],"created_at":"2024-10-09T23:32:57.625Z","updated_at":"2025-03-18T16:30:49.386Z","avatar_url":"https://github.com/frozolotl.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typst-font-compare\nA tool to compare how Typst documents would look using different fonts or font variants.\n\n## Installation\n```sh\ncargo install --path .\n```\n\n## Usage\n### Examples\nThe following command generates a file `main.variants.pdf` containing all the system fonts:\n```sh\ntypst-font-compare main.typ\n```\n\nTo additionally check all variants, meaning style, weight, and stretch:\n```sh\ntypst-font-compare --variants main.typ\n```\n\nThe variants file includes too many Noto fonts. Let's remove them.\n```sh\ntypst-font-compare --exclude Noto main.typ\n```\n\nWe only want to compare a certain few fonts.\n```sh\ntypst-font-compare --include 'Roboto|Inter|Ubuntu' main.typ\n```\n\nOnly compare fonts that support italics.\n```sh\ntypst-font-compare --style italic main.typ\n```\n\n### Command-line Arguments\n```\nA tool to compare how Typst documents would look using different fonts or font variants\n\nUsage: typst-font-compare [OPTIONS] \u003cINPUT\u003e\n\nArguments:\n  \u003cINPUT\u003e\n          Path to the Typst input file\n\nOptions:\n  -o, --output \u003cOUTPUT\u003e\n          Path to the output PDF.\n          \n          For an `input.typ`, the output will be `input.variants.pdf`.\n\n  -v, --variants\n          Whether to try each variant (style, weight, stretch)\n\n  -f, --fallback\n          Whether to enable font fallback\n\n  -i, --include \u003cINCLUDE\u003e\n          Only include font families that match this regular expression.\n          \n          The exclude regex takes priority over this regex.\n\n  -e, --exclude \u003cEXCLUDE\u003e\n          Exclude font families that match this regular expression.\n          \n          Takes priority over the include regex.\n\n      --style \u003cSTYLE\u003e\n          Which font styles to check\n          \n          [default: normal]\n          [possible values: normal, italic, oblique]\n\n      --weight \u003cWEIGHT\u003e\n          Which font weights to check\n\n      --stretch \u003cSTRETCH\u003e\n          Which font stretch values to check\n          \n          [possible values: ultra-condensed, extra-condensed, condensed, semi-condensed, normal, semi-expanded, expanded, extra-expanded, ultra-expanded]\n\n      --root \u003cDIR\u003e\n          Specify a different project root folder\n          \n          [env: TYPST_ROOT=]\n\n      --font-path \u003cDIR\u003e\n          Adds additional directories to search for fonts in\n          \n          [env: TYPST_FONT_PATHS=]\n\n      --ppi \u003cPPI\u003e\n          The resolution to render the embedded variant content to\n          \n          [default: 300]\n\n  -h, --help\n          Print help (see a summary with '-h')\n```\n\n## Questions and Answers\n### The pages are much larger than necessary.\nPrefix your document with the following snippet to make them be only as large as needed:\n```typ\n#set page(height: auto, margin: .5cm)\n```\n\nYou can also use this one to automatically scale all dimensions, though it can sometimes produce subpar results:\n```typ\n#set page(width: auto, height: auto, margin: .5cm)\n```\n\n### Why do certain fonts not appear?\nThis tool does not embed any fonts that might normally be embedded into Typst.\nYou must either install them system-wide, or add a `--font-path fonts-folder` argument, where `fonts-folder` contains the needed fonts.\n\n### The generated document looks weird in my PDF viewer.\nEach page this tool generates can have a different height.\nSome PDF viewers don't handle this correctly.\nTry opening the file in Firefox instead.\n\n### I'm getting a file not found error when including a package.\nThis tool does not automatically download packages.\nCompile your document using `typst compile` first and then `typst-font-compare` should work correctly.\n\n### The program just crashes at some point.\nImages are stored in memory, making it potentially very memory intensive.\nThus, your OOM killer (out-of-memory killer) shuts it down.\nTry not generating each variant, excluding certain fonts, or decreasing the PPI.\n\n## Legal\nThis software is not affiliated with Typst, the brand.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozolotl%2Ftypst-font-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrozolotl%2Ftypst-font-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrozolotl%2Ftypst-font-compare/lists"}