mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 22:41:10 +01:00
Add hb_draw_line_cap_t enum with HB_DRAW_LINE_CAP_BUTT (the existing default behavior) and HB_DRAW_LINE_CAP_SQUARE, which extends each endpoint along the line direction by half its local stroke width. Square caps let four hb_draw_line() calls form a closed rectangle without gaps at the corners -- a meaningfully cheaper alternative to hb_draw_rect() for thin outlined rectangles, since each line's bbox is just stroke_width tall instead of covering the full rectangle interior. Round caps not implemented yet; can be added as a third enum value when a use case shows up. Assisted-by: Claude <noreply@anthropic.com>