{"id":16594853,"url":"https://github.com/symind/postcss-pingfang","last_synced_at":"2025-06-11T08:34:15.170Z","repository":{"id":65475525,"uuid":"588645929","full_name":"SyMind/postcss-pingfang","owner":"SyMind","description":"低成本优化 PingFang 在安卓机型下的表现 💅","archived":false,"fork":false,"pushed_at":"2023-08-05T12:11:04.000Z","size":80,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-25T18:52:55.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/SyMind.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":"2023-01-13T16:26:42.000Z","updated_at":"2024-05-11T12:25:31.000Z","dependencies_parsed_at":"2025-02-14T09:36:38.237Z","dependency_job_id":"bfc18b45-9248-489e-905b-8f91645a5c6c","html_url":"https://github.com/SyMind/postcss-pingfang","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/SyMind%2Fpostcss-pingfang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyMind%2Fpostcss-pingfang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyMind%2Fpostcss-pingfang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyMind%2Fpostcss-pingfang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SyMind","download_url":"https://codeload.github.com/SyMind/postcss-pingfang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SyMind%2Fpostcss-pingfang/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259230467,"owners_count":22825394,"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":[],"created_at":"2024-10-11T23:47:42.735Z","updated_at":"2025-06-11T08:34:15.149Z","avatar_url":"https://github.com/SyMind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-pingfang\n\n优化 PingFang SC 在安卓机型下的表现\n\n## 动机\n\n设计同学使用 PingFang SC 作为设计稿默认字体，这会带来以下的问题：\n1. PingFang SC 并非安卓手机的内置字体，可以使用 font-weight 替换原设计稿中的字体，如 PingFangSC-Medium 替换为 500。\n2. 但大部分安卓手机内置的字体仅对中文支持 3 种字重，此时如 font-weight 为 500 的字体实际上并不会被加粗。\n\n而该插件将在 iOS 手机上使用 PingFangSC-Medium，在安卓手机上使用 font-weight: 700。\n\n## 安装\n\n```bash\nnpm install postcss-pingfang\n```\n\n## 使用\n\n```javascript\n// dependencies\nconst fs = require('fs')\nconst postcss = require('postcss')\nconst pingfang = require('postcss-pingfang')\n\n// css to be processed\nconst css = fs.readFileSync('input.css', 'utf8')\n\n// process css\nconst output = postcss()\n  .use(pingfang())\n  .process(css)\n  .css\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymind%2Fpostcss-pingfang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymind%2Fpostcss-pingfang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymind%2Fpostcss-pingfang/lists"}