{"id":25499954,"url":"https://github.com/opcon/quickfont","last_synced_at":"2025-10-29T07:10:30.891Z","repository":{"id":21744116,"uuid":"25065956","full_name":"opcon/QuickFont","owner":"opcon","description":"A Modern OpenGL Font Rendering Library for OpenTK","archived":false,"fork":false,"pushed_at":"2021-07-04T13:04:23.000Z","size":5225,"stargazers_count":85,"open_issues_count":11,"forks_count":26,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-06T06:53:52.890Z","etag":null,"topics":["c-sharp","cross-platform","font","opengl","opentk","rendering"],"latest_commit_sha":null,"homepage":"https://github.com/opcon/QuickFont","language":"C#","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/opcon.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-11T06:22:02.000Z","updated_at":"2025-02-23T10:47:56.000Z","dependencies_parsed_at":"2022-08-19T16:50:51.851Z","dependency_job_id":null,"html_url":"https://github.com/opcon/QuickFont","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/opcon%2FQuickFont","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opcon%2FQuickFont/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opcon%2FQuickFont/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opcon%2FQuickFont/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opcon","download_url":"https://codeload.github.com/opcon/QuickFont/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248686067,"owners_count":21145413,"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":["c-sharp","cross-platform","font","opengl","opentk","rendering"],"created_at":"2025-02-19T03:28:32.506Z","updated_at":"2025-10-29T07:10:25.873Z","avatar_url":"https://github.com/opcon.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"QuickFont [![Join the chat at https://gitter.im/opcon/QuickFont](https://badges.gitter.im/opcon/QuickFont.svg)](https://gitter.im/opcon/QuickFont?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge) [![Build Status](https://travis-ci.org/opcon/QuickFont.svg?branch=master)](https://travis-ci.org/opcon/QuickFont) [![Build status](https://ci.appveyor.com/api/projects/status/2t22o5k5eu989836/branch/master?svg=true)](https://ci.appveyor.com/project/opcon/quickfont/branch/master) [![NuGet](https://img.shields.io/nuget/v/QuickFont.Desktop.svg?maxAge=2592000)](https://www.nuget.org/packages/QuickFont.Desktop/)\n=========\n\nA modern OpenGL text rendering library for OpenTK.\n\nForked from [swax/QuickFont](https://github.com/swax/QuickFont) library.\nOriginal Library [QFont](http://www.opentk.com/project/QuickFont)\n\nYou can install this library via [nuget](https://www.nuget.org/packages/QuickFont.Desktop/).\n\n## Supported Platforms\n\nQuickFont has been tested and runs on Windows, Linux and OSX.\n\nThe minimum supported OpenGL version is 3.0\n\n**Note the example project will need to be changed to build correctly on OSX, since by default Apple returns an OpenGL 2.1 context if a specific version is not specified.**\n\nSimply replace the Game.cs constructor with:\n\n``` C#\npublic Game()\n\t: base(800, 600, GraphicsMode.Default, \"QuickFont Example\", GameWindowFlags.Default, DisplayDevice.Default, 3, 2, GraphicsContextFlags.Default)\n```\n\nThis will select an OpenGL version \u003e= 3.2 (usually 4.1).\n\n# Changelog\n\n## Latest Release - Version 4.5\n\n* Update to OpenTK 3.1\n* Add FAKE build script\n* Support loading FreeType fonts from memory\n\n## Previous Releases:\n\n#### Version 4.4\n\n* Updated to OpenTK 2.0 and SharpFont 4.0.1\n* Added fallback to builtin kerning if font file does not have any\n* Switch to using paket for dependency management rather than nuget\n* Added OSX and Linux continuous integration through travis-ci\n* Added a custom view-model-matrix to QFontDrawingPrimitive which allows for some fun effects - see Example\n* Improved inbuilt documentation\n\n#### Version 4.3\n* Kerning information is now loaded from FreeType if `FreeTypeFont` is used\n* Improved built in kerning method to account for pixels on glyph boundary\n* Fixes to example project\n* Improved overall code quality\n    * Renamed variables to a consistent naming scheme\n    * Added XML documentation to all public facing classes, methods, fields, properties, etc.\n    * Added lots of XML documentation to internal/private classes, methods, fields, properties etc\n* Fixed `QFontDrawing` not implementing `IDisposable`\n* Improved disposing in `QVertexArrayObject`\n\n#### Version 4.2\n* Switched to using a shared package to build QuickFont\n* Added an OpenGL ES 2.0 nuget package\n\n#### Version 4.1\n* Updated font loading mechanism to use [SharpFont](https://github.com/Robmaister/SharpFont) for loading fonts by path, and use the regular GDIFont mechanism for loading installed (system) fonts\n* Updated example project to show some different installed system fonts\n\n#### Version 4.0\n* Now uses SharpFont for loading the font files, so custom (non-installed) fonts are now supported on Linux and OSX\n* Added Nuget package\n* Added support for OpenGL ES (requires conditional compilation) thanks to [vescon](https://github.com/vescon/QuickFont)\n* Improved Shader loading\n* Cross-platform support (tested on Windows 10, Ubuntu 15.10, OSX 10.11,10.10)\n* Unicode support\n* Example is working again\n* Updated to latest OpenTK nuget package (OpenTK.Next)\n\n### Todo\n- [ ] Maybe extract all Print methods in a static class to leave QFontDrawingPrimitive more basic.\n- [ ] Right to Left text flow support (arabic, hebrew)\n- [ ] Unicode zero spacing eg. combining character support\n- [ ] On-the-fly character addition (If a character can not be found, add it, regenerate the font)\n\n## Screenshot\n\n![](http://i.imgur.com/M0iq083.png)\n\n![](https://i.imgur.com/lf0mKCl.png)\n\n## Example\n\nIn some OnLoad() method create your QFont and your QFontDrawing\n```C#\n_myFont = new QFont(\"Fonts/HappySans.ttf\", 72, new QFontBuilderConfiguration(true));\n_myFont2 = new QFont(\"basics.qfont\", new QFontBuilderConfiguration(true));\n_drawing = new QFontDrawing();\n```\n\nCall some print methods or create Drawing primitives by themselves.\nAdd them to the drawing.\n```C#\n_drawing.DrawingPrimitives.Clear();\n_drawing.Print(_myFont, \"text1\", pos, FontAlignment.Left);\n\n// draw with options\nvar textOpts = new QFontRenderOptions()\n    {\n\tColour = Color.FromArgb(new Color4(0.8f, 0.1f, 0.1f, 1.0f).ToArgb()),\n\tDropShadowActive = true\n\t};\nSizeF size = _drawing.Print(_myFont, \"text2\", pos2, FontAlignment.Left, textOpts);\n\nvar dp = new QFontDrawingPrimitive(_myFont2);\nsize = dp.Print(text, new Vector3(bounds.X, Height - yOffset, 0), new SizeF(maxWidth, float.MaxValue), alignment);\ndrawing.DrawingPrimitives.Add(dp);\n\n// after all changes do update buffer data and extend it's size if needed.\n_drawing.RefreshBuffers();\n\n```\n\nThen in your draw loop do:\n```C#\n_drawing.ProjectionMatrix = proj;\n_drawing.Draw();\nSwapBuffers();\n```\n\nAt the end of the program dispose the QuickFont resources:\n```C#\nprotected virtual void Dispose(bool disposing)\n{\n\t_drawing.Dispose();\n\t_myFont.Dispose();\n\t_myFont2.Dispose();\n}\n```\n\n**See the included example project for more!**\n\n## Contributors\n\nThe following is a non-exhaustive list of people who have contributed to QuickFont:\n\nJames Lohr - Creator of the original library (http://www.opentk.com/project/QuickFont)\n\nJohn (swax) Marshall - Added vertex buffer support\n\nPatrick (opcon) Yates - Current maintainer\n\nRobertofon - Refactored monolithic QFont class\n\nMartinay - OpenGL ES 2.0 support\n\nJan Polak\n\nJonathan\n\n## License\n\nLicensed under MIT, please see the file `License.txt` in the project root directory\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopcon%2Fquickfont","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopcon%2Fquickfont","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopcon%2Fquickfont/lists"}