{"id":19327447,"url":"https://github.com/dcsch/ufokit","last_synced_at":"2025-06-26T06:35:35.106Z","repository":{"id":147572503,"uuid":"115835954","full_name":"dcsch/ufokit","owner":"dcsch","description":"Unified Font Object file handling","archived":false,"fork":false,"pushed_at":"2022-11-26T06:50:31.000Z","size":89,"stargazers_count":11,"open_issues_count":3,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-22T21:48:50.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/dcsch.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,"zenodo":null}},"created_at":"2017-12-31T01:43:36.000Z","updated_at":"2024-12-04T16:04:13.000Z","dependencies_parsed_at":"2023-05-31T16:15:58.644Z","dependency_job_id":null,"html_url":"https://github.com/dcsch/ufokit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dcsch/ufokit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcsch%2Fufokit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcsch%2Fufokit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcsch%2Fufokit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcsch%2Fufokit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcsch","download_url":"https://codeload.github.com/dcsch/ufokit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcsch%2Fufokit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262016530,"owners_count":23245527,"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-10T02:17:11.172Z","updated_at":"2025-06-26T06:35:35.096Z","avatar_url":"https://github.com/dcsch.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  UFOKit\n\nA Swift library for low-level [Unified Font Object](http://unifiedfontobject.org/)\nfile handling.\n\nA simple example to render a glyph in a view:\n```swift\ndo {\n\n  // Load the font and grab the set of glyphs\n  let ufoReader = try UFOReader(url: URL(fileURLWithPath: \"font.ufo\"))\n  let glyphSet = try ufoReader.glyphSet()\n\n  // Use a pen that generates a CGPath from a glyph\n  let pen = QuartzPen(glyphSet: glyphSet)\n  \n  // Read the glyph for 'A'\n  try glyphSet.readGlyph(glyphName: \"A\", pointPen: pen)\n\n  // Render in a simple view\n  let glyphView = GlyphView(frame: NSRect(x: 0, y: 0, width: 240, height: 480))\n  glyphView.glyphPath = pen.path\n  glyphView.bounds = pen.path.boundingBox\n  PlaygroundPage.current.liveView = glyphView\n} catch {\n  print(\"Error: \\(error)\")\n}\n\n// A simple view that only renders a CGPath\nclass GlyphView: NSView {\n  var glyphPath: CGPath?\n\n  override func draw(_ dirtyRect: NSRect) {\n    guard let context = NSGraphicsContext.current?.cgContext else {\n      return\n    }\n    context.setFillColor(CGColor.white)\n    context.fill(self.bounds)\n    if let path = glyphPath {\n      context.addPath(path)\n    }\n    context.setFillColor(CGColor.black)\n    context.fillPath()\n  }\n}\n```\n\n## Useful links\n- [Unified Font Object (UFO) specification](http://unifiedfontobject.org/)\n- [ufoLib — A low-level UFO reader and writer in Python](https://github.com/unified-font-object/ufoLib)\n- [RoboFab](http://robofab.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsch%2Fufokit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcsch%2Fufokit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsch%2Fufokit/lists"}