From bb4f04b2c9f0053f54a4e59625dfb5addb67ca7c Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 24 Sep 2023 18:32:30 +0200 Subject: [PATCH] Expose CAIRO_STATUS_SVG_FONT_ERROR as Status.SVG_FONT_ERROR See #309 --- cairo/__init__.pyi | 5 +++++ cairo/enums.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/cairo/__init__.pyi b/cairo/__init__.pyi index 7d871bef..90a51b82 100644 --- a/cairo/__init__.pyi +++ b/cairo/__init__.pyi @@ -760,6 +760,10 @@ class Status(_IntEnum): """ .. versionadded:: 1.23.0 Only available with cairo 1.17.6+ """ + SVG_FONT_ERROR: "Status" = ... + """ + .. versionadded:: 1.25.0 Only available with cairo 1.17.8+ + """ class PDFVersion(_IntEnum): """ @@ -5691,6 +5695,7 @@ STATUS_FREETYPE_ERROR = Status.FREETYPE_ERROR STATUS_WIN32_GDI_ERROR = Status.WIN32_GDI_ERROR STATUS_PNG_ERROR = Status.PNG_ERROR STATUS_DWRITE_ERROR = Status.DWRITE_ERROR +STATUS_SVG_FONT_ERROR = Status.SVG_FONT_ERROR PDF_OUTLINE_FLAG_OPEN = PDFOutlineFlags.OPEN PDF_OUTLINE_FLAG_BOLD = PDFOutlineFlags.BOLD PDF_OUTLINE_FLAG_ITALIC = PDFOutlineFlags.ITALIC diff --git a/cairo/enums.c b/cairo/enums.c index aa54f1ec..3ab7e59a 100644 --- a/cairo/enums.c +++ b/cairo/enums.c @@ -431,6 +431,9 @@ init_enums (PyObject *module) { #endif #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 17, 6) CONSTANT(Status, STATUS, DWRITE_ERROR); +#endif +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 17, 8) + CONSTANT(Status, STATUS, SVG_FONT_ERROR); #endif CONSTANT(Status, STATUS, LAST_STATUS);