{"id":19560082,"url":"https://github.com/plotdb/text-to-svg","last_synced_at":"2025-07-31T01:41:24.500Z","repository":{"id":44740947,"uuid":"239947079","full_name":"plotdb/text-to-svg","owner":"plotdb","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-05T07:58:09.000Z","size":6925,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T08:35:16.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","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/plotdb.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}},"created_at":"2020-02-12T06:58:15.000Z","updated_at":"2022-01-21T15:23:05.000Z","dependencies_parsed_at":"2023-01-23T03:30:12.768Z","dependency_job_id":null,"html_url":"https://github.com/plotdb/text-to-svg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/plotdb/text-to-svg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftext-to-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftext-to-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftext-to-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftext-to-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plotdb","download_url":"https://codeload.github.com/plotdb/text-to-svg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Ftext-to-svg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267973271,"owners_count":24174401,"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-07-30T02:00:09.044Z","response_time":70,"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":[],"created_at":"2024-11-11T05:05:52.447Z","updated_at":"2025-07-31T01:41:24.467Z","avatar_url":"https://github.com/plotdb.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# text-to-svg\n\nconvert text to svg path. WIP.\n\n\n## Current Progress\n\nthere are already libraries doing this, such as\n\n * text-to-svg - convert text to svg path data\n * opentype-layout - calculate the position of each glyph in a multiple line manner.\n\nWe simply browserify them to tts.bundle.min.js and ol.bundle.min.js and it works.\n\nFor now to render text to svg we actually don't need text-to-svg, instead we only need opentype.js to parse font files / get path data, and opentype-layout for getting glyph position and calculating word-break ( which is provided by mattldesl/word-wrapper ). \n\nYet, we might want to derive a direct lib from multi-line text to svg that are handy in online text-editing environment.\n\n## TODO\n\n * API - whether using 3rd party library or not, we can have a common interface for rendering.\n   - tts(text, option) - return svg path nodes corresponding to each glyph in the text, as an array. options:\n     container: append path to this container if provided. ( is this necessary? TBD )\n     font: font name. ( We also need the font url. can be derived from choosefont. TBD )\n     fontSize: font size. default 16 ( in px )\n     lineHeight: line height. default 1.5 ( in em )\n     width: used by opentype-layout. use to wrap the texts.\n\n * Merge / Minimize code - combine text-to-svg and opentype-layout to provide our own version of text-to-svg.\n   - seems opentype-layout already does a good job, and we don't need text-to-svg. (TBD)\n\n * fallback fonts\n   - cjk characters won't be rendered correctly if chosen font doesn't support them. should we add fallback mechanism and load default fonts if need? (TBD)\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Ftext-to-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplotdb%2Ftext-to-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Ftext-to-svg/lists"}