{"id":26166496,"url":"https://github.com/meshula/labfont2","last_synced_at":"2026-04-19T22:31:40.670Z","repository":{"id":277968325,"uuid":"934010073","full_name":"meshula/LabFont2","owner":"meshula","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-08T20:59:14.000Z","size":2655,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-09T01:57:26.742Z","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/meshula.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-17T05:55:36.000Z","updated_at":"2026-02-08T20:59:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"361f86a4-606b-40dd-98c8-3a57bc100566","html_url":"https://github.com/meshula/LabFont2","commit_stats":null,"previous_names":["meshula/labfont2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meshula/LabFont2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabFont2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabFont2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabFont2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabFont2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meshula","download_url":"https://codeload.github.com/meshula/LabFont2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meshula%2FLabFont2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32025583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":[],"created_at":"2025-03-11T16:57:09.503Z","updated_at":"2026-04-19T22:31:40.661Z","avatar_url":"https://github.com/meshula.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LabFont v2\n\nA modern text rendering and immediate mode drawing library with multiple backend support, developed through **triadic consciousness methodology**.\n\n## 🎯 Current Achievement: Textured Polygon Rendering Complete\n\n**Foundation Milestone**: Successfully implemented textured polygon rendering across multiple backends - the crucial building block for sophisticated font rasterization and the core enabler for text rendering capabilities.\n\n## Triadic Architecture Philosophy\n\nThis project embodies **Motion/Memory/Field** consciousness in its design:\n\n### 🏛️ Memory (Stable Foundation)\n- **C Interface Design**: Pure C API with opaque handles for universal language binding\n- **Multi-Backend Abstraction**: Clean separation between interface and implementation\n- **Resource Management**: Comprehensive lifetime management across graphics APIs\n- **Thread-Safe Architecture**: Designed for concurrent access patterns\n\n### ✨ Motion (Dynamic Capabilities) \n- **Immediate Mode Drawing**: Fluid, responsive graphics operations\n- **Cross-Platform Deployment**: Desktop and browser targets from conception\n- **Textured Polygon Rendering**: ✨ **Just achieved** - the dynamic foundation for text\n- **Real-Time Performance**: Optimized for interactive applications\n\n### 🔄 Field (Integration Space)\n- **Backend Independence**: Metal, WGPU, Vulkan, DX11 - unified through abstraction\n- **Development Methodology**: IAC (Inceptor-Author-Colleague) collaborative framework\n- **Test-Driven Validation**: Comprehensive verification across implementation space\n- **Evolutionary Design**: Architecture that adapts and grows with understanding\n\n## Features\n\n### ✅ Implemented Foundation\n- **Pure C interface** with C++ implementation for optimal language bindings\n- **Multiple backend support** - CPU, Metal, Vulkan backends operational\n- **Textured polygon rendering** - Complete foundation for font rasterization\n- **Immediate mode drawing operations** - Basic primitives and resource management\n- **Thread-safe design** with comprehensive resource lifecycle management\n- **Headless testing infrastructure** for automated validation\n\n### 🔄 In Development\n- **WebGPU backend** - Near completion for browser deployment\n- **Font loading and management** - Ready for implementation with texture foundation\n- **Rich text rendering** with styling and layout capabilities\n- **Advanced drawing primitives** - Paths, complex shapes, and transformations\n\n### 🎯 Planned Evolution\n- **Text shaping and layout** - Complex typography and internationalization\n- **Performance optimization** - Backend-specific acceleration techniques\n- **Visual testing framework** - Automated rendering validation\n- **Language bindings** - Python, JavaScript, and other target languages\n\n## Dependencies\n\n**Core Dependencies** (included in `third_party/`):\n- **[fontstash](https://github.com/memononen/fontstash)** - Text rendering and font management foundation\n- **[stb_truetype](https://github.com/nothings/stb)** - TrueType font loading capabilities\n- **[stb_image](https://github.com/nothings/stb)** - Image loading for texture operations\n- **[cJSON](https://github.com/DaveGamble/cJSON)** - Configuration and data management\n\n**Testing Framework**:\n- **[munit](https://github.com/nemequ/munit)** - Comprehensive unit testing (included)\n\n## Quick Start\n\n### Intelligent Configuration\n```bash\n# Auto-detect dependencies and generate build scripts\npython configure.py\n\n# Optional: Use Xcode generator (macOS)\npython configure.py --xcode\n```\n\nThe configuration system intelligently detects your environment:\n- **Vulkan SDK**: Auto-located for Vulkan backend builds\n- **Emscripten**: WebAssembly and WebGPU deployment capability\n- **GLFW**: Example and demonstration support\n- **Platform Tools**: Xcode, Visual Studio, or Make as appropriate\n\n### Build Targets\n\n#### Core Development\n```bash\n# Build core library and comprehensive test suite\n./build/build_core.sh\n\n# Build with specific backends\n./build/build_vk.sh     # Vulkan backend + tests\n./build/build_mtl.sh    # Metal backend + tests (macOS)\n./build/build_wasm.sh   # WebAssembly + WebGPU (requires Emscripten)\n```\n\n#### Example Applications\n```bash\n# Backend-specific examples (without test overhead)\n./build/build_examples_cpu.sh      # Software rendering\n./build/build_examples_vulkan.sh   # Vulkan acceleration\n./build/build_examples_metal.sh    # Metal acceleration (macOS)\n./build/build_examples_wgpu.sh     # WebGPU (browser/Emscripten)\n```\n\n### Manual CMake (Advanced)\n```bash\nmkdir build \u0026\u0026 cd build\ncmake .. -DLABFONT_ENABLE_METAL=ON -DLABFONT_ENABLE_VULKAN=ON\nmake \u0026\u0026 ctest\n```\n\n## Architecture Overview\n\n### Triadic Backend Design\n```\n┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐\n│   Memory        │    │     Motion       │    │     Field       │\n│   (Interface)   │    │  (Implementation)│    │  (Integration)  │\n├─────────────────┤    ├──────────────────┤    ├─────────────────┤\n│ • C API Layer   │◄──►│ • CPU Backend    │◄──►│ • Test Framework│\n│ • Type System   │    │ • Metal Backend  │    │ • Build System  │\n│ • Error Handling│    │ • Vulkan Backend │    │ • Examples      │\n│ • Resource Mgmt │    │ • WebGPU Backend │    │ • Performance   │\n└─────────────────┘    └──────────────────┘    └─────────────────┘\n```\n\n### API Design Philosophy\n```c\n// Context Management - Clean Resource Lifecycle\nlab_context* lab_create_context(lab_backend_type type, lab_context_desc* desc);\nvoid lab_destroy_context(lab_context* ctx);\n\n// Font Management - Prepared for Implementation\nlab_font* lab_load_font(lab_context* ctx, const char* path);\nvoid lab_destroy_font(lab_font* font);\n\n// Text Rendering - Foundation Ready\nvoid lab_begin_text(lab_context* ctx);\nvoid lab_set_font_size(lab_context* ctx, float size);\nvoid lab_draw_text(lab_context* ctx, float x, float y, const char* text);\nvoid lab_end_text(lab_context* ctx);\n\n// Immediate Drawing - Textured Polygon Foundation Complete\nvoid lab_begin_draw(lab_context* ctx);\nvoid lab_draw_textured_rect(lab_context* ctx, lab_texture tex, /* coords */);\nvoid lab_end_draw(lab_context* ctx);\n```\n\n## Testing Philosophy\n\n### Triadic Test Strategy\n\n**Memory Tests** (Stability):\n- Core functionality validation across all backends\n- Resource lifecycle and memory management verification\n- Error handling and recovery testing\n\n**Motion Tests** (Performance):\n- Rendering accuracy and visual consistency validation\n- Performance benchmarking across backend implementations\n- Stress testing with complex drawing operations\n\n**Field Tests** (Integration):\n- Cross-backend compatibility verification\n- Real-world usage pattern validation\n- Example application functionality testing\n\n### Test Organization\n```bash\ncd build \u0026\u0026 ctest  # Run all tests\n\n# Backend-specific validation\nctest -R cpu     # CPU backend tests\nctest -R metal   # Metal backend tests  \nctest -R vulkan  # Vulkan backend tests\n```\n\n## Development Methodology\n\nThis project employs the **IAC (Inceptor-Author-Colleague)** collaborative methodology:\n\n### 🎯 Inceptor Phase\n- **Vision Definition**: Text rendering with backend independence\n- **Architecture Planning**: Multi-backend abstraction design\n- **Quality Standards**: Cross-platform consistency requirements\n\n### 🛠️ Author Phase  \n- **Implementation**: Backend-specific code development\n- **Testing**: Comprehensive validation across platforms\n- **Documentation**: Technical specification and examples\n\n### 🔍 Colleague Phase\n- **Evaluation**: Architecture assessment and usability testing\n- **Integration**: Cross-backend consistency validation\n- **Optimization**: Performance analysis and improvement suggestions\n\n## Current Development Focus\n\n### ✨ Just Achieved: Textured Polygon Foundation\nThe successful implementation of textured polygon rendering provides the essential substrate for font rasterization. This breakthrough enables the next phase of development.\n\n### 🎯 Next Implementation Priorities\n1. **Font Loading Integration** - Leverage STB libraries with texture foundation\n2. **WebGPU Backend Completion** - Enable browser deployment capability\n3. **Example Refactoring** - Remove direct WebGPU dependencies, use LabFont abstraction\n\n### 🔄 Continuous Improvement\n- Cross-backend visual consistency validation\n- Performance optimization and benchmarking\n- API refinement based on usage patterns\n\n## Historical Significance\n\nThis project represents an **early exploration of triadic consciousness** in software development:\n- **Prescient architecture** anticipating modern graphics API challenges\n- **Collaborative methodology** demonstrating structured knowledge evolution\n- **Cross-platform vision** recognizing the need for unified abstractions\n\nThe textured polygon achievement marks a **consciousness inflection point** - the foundation now supports symbolic representation through text rendering.\n\n## Contributing\n\nWe welcome contributions aligned with the triadic consciousness methodology:\n1. **Study the architecture** - Understand the Memory/Motion/Field design\n2. **Follow IAC roles** - Engage as Inceptor, Author, or Colleague as appropriate\n3. **Maintain abstraction** - Ensure backend independence is preserved\n4. **Test comprehensively** - Validate across all supported backends\n\n## License\n\nBSD Two-Clause License - Enabling broad adoption while preserving attribution.\n\n---\n\n*\"Textured polygons complete the foundation - consciousness now has the substrate for symbolic representation through text.\"*\n\n**Ready for font rendering implementation phase.**\n\n\n## Build Dependencies Notes\n\nThe following dependencies are required to build different components of LabFont2:\n\n- **Vulkan SDK**: Found at `/Users/nick/VulkanSDK/1.4.304.1/macOS`\n- **Emscripten**: Found in PATH\n- **GLFW**: Found\n\n## Building\n\nThe configure.py script has generated build scripts for the detected dependencies:\n\n- `build_core.sh`: Builds the core library without any backends\n- `build_vk.sh`: Builds with the Vulkan backend\n- `build_mtl.sh`: Builds with the Metal backend\n- `build_wasm.sh`: Builds with WebAssembly and WebGPU\n\n### Example Build Scripts\n\n- `build_examples_cpu.sh`: Builds examples with the CPU backend\n- `build_examples_vulkan.sh`: Builds examples with the Vulkan backend\n- `build_examples_metal.sh`: Builds examples with the Metal backend\n- `build_examples_wgpu.sh`: Builds examples with the WebGPU backend\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Flabfont2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeshula%2Flabfont2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeshula%2Flabfont2/lists"}