{"id":20128513,"url":"https://github.com/cococry/runara","last_synced_at":"2025-04-09T15:50:40.206Z","repository":{"id":251809265,"uuid":"836289478","full_name":"cococry/runara","owner":"cococry","description":"Minimal \u0026 fast 2D rendering engine","archived":false,"fork":false,"pushed_at":"2025-04-05T10:54:57.000Z","size":270,"stargazers_count":25,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T11:31:52.898Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cococry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-31T14:31:10.000Z","updated_at":"2025-04-05T10:55:00.000Z","dependencies_parsed_at":"2024-11-13T20:30:24.901Z","dependency_job_id":"ea6bd239-2e91-4dfd-8bbe-cd869dd76e52","html_url":"https://github.com/cococry/runara","commit_stats":null,"previous_names":["cococry/runara"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cococry%2Frunara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cococry%2Frunara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cococry%2Frunara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cococry%2Frunara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cococry","download_url":"https://codeload.github.com/cococry/runara/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248063853,"owners_count":21041854,"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-13T20:27:27.321Z","updated_at":"2025-04-09T15:50:40.200Z","avatar_url":"https://github.com/cococry.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"left\" style=\"width:128px\" src=\"https://github.com/cococry/runara/blob/master/branding/logo.png\" width=\"128px\"\u003e\n\n**Runara is a simple, well documented, bloatless 2D graphics library**\n\nRunara aims to be as small and as fast as possible. The code is contained\nin ~1.4k lines of code that feature a complete batch rendering system, \nglyph loading with [freetype](http://freetype.org/), text shaping with [harfbuzz](https://harfbuzz.github.io/),\na glyph caching system and much more. \n\n---\n\n\u003cbr\u003e\n\n## Features\n- Efficient batch rendering system\n- Support for shader operations like rounded corners\n- Comple text rendering \u0026 loading engine\n- Extensivly documented functions \u0026 structures\n- Support for loading \u0026 rendering images\n- No global or hidden state\n- Built to make extending \u0026 modifing as straightforward as possible\n- Small and readable codebase\n\n## Example using GLFW\n\n```c\n#include \u003cGL/gl.h\u003e\n#include \u003cGLFW/glfw3.h\u003e\n#include \u003crunara/runara.h\u003e\n\nRnState *state;\n\nvoid resizecb(GLFWwindow* window, int w, int h) {\n  rn_resize_display(state, w, h);\n}\n\nint main() {\n  glfwInit();\n\n  GLFWwindow* window = glfwCreateWindow(1280, 720, \"Hello, World!\", NULL, NULL);\n\n  glfwSetFramebufferSizeCallback(window, resizecb);\n\n  glfwMakeContextCurrent(window);\n\n  // Initialize your state of the library\n  state = rn_init(1280, 720, (RnGLLoader)glfwGetProcAddress);\n\n  // Loading some fonts\n  RnFont *heading = rn_load_font(state, \"./Lora-Italic.ttf\", 36);\n  RnFont *paragraph = rn_load_font(state, \"./Lora-Italic.ttf\", 24);\n\n  while(!glfwWindowShouldClose(window)) {\n    glClear(GL_COLOR_BUFFER_BIT);\n    glClearColor(0.1f, 0.1f, 0.1f, 1.0f);\n\n    // Beginning a rende pass with Runara\n    rn_begin(state);\n\n    // Rendering some text with one font\n    rn_text_render(state, \"Hello, runara!\", heading, (vec2s){20, 20}, RN_WHITE);\n\n    // Render some text with another font\n    rn_text_render(state, \"Hey There!\\nThis is a paragraph.\", paragraph, (vec2s){20, 70}, RN_WHITE);\n\n    // Rendering a basic rectangle\n    rn_rect_render(state, (vec2s){20, 130}, (vec2s){200, 100}, RN_RED);\n\n    // Ending the render pass\n    rn_end(state);\n\n    // External application or game code can still run perfectly fine\n    // here.\n\n    glfwPollEvents();\n    glfwSwapBuffers(window);\n  }\n  rn_free_font(state, heading);\n  rn_free_font(state, paragraph);\n  rn_terminate(state);\n}\n```\n\n## Building and installing\n\nMake sure you have those build dependencies installed \nbefore installing Runara:\n\n### Dependencies\n```console\nfreetype, harfbuzz, gl, make, gcc\n```\n\nAfter installing the dependencies just run:\n\n```console\nsudo make install\n```\n\n## Documentation\n\nFor documentation of the library, just take a look at the Runara [header file](https://github.com/cococry/runara/blob/master/include/runara/runara.h) where every function is well documented.\nThis is in my opinion the best approach to documenting as it is straightly bound to actually deleloping with the library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcococry%2Frunara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcococry%2Frunara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcococry%2Frunara/lists"}