{"id":16556308,"url":"https://github.com/miraclx/svgembed","last_synced_at":"2025-08-07T04:47:40.125Z","repository":{"id":97679930,"uuid":"264726613","full_name":"miraclx/svgembed","owner":"miraclx","description":"SVG embedder for https://github.com/marionebl/svg-term","archived":false,"fork":false,"pushed_at":"2020-05-17T20:18:38.000Z","size":810,"stargazers_count":15,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-03T04:29:06.428Z","etag":null,"topics":["asciicast","asciinema","css","embedder","font","svg","svg-term","svg-term-cli","tty"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miraclx.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}},"created_at":"2020-05-17T18:03:20.000Z","updated_at":"2025-07-18T14:16:29.000Z","dependencies_parsed_at":"2023-05-05T18:16:27.927Z","dependency_job_id":null,"html_url":"https://github.com/miraclx/svgembed","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/miraclx/svgembed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miraclx%2Fsvgembed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miraclx%2Fsvgembed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miraclx%2Fsvgembed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miraclx%2Fsvgembed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miraclx","download_url":"https://codeload.github.com/miraclx/svgembed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miraclx%2Fsvgembed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269201196,"owners_count":24377453,"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","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["asciicast","asciinema","css","embedder","font","svg","svg-term","svg-term-cli","tty"],"created_at":"2024-10-11T20:04:09.866Z","updated_at":"2025-08-07T04:47:40.042Z","avatar_url":"https://github.com/miraclx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# svgembed\n\n\u003e SVG embedder for \u003chttps://github.com/marionebl/svg-term\u003e\n\n## Installing\n\n``` bash\nnpm install -g git+https://github.com/miraclx/svgembed\n\n# alternatively, with yarn\nyarn global add https://github.com/miraclx/svgembed.git\n```\n\n## Features\n\n- [x] Window titles\n- [x] Embed custom fonts (ttf, otf) **[useful in the case of embedding powerline/nerd fonts]**\n- [ ] Multiple font files\n- [x] Move icons (close, minimize, maximize) to the right side of the window.\n- [x] Window icon darken on hover (doesn't work behind `\u003cimg\u003e` tags like on GitHub)\n- [ ] Customize window icon order\n- [ ] Embed custom CSS\n- [ ] Handle filestreams and `stdin`\n\n## Caveats\n\nSince this script just embeds the files you give it along with some SVG patches, the filesize is incremental and can be really large in some cases.\nTry using lightweight versions of fonts you embed. Or create custom fonts with the glyphs you need.\n\nDepending on your browser and internet connection, the fonts might take a little while to load.\n\n## Usage\n\n`$ svgembed --help`\n\n``` text\nsvgembed (c) 2020 Miraculous Owonubi \u003comiraculous@gmail.com\u003e\n------------------------------------------------------------\nUsage: svgembed [options]\n\nOptions\n  -i, --input \u003cVALUE\u003e  the input SVG file\n  -o, --output \u003cVALUE\u003e the output file name\n  -f, --font \u003cVALUE\u003e   fontfile to be embedded (otf/ttf)\n  -t, --title [VALUE]  set terminal window title (default: \"Terminal\")\n  -r, --right          use right-sided window icons\n  -v, --hover          dim window icons on hover\n  --overwrite          overwrite existing output\n  --h, --help          output usage information\n```\n\n## Screenshots\n\n### Original SVG from svg-term\n\n`svg-term --in media/demo --out demo.svg --window --term konsole --width 78`\n\n- Input Size: `52.10 KiB`\n- Output Size: `501.62 KiB`\n\n![Screenshot of original output from svg-term](media/demo.svg)\n\n### Processed\n\n`svgembed -i demo.svg -o final.svg -r -f nerd_fonts.ttf -t \"svgembed is cool\" --hover`\n\n- Input Size: `501.62 KiB`\n- Font: Fira Code Nerd Font, Regular (`1007.0 KiB`)\n- Title: `\"svgembed is cool\"`\n- Icon position: `right`\n- On hover: `dim` (view the [raw SVG](https://cdn.jsdelivr.net/gh/miraclx/svgembed/media/final.svg) to see this)\n- Output Size: `1844.76 KiB`\n\n![Screenshot of embedded fonts](media/final.svg)\n\n### Window icon dim on hover `-v, --hover`\n\n![Screenshot of embedded fonts](media/hover.png)\n\n## Library API\n\n### config: \\\u003cobject\\\u003e\n\n- `font`: \\\u003cstring\\\u003e: The font to be embedded, if any.\n- `title`: \\\u003cstring\\\u003e: The window title to be used, if any.\n- `right`: \\\u003cboolean\\\u003e: Whether or not to move window icons to right side.\n- `hover`: \\\u003cboolean\\\u003e: Whether or not to dim window icons on hover.\n\n### embedFont\n\n- `file`: \\\u003cstring\\\u003e: string representation of the SVG file.\n- `config`: \\\u003c[config](#config_object)\\\u003e\n\n### insertTitleAndPositionIcons\n\n- `file`: \\\u003cstring\\\u003e: string representation of the SVG file.\n- `config`: \\\u003c[config](#config_object)\\\u003e\n\n## License\n\n[Apache 2.0][license] © **Miraculous Owonubi** ([@miraclx][author-url]) \u0026lt;omiraculous@gmail.com\u0026gt;\n\n[license]:  LICENSE \"Apache 2.0 License\"\n[author-url]: https://github.com/miraclx\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiraclx%2Fsvgembed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiraclx%2Fsvgembed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiraclx%2Fsvgembed/lists"}