{"id":18646304,"url":"https://github.com/figma-linux/figma-linux-bindings","last_synced_at":"2025-04-11T12:31:45.320Z","repository":{"id":57235308,"uuid":"148012502","full_name":"Figma-Linux/figma-linux-bindings","owner":"Figma-Linux","description":"C++ module for figma-linux. This module need for recursive reading a directories with fonts.","archived":false,"fork":false,"pushed_at":"2019-07-31T14:22:24.000Z","size":6342,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T14:01:39.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Figma-Linux.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":"2018-09-09T09:50:37.000Z","updated_at":"2019-10-20T19:52:08.000Z","dependencies_parsed_at":"2022-08-31T20:50:58.316Z","dependency_job_id":null,"html_url":"https://github.com/Figma-Linux/figma-linux-bindings","commit_stats":null,"previous_names":["chugunovroman/figma-linux-bindings"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Figma-Linux%2Ffigma-linux-bindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Figma-Linux%2Ffigma-linux-bindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Figma-Linux%2Ffigma-linux-bindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Figma-Linux%2Ffigma-linux-bindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Figma-Linux","download_url":"https://codeload.github.com/Figma-Linux/figma-linux-bindings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248401973,"owners_count":21097328,"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-11-07T06:19:08.475Z","updated_at":"2025-04-11T12:31:45.039Z","avatar_url":"https://github.com/Figma-Linux.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\nThis module find (by mask: \\\\.(tt[fc]|otf|pfb)) and combine all fonts from the passed directories. And returns IFonts object of fonts of next structure:\n\n```typescript\ninterface IFontsFigmaItem {\n\tpostscript: string;\n\tfamily: string;\n\tid: string;\n\tstyle?: string;\n\tweight?: number;\n\tstretch?: number;\n\titalic?: boolean;\n}\n\ninterface IFonts {\n\t[path: string]: Array\u003cIFontsFigmaItem\u003e\n}\n```\n\nExample:\n\n```javascript\n{ '/usr/share/fonts/opentype/stix/STIXVariants-Bold.otf':\n   [ { postscript: 'STIXVariants-Bold',\n       family: 'STIXVariants',\n       id: 'STIXVariants',\n       style: 'Bold',\n       weight: 400,\n       stretch: 5,\n       italic: false } ],\n  '/usr/share/fonts/opentype/stix/STIXIntegralsUpSm-Bold.otf':\n   [ { postscript: 'STIXIntegralsUpSm-Bold',\n       family: 'STIXIntegralsUpSm',\n       id: 'STIXIntegralsUpSm',\n       style: 'Bold',\n       weight: 400,\n       stretch: 5,\n       italic: false } ],\n  '/usr/share/fonts/opentype/stix/STIXNonUnicode-Regular.otf':\n   [ { postscript: 'STIXNonUnicode-Regular',\n       family: 'STIXNonUnicode',\n       id: 'STIXNonUnicode',\n       style: 'Regular',\n       weight: 400,\n       stretch: 5,\n       italic: false } ],\n  '/usr/share/fonts/opentype/stix/STIXSizeFourSym-Regular.otf':\n   [ { postscript: 'STIXSizeFourSym-Regular',\n       family: 'STIXSizeFourSym',\n       id: 'STIXSizeFourSym',\n       style: 'Regular',\n       weight: 400,\n       stretch: 5,\n       italic: false } ],\n  '/usr/share/fonts/opentype/noto/NotoSansCJK-DemiLight.ttc':\n   [ { postscript: 'NotoSansCJKjp-DemiLight',\n       family: 'Noto Sans CJK JP',\n       id: 'Noto Sans CJK JP',\n       style: 'DemiLight',\n       weight: 400,\n       stretch: 5,\n       italic: false },\n     { postscript: 'NotoSansCJKkr-DemiLight',\n       family: 'Noto Sans CJK KR',\n       id: 'Noto Sans CJK KR',\n       style: 'DemiLight',\n       weight: 400,\n       stretch: 5,\n       italic: false },\n     { postscript: 'NotoSansCJKsc-DemiLight',\n       family: 'Noto Sans CJK SC',\n       id: 'Noto Sans CJK SC',\n       style: 'DemiLight',\n       weight: 400,\n       stretch: 5,\n       italic: false },\n     { postscript: 'NotoSansCJKtc-DemiLight',\n       family: 'Noto Sans CJK TC',\n       id: 'Noto Sans CJK TC',\n       style: 'DemiLight',\n       weight: 400,\n       stretch: 5,\n       italic: false } ],\n  '/usr/share/fonts/opentype/noto/NotoSansCJK-Thin.ttc':\n   [ { postscript: 'NotoSansCJKjp-Thin',\n       family: 'Noto Sans CJK JP',\n       id: 'Noto Sans CJK JP',\n       style: 'Thin',\n       weight: 400,\n       stretch: 5,\n       italic: false },\n     { postscript: 'NotoSansCJKkr-Thin',\n       family: 'Noto Sans CJK KR',\n       id: 'Noto Sans CJK KR',\n       style: 'Thin',\n       weight: 400,\n       stretch: 5,\n       italic: false },\n     { postscript: 'NotoSansCJKsc-Thin',\n       family: 'Noto Sans CJK SC',\n       id: 'Noto Sans CJK SC',\n       style: 'Thin',\n       weight: 400,\n       stretch: 5,\n       italic: false },\n     { postscript: 'NotoSansCJKtc-Thin',\n       family: 'Noto Sans CJK TC',\n       id: 'Noto Sans CJK TC',\n       style: 'Thin',\n       weight: 400,\n       stretch: 5,\n       italic: false } ] }\n```\n\n# Usage\n\n```javascript\nimport * as binding from 'figma-linux-bindings';\n\nlet fonts;\nlet dirs = [\n  '/usr/share/fonts',\n  `${process.env.HOME}/.local/share/fonts`\n];\n\nbinding.getFonts(dirs, (err, fonts) =\u003e {\n  console.log('fonts: ', fonts);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigma-linux%2Ffigma-linux-bindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffigma-linux%2Ffigma-linux-bindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigma-linux%2Ffigma-linux-bindings/lists"}