{"id":17011821,"url":"https://github.com/superzazu/sdl_dbgp","last_synced_at":"2025-10-17T18:51:38.092Z","repository":{"id":45299934,"uuid":"260419833","full_name":"superzazu/SDL_DBGP","owner":"superzazu","description":"A C99 library to display UTF-8 text in SDL3 programs (in a VGA-like text mode)","archived":false,"fork":false,"pushed_at":"2025-09-26T15:27:24.000Z","size":139,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-07T03:00:42.225Z","etag":null,"topics":["c","sdl","sdl2"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superzazu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-01T09:16:10.000Z","updated_at":"2025-09-26T15:27:28.000Z","dependencies_parsed_at":"2025-10-07T02:54:56.420Z","dependency_job_id":"9871eaf0-663f-4ddc-8dfe-fcb617ee480d","html_url":"https://github.com/superzazu/SDL_DBGP","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/superzazu/SDL_DBGP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2FSDL_DBGP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2FSDL_DBGP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2FSDL_DBGP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2FSDL_DBGP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superzazu","download_url":"https://codeload.github.com/superzazu/SDL_DBGP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superzazu%2FSDL_DBGP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279399454,"owners_count":26162880,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","sdl","sdl2"],"created_at":"2024-10-14T06:08:09.602Z","updated_at":"2025-10-17T18:51:38.044Z","avatar_url":"https://github.com/superzazu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SDL_DBGP\n\nSDL_DBGP (DeBuG Print) is a C99 library to display UTF-8 text in SDL3 programs (in a VGA-like text mode), greatly inspired by [bgfx](https://github.com/bkaradzic/bgfx) debug text API. To install, copy DBGP.c/.h and a font file (SDL_DBGP_unscii8.h or SDL_DBGP_unscii16.h) in your project.\n\nTwo fonts are provided for convenience: [UNSCII-8](https://github.com/viznut/unscii) (8x8px) and UNSCII-16 (8x16px). They both are in the public domain ; and include glyphs for the first 256 Unicode codepoints. The Python script used to generate C header files from UNSCII `.hex` files is also available (unscii2raw.py).\n\n![screenshot](screenshot.png)\n\nExample:\n\n```c\n#include \u003cSDL3/SDL.h\u003e\n#include \u003cSDL3/SDL_main.h\u003e\n#include \"SDL_DBGP.h\"\n#include \"SDL_DBGP_unscii16.h\"\n\nint main(void) {\n  SDL_Init(SDL_INIT_VIDEO);\n  SDL_Window* window = NULL;\n  SDL_Renderer* renderer = NULL;\n  SDL_CreateWindowAndRenderer(\"SDL_DBGP\", 800, 600, 0, \u0026window, \u0026renderer);\n\n  DBGP_Font font;\n  if (!DBGP_CreateFont(\n          \u0026font, renderer, DBGP_UNSCII16, sizeof(DBGP_UNSCII16),\n          DBGP_UNSCII16_HEIGHT)) {\n    SDL_Log(\"Unable to initialise DBGP_UNSCII16: %s\", SDL_GetError());\n    return 1;\n  }\n\n  int should_quit = 0;\n  SDL_Event event;\n  while (!should_quit) {\n    while (SDL_PollEvent(\u0026event)) {\n      switch (event.type) {\n      case SDL_EVENT_QUIT: should_quit = 1; break;\n      }\n    }\n\n    SDL_SetRenderDrawColor(renderer, 0x30, 0x30, 0x30, 0xff);\n    SDL_RenderClear(renderer);\n\n    DBGP_ColorPrint(\u0026font, renderer, 0, 0, DBGP_DEFAULT_COLORS, \"Hello world!\");\n    DBGP_ColorPrintf(\u0026font, renderer, 32, 32, 0x3f, \"Hello %s\", \"Bobby\");\n    DBGP_ColorPrint(\n        \u0026font, renderer, 0, 64, 0x0f,\n        \"Color can be changed with\\n\"\n        \"$09e$0As$0Bc$0Ca$0Dp$0Ee$0F\"\n        \" codes too.\");\n\n    SDL_RenderPresent(renderer);\n  }\n\n  DBGP_DestroyFont(\u0026font);\n  SDL_Quit();\n  return 0;\n}\n```\n\nCheckout the example program `example.c`, and build the docs by running `doxygen Doxyfile` in this directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzazu%2Fsdl_dbgp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperzazu%2Fsdl_dbgp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperzazu%2Fsdl_dbgp/lists"}