{"id":31918765,"url":"https://github.com/kekee000/react-font-svg","last_synced_at":"2025-10-13T21:17:27.006Z","repository":{"id":57333302,"uuid":"224130550","full_name":"kekee000/react-font-svg","owner":"kekee000","description":"fonts to react/react-native svg icon components","archived":false,"fork":false,"pushed_at":"2019-11-26T08:52:26.000Z","size":407,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-11T16:11:44.647Z","etag":null,"topics":["font","icon","react","react-native","svg","svg-icon"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/kekee000.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}},"created_at":"2019-11-26T07:36:32.000Z","updated_at":"2025-07-09T10:12:56.000Z","dependencies_parsed_at":"2022-08-24T20:41:11.219Z","dependency_job_id":null,"html_url":"https://github.com/kekee000/react-font-svg","commit_stats":null,"previous_names":["kekee000/react-font-svg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kekee000/react-font-svg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Freact-font-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Freact-font-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Freact-font-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Freact-font-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kekee000","download_url":"https://codeload.github.com/kekee000/react-font-svg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kekee000%2Freact-font-svg/sbom","scorecard":{"id":554172,"data":{"date":"2025-08-11","repo":{"name":"github.com/kekee000/react-font-svg","commit":"1830f1b396a80a1be1013c6b0be766e0b4b8a180"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T11:52:59.183Z","repository_id":57333302,"created_at":"2025-08-20T11:52:59.183Z","updated_at":"2025-08-20T11:52:59.183Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017048,"owners_count":26085950,"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-10-13T02:00:06.723Z","response_time":61,"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":["font","icon","react","react-native","svg","svg-icon"],"created_at":"2025-10-13T21:17:20.822Z","updated_at":"2025-10-13T21:17:26.997Z","avatar_url":"https://github.com/kekee000.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[English](./README.md) | [中文](./README.zh-CN.md)\n\n\nreact-font-svg\n===\n\nYou can use this tool to convert fonts to `react`/`react-native` `Icon` Components.\n\nSupport font formats:\n\n- ttf\n- woff/woff2\n- otf\n- eot\n\n# Usage\n\n```javascript\nnpm install -g react-font-svg\nreact-font-svg ./src/icons/fontawesome-webfont.ttf -d ./src/icons\n```\n\nIt will generate Jsx component, contains svg paths(default `react-native`):\n\n\n```javascript\n/**\n * @file Icon.js\n * @author \n */\n\nimport React from \"react\";\nimport Svg, {Path} from 'react-native-svg';\n\n// icon glyphs\nconst glyphs = {\n    'glass':'M1699 -198 q0 -23 -18 -36.5 q-18 -13.5 -38 -17.5 q-20 -4 -43 -4 l-1408 0 q-23 0 -43 4 q-20 4 -38 17.5 q-18 13.5 -18 36.5 q0 35 43 78 l632 632 l0 768 l-320 0 q-26 0 -45 19 q-19 19 -19 45 q0 26 19 45 q19 19 45 19 l896 0 q26 0 45 -19 q19 -19 19 -45 q0 -26 -19 -45 q-19 -19 -45 -19 l-320 0 l0 -768 l632 -632 q43 -43 43 -78 Z', \n    'ok':'M1643 178 l-136 -136 q-28 -28 -68 -28 q-40 0 -68 28 l-656 657 l-294 -295 q-28 -28 -68 -28 q-40 0 -68 28 l-136 136 q-28 28 -28 68 q0 40 28 68 l362 362 l136 136 q28 28 68 28 q40 0 68 -28 l136 -136 l724 -724 q28 -28 28 -68 q0 -40 -28 -68 Z' \n};\n\nconst Icon = props =\u003e (\n    \u003cSvg width={props.width || 120} height={props.height || 120} viewBox={props.viewBox || \"0 -256 1792 1792\"}\u003e\n        \u003cPath fill={props.color || '#000'} d={glyphs[props.name] || ''}\u003e\u003c/Path\u003e\n    \u003c/Svg\u003e\n);\n\nexport default Icon;\n```\n\nYou can use it in React, ReactNative project now:\n\n```javascript\nimport React from 'react';\nimport Icon from './Icon';\n\nexport default class App extends React.Component {\n    render() {\n        return (\n            \u003c\u003e\n            \u003cIcon name=\"glass\" color=\"#000\" width=\"100\" height=\"100\" viewBox=\"0 0 1024 1024\"/\u003e\n            \u003cIcon name=\"ok\" color=\"#000\"/\u003e\n            \u003c/\u003e\n        );\n    }\n}\n\n```\n\n# Api\n\n```javascript\nconst reactFontSvgConverter = require('react-font-svg');\n\nconst iconTexts = reactFontSvgConverter(\n    './font/iconfont.ttf',\n    {\n        names: ['music', 'search'],\n        unicodes: [0xf001, 0xf002],\n        platform: 'react-native'\n    });\n// output\n// {Icon: ''}\n```\n\n# Notice\n\n- React Native project should import [`react-native-svg`](https://github.com/react-native-community/react-native-svg) modules.\n- Font formats like `otf` or `woff` will cause errors in some cases, you can convert to `ttf` font file before generate.\n\n# Options\n\n`react-font-svg -h`\n\n```\nUsage\n    $ react-font-svg \u003cfile\u003e [\u003coutput\u003e]\n\n  Example\n    $ react-font-svg ./src/font.ttf\n    $ react-font-svg ./src/font.ttf -n 'music,search' -u '0xf00d,0xf00e' -d ./src/icons\n\n\n  Options,\n    -n, --names                         glyph names to output eg. -n music,search\n    -u, --unicodes                      unicode code points to output eg. -u 0xe001,0xe002\n    -d, --dest                          output folder\n    -p, --platform                      component template: react-native|react\n```\n\n# Relative\n\n[FontEditor](https://github.com/ecomfe/fonteditor)\n\n[fonteditor-core](https://github.com/kekee000/fonteditor-core)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkekee000%2Freact-font-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkekee000%2Freact-font-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkekee000%2Freact-font-svg/lists"}