{"id":26797421,"url":"https://github.com/xenocrat/sfnt2woff","last_synced_at":"2025-04-22T22:08:02.846Z","repository":{"id":80077214,"uuid":"190624971","full_name":"xenocrat/sfnt2woff","owner":"xenocrat","description":"A PHP class for converting OTF/TTF files to WOFF.","archived":false,"fork":false,"pushed_at":"2024-11-24T11:14:55.000Z","size":39,"stargazers_count":18,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T22:07:34.488Z","etag":null,"topics":["converter","font","otf","php","ttf","woff"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xenocrat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-06-06T17:48:05.000Z","updated_at":"2024-11-16T18:25:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"d952b43b-91c2-4f11-9371-9b3f96f2aa06","html_url":"https://github.com/xenocrat/sfnt2woff","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenocrat%2Fsfnt2woff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenocrat%2Fsfnt2woff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenocrat%2Fsfnt2woff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenocrat%2Fsfnt2woff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xenocrat","download_url":"https://codeload.github.com/xenocrat/sfnt2woff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250331825,"owners_count":21413103,"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":["converter","font","otf","php","ttf","woff"],"created_at":"2025-03-29T19:14:36.186Z","updated_at":"2025-04-22T22:08:02.800Z","avatar_url":"https://github.com/xenocrat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is this?\n\nsfnt2woff is a PHP class for converting OTF/TTF files to WOFF.\n\n## Requirements\n\n* PHP 8.0+\n* ZLIB extension\n\n## Usage\n\nConvert a font to WOFF:\n\n    $sfnt2woff = new \\xenocrat\\sfnt2woff();\n    $sfnt = file_get_contents(\"font.ttf\");\n    $sfnt2woff-\u003eimport($sfnt);\n    $woff = $sfnt2woff-\u003eexport();\n    file_put_contents(\"font.woff\", $woff);\n\nImport OTF/TTF font file:\n\n    $sfnt2woff-\u003eimport($sfnt);\n\nDisable the integrity test:\n\n    $sfnt2woff-\u003estrict = false;\n\nSet the compression level (1-9):\n\n    $sfnt2woff-\u003ecompression_level = 9;\n\nSet the WOFF file version:\n\n    $sfnt2woff-\u003eversion_major = 1;\n    $sfnt2woff-\u003eversion_minor = 1;\n\nSet the extended metadata block:\n\n    $xml = simplexml_load_file(\"example.xml\");\n    $sfnt2woff-\u003eset_meta($xml);\n\nSet the private data block:\n\n    $string = sha1(\"example\");\n    $sfnt2woff-\u003eset_priv($string);\n\nExport the WOFF font file:\n\n    $woff = $sfnt2woff-\u003eexport();\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenocrat%2Fsfnt2woff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxenocrat%2Fsfnt2woff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenocrat%2Fsfnt2woff/lists"}