/* Generated by Cython 3.2.3 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "/build/python-kivy/src/kivy/kivy/include/gl_redirect.h",
            "/build/python-kivy/src/kivy/kivy/lib/pango/pangoft2.h",
            "/build/python-kivy/src/kivy/kivy/lib/pango/pangoft2.pxi",
            "/usr/include/glib-2.0/glib.h",
            "/usr/include/pango-1.0/pango/pango-attributes.h",
            "/usr/include/pango-1.0/pango/pango-bidi-type.h",
            "/usr/include/pango-1.0/pango/pango-context.h",
            "/usr/include/pango-1.0/pango/pango-font.h",
            "/usr/include/pango-1.0/pango/pango-fontmap.h",
            "/usr/include/pango-1.0/pango/pango-language.h",
            "/usr/include/pango-1.0/pango/pango-layout.h",
            "/usr/include/pango-1.0/pango/pango-types.h",
            "/usr/include/pango-1.0/pango/pango-utils.h",
            "/usr/include/pango-1.0/pango/pangofc-fontmap.h",
            "/usr/include/pango-1.0/pango/pangoft2.h",
            "kivy/lib/kivy_endian.h",
            "kivy/lib/pango/freetype2.h",
            "kivy/lib/pango/pangoft2.h"
        ],
        "extra_link_args": [
            "-lm"
        ],
        "include_dirs": [
            "kivy/lib/pango",
            "kivy/core/text",
            "/build/python-kivy/src/kivy/kivy/include",
            "/usr/include/pango-1.0",
            "/usr/include/libmount",
            "/usr/include/blkid",
            "/usr/include/fribidi",
            "/usr/include/cairo",
            "/usr/include/pixman-1",
            "/usr/include/harfbuzz",
            "/usr/include/freetype2",
            "/usr/include/libpng16",
            "/usr/include/glib-2.0",
            "/usr/lib/glib-2.0/include",
            "/usr/include/sysprof-6"
        ],
        "libraries": [
            "pangoft2-1.0",
            "pango-1.0",
            "fontconfig",
            "harfbuzz",
            "freetype",
            "gobject-2.0",
            "glib-2.0"
        ],
        "name": "kivy.core.text._text_pango",
        "sources": [
            "/build/python-kivy/src/kivy/kivy/core/text/_text_pango.pyx"
        ]
    },
    "module_name": "kivy.core.text._text_pango"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
/* InitLimitedAPI */
#if defined(Py_LIMITED_API)
  #if !defined(CYTHON_LIMITED_API)
  #define CYTHON_LIMITED_API 1
  #endif
#elif defined(CYTHON_LIMITED_API)
  #ifdef _MSC_VER
  #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.")
  #else
  #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x03080000
    #error Cython requires Python 3.8+.
#else
#define __PYX_ABI_VERSION "3_2_3"
#define CYTHON_HEX_VERSION 0x030203F0
#define CYTHON_FUTURE_DIVISION 1
/* CModulePreamble */
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 1
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 1
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00)
  #endif
  #undef CYTHON_USE_AM_SEND
  #define CYTHON_USE_AM_SEND 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100)
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_ASSUME_SAFE_SIZE
  #define CYTHON_ASSUME_SAFE_SIZE 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #undef CYTHON_USE_SYS_MONITORING
  #define CYTHON_USE_SYS_MONITORING 0
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #ifndef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 1
  #endif
  #undef CYTHON_IMMORTAL_CONSTANTS
  #define CYTHON_IMMORTAL_CONSTANTS 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #ifdef Py_GIL_DISABLED
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1
  #else
    #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0
  #endif
  #if PY_VERSION_HEX < 0x030A0000
    #undef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #elif !defined(CYTHON_USE_TYPE_SLOTS)
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLIST_INTERNALS)
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1
  #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)
    #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_ASSUME_SAFE_SIZE
    #define CYTHON_ASSUME_SAFE_SIZE 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL 0
  #elif !defined(CYTHON_FAST_GIL)
    #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_SYS_MONITORING
    #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #ifndef CYTHON_USE_AM_SEND
    #define CYTHON_USE_AM_SEND 1
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE)
  #endif
  #ifndef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
  #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000
    #undef CYTHON_IMMORTAL_CONSTANTS
    #define CYTHON_IMMORTAL_CONSTANTS 0  // definitely won't work
  #elif !defined(CYTHON_IMMORTAL_CONSTANTS)
    #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING)
  #endif
#endif
#ifndef CYTHON_COMPRESS_STRINGS
  #define CYTHON_COMPRESS_STRINGS 1
#endif
#ifndef CYTHON_FAST_PYCCALL
#define CYTHON_FAST_PYCCALL  CYTHON_FAST_PYCALL
#endif
#ifndef CYTHON_VECTORCALL
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_VECTORCALL  (__PYX_LIMITED_VERSION_HEX >= 0x030C0000)
#else
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL)
#endif
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#include <stdint.h>
typedef uintptr_t  __pyx_uintptr_t;
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifndef Py_UNREACHABLE
  #define Py_UNREACHABLE()  assert(0); abort()
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

/* CInitCode */
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* PythonCompatibility */
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    #ifndef CO_OPTIMIZED
    static int CO_OPTIMIZED;
    #endif
    #ifndef CO_NEWLOCALS
    static int CO_NEWLOCALS;
    #endif
    #ifndef CO_VARARGS
    static int CO_VARARGS;
    #endif
    #ifndef CO_VARKEYWORDS
    static int CO_VARKEYWORDS;
    #endif
    #ifndef CO_ASYNC_GENERATOR
    static int CO_ASYNC_GENERATOR;
    #endif
    #ifndef CO_GENERATOR
    static int CO_GENERATOR;
    #endif
    #ifndef CO_COROUTINE
    static int CO_COROUTINE;
    #endif
#else
    #ifndef CO_COROUTINE
      #define CO_COROUTINE 0x80
    #endif
    #ifndef CO_ASYNC_GENERATOR
      #define CO_ASYNC_GENERATOR 0x200
    #endif
#endif
static int __Pyx_init_co_variables(void);
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef Py_TPFLAGS_IMMUTABLETYPE
  #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
#endif
#ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION
  #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#ifndef METH_FASTCALL
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_VERSION_HEX >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000)
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno))
#elif CYTHON_COMPILING_IN_GRAAL
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno))
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#endif
#if CYTHON_USE_MODULE_STATE
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o)
#else
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global)
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype)
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype)
#define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype)
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype)
  #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL)
  #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype)
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
  #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\
    ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\
     (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\
     __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL)
  #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype)
  #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype)
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
#endif
#define __Pyx_PyObject_GetIterNextFunc(iterator)  __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc)
#if CYTHON_USE_TYPE_SPECS
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#else
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains)
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#elif CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
enum __Pyx_ReferenceSharing {
  __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check
  __Pyx_ReferenceSharing_OwnStrongReference,
  __Pyx_ReferenceSharing_FunctionArgument,
  __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar
};
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\
    (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\
      (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\
      (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0)))
#elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1)
#else
#define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0)
#endif
#if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  #else
    #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i)
  #endif
#elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS
  #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i)
  #else
    #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i))
  #endif
#else
  #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i))
#endif
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\
    __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i))
#else
  #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result)
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyObject_GetItem(dict, key);
  if (*result == NULL) {
    if (PyErr_ExceptionMatches(PyExc_KeyError)) {
      PyErr_Clear();
      return 0;
    }
    return -1;
  }
  return 1;
}
#else
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) {
  *result = PyDict_GetItemWithError(dict, key);
  if (*result == NULL) {
    return PyErr_Occurred() ? -1 : 0;
  }
  Py_INCREF(*result);
  return 1;
}
#endif
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST
  #define __Pyx_VISIT_CONST(obj)  Py_VISIT(obj)
#else
  #define __Pyx_VISIT_CONST(obj)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i)
#endif
#if CYTHON_ASSUME_SAFE_SIZE
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o)
#else
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
  #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString)
  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t
#define __Pyx_PyLong_AsHash_t   __Pyx_PyIndex_AsSsize_t
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000
    #define __Pyx_PySendResult PySendResult
#else
    typedef enum {
        PYGEN_RETURN = 0,
        PYGEN_ERROR = -1,
        PYGEN_NEXT = 1,
    } __Pyx_PySendResult;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3
  typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result);
#else
  #define __Pyx_pyiter_sendfunc sendfunc
#endif
#if !CYTHON_USE_AM_SEND
#define __PYX_HAS_PY_AM_SEND 0
#elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000
#define __PYX_HAS_PY_AM_SEND 1
#else
#define __PYX_HAS_PY_AM_SEND 2  // our own backported implementation
#endif
#if __PYX_HAS_PY_AM_SEND < 2
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#else
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
        __Pyx_pyiter_sendfunc am_send;
    } __Pyx_PyAsyncMethodsStruct;
    #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s))
#endif
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21)
#else
    #define __Pyx_TPFLAGS_HAVE_AM_SEND (0)
#endif
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get()
#else
#define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000
#ifdef __cplusplus
extern "C"
#endif
PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) {
    int value;
    PyObject *py_value = PyObject_GetAttrString(inspect, name);
    if (!py_value) return 0;
    value = (int) PyLong_AsLong(py_value);
    Py_DECREF(py_value);
    *write_to = value;
    return value != -1 || !PyErr_Occurred();
}
static int __Pyx_init_co_variables(void) {
    PyObject *inspect;
    int result;
    inspect = PyImport_ImportModule("inspect");
    result =
#if !defined(CO_OPTIMIZED)
        __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) &&
#endif
#if !defined(CO_NEWLOCALS)
        __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) &&
#endif
#if !defined(CO_VARARGS)
        __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) &&
#endif
#if !defined(CO_VARKEYWORDS)
        __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) &&
#endif
#if !defined(CO_ASYNC_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) &&
#endif
#if !defined(CO_GENERATOR)
        __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) &&
#endif
#if !defined(CO_COROUTINE)
        __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) &&
#endif
        1;
    Py_DECREF(inspect);
    return result ? 0 : -1;
}
#else
static int __Pyx_init_co_variables(void) {
    return 0;  // It's a limited API-only feature
}
#endif

/* MathInitCode */
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #ifndef _USE_MATH_DEFINES
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0
#endif
#ifndef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#endif
#if CYTHON_CLINE_IN_TRACEBACK
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; }
#else
#define __PYX_MARK_ERR_POS(f_index, lineno)  { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; }
#endif
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__kivy__core__text___text_pango
#define __PYX_HAVE_API__kivy__core__text___text_pango
/* Early includes */
#include <stdint.h>
#include <string.h>
#include "math.h"
#include "stdlib.h"
#include "string.h"
#include "gl_redirect.h"
#include "glib.h"
#include "../../lib/pango/freetype2.h"
#include "fontconfig/fontconfig.h"
#include "fontconfig/fcfreetype.h"
#include "pango/pango-utils.h"
#include "pango/pango-types.h"
#include "pango/pango-attributes.h"
#include "pango/pango-language.h"
#include "pango/pangoft2.h"
#include "pango/pango-context.h"
#include "pango/pango-bidi-type.h"
#include "pango/pango-font.h"
#include "pango/pango-fontmap.h"
#include "pango/pangofc-fontmap.h"
#include "pango/pango-layout.h"
#include "../../lib/pango/pangoft2.h"
#include "../../lib/kivy_endian.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#ifdef CYTHON_FREETHREADING_COMPATIBLE
#if CYTHON_FREETHREADING_COMPATIBLE
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#else
#define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED
#endif
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING "utf-8"
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s)
#else
    #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AsString(s))
    #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AsString(s))
    #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s)
#endif
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef)
    return Py_NewRef(obj);
#else
    Py_INCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef)
    return Py_XNewRef(obj);
#else
    Py_XINCREF(obj);
    return obj;
#endif
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b);
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x)
#else
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x)
#endif
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x))
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL)
#else
  #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
/* PretendToInitialize */
#ifdef __cplusplus
#if __cplusplus > 201103L
#include <type_traits>
#endif
template <typename T>
static void __Pyx_pretend_to_initialize(T* ptr) {
#if __cplusplus > 201103L
    if ((std::is_trivially_default_constructible<T>::value))
#endif
        *ptr = T();
    (void)ptr;
}
#else
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#endif


#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * const __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char* const __pyx_f[] = {
  "kivy/core/text/_text_pango.pyx",
  "<stringsource>",
  "kivy/graphics/texture.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* Atomics.proto (used by UnpackUnboundCMethod) */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 1
#endif
#define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
#define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __pyx_atomic_int_type int
#define __pyx_nonatomic_int_type int
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__))
    #include <stdatomic.h>
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)))
    #include <atomic>
#endif
#if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
                        (__STDC_VERSION__ >= 201112L) &&\
                        !defined(__STDC_NO_ATOMICS__) &&\
                       ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type atomic_int
    #define __pyx_atomic_ptr_type atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) atomic_load(value)
    #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C atomics"
    #endif
#elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
                    (__cplusplus >= 201103L) ||\
\
                    (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
                    ATOMIC_INT_LOCK_FREE == 2)
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type std::atomic_int
    #define __pyx_atomic_ptr_type std::atomic_uintptr_t
    #define __pyx_nonatomic_ptr_type uintptr_t
    #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg)
    #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #define __pyx_atomic_load(value) std::atomic_load(value)
    #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed)
    #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire)
    #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value)
    #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired)
    #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
        #pragma message ("Using standard C++ atomics")
    #elif defined(__PYX_DEBUG_ATOMICS)
        #warning "Using standard C++ atomics"
    #endif
#elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
                    (__GNUC_MINOR__ > 1 ||\
                    (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    #define __pyx_atomic_ptr_type void*
    #define __pyx_nonatomic_ptr_type void*
    #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1)
    #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Using GNU atomics"
    #endif
#elif CYTHON_ATOMICS && defined(_MSC_VER)
    #include <intrin.h>
    #undef __pyx_atomic_int_type
    #define __pyx_atomic_int_type long
    #define __pyx_atomic_ptr_type void*
    #undef __pyx_nonatomic_int_type
    #define __pyx_nonatomic_int_type long
    #define __pyx_nonatomic_ptr_type void*
    #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer)
    #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1)
    #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1)
    #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg)
    static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) {
        __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0)
    #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value)
    #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value
    #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0)
    #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value)
    static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) {
        __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected);
        int result = old == *expected;
        *expected = old;
        return result;
    }
    #ifdef __PYX_DEBUG_ATOMICS
        #pragma message ("Using MSVC atomics")
    #endif
#else
    #undef CYTHON_ATOMICS
    #define CYTHON_ATOMICS 0
    #ifdef __PYX_DEBUG_ATOMICS
        #warning "Not using atomics"
    #endif
#endif

/* CriticalSectionsDefinition.proto (used by CriticalSections) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection void*
#define __Pyx_PyCriticalSection2 void*
#define __Pyx_PyCriticalSection_End(cs)
#define __Pyx_PyCriticalSection2_End(cs)
#else
#define __Pyx_PyCriticalSection PyCriticalSection
#define __Pyx_PyCriticalSection2 PyCriticalSection2
#define __Pyx_PyCriticalSection_End PyCriticalSection_End
#define __Pyx_PyCriticalSection2_End PyCriticalSection2_End
#endif

/* CriticalSections.proto (used by ParseKeywordsImpl) */
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs)
#define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs)
#else
#define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin
#define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin
#endif
#if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_BEGIN_CRITICAL_SECTION(o) {
#define __Pyx_END_CRITICAL_SECTION() }
#else
#define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION
#define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION
#endif

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* IncludeStructmemberH.proto (used by FixUpExtensionType) */
#include <structmember.h>

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_4kivy_8graphics_7texture_Texture;
struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion;
struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer;
struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer;
struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout;
struct __pyx_t_4kivy_8graphics_3cgl_GLES2_Context;
typedef struct __pyx_t_4kivy_8graphics_3cgl_GLES2_Context __pyx_t_4kivy_8graphics_3cgl_GLES2_Context;
struct __pyx_opt_args_4kivy_8graphics_3cgl_cgl_init;
struct __pyx_opt_args_4kivy_8graphics_3cgl_cgl_get_backend_name;

/* "kivy/graphics/cgl.pxd":381
 *     int GL_FRAMEBUFFER_UNDEFINED_OES
 * 
 * ctypedef const GLubyte* (__stdcall *GLGETSTRINGPTR)(GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLboolean (__stdcall *GLISBUFFERPTR)(GLuint buffer) nogil
 * ctypedef GLboolean (__stdcall *GLISENABLEDPTR)(GLenum cap) nogil
*/
typedef GLubyte const *(__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETSTRINGPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":382
 * 
 * ctypedef const GLubyte* (__stdcall *GLGETSTRINGPTR)(GLenum) nogil
 * ctypedef GLboolean (__stdcall *GLISBUFFERPTR)(GLuint buffer) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLboolean (__stdcall *GLISENABLEDPTR)(GLenum cap) nogil
 * ctypedef GLboolean (__stdcall *GLISFRAMEBUFFERPTR)(GLuint framebuffer) nogil
*/
typedef GLboolean (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLISBUFFERPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":383
 * ctypedef const GLubyte* (__stdcall *GLGETSTRINGPTR)(GLenum) nogil
 * ctypedef GLboolean (__stdcall *GLISBUFFERPTR)(GLuint buffer) nogil
 * ctypedef GLboolean (__stdcall *GLISENABLEDPTR)(GLenum cap) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLboolean (__stdcall *GLISFRAMEBUFFERPTR)(GLuint framebuffer) nogil
 * ctypedef GLboolean (__stdcall *GLISPROGRAMPTR)(GLuint program) nogil
*/
typedef GLboolean (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLISENABLEDPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":384
 * ctypedef GLboolean (__stdcall *GLISBUFFERPTR)(GLuint buffer) nogil
 * ctypedef GLboolean (__stdcall *GLISENABLEDPTR)(GLenum cap) nogil
 * ctypedef GLboolean (__stdcall *GLISFRAMEBUFFERPTR)(GLuint framebuffer) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLboolean (__stdcall *GLISPROGRAMPTR)(GLuint program) nogil
 * ctypedef GLboolean (__stdcall *GLISRENDERBUFFERPTR)(GLuint renderbuffer) nogil
*/
typedef GLboolean (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLISFRAMEBUFFERPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":385
 * ctypedef GLboolean (__stdcall *GLISENABLEDPTR)(GLenum cap) nogil
 * ctypedef GLboolean (__stdcall *GLISFRAMEBUFFERPTR)(GLuint framebuffer) nogil
 * ctypedef GLboolean (__stdcall *GLISPROGRAMPTR)(GLuint program) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLboolean (__stdcall *GLISRENDERBUFFERPTR)(GLuint renderbuffer) nogil
 * ctypedef GLboolean (__stdcall *GLISSHADERPTR)(GLuint shader) nogil
*/
typedef GLboolean (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLISPROGRAMPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":386
 * ctypedef GLboolean (__stdcall *GLISFRAMEBUFFERPTR)(GLuint framebuffer) nogil
 * ctypedef GLboolean (__stdcall *GLISPROGRAMPTR)(GLuint program) nogil
 * ctypedef GLboolean (__stdcall *GLISRENDERBUFFERPTR)(GLuint renderbuffer) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLboolean (__stdcall *GLISSHADERPTR)(GLuint shader) nogil
 * ctypedef GLboolean (__stdcall *GLISTEXTUREPTR)(GLuint texture) nogil
*/
typedef GLboolean (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLISRENDERBUFFERPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":387
 * ctypedef GLboolean (__stdcall *GLISPROGRAMPTR)(GLuint program) nogil
 * ctypedef GLboolean (__stdcall *GLISRENDERBUFFERPTR)(GLuint renderbuffer) nogil
 * ctypedef GLboolean (__stdcall *GLISSHADERPTR)(GLuint shader) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLboolean (__stdcall *GLISTEXTUREPTR)(GLuint texture) nogil
 * ctypedef GLenum (__stdcall *GLCHECKFRAMEBUFFERSTATUSPTR)(GLenum) nogil
*/
typedef GLboolean (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLISSHADERPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":388
 * ctypedef GLboolean (__stdcall *GLISRENDERBUFFERPTR)(GLuint renderbuffer) nogil
 * ctypedef GLboolean (__stdcall *GLISSHADERPTR)(GLuint shader) nogil
 * ctypedef GLboolean (__stdcall *GLISTEXTUREPTR)(GLuint texture) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLenum (__stdcall *GLCHECKFRAMEBUFFERSTATUSPTR)(GLenum) nogil
 * ctypedef GLenum (__stdcall *GLGETERRORPTR)() nogil
*/
typedef GLboolean (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLISTEXTUREPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":389
 * ctypedef GLboolean (__stdcall *GLISSHADERPTR)(GLuint shader) nogil
 * ctypedef GLboolean (__stdcall *GLISTEXTUREPTR)(GLuint texture) nogil
 * ctypedef GLenum (__stdcall *GLCHECKFRAMEBUFFERSTATUSPTR)(GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLenum (__stdcall *GLGETERRORPTR)() nogil
 * ctypedef GLint (__stdcall *GLGETATTRIBLOCATIONPTR)(GLuint, const GLchar *) nogil
*/
typedef GLenum (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCHECKFRAMEBUFFERSTATUSPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":390
 * ctypedef GLboolean (__stdcall *GLISTEXTUREPTR)(GLuint texture) nogil
 * ctypedef GLenum (__stdcall *GLCHECKFRAMEBUFFERSTATUSPTR)(GLenum) nogil
 * ctypedef GLenum (__stdcall *GLGETERRORPTR)() nogil             # <<<<<<<<<<<<<<
 * ctypedef GLint (__stdcall *GLGETATTRIBLOCATIONPTR)(GLuint, const GLchar *) nogil
 * ctypedef GLint (__stdcall *GLGETUNIFORMLOCATIONPTR)(GLuint, const char *) nogil
*/
typedef GLenum (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETERRORPTR)(void);

/* "kivy/graphics/cgl.pxd":391
 * ctypedef GLenum (__stdcall *GLCHECKFRAMEBUFFERSTATUSPTR)(GLenum) nogil
 * ctypedef GLenum (__stdcall *GLGETERRORPTR)() nogil
 * ctypedef GLint (__stdcall *GLGETATTRIBLOCATIONPTR)(GLuint, const GLchar *) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLint (__stdcall *GLGETUNIFORMLOCATIONPTR)(GLuint, const char *) nogil
 * ctypedef GLuint (__stdcall *GLCREATEPROGRAMPTR)() nogil
*/
typedef GLint (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETATTRIBLOCATIONPTR)(GLuint, GLchar const *);

/* "kivy/graphics/cgl.pxd":392
 * ctypedef GLenum (__stdcall *GLGETERRORPTR)() nogil
 * ctypedef GLint (__stdcall *GLGETATTRIBLOCATIONPTR)(GLuint, const GLchar *) nogil
 * ctypedef GLint (__stdcall *GLGETUNIFORMLOCATIONPTR)(GLuint, const char *) nogil             # <<<<<<<<<<<<<<
 * ctypedef GLuint (__stdcall *GLCREATEPROGRAMPTR)() nogil
 * ctypedef GLuint (__stdcall *GLCREATESHADERPTR)(GLenum) nogil
*/
typedef GLint (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETUNIFORMLOCATIONPTR)(GLuint, char const *);

/* "kivy/graphics/cgl.pxd":393
 * ctypedef GLint (__stdcall *GLGETATTRIBLOCATIONPTR)(GLuint, const GLchar *) nogil
 * ctypedef GLint (__stdcall *GLGETUNIFORMLOCATIONPTR)(GLuint, const char *) nogil
 * ctypedef GLuint (__stdcall *GLCREATEPROGRAMPTR)() nogil             # <<<<<<<<<<<<<<
 * ctypedef GLuint (__stdcall *GLCREATESHADERPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLACTIVETEXTUREPTR)(GLenum) nogil
*/
typedef GLuint (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCREATEPROGRAMPTR)(void);

/* "kivy/graphics/cgl.pxd":394
 * ctypedef GLint (__stdcall *GLGETUNIFORMLOCATIONPTR)(GLuint, const char *) nogil
 * ctypedef GLuint (__stdcall *GLCREATEPROGRAMPTR)() nogil
 * ctypedef GLuint (__stdcall *GLCREATESHADERPTR)(GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLACTIVETEXTUREPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLATTACHSHADERPTR)(GLuint, GLuint) nogil
*/
typedef GLuint (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCREATESHADERPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":395
 * ctypedef GLuint (__stdcall *GLCREATEPROGRAMPTR)() nogil
 * ctypedef GLuint (__stdcall *GLCREATESHADERPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLACTIVETEXTUREPTR)(GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLATTACHSHADERPTR)(GLuint, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDATTRIBLOCATIONPTR)(GLuint, GLuint, const char *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLACTIVETEXTUREPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":396
 * ctypedef GLuint (__stdcall *GLCREATESHADERPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLACTIVETEXTUREPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLATTACHSHADERPTR)(GLuint, GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBINDATTRIBLOCATIONPTR)(GLuint, GLuint, const char *) nogil
 * ctypedef void (__stdcall *GLBINDBUFFERPTR)(GLenum, GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLATTACHSHADERPTR)(GLuint, GLuint);

/* "kivy/graphics/cgl.pxd":397
 * ctypedef void (__stdcall *GLACTIVETEXTUREPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLATTACHSHADERPTR)(GLuint, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDATTRIBLOCATIONPTR)(GLuint, GLuint, const char *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBINDBUFFERPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDFRAMEBUFFERPTR)(GLenum, GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBINDATTRIBLOCATIONPTR)(GLuint, GLuint, char const *);

/* "kivy/graphics/cgl.pxd":398
 * ctypedef void (__stdcall *GLATTACHSHADERPTR)(GLuint, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDATTRIBLOCATIONPTR)(GLuint, GLuint, const char *) nogil
 * ctypedef void (__stdcall *GLBINDBUFFERPTR)(GLenum, GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBINDFRAMEBUFFERPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDRENDERBUFFERPTR)(GLenum target, GLuint renderbuffer) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBINDBUFFERPTR)(GLenum, GLuint);

/* "kivy/graphics/cgl.pxd":399
 * ctypedef void (__stdcall *GLBINDATTRIBLOCATIONPTR)(GLuint, GLuint, const char *) nogil
 * ctypedef void (__stdcall *GLBINDBUFFERPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDFRAMEBUFFERPTR)(GLenum, GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBINDRENDERBUFFERPTR)(GLenum target, GLuint renderbuffer) nogil
 * ctypedef void (__stdcall *GLBINDTEXTUREPTR)(GLenum, GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBINDFRAMEBUFFERPTR)(GLenum, GLuint);

/* "kivy/graphics/cgl.pxd":400
 * ctypedef void (__stdcall *GLBINDBUFFERPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDFRAMEBUFFERPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDRENDERBUFFERPTR)(GLenum target, GLuint renderbuffer) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBINDTEXTUREPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBLENDCOLORPTR)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBINDRENDERBUFFERPTR)(GLenum, GLuint);

/* "kivy/graphics/cgl.pxd":401
 * ctypedef void (__stdcall *GLBINDFRAMEBUFFERPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBINDRENDERBUFFERPTR)(GLenum target, GLuint renderbuffer) nogil
 * ctypedef void (__stdcall *GLBINDTEXTUREPTR)(GLenum, GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBLENDCOLORPTR)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) nogil
 * ctypedef void (__stdcall *GLBLENDEQUATIONPTR)( GLenum mode ) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBINDTEXTUREPTR)(GLenum, GLuint);

/* "kivy/graphics/cgl.pxd":402
 * ctypedef void (__stdcall *GLBINDRENDERBUFFERPTR)(GLenum target, GLuint renderbuffer) nogil
 * ctypedef void (__stdcall *GLBINDTEXTUREPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBLENDCOLORPTR)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBLENDEQUATIONPTR)( GLenum mode ) nogil
 * ctypedef void (__stdcall *GLBLENDEQUATIONSEPARATEPTR)(GLenum modeRGB, GLenum modeAlpha) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBLENDCOLORPTR)(GLclampf, GLclampf, GLclampf, GLclampf);

/* "kivy/graphics/cgl.pxd":403
 * ctypedef void (__stdcall *GLBINDTEXTUREPTR)(GLenum, GLuint) nogil
 * ctypedef void (__stdcall *GLBLENDCOLORPTR)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) nogil
 * ctypedef void (__stdcall *GLBLENDEQUATIONPTR)( GLenum mode ) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBLENDEQUATIONSEPARATEPTR)(GLenum modeRGB, GLenum modeAlpha) nogil
 * ctypedef void (__stdcall *GLBLENDFUNCPTR)(GLenum sfactor, GLenum dfactor) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBLENDEQUATIONPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":404
 * ctypedef void (__stdcall *GLBLENDCOLORPTR)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) nogil
 * ctypedef void (__stdcall *GLBLENDEQUATIONPTR)( GLenum mode ) nogil
 * ctypedef void (__stdcall *GLBLENDEQUATIONSEPARATEPTR)(GLenum modeRGB, GLenum modeAlpha) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBLENDFUNCPTR)(GLenum sfactor, GLenum dfactor) nogil
 * ctypedef void (__stdcall *GLBLENDFUNCSEPARATEPTR)(GLenum, GLenum, GLenum, GLenum) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBLENDEQUATIONSEPARATEPTR)(GLenum, GLenum);

/* "kivy/graphics/cgl.pxd":405
 * ctypedef void (__stdcall *GLBLENDEQUATIONPTR)( GLenum mode ) nogil
 * ctypedef void (__stdcall *GLBLENDEQUATIONSEPARATEPTR)(GLenum modeRGB, GLenum modeAlpha) nogil
 * ctypedef void (__stdcall *GLBLENDFUNCPTR)(GLenum sfactor, GLenum dfactor) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBLENDFUNCSEPARATEPTR)(GLenum, GLenum, GLenum, GLenum) nogil
 * ctypedef void (__stdcall *GLBUFFERDATAPTR)(GLenum, GLsizeiptr, const GLvoid *, GLenum) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBLENDFUNCPTR)(GLenum, GLenum);

/* "kivy/graphics/cgl.pxd":406
 * ctypedef void (__stdcall *GLBLENDEQUATIONSEPARATEPTR)(GLenum modeRGB, GLenum modeAlpha) nogil
 * ctypedef void (__stdcall *GLBLENDFUNCPTR)(GLenum sfactor, GLenum dfactor) nogil
 * ctypedef void (__stdcall *GLBLENDFUNCSEPARATEPTR)(GLenum, GLenum, GLenum, GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBUFFERDATAPTR)(GLenum, GLsizeiptr, const GLvoid *, GLenum) nogil
 * ctypedef void (__stdcall *GLBUFFERSUBDATAPTR)(GLenum, GLintptr, GLsizeiptr, const GLvoid *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBLENDFUNCSEPARATEPTR)(GLenum, GLenum, GLenum, GLenum);

/* "kivy/graphics/cgl.pxd":407
 * ctypedef void (__stdcall *GLBLENDFUNCPTR)(GLenum sfactor, GLenum dfactor) nogil
 * ctypedef void (__stdcall *GLBLENDFUNCSEPARATEPTR)(GLenum, GLenum, GLenum, GLenum) nogil
 * ctypedef void (__stdcall *GLBUFFERDATAPTR)(GLenum, GLsizeiptr, const GLvoid *, GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLBUFFERSUBDATAPTR)(GLenum, GLintptr, GLsizeiptr, const GLvoid *) nogil
 * ctypedef void (__stdcall *GLCLEARCOLORPTR)(GLclampf, GLclampf, GLclampf, GLclampf) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBUFFERDATAPTR)(GLenum, GLsizeiptr, GLvoid const *, GLenum);

/* "kivy/graphics/cgl.pxd":408
 * ctypedef void (__stdcall *GLBLENDFUNCSEPARATEPTR)(GLenum, GLenum, GLenum, GLenum) nogil
 * ctypedef void (__stdcall *GLBUFFERDATAPTR)(GLenum, GLsizeiptr, const GLvoid *, GLenum) nogil
 * ctypedef void (__stdcall *GLBUFFERSUBDATAPTR)(GLenum, GLintptr, GLsizeiptr, const GLvoid *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCLEARCOLORPTR)(GLclampf, GLclampf, GLclampf, GLclampf) nogil
 * ctypedef void (__stdcall *GLCLEARPTR)(GLbitfield) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLBUFFERSUBDATAPTR)(GLenum, GLintptr, GLsizeiptr, GLvoid const *);

/* "kivy/graphics/cgl.pxd":409
 * ctypedef void (__stdcall *GLBUFFERDATAPTR)(GLenum, GLsizeiptr, const GLvoid *, GLenum) nogil
 * ctypedef void (__stdcall *GLBUFFERSUBDATAPTR)(GLenum, GLintptr, GLsizeiptr, const GLvoid *) nogil
 * ctypedef void (__stdcall *GLCLEARCOLORPTR)(GLclampf, GLclampf, GLclampf, GLclampf) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCLEARPTR)(GLbitfield) nogil
 * ctypedef void (__stdcall *GLCLEARSTENCILPTR)(GLint s) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCLEARCOLORPTR)(GLclampf, GLclampf, GLclampf, GLclampf);

/* "kivy/graphics/cgl.pxd":410
 * ctypedef void (__stdcall *GLBUFFERSUBDATAPTR)(GLenum, GLintptr, GLsizeiptr, const GLvoid *) nogil
 * ctypedef void (__stdcall *GLCLEARCOLORPTR)(GLclampf, GLclampf, GLclampf, GLclampf) nogil
 * ctypedef void (__stdcall *GLCLEARPTR)(GLbitfield) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCLEARSTENCILPTR)(GLint s) nogil
 * ctypedef void (__stdcall *GLCOLORMASKPTR)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCLEARPTR)(GLbitfield);

/* "kivy/graphics/cgl.pxd":411
 * ctypedef void (__stdcall *GLCLEARCOLORPTR)(GLclampf, GLclampf, GLclampf, GLclampf) nogil
 * ctypedef void (__stdcall *GLCLEARPTR)(GLbitfield) nogil
 * ctypedef void (__stdcall *GLCLEARSTENCILPTR)(GLint s) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCOLORMASKPTR)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) nogil
 * ctypedef void (__stdcall *GLCOMPILESHADERPTR)(GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCLEARSTENCILPTR)(GLint);

/* "kivy/graphics/cgl.pxd":412
 * ctypedef void (__stdcall *GLCLEARPTR)(GLbitfield) nogil
 * ctypedef void (__stdcall *GLCLEARSTENCILPTR)(GLint s) nogil
 * ctypedef void (__stdcall *GLCOLORMASKPTR)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCOMPILESHADERPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCOLORMASKPTR)(GLboolean, GLboolean, GLboolean, GLboolean);

/* "kivy/graphics/cgl.pxd":413
 * ctypedef void (__stdcall *GLCLEARSTENCILPTR)(GLint s) nogil
 * ctypedef void (__stdcall *GLCOLORMASKPTR)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) nogil
 * ctypedef void (__stdcall *GLCOMPILESHADERPTR)(GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) nogil
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCOMPILESHADERPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":414
 * ctypedef void (__stdcall *GLCOLORMASKPTR)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) nogil
 * ctypedef void (__stdcall *GLCOMPILESHADERPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) nogil
 * ctypedef void (__stdcall *GLCOPYTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCOMPRESSEDTEXIMAGE2DPTR)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid const *);

/* "kivy/graphics/cgl.pxd":415
 * ctypedef void (__stdcall *GLCOMPILESHADERPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) nogil
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCOPYTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) nogil
 * ctypedef void (__stdcall *GLCOPYTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCOMPRESSEDTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid const *);

/* "kivy/graphics/cgl.pxd":416
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) nogil
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) nogil
 * ctypedef void (__stdcall *GLCOPYTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCOPYTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) nogil
 * ctypedef void (__stdcall *GLCULLFACEPTR)(GLenum mode) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCOPYTEXIMAGE2DPTR)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);

/* "kivy/graphics/cgl.pxd":417
 * ctypedef void (__stdcall *GLCOMPRESSEDTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) nogil
 * ctypedef void (__stdcall *GLCOPYTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) nogil
 * ctypedef void (__stdcall *GLCOPYTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLCULLFACEPTR)(GLenum mode) nogil
 * ctypedef void (__stdcall *GLDELETEBUFFERSPTR)(GLsizei n, const GLuint* buffers) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCOPYTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);

/* "kivy/graphics/cgl.pxd":418
 * ctypedef void (__stdcall *GLCOPYTEXIMAGE2DPTR)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) nogil
 * ctypedef void (__stdcall *GLCOPYTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) nogil
 * ctypedef void (__stdcall *GLCULLFACEPTR)(GLenum mode) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDELETEBUFFERSPTR)(GLsizei n, const GLuint* buffers) nogil
 * ctypedef void (__stdcall *GLDELETEFRAMEBUFFERSPTR)(GLsizei, const GLuint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLCULLFACEPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":419
 * ctypedef void (__stdcall *GLCOPYTEXSUBIMAGE2DPTR)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) nogil
 * ctypedef void (__stdcall *GLCULLFACEPTR)(GLenum mode) nogil
 * ctypedef void (__stdcall *GLDELETEBUFFERSPTR)(GLsizei n, const GLuint* buffers) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDELETEFRAMEBUFFERSPTR)(GLsizei, const GLuint *) nogil
 * ctypedef void (__stdcall *GLDELETEPROGRAMPTR)(GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDELETEBUFFERSPTR)(GLsizei, GLuint const *);

/* "kivy/graphics/cgl.pxd":420
 * ctypedef void (__stdcall *GLCULLFACEPTR)(GLenum mode) nogil
 * ctypedef void (__stdcall *GLDELETEBUFFERSPTR)(GLsizei n, const GLuint* buffers) nogil
 * ctypedef void (__stdcall *GLDELETEFRAMEBUFFERSPTR)(GLsizei, const GLuint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDELETEPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDELETERENDERBUFFERSPTR)(GLsizei n, const GLuint* renderbuffers) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDELETEFRAMEBUFFERSPTR)(GLsizei, GLuint const *);

/* "kivy/graphics/cgl.pxd":421
 * ctypedef void (__stdcall *GLDELETEBUFFERSPTR)(GLsizei n, const GLuint* buffers) nogil
 * ctypedef void (__stdcall *GLDELETEFRAMEBUFFERSPTR)(GLsizei, const GLuint *) nogil
 * ctypedef void (__stdcall *GLDELETEPROGRAMPTR)(GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDELETERENDERBUFFERSPTR)(GLsizei n, const GLuint* renderbuffers) nogil
 * ctypedef void (__stdcall *GLDELETESHADERPTR)(GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDELETEPROGRAMPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":422
 * ctypedef void (__stdcall *GLDELETEFRAMEBUFFERSPTR)(GLsizei, const GLuint *) nogil
 * ctypedef void (__stdcall *GLDELETEPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDELETERENDERBUFFERSPTR)(GLsizei n, const GLuint* renderbuffers) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDELETESHADERPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDELETETEXTURESPTR)(GLsizei, const GLuint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDELETERENDERBUFFERSPTR)(GLsizei, GLuint const *);

/* "kivy/graphics/cgl.pxd":423
 * ctypedef void (__stdcall *GLDELETEPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDELETERENDERBUFFERSPTR)(GLsizei n, const GLuint* renderbuffers) nogil
 * ctypedef void (__stdcall *GLDELETESHADERPTR)(GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDELETETEXTURESPTR)(GLsizei, const GLuint *) nogil
 * ctypedef void (__stdcall *GLDEPTHFUNCPTR)(GLenum func) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDELETESHADERPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":424
 * ctypedef void (__stdcall *GLDELETERENDERBUFFERSPTR)(GLsizei n, const GLuint* renderbuffers) nogil
 * ctypedef void (__stdcall *GLDELETESHADERPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDELETETEXTURESPTR)(GLsizei, const GLuint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDEPTHFUNCPTR)(GLenum func) nogil
 * ctypedef void (__stdcall *GLDEPTHMASKPTR)(GLboolean flag) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDELETETEXTURESPTR)(GLsizei, GLuint const *);

/* "kivy/graphics/cgl.pxd":425
 * ctypedef void (__stdcall *GLDELETESHADERPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDELETETEXTURESPTR)(GLsizei, const GLuint *) nogil
 * ctypedef void (__stdcall *GLDEPTHFUNCPTR)(GLenum func) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDEPTHMASKPTR)(GLboolean flag) nogil
 * ctypedef void (__stdcall *GLDETACHSHADERPTR)(GLuint program, GLuint shader) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDEPTHFUNCPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":426
 * ctypedef void (__stdcall *GLDELETETEXTURESPTR)(GLsizei, const GLuint *) nogil
 * ctypedef void (__stdcall *GLDEPTHFUNCPTR)(GLenum func) nogil
 * ctypedef void (__stdcall *GLDEPTHMASKPTR)(GLboolean flag) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDETACHSHADERPTR)(GLuint program, GLuint shader) nogil
 * ctypedef void (__stdcall *GLDISABLEPTR)(GLenum) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDEPTHMASKPTR)(GLboolean);

/* "kivy/graphics/cgl.pxd":427
 * ctypedef void (__stdcall *GLDEPTHFUNCPTR)(GLenum func) nogil
 * ctypedef void (__stdcall *GLDEPTHMASKPTR)(GLboolean flag) nogil
 * ctypedef void (__stdcall *GLDETACHSHADERPTR)(GLuint program, GLuint shader) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDISABLEPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLDISABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDETACHSHADERPTR)(GLuint, GLuint);

/* "kivy/graphics/cgl.pxd":428
 * ctypedef void (__stdcall *GLDEPTHMASKPTR)(GLboolean flag) nogil
 * ctypedef void (__stdcall *GLDETACHSHADERPTR)(GLuint program, GLuint shader) nogil
 * ctypedef void (__stdcall *GLDISABLEPTR)(GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDISABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDRAWARRAYSPTR)(GLenum, GLint, GLsizei) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDISABLEPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":429
 * ctypedef void (__stdcall *GLDETACHSHADERPTR)(GLuint program, GLuint shader) nogil
 * ctypedef void (__stdcall *GLDISABLEPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLDISABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDRAWARRAYSPTR)(GLenum, GLint, GLsizei) nogil
 * ctypedef void (__stdcall *GLDRAWELEMENTSPTR)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDISABLEVERTEXATTRIBARRAYPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":430
 * ctypedef void (__stdcall *GLDISABLEPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLDISABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDRAWARRAYSPTR)(GLenum, GLint, GLsizei) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLDRAWELEMENTSPTR)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) nogil
 * ctypedef void (__stdcall *GLENABLEPTR)(GLenum) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDRAWARRAYSPTR)(GLenum, GLint, GLsizei);

/* "kivy/graphics/cgl.pxd":431
 * ctypedef void (__stdcall *GLDISABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLDRAWARRAYSPTR)(GLenum, GLint, GLsizei) nogil
 * ctypedef void (__stdcall *GLDRAWELEMENTSPTR)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLENABLEPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLENABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLDRAWELEMENTSPTR)(GLenum, GLsizei, GLenum, GLvoid const *);

/* "kivy/graphics/cgl.pxd":432
 * ctypedef void (__stdcall *GLDRAWARRAYSPTR)(GLenum, GLint, GLsizei) nogil
 * ctypedef void (__stdcall *GLDRAWELEMENTSPTR)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) nogil
 * ctypedef void (__stdcall *GLENABLEPTR)(GLenum) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLENABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLFINISHPTR)() nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLENABLEPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":433
 * ctypedef void (__stdcall *GLDRAWELEMENTSPTR)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) nogil
 * ctypedef void (__stdcall *GLENABLEPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLENABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLFINISHPTR)() nogil
 * ctypedef void (__stdcall *GLFLUSHPTR)() nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLENABLEVERTEXATTRIBARRAYPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":434
 * ctypedef void (__stdcall *GLENABLEPTR)(GLenum) nogil
 * ctypedef void (__stdcall *GLENABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLFINISHPTR)() nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLFLUSHPTR)() nogil
 * ctypedef void (__stdcall *GLFRAMEBUFFERRENDERBUFFERPTR)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLFINISHPTR)(void);

/* "kivy/graphics/cgl.pxd":435
 * ctypedef void (__stdcall *GLENABLEVERTEXATTRIBARRAYPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLFINISHPTR)() nogil
 * ctypedef void (__stdcall *GLFLUSHPTR)() nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLFRAMEBUFFERRENDERBUFFERPTR)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) nogil
 * ctypedef void (__stdcall *GLFRAMEBUFFERTEXTURE2DPTR)(GLenum, GLenum, GLenum, GLuint, GLint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLFLUSHPTR)(void);

/* "kivy/graphics/cgl.pxd":436
 * ctypedef void (__stdcall *GLFINISHPTR)() nogil
 * ctypedef void (__stdcall *GLFLUSHPTR)() nogil
 * ctypedef void (__stdcall *GLFRAMEBUFFERRENDERBUFFERPTR)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLFRAMEBUFFERTEXTURE2DPTR)(GLenum, GLenum, GLenum, GLuint, GLint) nogil
 * ctypedef void (__stdcall *GLFRONTFACEPTR)(GLenum mode) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLFRAMEBUFFERRENDERBUFFERPTR)(GLenum, GLenum, GLenum, GLuint);

/* "kivy/graphics/cgl.pxd":437
 * ctypedef void (__stdcall *GLFLUSHPTR)() nogil
 * ctypedef void (__stdcall *GLFRAMEBUFFERRENDERBUFFERPTR)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) nogil
 * ctypedef void (__stdcall *GLFRAMEBUFFERTEXTURE2DPTR)(GLenum, GLenum, GLenum, GLuint, GLint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLFRONTFACEPTR)(GLenum mode) nogil
 * ctypedef void (__stdcall *GLGENBUFFERSPTR)(GLsizei, GLuint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLFRAMEBUFFERTEXTURE2DPTR)(GLenum, GLenum, GLenum, GLuint, GLint);

/* "kivy/graphics/cgl.pxd":438
 * ctypedef void (__stdcall *GLFRAMEBUFFERRENDERBUFFERPTR)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) nogil
 * ctypedef void (__stdcall *GLFRAMEBUFFERTEXTURE2DPTR)(GLenum, GLenum, GLenum, GLuint, GLint) nogil
 * ctypedef void (__stdcall *GLFRONTFACEPTR)(GLenum mode) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGENBUFFERSPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGENERATEMIPMAPPTR)(GLenum target) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLFRONTFACEPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":439
 * ctypedef void (__stdcall *GLFRAMEBUFFERTEXTURE2DPTR)(GLenum, GLenum, GLenum, GLuint, GLint) nogil
 * ctypedef void (__stdcall *GLFRONTFACEPTR)(GLenum mode) nogil
 * ctypedef void (__stdcall *GLGENBUFFERSPTR)(GLsizei, GLuint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGENERATEMIPMAPPTR)(GLenum target) nogil
 * ctypedef void (__stdcall *GLGENFRAMEBUFFERSPTR)(GLsizei, GLuint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGENBUFFERSPTR)(GLsizei, GLuint *);

/* "kivy/graphics/cgl.pxd":440
 * ctypedef void (__stdcall *GLFRONTFACEPTR)(GLenum mode) nogil
 * ctypedef void (__stdcall *GLGENBUFFERSPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGENERATEMIPMAPPTR)(GLenum target) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGENFRAMEBUFFERSPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGENRENDERBUFFERSPTR)(GLsizei n, GLuint* renderbuffers) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGENERATEMIPMAPPTR)(GLenum);

/* "kivy/graphics/cgl.pxd":441
 * ctypedef void (__stdcall *GLGENBUFFERSPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGENERATEMIPMAPPTR)(GLenum target) nogil
 * ctypedef void (__stdcall *GLGENFRAMEBUFFERSPTR)(GLsizei, GLuint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGENRENDERBUFFERSPTR)(GLsizei n, GLuint* renderbuffers) nogil
 * ctypedef void (__stdcall *GLGENTEXTURESPTR)(GLsizei, GLuint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGENFRAMEBUFFERSPTR)(GLsizei, GLuint *);

/* "kivy/graphics/cgl.pxd":442
 * ctypedef void (__stdcall *GLGENERATEMIPMAPPTR)(GLenum target) nogil
 * ctypedef void (__stdcall *GLGENFRAMEBUFFERSPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGENRENDERBUFFERSPTR)(GLsizei n, GLuint* renderbuffers) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGENTEXTURESPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGETACTIVEATTRIBPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGENRENDERBUFFERSPTR)(GLsizei, GLuint *);

/* "kivy/graphics/cgl.pxd":443
 * ctypedef void (__stdcall *GLGENFRAMEBUFFERSPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGENRENDERBUFFERSPTR)(GLsizei n, GLuint* renderbuffers) nogil
 * ctypedef void (__stdcall *GLGENTEXTURESPTR)(GLsizei, GLuint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETACTIVEATTRIBPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
 * ctypedef void (__stdcall *GLGETACTIVEUNIFORMPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGENTEXTURESPTR)(GLsizei, GLuint *);

/* "kivy/graphics/cgl.pxd":444
 * ctypedef void (__stdcall *GLGENRENDERBUFFERSPTR)(GLsizei n, GLuint* renderbuffers) nogil
 * ctypedef void (__stdcall *GLGENTEXTURESPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGETACTIVEATTRIBPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETACTIVEUNIFORMPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
 * ctypedef void (__stdcall *GLGETATTACHEDSHADERSPTR)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETACTIVEATTRIBPTR)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);

/* "kivy/graphics/cgl.pxd":445
 * ctypedef void (__stdcall *GLGENTEXTURESPTR)(GLsizei, GLuint *) nogil
 * ctypedef void (__stdcall *GLGETACTIVEATTRIBPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
 * ctypedef void (__stdcall *GLGETACTIVEUNIFORMPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETATTACHEDSHADERSPTR)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) nogil
 * ctypedef void (__stdcall *GLGETBOOLEANVPTR)(GLenum, GLboolean *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETACTIVEUNIFORMPTR)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);

/* "kivy/graphics/cgl.pxd":446
 * ctypedef void (__stdcall *GLGETACTIVEATTRIBPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
 * ctypedef void (__stdcall *GLGETACTIVEUNIFORMPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
 * ctypedef void (__stdcall *GLGETATTACHEDSHADERSPTR)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETBOOLEANVPTR)(GLenum, GLboolean *) nogil
 * ctypedef void (__stdcall *GLGETBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETATTACHEDSHADERSPTR)(GLuint, GLsizei, GLsizei *, GLuint *);

/* "kivy/graphics/cgl.pxd":447
 * ctypedef void (__stdcall *GLGETACTIVEUNIFORMPTR)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) nogil
 * ctypedef void (__stdcall *GLGETATTACHEDSHADERSPTR)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) nogil
 * ctypedef void (__stdcall *GLGETBOOLEANVPTR)(GLenum, GLboolean *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETFLOATVPTR)(GLenum pname, GLfloat* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETBOOLEANVPTR)(GLenum, GLboolean *);

/* "kivy/graphics/cgl.pxd":448
 * ctypedef void (__stdcall *GLGETATTACHEDSHADERSPTR)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) nogil
 * ctypedef void (__stdcall *GLGETBOOLEANVPTR)(GLenum, GLboolean *) nogil
 * ctypedef void (__stdcall *GLGETBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETFLOATVPTR)(GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETFRAMEBUFFERATTACHMENTPARAMETERIVPTR)(GLenum target, GLenum attachment, GLenum pname, GLint* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETBUFFERPARAMETERIVPTR)(GLenum, GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":449
 * ctypedef void (__stdcall *GLGETBOOLEANVPTR)(GLenum, GLboolean *) nogil
 * ctypedef void (__stdcall *GLGETBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETFLOATVPTR)(GLenum pname, GLfloat* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETFRAMEBUFFERATTACHMENTPARAMETERIVPTR)(GLenum target, GLenum attachment, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETINTEGERVPTR)(GLenum, GLint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETFLOATVPTR)(GLenum, GLfloat *);

/* "kivy/graphics/cgl.pxd":450
 * ctypedef void (__stdcall *GLGETBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETFLOATVPTR)(GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETFRAMEBUFFERATTACHMENTPARAMETERIVPTR)(GLenum target, GLenum attachment, GLenum pname, GLint* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETINTEGERVPTR)(GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETPROGRAMINFOLOGPTR)(GLuint, GLsizei, GLsizei*, GLchar*) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETFRAMEBUFFERATTACHMENTPARAMETERIVPTR)(GLenum, GLenum, GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":451
 * ctypedef void (__stdcall *GLGETFLOATVPTR)(GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETFRAMEBUFFERATTACHMENTPARAMETERIVPTR)(GLenum target, GLenum attachment, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETINTEGERVPTR)(GLenum, GLint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETPROGRAMINFOLOGPTR)(GLuint, GLsizei, GLsizei*, GLchar*) nogil
 * ctypedef void (__stdcall *GLGETPROGRAMIVPTR)(GLuint, GLenum, GLint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETINTEGERVPTR)(GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":452
 * ctypedef void (__stdcall *GLGETFRAMEBUFFERATTACHMENTPARAMETERIVPTR)(GLenum target, GLenum attachment, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETINTEGERVPTR)(GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETPROGRAMINFOLOGPTR)(GLuint, GLsizei, GLsizei*, GLchar*) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETPROGRAMIVPTR)(GLuint, GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETRENDERBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETPROGRAMINFOLOGPTR)(GLuint, GLsizei, GLsizei *, GLchar *);

/* "kivy/graphics/cgl.pxd":453
 * ctypedef void (__stdcall *GLGETINTEGERVPTR)(GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETPROGRAMINFOLOGPTR)(GLuint, GLsizei, GLsizei*, GLchar*) nogil
 * ctypedef void (__stdcall *GLGETPROGRAMIVPTR)(GLuint, GLenum, GLint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETRENDERBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETSHADERINFOLOGPTR)(GLuint, GLsizei, GLsizei *, char *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETPROGRAMIVPTR)(GLuint, GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":454
 * ctypedef void (__stdcall *GLGETPROGRAMINFOLOGPTR)(GLuint, GLsizei, GLsizei*, GLchar*) nogil
 * ctypedef void (__stdcall *GLGETPROGRAMIVPTR)(GLuint, GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETRENDERBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETSHADERINFOLOGPTR)(GLuint, GLsizei, GLsizei *, char *) nogil
 * ctypedef void (__stdcall *GLGETSHADERIVPTR)(GLuint, GLenum, GLint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETRENDERBUFFERPARAMETERIVPTR)(GLenum, GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":455
 * ctypedef void (__stdcall *GLGETPROGRAMIVPTR)(GLuint, GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETRENDERBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETSHADERINFOLOGPTR)(GLuint, GLsizei, GLsizei *, char *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETSHADERIVPTR)(GLuint, GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETSHADERSOURCEPTR)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETSHADERINFOLOGPTR)(GLuint, GLsizei, GLsizei *, char *);

/* "kivy/graphics/cgl.pxd":456
 * ctypedef void (__stdcall *GLGETRENDERBUFFERPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETSHADERINFOLOGPTR)(GLuint, GLsizei, GLsizei *, char *) nogil
 * ctypedef void (__stdcall *GLGETSHADERIVPTR)(GLuint, GLenum, GLint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETSHADERSOURCEPTR)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) nogil
 * ctypedef void (__stdcall *GLGETTEXPARAMETERFVPTR)(GLenum target, GLenum pname, GLfloat* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETSHADERIVPTR)(GLuint, GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":457
 * ctypedef void (__stdcall *GLGETSHADERINFOLOGPTR)(GLuint, GLsizei, GLsizei *, char *) nogil
 * ctypedef void (__stdcall *GLGETSHADERIVPTR)(GLuint, GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETSHADERSOURCEPTR)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETTEXPARAMETERFVPTR)(GLenum target, GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETTEXPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETSHADERSOURCEPTR)(GLuint, GLsizei, GLsizei *, GLchar *);

/* "kivy/graphics/cgl.pxd":458
 * ctypedef void (__stdcall *GLGETSHADERIVPTR)(GLuint, GLenum, GLint *) nogil
 * ctypedef void (__stdcall *GLGETSHADERSOURCEPTR)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) nogil
 * ctypedef void (__stdcall *GLGETTEXPARAMETERFVPTR)(GLenum target, GLenum pname, GLfloat* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETTEXPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETUNIFORMFVPTR)(GLuint program, GLint location, GLfloat* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETTEXPARAMETERFVPTR)(GLenum, GLenum, GLfloat *);

/* "kivy/graphics/cgl.pxd":459
 * ctypedef void (__stdcall *GLGETSHADERSOURCEPTR)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) nogil
 * ctypedef void (__stdcall *GLGETTEXPARAMETERFVPTR)(GLenum target, GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETTEXPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETUNIFORMFVPTR)(GLuint program, GLint location, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETUNIFORMIVPTR)(GLuint program, GLint location, GLint* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETTEXPARAMETERIVPTR)(GLenum, GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":460
 * ctypedef void (__stdcall *GLGETTEXPARAMETERFVPTR)(GLenum target, GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETTEXPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETUNIFORMFVPTR)(GLuint program, GLint location, GLfloat* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETUNIFORMIVPTR)(GLuint program, GLint location, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBFVPTR)(GLuint index, GLenum pname, GLfloat* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETUNIFORMFVPTR)(GLuint, GLint, GLfloat *);

/* "kivy/graphics/cgl.pxd":461
 * ctypedef void (__stdcall *GLGETTEXPARAMETERIVPTR)(GLenum target, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETUNIFORMFVPTR)(GLuint program, GLint location, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETUNIFORMIVPTR)(GLuint program, GLint location, GLint* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBFVPTR)(GLuint index, GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBIVPTR)(GLuint index, GLenum pname, GLint* params) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETUNIFORMIVPTR)(GLuint, GLint, GLint *);

/* "kivy/graphics/cgl.pxd":462
 * ctypedef void (__stdcall *GLGETUNIFORMFVPTR)(GLuint program, GLint location, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETUNIFORMIVPTR)(GLuint program, GLint location, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBFVPTR)(GLuint index, GLenum pname, GLfloat* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBIVPTR)(GLuint index, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLHINTPTR)(GLenum target, GLenum mode) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETVERTEXATTRIBFVPTR)(GLuint, GLenum, GLfloat *);

/* "kivy/graphics/cgl.pxd":463
 * ctypedef void (__stdcall *GLGETUNIFORMIVPTR)(GLuint program, GLint location, GLint* params) nogil
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBFVPTR)(GLuint index, GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBIVPTR)(GLuint index, GLenum pname, GLint* params) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLHINTPTR)(GLenum target, GLenum mode) nogil
 * ctypedef void (__stdcall *GLLINEWIDTHPTR)(GLfloat width) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLGETVERTEXATTRIBIVPTR)(GLuint, GLenum, GLint *);

/* "kivy/graphics/cgl.pxd":464
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBFVPTR)(GLuint index, GLenum pname, GLfloat* params) nogil
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBIVPTR)(GLuint index, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLHINTPTR)(GLenum target, GLenum mode) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLLINEWIDTHPTR)(GLfloat width) nogil
 * ctypedef void (__stdcall *GLLINKPROGRAMPTR)(GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLHINTPTR)(GLenum, GLenum);

/* "kivy/graphics/cgl.pxd":465
 * ctypedef void (__stdcall *GLGETVERTEXATTRIBIVPTR)(GLuint index, GLenum pname, GLint* params) nogil
 * ctypedef void (__stdcall *GLHINTPTR)(GLenum target, GLenum mode) nogil
 * ctypedef void (__stdcall *GLLINEWIDTHPTR)(GLfloat width) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLLINKPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLPIXELSTOREIPTR)(GLenum, GLint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLLINEWIDTHPTR)(GLfloat);

/* "kivy/graphics/cgl.pxd":466
 * ctypedef void (__stdcall *GLHINTPTR)(GLenum target, GLenum mode) nogil
 * ctypedef void (__stdcall *GLLINEWIDTHPTR)(GLfloat width) nogil
 * ctypedef void (__stdcall *GLLINKPROGRAMPTR)(GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLPIXELSTOREIPTR)(GLenum, GLint) nogil
 * ctypedef void (__stdcall *GLPOLYGONOFFSETPTR)(GLfloat factor, GLfloat units) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLLINKPROGRAMPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":467
 * ctypedef void (__stdcall *GLLINEWIDTHPTR)(GLfloat width) nogil
 * ctypedef void (__stdcall *GLLINKPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLPIXELSTOREIPTR)(GLenum, GLint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLPOLYGONOFFSETPTR)(GLfloat factor, GLfloat units) nogil
 * ctypedef void (__stdcall *GLREADPIXELSPTR)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLPIXELSTOREIPTR)(GLenum, GLint);

/* "kivy/graphics/cgl.pxd":468
 * ctypedef void (__stdcall *GLLINKPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLPIXELSTOREIPTR)(GLenum, GLint) nogil
 * ctypedef void (__stdcall *GLPOLYGONOFFSETPTR)(GLfloat factor, GLfloat units) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLREADPIXELSPTR)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*) nogil
 * ctypedef void (__stdcall *GLRENDERBUFFERSTORAGEPTR)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLPOLYGONOFFSETPTR)(GLfloat, GLfloat);

/* "kivy/graphics/cgl.pxd":469
 * ctypedef void (__stdcall *GLPIXELSTOREIPTR)(GLenum, GLint) nogil
 * ctypedef void (__stdcall *GLPOLYGONOFFSETPTR)(GLfloat factor, GLfloat units) nogil
 * ctypedef void (__stdcall *GLREADPIXELSPTR)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLRENDERBUFFERSTORAGEPTR)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) nogil
 * ctypedef void (__stdcall *GLSAMPLECOVERAGEPTR)(GLclampf value, GLboolean invert) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLREADPIXELSPTR)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *);

/* "kivy/graphics/cgl.pxd":470
 * ctypedef void (__stdcall *GLPOLYGONOFFSETPTR)(GLfloat factor, GLfloat units) nogil
 * ctypedef void (__stdcall *GLREADPIXELSPTR)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*) nogil
 * ctypedef void (__stdcall *GLRENDERBUFFERSTORAGEPTR)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSAMPLECOVERAGEPTR)(GLclampf value, GLboolean invert) nogil
 * ctypedef void (__stdcall *GLSCISSORPTR)(GLint, GLint, GLsizei, GLsizei) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLRENDERBUFFERSTORAGEPTR)(GLenum, GLenum, GLsizei, GLsizei);

/* "kivy/graphics/cgl.pxd":471
 * ctypedef void (__stdcall *GLREADPIXELSPTR)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*) nogil
 * ctypedef void (__stdcall *GLRENDERBUFFERSTORAGEPTR)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) nogil
 * ctypedef void (__stdcall *GLSAMPLECOVERAGEPTR)(GLclampf value, GLboolean invert) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSCISSORPTR)(GLint, GLint, GLsizei, GLsizei) nogil
 * ctypedef void (__stdcall *GLSHADERBINARYPTR)(GLsizei, const GLuint *, GLenum, const void *, GLsizei) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSAMPLECOVERAGEPTR)(GLclampf, GLboolean);

/* "kivy/graphics/cgl.pxd":472
 * ctypedef void (__stdcall *GLRENDERBUFFERSTORAGEPTR)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) nogil
 * ctypedef void (__stdcall *GLSAMPLECOVERAGEPTR)(GLclampf value, GLboolean invert) nogil
 * ctypedef void (__stdcall *GLSCISSORPTR)(GLint, GLint, GLsizei, GLsizei) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSHADERBINARYPTR)(GLsizei, const GLuint *, GLenum, const void *, GLsizei) nogil
 * ctypedef void (__stdcall *GLSHADERSOURCEPTR)(GLuint, GLsizei, const GLchar* const *, const GLint *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSCISSORPTR)(GLint, GLint, GLsizei, GLsizei);

/* "kivy/graphics/cgl.pxd":473
 * ctypedef void (__stdcall *GLSAMPLECOVERAGEPTR)(GLclampf value, GLboolean invert) nogil
 * ctypedef void (__stdcall *GLSCISSORPTR)(GLint, GLint, GLsizei, GLsizei) nogil
 * ctypedef void (__stdcall *GLSHADERBINARYPTR)(GLsizei, const GLuint *, GLenum, const void *, GLsizei) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSHADERSOURCEPTR)(GLuint, GLsizei, const GLchar* const *, const GLint *) nogil
 * ctypedef void (__stdcall *GLSTENCILFUNCPTR)(GLenum func, GLint ref, GLuint mask) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSHADERBINARYPTR)(GLsizei, GLuint const *, GLenum, void const *, GLsizei);

/* "kivy/graphics/cgl.pxd":474
 * ctypedef void (__stdcall *GLSCISSORPTR)(GLint, GLint, GLsizei, GLsizei) nogil
 * ctypedef void (__stdcall *GLSHADERBINARYPTR)(GLsizei, const GLuint *, GLenum, const void *, GLsizei) nogil
 * ctypedef void (__stdcall *GLSHADERSOURCEPTR)(GLuint, GLsizei, const GLchar* const *, const GLint *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSTENCILFUNCPTR)(GLenum func, GLint ref, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILFUNCSEPARATEPTR)(GLenum face, GLenum func, GLint ref, GLuint mask) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSHADERSOURCEPTR)(GLuint, GLsizei, GLchar const *const *, GLint const *);

/* "kivy/graphics/cgl.pxd":475
 * ctypedef void (__stdcall *GLSHADERBINARYPTR)(GLsizei, const GLuint *, GLenum, const void *, GLsizei) nogil
 * ctypedef void (__stdcall *GLSHADERSOURCEPTR)(GLuint, GLsizei, const GLchar* const *, const GLint *) nogil
 * ctypedef void (__stdcall *GLSTENCILFUNCPTR)(GLenum func, GLint ref, GLuint mask) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSTENCILFUNCSEPARATEPTR)(GLenum face, GLenum func, GLint ref, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILMASKPTR)(GLuint mask) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSTENCILFUNCPTR)(GLenum, GLint, GLuint);

/* "kivy/graphics/cgl.pxd":476
 * ctypedef void (__stdcall *GLSHADERSOURCEPTR)(GLuint, GLsizei, const GLchar* const *, const GLint *) nogil
 * ctypedef void (__stdcall *GLSTENCILFUNCPTR)(GLenum func, GLint ref, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILFUNCSEPARATEPTR)(GLenum face, GLenum func, GLint ref, GLuint mask) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSTENCILMASKPTR)(GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILMASKSEPARATEPTR)(GLenum face, GLuint mask) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSTENCILFUNCSEPARATEPTR)(GLenum, GLenum, GLint, GLuint);

/* "kivy/graphics/cgl.pxd":477
 * ctypedef void (__stdcall *GLSTENCILFUNCPTR)(GLenum func, GLint ref, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILFUNCSEPARATEPTR)(GLenum face, GLenum func, GLint ref, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILMASKPTR)(GLuint mask) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSTENCILMASKSEPARATEPTR)(GLenum face, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILOPPTR)(GLenum fail, GLenum zfail, GLenum zpass) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSTENCILMASKPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":478
 * ctypedef void (__stdcall *GLSTENCILFUNCSEPARATEPTR)(GLenum face, GLenum func, GLint ref, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILMASKPTR)(GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILMASKSEPARATEPTR)(GLenum face, GLuint mask) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSTENCILOPPTR)(GLenum fail, GLenum zfail, GLenum zpass) nogil
 * ctypedef void (__stdcall *GLSTENCILOPSEPARATEPTR)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSTENCILMASKSEPARATEPTR)(GLenum, GLuint);

/* "kivy/graphics/cgl.pxd":479
 * ctypedef void (__stdcall *GLSTENCILMASKPTR)(GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILMASKSEPARATEPTR)(GLenum face, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILOPPTR)(GLenum fail, GLenum zfail, GLenum zpass) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLSTENCILOPSEPARATEPTR)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) nogil
 * ctypedef void (__stdcall *GLTEXIMAGE2DPTR)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSTENCILOPPTR)(GLenum, GLenum, GLenum);

/* "kivy/graphics/cgl.pxd":480
 * ctypedef void (__stdcall *GLSTENCILMASKSEPARATEPTR)(GLenum face, GLuint mask) nogil
 * ctypedef void (__stdcall *GLSTENCILOPPTR)(GLenum fail, GLenum zfail, GLenum zpass) nogil
 * ctypedef void (__stdcall *GLSTENCILOPSEPARATEPTR)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLTEXIMAGE2DPTR)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) nogil
 * ctypedef void (__stdcall *GLTEXPARAMETERFPTR)(GLenum target, GLenum pname, GLfloat param) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLSTENCILOPSEPARATEPTR)(GLenum, GLenum, GLenum, GLenum);

/* "kivy/graphics/cgl.pxd":481
 * ctypedef void (__stdcall *GLSTENCILOPPTR)(GLenum fail, GLenum zfail, GLenum zpass) nogil
 * ctypedef void (__stdcall *GLSTENCILOPSEPARATEPTR)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) nogil
 * ctypedef void (__stdcall *GLTEXIMAGE2DPTR)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLTEXPARAMETERFPTR)(GLenum target, GLenum pname, GLfloat param) nogil
 * ctypedef void (__stdcall *GLTEXPARAMETERIPTR)(GLenum, GLenum, GLint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLTEXIMAGE2DPTR)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, void const *);

/* "kivy/graphics/cgl.pxd":482
 * ctypedef void (__stdcall *GLSTENCILOPSEPARATEPTR)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) nogil
 * ctypedef void (__stdcall *GLTEXIMAGE2DPTR)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) nogil
 * ctypedef void (__stdcall *GLTEXPARAMETERFPTR)(GLenum target, GLenum pname, GLfloat param) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLTEXPARAMETERIPTR)(GLenum, GLenum, GLint) nogil
 * ctypedef void (__stdcall *GLTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLTEXPARAMETERFPTR)(GLenum, GLenum, GLfloat);

/* "kivy/graphics/cgl.pxd":483
 * ctypedef void (__stdcall *GLTEXIMAGE2DPTR)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *) nogil
 * ctypedef void (__stdcall *GLTEXPARAMETERFPTR)(GLenum target, GLenum pname, GLfloat param) nogil
 * ctypedef void (__stdcall *GLTEXPARAMETERIPTR)(GLenum, GLenum, GLint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) nogil
 * ctypedef void (__stdcall *GLUNIFORM1FPTR)(GLint location, GLfloat x) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLTEXPARAMETERIPTR)(GLenum, GLenum, GLint);

/* "kivy/graphics/cgl.pxd":484
 * ctypedef void (__stdcall *GLTEXPARAMETERFPTR)(GLenum target, GLenum pname, GLfloat param) nogil
 * ctypedef void (__stdcall *GLTEXPARAMETERIPTR)(GLenum, GLenum, GLint) nogil
 * ctypedef void (__stdcall *GLTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM1FPTR)(GLint location, GLfloat x) nogil
 * ctypedef void (__stdcall *GLUNIFORM1FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid const *);

/* "kivy/graphics/cgl.pxd":485
 * ctypedef void (__stdcall *GLTEXPARAMETERIPTR)(GLenum, GLenum, GLint) nogil
 * ctypedef void (__stdcall *GLTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) nogil
 * ctypedef void (__stdcall *GLUNIFORM1FPTR)(GLint location, GLfloat x) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM1FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM1IPTR)(GLint, GLint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM1FPTR)(GLint, GLfloat);

/* "kivy/graphics/cgl.pxd":486
 * ctypedef void (__stdcall *GLTEXSUBIMAGE2DPTR)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) nogil
 * ctypedef void (__stdcall *GLUNIFORM1FPTR)(GLint location, GLfloat x) nogil
 * ctypedef void (__stdcall *GLUNIFORM1FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM1IPTR)(GLint, GLint) nogil
 * ctypedef void (__stdcall *GLUNIFORM1IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM1FVPTR)(GLint, GLsizei, GLfloat const *);

/* "kivy/graphics/cgl.pxd":487
 * ctypedef void (__stdcall *GLUNIFORM1FPTR)(GLint location, GLfloat x) nogil
 * ctypedef void (__stdcall *GLUNIFORM1FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM1IPTR)(GLint, GLint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM1IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM2FPTR)(GLint location, GLfloat x, GLfloat y) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM1IPTR)(GLint, GLint);

/* "kivy/graphics/cgl.pxd":488
 * ctypedef void (__stdcall *GLUNIFORM1FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM1IPTR)(GLint, GLint) nogil
 * ctypedef void (__stdcall *GLUNIFORM1IVPTR)(GLint location, GLsizei count, const GLint* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM2FPTR)(GLint location, GLfloat x, GLfloat y) nogil
 * ctypedef void (__stdcall *GLUNIFORM2FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM1IVPTR)(GLint, GLsizei, GLint const *);

/* "kivy/graphics/cgl.pxd":489
 * ctypedef void (__stdcall *GLUNIFORM1IPTR)(GLint, GLint) nogil
 * ctypedef void (__stdcall *GLUNIFORM1IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM2FPTR)(GLint location, GLfloat x, GLfloat y) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM2FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM2IPTR)(GLint location, GLint x, GLint y) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM2FPTR)(GLint, GLfloat, GLfloat);

/* "kivy/graphics/cgl.pxd":490
 * ctypedef void (__stdcall *GLUNIFORM1IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM2FPTR)(GLint location, GLfloat x, GLfloat y) nogil
 * ctypedef void (__stdcall *GLUNIFORM2FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM2IPTR)(GLint location, GLint x, GLint y) nogil
 * ctypedef void (__stdcall *GLUNIFORM2IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM2FVPTR)(GLint, GLsizei, GLfloat const *);

/* "kivy/graphics/cgl.pxd":491
 * ctypedef void (__stdcall *GLUNIFORM2FPTR)(GLint location, GLfloat x, GLfloat y) nogil
 * ctypedef void (__stdcall *GLUNIFORM2FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM2IPTR)(GLint location, GLint x, GLint y) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM2IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM3FPTR)(GLint location, GLfloat x, GLfloat y, GLfloat z) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM2IPTR)(GLint, GLint, GLint);

/* "kivy/graphics/cgl.pxd":492
 * ctypedef void (__stdcall *GLUNIFORM2FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM2IPTR)(GLint location, GLint x, GLint y) nogil
 * ctypedef void (__stdcall *GLUNIFORM2IVPTR)(GLint location, GLsizei count, const GLint* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM3FPTR)(GLint location, GLfloat x, GLfloat y, GLfloat z) nogil
 * ctypedef void (__stdcall *GLUNIFORM3FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM2IVPTR)(GLint, GLsizei, GLint const *);

/* "kivy/graphics/cgl.pxd":493
 * ctypedef void (__stdcall *GLUNIFORM2IPTR)(GLint location, GLint x, GLint y) nogil
 * ctypedef void (__stdcall *GLUNIFORM2IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM3FPTR)(GLint location, GLfloat x, GLfloat y, GLfloat z) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM3FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM3IPTR)(GLint location, GLint x, GLint y, GLint z) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM3FPTR)(GLint, GLfloat, GLfloat, GLfloat);

/* "kivy/graphics/cgl.pxd":494
 * ctypedef void (__stdcall *GLUNIFORM2IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM3FPTR)(GLint location, GLfloat x, GLfloat y, GLfloat z) nogil
 * ctypedef void (__stdcall *GLUNIFORM3FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM3IPTR)(GLint location, GLint x, GLint y, GLint z) nogil
 * ctypedef void (__stdcall *GLUNIFORM3IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM3FVPTR)(GLint, GLsizei, GLfloat const *);

/* "kivy/graphics/cgl.pxd":495
 * ctypedef void (__stdcall *GLUNIFORM3FPTR)(GLint location, GLfloat x, GLfloat y, GLfloat z) nogil
 * ctypedef void (__stdcall *GLUNIFORM3FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM3IPTR)(GLint location, GLint x, GLint y, GLint z) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM3IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM4FPTR)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM3IPTR)(GLint, GLint, GLint, GLint);

/* "kivy/graphics/cgl.pxd":496
 * ctypedef void (__stdcall *GLUNIFORM3FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM3IPTR)(GLint location, GLint x, GLint y, GLint z) nogil
 * ctypedef void (__stdcall *GLUNIFORM3IVPTR)(GLint location, GLsizei count, const GLint* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM4FPTR)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) nogil
 * ctypedef void (__stdcall *GLUNIFORM4FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM3IVPTR)(GLint, GLsizei, GLint const *);

/* "kivy/graphics/cgl.pxd":497
 * ctypedef void (__stdcall *GLUNIFORM3IPTR)(GLint location, GLint x, GLint y, GLint z) nogil
 * ctypedef void (__stdcall *GLUNIFORM3IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM4FPTR)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM4FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM4IPTR)(GLint location, GLint x, GLint y, GLint z, GLint w) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM4FPTR)(GLint, GLfloat, GLfloat, GLfloat, GLfloat);

/* "kivy/graphics/cgl.pxd":498
 * ctypedef void (__stdcall *GLUNIFORM3IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM4FPTR)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) nogil
 * ctypedef void (__stdcall *GLUNIFORM4FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM4IPTR)(GLint location, GLint x, GLint y, GLint z, GLint w) nogil
 * ctypedef void (__stdcall *GLUNIFORM4IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM4FVPTR)(GLint, GLsizei, GLfloat const *);

/* "kivy/graphics/cgl.pxd":499
 * ctypedef void (__stdcall *GLUNIFORM4FPTR)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) nogil
 * ctypedef void (__stdcall *GLUNIFORM4FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM4IPTR)(GLint location, GLint x, GLint y, GLint z, GLint w) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORM4IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORMMATRIX4FVPTR)(GLint, GLsizei, GLboolean, const GLfloat *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM4IPTR)(GLint, GLint, GLint, GLint, GLint);

/* "kivy/graphics/cgl.pxd":500
 * ctypedef void (__stdcall *GLUNIFORM4FVPTR)(GLint location, GLsizei count, const GLfloat* v) nogil
 * ctypedef void (__stdcall *GLUNIFORM4IPTR)(GLint location, GLint x, GLint y, GLint z, GLint w) nogil
 * ctypedef void (__stdcall *GLUNIFORM4IVPTR)(GLint location, GLsizei count, const GLint* v) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUNIFORMMATRIX4FVPTR)(GLint, GLsizei, GLboolean, const GLfloat *) nogil
 * ctypedef void (__stdcall *GLUSEPROGRAMPTR)(GLuint) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORM4IVPTR)(GLint, GLsizei, GLint const *);

/* "kivy/graphics/cgl.pxd":501
 * ctypedef void (__stdcall *GLUNIFORM4IPTR)(GLint location, GLint x, GLint y, GLint z, GLint w) nogil
 * ctypedef void (__stdcall *GLUNIFORM4IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORMMATRIX4FVPTR)(GLint, GLsizei, GLboolean, const GLfloat *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLUSEPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLVALIDATEPROGRAMPTR)(GLuint program) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUNIFORMMATRIX4FVPTR)(GLint, GLsizei, GLboolean, GLfloat const *);

/* "kivy/graphics/cgl.pxd":502
 * ctypedef void (__stdcall *GLUNIFORM4IVPTR)(GLint location, GLsizei count, const GLint* v) nogil
 * ctypedef void (__stdcall *GLUNIFORMMATRIX4FVPTR)(GLint, GLsizei, GLboolean, const GLfloat *) nogil
 * ctypedef void (__stdcall *GLUSEPROGRAMPTR)(GLuint) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLVALIDATEPROGRAMPTR)(GLuint program) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB1FPTR)(GLuint indx, GLfloat x) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLUSEPROGRAMPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":503
 * ctypedef void (__stdcall *GLUNIFORMMATRIX4FVPTR)(GLint, GLsizei, GLboolean, const GLfloat *) nogil
 * ctypedef void (__stdcall *GLUSEPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLVALIDATEPROGRAMPTR)(GLuint program) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLVERTEXATTRIB1FPTR)(GLuint indx, GLfloat x) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB2FPTR)(GLuint indx, GLfloat x, GLfloat y) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLVALIDATEPROGRAMPTR)(GLuint);

/* "kivy/graphics/cgl.pxd":504
 * ctypedef void (__stdcall *GLUSEPROGRAMPTR)(GLuint) nogil
 * ctypedef void (__stdcall *GLVALIDATEPROGRAMPTR)(GLuint program) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB1FPTR)(GLuint indx, GLfloat x) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLVERTEXATTRIB2FPTR)(GLuint indx, GLfloat x, GLfloat y) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB3FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLVERTEXATTRIB1FPTR)(GLuint, GLfloat);

/* "kivy/graphics/cgl.pxd":505
 * ctypedef void (__stdcall *GLVALIDATEPROGRAMPTR)(GLuint program) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB1FPTR)(GLuint indx, GLfloat x) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB2FPTR)(GLuint indx, GLfloat x, GLfloat y) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLVERTEXATTRIB3FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB4FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLVERTEXATTRIB2FPTR)(GLuint, GLfloat, GLfloat);

/* "kivy/graphics/cgl.pxd":506
 * ctypedef void (__stdcall *GLVERTEXATTRIB1FPTR)(GLuint indx, GLfloat x) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB2FPTR)(GLuint indx, GLfloat x, GLfloat y) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB3FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLVERTEXATTRIB4FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIBPOINTERPTR)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLVERTEXATTRIB3FPTR)(GLuint, GLfloat, GLfloat, GLfloat);

/* "kivy/graphics/cgl.pxd":507
 * ctypedef void (__stdcall *GLVERTEXATTRIB2FPTR)(GLuint indx, GLfloat x, GLfloat y) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB3FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB4FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLVERTEXATTRIBPOINTERPTR)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) nogil
 * ctypedef void (__stdcall *GLVIEWPORTPTR)(GLint, GLint, GLsizei, GLsizei) nogil
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLVERTEXATTRIB4FPTR)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat);

/* "kivy/graphics/cgl.pxd":508
 * ctypedef void (__stdcall *GLVERTEXATTRIB3FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIB4FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIBPOINTERPTR)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) nogil             # <<<<<<<<<<<<<<
 * ctypedef void (__stdcall *GLVIEWPORTPTR)(GLint, GLint, GLsizei, GLsizei) nogil
 * 
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLVERTEXATTRIBPOINTERPTR)(GLuint, GLint, GLenum, GLboolean, GLsizei, void const *);

/* "kivy/graphics/cgl.pxd":509
 * ctypedef void (__stdcall *GLVERTEXATTRIB4FPTR)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) nogil
 * ctypedef void (__stdcall *GLVERTEXATTRIBPOINTERPTR)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) nogil
 * ctypedef void (__stdcall *GLVIEWPORTPTR)(GLint, GLint, GLsizei, GLsizei) nogil             # <<<<<<<<<<<<<<
 * 
 * ctypedef struct GLES2_Context:
*/
typedef void (__stdcall *__pyx_t_4kivy_8graphics_3cgl_GLVIEWPORTPTR)(GLint, GLint, GLsizei, GLsizei);

/* "kivy/graphics/cgl.pxd":511
 * ctypedef void (__stdcall *GLVIEWPORTPTR)(GLint, GLint, GLsizei, GLsizei) nogil
 * 
 * ctypedef struct GLES2_Context:             # <<<<<<<<<<<<<<
 *     const GLubyte* (__stdcall *glGetString)(GLenum) nogil
 *     GLboolean (__stdcall *glIsBuffer)(GLuint buffer) nogil
*/
struct __pyx_t_4kivy_8graphics_3cgl_GLES2_Context {
  GLubyte const *(__stdcall *glGetString)(GLenum);
  GLboolean (__stdcall *glIsBuffer)(GLuint);
  GLboolean (__stdcall *glIsEnabled)(GLenum);
  GLboolean (__stdcall *glIsFramebuffer)(GLuint);
  GLboolean (__stdcall *glIsProgram)(GLuint);
  GLboolean (__stdcall *glIsRenderbuffer)(GLuint);
  GLboolean (__stdcall *glIsShader)(GLuint);
  GLboolean (__stdcall *glIsTexture)(GLuint);
  GLenum (__stdcall *glCheckFramebufferStatus)(GLenum);
  GLenum (__stdcall *glGetError)(void);
  GLint (__stdcall *glGetAttribLocation)(GLuint, GLchar const *);
  GLint (__stdcall *glGetUniformLocation)(GLuint, char const *);
  GLuint (__stdcall *glCreateProgram)(void);
  GLuint (__stdcall *glCreateShader)(GLenum);
  void (__stdcall *glActiveTexture)(GLenum);
  void (__stdcall *glAttachShader)(GLuint, GLuint);
  void (__stdcall *glBindAttribLocation)(GLuint, GLuint, char const *);
  void (__stdcall *glBindBuffer)(GLenum, GLuint);
  void (__stdcall *glBindFramebuffer)(GLenum, GLuint);
  void (__stdcall *glBindRenderbuffer)(GLenum, GLuint);
  void (__stdcall *glBindTexture)(GLenum, GLuint);
  void (__stdcall *glBlendColor)(GLclampf, GLclampf, GLclampf, GLclampf);
  void (__stdcall *glBlendEquation)(GLenum);
  void (__stdcall *glBlendEquationSeparate)(GLenum, GLenum);
  void (__stdcall *glBlendFunc)(GLenum, GLenum);
  void (__stdcall *glBlendFuncSeparate)(GLenum, GLenum, GLenum, GLenum);
  void (__stdcall *glBufferData)(GLenum, GLsizeiptr, GLvoid const *, GLenum);
  void (__stdcall *glBufferSubData)(GLenum, GLintptr, GLsizeiptr, GLvoid const *);
  void (__stdcall *glClear)(GLbitfield);
  void (__stdcall *glClearColor)(GLclampf, GLclampf, GLclampf, GLclampf);
  void (__stdcall *glClearStencil)(GLint);
  void (__stdcall *glColorMask)(GLboolean, GLboolean, GLboolean, GLboolean);
  void (__stdcall *glCompileShader)(GLuint);
  void (__stdcall *glCompressedTexImage2D)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, GLvoid const *);
  void (__stdcall *glCompressedTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, GLvoid const *);
  void (__stdcall *glCopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
  void (__stdcall *glCopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
  void (__stdcall *glCullFace)(GLenum);
  void (__stdcall *glDeleteBuffers)(GLsizei, GLuint const *);
  void (__stdcall *glDeleteFramebuffers)(GLsizei, GLuint const *);
  void (__stdcall *glDeleteProgram)(GLuint);
  void (__stdcall *glDeleteRenderbuffers)(GLsizei, GLuint const *);
  void (__stdcall *glDeleteShader)(GLuint);
  void (__stdcall *glDeleteTextures)(GLsizei, GLuint const *);
  void (__stdcall *glDepthFunc)(GLenum);
  void (__stdcall *glDepthMask)(GLboolean);
  void (__stdcall *glDetachShader)(GLuint, GLuint);
  void (__stdcall *glDisable)(GLenum);
  void (__stdcall *glDisableVertexAttribArray)(GLuint);
  void (__stdcall *glDrawArrays)(GLenum, GLint, GLsizei);
  void (__stdcall *glDrawElements)(GLenum, GLsizei, GLenum, GLvoid const *);
  void (__stdcall *glEnable)(GLenum);
  void (__stdcall *glEnableVertexAttribArray)(GLuint);
  void (__stdcall *glFinish)(void);
  void (__stdcall *glFlush)(void);
  void (__stdcall *glFramebufferRenderbuffer)(GLenum, GLenum, GLenum, GLuint);
  void (__stdcall *glFramebufferTexture2D)(GLenum, GLenum, GLenum, GLuint, GLint);
  void (__stdcall *glFrontFace)(GLenum);
  void (__stdcall *glGenBuffers)(GLsizei, GLuint *);
  void (__stdcall *glGenerateMipmap)(GLenum);
  void (__stdcall *glGenFramebuffers)(GLsizei, GLuint *);
  void (__stdcall *glGenRenderbuffers)(GLsizei, GLuint *);
  void (__stdcall *glGenTextures)(GLsizei, GLuint *);
  void (__stdcall *glGetActiveAttrib)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
  void (__stdcall *glGetActiveUniform)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
  void (__stdcall *glGetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *);
  void (__stdcall *glGetBooleanv)(GLenum, GLboolean *);
  void (__stdcall *glGetBufferParameteriv)(GLenum, GLenum, GLint *);
  void (__stdcall *glGetFloatv)(GLenum, GLfloat *);
  void (__stdcall *glGetFramebufferAttachmentParameteriv)(GLenum, GLenum, GLenum, GLint *);
  void (__stdcall *glGetIntegerv)(GLenum, GLint *);
  void (__stdcall *glGetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *);
  void (__stdcall *glGetProgramiv)(GLuint, GLenum, GLint *);
  void (__stdcall *glGetRenderbufferParameteriv)(GLenum, GLenum, GLint *);
  void (__stdcall *glGetShaderInfoLog)(GLuint, GLsizei, GLsizei *, char *);
  void (__stdcall *glGetShaderiv)(GLuint, GLenum, GLint *);
  void (__stdcall *glGetShaderSource)(GLuint, GLsizei, GLsizei *, GLchar *);
  void (__stdcall *glGetTexParameterfv)(GLenum, GLenum, GLfloat *);
  void (__stdcall *glGetTexParameteriv)(GLenum, GLenum, GLint *);
  void (__stdcall *glGetUniformfv)(GLuint, GLint, GLfloat *);
  void (__stdcall *glGetUniformiv)(GLuint, GLint, GLint *);
  void (__stdcall *glGetVertexAttribfv)(GLuint, GLenum, GLfloat *);
  void (__stdcall *glGetVertexAttribiv)(GLuint, GLenum, GLint *);
  void (__stdcall *glHint)(GLenum, GLenum);
  void (__stdcall *glLineWidth)(GLfloat);
  void (__stdcall *glLinkProgram)(GLuint);
  void (__stdcall *glPixelStorei)(GLenum, GLint);
  void (__stdcall *glPolygonOffset)(GLfloat, GLfloat);
  void (__stdcall *glReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *);
  void (__stdcall *glRenderbufferStorage)(GLenum, GLenum, GLsizei, GLsizei);
  void (__stdcall *glSampleCoverage)(GLclampf, GLboolean);
  void (__stdcall *glScissor)(GLint, GLint, GLsizei, GLsizei);
  void (__stdcall *glShaderBinary)(GLsizei, GLuint const *, GLenum, void const *, GLsizei);
  void (__stdcall *glShaderSource)(GLuint, GLsizei, GLchar const *const *, GLint const *);
  void (__stdcall *glStencilFunc)(GLenum, GLint, GLuint);
  void (__stdcall *glStencilFuncSeparate)(GLenum, GLenum, GLint, GLuint);
  void (__stdcall *glStencilMask)(GLuint);
  void (__stdcall *glStencilMaskSeparate)(GLenum, GLuint);
  void (__stdcall *glStencilOp)(GLenum, GLenum, GLenum);
  void (__stdcall *glStencilOpSeparate)(GLenum, GLenum, GLenum, GLenum);
  void (__stdcall *glTexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, void const *);
  void (__stdcall *glTexParameterf)(GLenum, GLenum, GLfloat);
  void (__stdcall *glTexParameteri)(GLenum, GLenum, GLint);
  void (__stdcall *glTexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid const *);
  void (__stdcall *glUniform1f)(GLint, GLfloat);
  void (__stdcall *glUniform1fv)(GLint, GLsizei, GLfloat const *);
  void (__stdcall *glUniform1i)(GLint, GLint);
  void (__stdcall *glUniform1iv)(GLint, GLsizei, GLint const *);
  void (__stdcall *glUniform2f)(GLint, GLfloat, GLfloat);
  void (__stdcall *glUniform2fv)(GLint, GLsizei, GLfloat const *);
  void (__stdcall *glUniform2i)(GLint, GLint, GLint);
  void (__stdcall *glUniform2iv)(GLint, GLsizei, GLint const *);
  void (__stdcall *glUniform3f)(GLint, GLfloat, GLfloat, GLfloat);
  void (__stdcall *glUniform3fv)(GLint, GLsizei, GLfloat const *);
  void (__stdcall *glUniform3i)(GLint, GLint, GLint, GLint);
  void (__stdcall *glUniform3iv)(GLint, GLsizei, GLint const *);
  void (__stdcall *glUniform4f)(GLint, GLfloat, GLfloat, GLfloat, GLfloat);
  void (__stdcall *glUniform4fv)(GLint, GLsizei, GLfloat const *);
  void (__stdcall *glUniform4i)(GLint, GLint, GLint, GLint, GLint);
  void (__stdcall *glUniform4iv)(GLint, GLsizei, GLint const *);
  void (__stdcall *glUniformMatrix4fv)(GLint, GLsizei, GLboolean, GLfloat const *);
  void (__stdcall *glUseProgram)(GLuint);
  void (__stdcall *glValidateProgram)(GLuint);
  void (__stdcall *glVertexAttrib1f)(GLuint, GLfloat);
  void (__stdcall *glVertexAttrib2f)(GLuint, GLfloat, GLfloat);
  void (__stdcall *glVertexAttrib3f)(GLuint, GLfloat, GLfloat, GLfloat);
  void (__stdcall *glVertexAttrib4f)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
  void (__stdcall *glVertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, void const *);
  void (__stdcall *glViewport)(GLint, GLint, GLsizei, GLsizei);
};

/* "kivy/graphics/cgl.pxd":646
 * cdef unsigned long initialized_tid
 * cdef public int verify_gl_main_thread
 * cpdef cgl_init(allowed=*, ignored=*)             # <<<<<<<<<<<<<<
 * cdef GLES2_Context *cgl_get_context()
 * cdef void cgl_set_context(GLES2_Context* ctx)
*/
struct __pyx_opt_args_4kivy_8graphics_3cgl_cgl_init {
  int __pyx_n;
  PyObject *allowed;
  PyObject *ignored;
};

/* "kivy/graphics/cgl.pxd":649
 * cdef GLES2_Context *cgl_get_context()
 * cdef void cgl_set_context(GLES2_Context* ctx)
 * cpdef cgl_get_backend_name(allowed=*, ignored=*)             # <<<<<<<<<<<<<<
 * cpdef cgl_get_initialized_backend_name()
*/
struct __pyx_opt_args_4kivy_8graphics_3cgl_cgl_get_backend_name {
  int __pyx_n;
  PyObject *allowed;
  PyObject *ignored;
};
struct __pyx_t_4kivy_4core_4text_11_text_pango_ft2subst_callback_data_t;
typedef struct __pyx_t_4kivy_4core_4text_11_text_pango_ft2subst_callback_data_t __pyx_t_4kivy_4core_4text_11_text_pango_ft2subst_callback_data_t;

/* "kivy/core/text/_text_pango.pyx":149
 * #        this is not reliable, but I can't find it now. I tested it with
 * #        cli tools, it seems to work. Needs to be investigated/tested.
 * ctypedef struct ft2subst_callback_data_t:             # <<<<<<<<<<<<<<
 *     int antialias
 *     int hintstyle
*/
struct __pyx_t_4kivy_4core_4text_11_text_pango_ft2subst_callback_data_t {
  int antialias;
  int hintstyle;
};

/* "kivy/graphics/texture.pxd":3
 * from kivy.graphics.cgl cimport GLuint
 * 
 * cdef class Texture:             # <<<<<<<<<<<<<<
 *     cdef object __weakref__
 *     cdef unsigned int flags
*/
struct __pyx_obj_4kivy_8graphics_7texture_Texture {
  PyObject_HEAD
  struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture *__pyx_vtab;
  PyObject *__weakref__;
  unsigned int flags;
  PyObject *_source;
  float _tex_coords[8];
  int _width;
  int _height;
  GLuint _target;
  GLuint _id;
  int _mipmap;
  PyObject *_wrap;
  PyObject *_min_filter;
  PyObject *_mag_filter;
  int _rectangle;
  PyObject *_colorfmt;
  PyObject *_icolorfmt;
  PyObject *_bufferfmt;
  float _uvx;
  float _uvy;
  float _uvw;
  float _uvh;
  int _is_allocated;
  int _nofree;
  PyObject *observers;
  PyObject *_proxyimage;
  PyObject *_callback;
};


/* "kivy/graphics/texture.pxd":44
 *     cpdef bind(self)
 * 
 * cdef class TextureRegion(Texture):             # <<<<<<<<<<<<<<
 *     cdef int x
 *     cdef int y
*/
struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion {
  struct __pyx_obj_4kivy_8graphics_7texture_Texture __pyx_base;
  int x;
  int y;
  struct __pyx_obj_4kivy_8graphics_7texture_Texture *owner;
};


/* "kivy/core/text/_text_pango.pyx":175
 * # Fontconfig and pango structures (one per font context). Instances of
 * # this class are stored in the kivy_font_context_cache dict.
 * cdef class ContextContainer:             # <<<<<<<<<<<<<<
 *     cdef FcConfig *fc_config
 *     cdef PangoLayout *layout
*/
struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer {
  PyObject_HEAD
  FcConfig *fc_config;
  PangoLayout *layout;
  PangoContext *context;
  PangoFontMap *fontmap;
  PangoFontDescription *fontdesc;
  __pyx_t_4kivy_4core_4text_11_text_pango_ft2subst_callback_data_t ft2subst_callback_data;
  double ascent;
  double descent;
  PyObject *loaded_fonts;
};


/* "kivy/core/text/_text_pango.pyx":576
 * # Public API from this point
 * # ----------------------------------------------------------------------------
 * cdef class KivyPangoRenderer:             # <<<<<<<<<<<<<<
 *     # w, h is the final bitmap size, drawn by 1+ render() calls in *pixels
 *     cdef int w, h
*/
struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer {
  PyObject_HEAD
  int w;
  int h;
  int canary;
  int rdrcount;
  unsigned char *pixels;
};


/* "kivy/core/text/_text_pango.pyx":807
 *         'word_char': PANGO_WRAP_WORD_CHAR}
 * 
 * cdef class KivyPangoLayout:             # <<<<<<<<<<<<<<
 *     cdef PangoLayout *layout
 * 
*/
struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout {
  PyObject_HEAD
  PangoLayout *layout;
};



/* "kivy/graphics/texture.pxd":3
 * from kivy.graphics.cgl cimport GLuint
 * 
 * cdef class Texture:             # <<<<<<<<<<<<<<
 *     cdef object __weakref__
 *     cdef unsigned int flags
*/

struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture {
  void (*update_tex_coords)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *);
  void (*set_min_filter)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, PyObject *);
  void (*set_mag_filter)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, PyObject *);
  void (*set_wrap)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, PyObject *);
  void (*reload)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *);
  void (*_reload_propagate)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, struct __pyx_obj_4kivy_8graphics_7texture_Texture *);
  void (*allocate)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *);
  PyObject *(*flip_vertical)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, int __pyx_skip_dispatch);
  PyObject *(*flip_horizontal)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, int __pyx_skip_dispatch);
  PyObject *(*get_region)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, PyObject *, PyObject *, PyObject *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*bind)(struct __pyx_obj_4kivy_8graphics_7texture_Texture *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture *__pyx_vtabptr_4kivy_8graphics_7texture_Texture;


/* "kivy/graphics/texture.pxd":44
 *     cpdef bind(self)
 * 
 * cdef class TextureRegion(Texture):             # <<<<<<<<<<<<<<
 *     cdef int x
 *     cdef int y
*/

struct __pyx_vtabstruct_4kivy_8graphics_7texture_TextureRegion {
  struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture __pyx_base;
};
static struct __pyx_vtabstruct_4kivy_8graphics_7texture_TextureRegion *__pyx_vtabptr_4kivy_8graphics_7texture_TextureRegion;
/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectCall.proto (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto (used by PyObjectCall2Args) */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);

/* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallOneArg.proto (used by PyObjectCallMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* PyObjectGetAttrStr.proto (used by PyObjectGetMethod) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
#endif

/* PyObjectCallMethod1.proto (used by pop_index) */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* pop_index.proto */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix);
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix);
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#else
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\
    __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
        __Pyx__PyObject_PopIndex(L, py_ix))
#endif

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto (used by PyErrFetchRestore) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto (used by GetModuleGlobalName) */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* PyDictVersioning.proto (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* DictGetItem.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyObjectFastCallMethod.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL)
#else
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf);
#endif

/* PyObjectCallNoArg.proto (used by pyfrozenset_new) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* pyfrozenset_new.proto (used by PySetContains) */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it);

/* PySetContains.proto */
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq);

/* CallCFunction.proto (used by CallUnboundCMethod1) */
#define __Pyx_CallCFunction(cfunc, self, args)\
    ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args)
#define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\
    ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs)
#define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\
    ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs)
#define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\
    ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames)

/* UnpackUnboundCMethod.proto (used by CallUnboundCMethod1) */
typedef struct {
    PyObject *type;
    PyObject **method_name;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS
    __pyx_atomic_int_type initialized;
#endif
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) {
#if !CYTHON_ATOMICS
    return 1;
#else
    __pyx_nonatomic_int_type expected = 0;
    if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) {
        return 0;
    }
    return expected;
#endif
}
static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) {
#if CYTHON_ATOMICS
    __pyx_atomic_store(&cfunc->initialized, 2);
#endif
}
#else
#define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2
#define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc)
#endif

/* CallUnboundCMethod1.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* TupleAndListFromArray.proto (used by fastcall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto (used by BytesEquals) */
#include <string.h>

/* BytesEquals.proto (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i))
#else
    #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i))
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i])
    #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
#else
    #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#endif
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start)
#else
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* py_dict_items.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d);

/* CallUnboundCMethod0.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_values.proto (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* OwnedDictNext.proto (used by RejectKeywords) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue);
#else
CYTHON_INLINE
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue);
#endif

/* RejectKeywords.export */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);

/* PyTypeError_Check.proto */
#define __Pyx_PyExc_TypeError_Check(obj)  __Pyx_TypeCheck(obj, PyExc_TypeError)

/* RaiseException.export */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywordsImpl.export */
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name
);
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* CallUnboundCMethod2.proto */
CYTHON_UNUSED
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2);
#else
#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2)  __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2)
#endif

/* ParseKeywords.proto */
static CYTHON_INLINE int __Pyx_ParseKeywords(
    PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[],
    PyObject *kwds2, PyObject *values[],
    Py_ssize_t num_pos_args, Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs
);

/* bytes_tailmatch.proto */
static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
                                         Py_ssize_t start, Py_ssize_t end, int direction);
static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
                                   Py_ssize_t start, Py_ssize_t end, int direction);

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* dict_getitem_default.proto */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* PyLongBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck, int unsafe_shared);

/* pyint_simplify.proto */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none);

/* ErrOccurredWithGIL.proto */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void);

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetTopmostException.proto (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* py_dict_keys.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* IterFinish.proto (used by set_iter) */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* set_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
                                                  Py_ssize_t* p_orig_length, int* p_source_is_set);
static CYTHON_INLINE int __Pyx_set_iter_next(
        PyObject* iter_obj, Py_ssize_t orig_length,
        Py_ssize_t* ppos, PyObject **value,
        int source_is_set);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* KeywordStringCheck.proto */
static CYTHON_INLINE int __Pyx_CheckKeywordStrings(const char* function_name, PyObject *kw);

/* PyObjectVectorCallKwBuilder.proto (used by PyObjectVectorCallMethodKwBuilder) */
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#if CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall
#endif
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n)
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n);
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n);
#else
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict
#define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n)
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value)
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value)
#endif

/* PyObjectVectorCallMethodKwBuilder.proto */
#if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000
#define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod
#else
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#endif

/* AllocateExtensionType.proto */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final);

/* CallTypeTraverse.proto */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg);
#endif

/* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp);
#endif

/* SetItemOnTypeDict.proto (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v);
#define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v)

/* FixUpExtensionType.proto */
static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);

/* PyObjectCallMethod0.proto (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* ValidateBasesTuple.proto (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* DelItemOnTypeDict.proto (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k);
#define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k)

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_2_3
#define __PYX_HAVE_RT_ImportType_proto_3_2_3
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_3(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_2_3(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_2_3 {
   __Pyx_ImportType_CheckSize_Error_3_2_3 = 0,
   __Pyx_ImportType_CheckSize_Warn_3_2_3 = 1,
   __Pyx_ImportType_CheckSize_Ignore_3_2_3 = 2
};
static PyTypeObject *__Pyx_ImportType_3_2_3(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_3 check_size);
#endif

/* GetVTable.proto */
static void* __Pyx_GetVtable(PyTypeObject *type);

/* VoidPtrImport.proto */
static int __Pyx_ImportVoidPtr_3_2_3(PyObject *module, const char *name, void **p, const char *sig);

/* HasAttr.proto (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_HasAttr(o, n)  PyObject_HasAttrWithError(o, n)
#else
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
#endif

/* ImportImpl.export */
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level);

/* Import.proto */
static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* dict_setdefault.proto (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value);

/* AddModuleRef.proto (used by FetchSharedCythonModule) */
#if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\
     __PYX_LIMITED_VERSION_HEX < 0x030d0000)
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name);
#else
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#endif

/* FetchSharedCythonModule.proto (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto (used by CommonTypesMetaclass) */
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases);

/* CommonTypesMetaclass.proto (used by CythonFunctionShared) */
static int __pyx_CommonTypesMetaclass_init(PyObject *module);
#define __Pyx_CommonTypesMetaclass_USED

/* PyMethodNew.proto (used by CythonFunctionShared) */
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ);

/* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto (used by CythonFunction) */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_dict;
#endif
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    PyObject *defaults;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void));
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func,
                                                         PyTypeObject *defaults_type);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* CLineInTraceback.proto (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#else
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#endif

/* CodeObjectCache.proto (used by AddTraceback) */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject __Pyx_CachedCodeObjectType;
#else
typedef PyCodeObject __Pyx_CachedCodeObjectType;
#endif
typedef struct {
    __Pyx_CachedCodeObjectType* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_int_type accessor_count;
  #endif
};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* GCCDiagnostics.proto */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoDirection(PangoDirection value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoAlignment(PangoAlignment value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoEllipsizeMode(PangoEllipsizeMode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoWrapMode(PangoWrapMode value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_FT_Error(FT_Error value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_long(unsigned long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PangoWrapMode __Pyx_PyLong_As_PangoWrapMode(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_gint(gint value);

/* CIntFromPy.proto */
static CYTHON_INLINE PangoEllipsizeMode __Pyx_PyLong_As_PangoEllipsizeMode(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE gint __Pyx_PyLong_As_gint(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE PangoAlignment __Pyx_PyLong_As_PangoAlignment(PyObject *);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
#define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName
#else
static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp);
#endif
#else  // !LIMITED_API
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) {
    return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2);
}
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#ifdef PyExceptionInstance_Check
  #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj)
#else
  #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException)
#endif

/* GetRuntimeVersion.proto */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
static unsigned long __Pyx_cached_runtime_version = 0;
static void __Pyx_init_runtime_version(void);
#else
#define __Pyx_init_runtime_version()
#endif
static unsigned long __Pyx_get_runtime_version(void);

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* DecompressString.proto */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo);

/* MultiPhaseInitModuleState.proto */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
static PyObject *__Pyx_State_FindModule(void*);
static int __Pyx_State_AddModule(PyObject* module, void*);
static int __Pyx_State_RemoveModule(void*);
#elif CYTHON_USE_MODULE_STATE
#define __Pyx_State_FindModule PyState_FindModule
#define __Pyx_State_AddModule PyState_AddModule
#define __Pyx_State_RemoveModule PyState_RemoveModule
#endif

/* #### Code section: module_declarations ### */
/* CythonABIVersion.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
    #if CYTHON_METH_FASTCALL
        #define __PYX_FASTCALL_ABI_SUFFIX  "_fastcall"
    #else
        #define __PYX_FASTCALL_ABI_SUFFIX
    #endif
    #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#else
    #define __PYX_LIMITED_ABI_SUFFIX
#endif
#if __PYX_HAS_PY_AM_SEND == 1
    #define __PYX_AM_SEND_ABI_SUFFIX
#elif __PYX_HAS_PY_AM_SEND == 2
    #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport"
#else
    #define __PYX_AM_SEND_ABI_SUFFIX "noamsend"
#endif
#ifndef __PYX_MONITORING_ABI_SUFFIX
    #define __PYX_MONITORING_ABI_SUFFIX
#endif
#if CYTHON_USE_TP_FINALIZE
    #define __PYX_TP_FINALIZE_ABI_SUFFIX
#else
    #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize"
#endif
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED)
    #define __PYX_FREELISTS_ABI_SUFFIX
#else
    #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists"
#endif
#define CYTHON_ABI  __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."


/* Module declarations from "cython" */

/* Module declarations from "libc.stdint" */

/* Module declarations from "libc.string" */

/* Module declarations from "cpython.mem" */

/* Module declarations from "kivy.graphics.cgl" */
static double *__pyx_vp_4kivy_8graphics_3cgl_pi = 0;
#define __pyx_v_4kivy_8graphics_3cgl_pi (*__pyx_vp_4kivy_8graphics_3cgl_pi)
static __pyx_t_4kivy_8graphics_3cgl_GLES2_Context **__pyx_vp_4kivy_8graphics_3cgl_cgl = 0;
#define __pyx_v_4kivy_8graphics_3cgl_cgl (*__pyx_vp_4kivy_8graphics_3cgl_cgl)
static int *__pyx_vp_4kivy_8graphics_3cgl_kivy_opengl_es2 = 0;
#define __pyx_v_4kivy_8graphics_3cgl_kivy_opengl_es2 (*__pyx_vp_4kivy_8graphics_3cgl_kivy_opengl_es2)
static unsigned long *__pyx_vp_4kivy_8graphics_3cgl_initialized_tid = 0;
#define __pyx_v_4kivy_8graphics_3cgl_initialized_tid (*__pyx_vp_4kivy_8graphics_3cgl_initialized_tid)
static int *__pyx_vp_4kivy_8graphics_3cgl_verify_gl_main_thread = 0;
#define __pyx_v_4kivy_8graphics_3cgl_verify_gl_main_thread (*__pyx_vp_4kivy_8graphics_3cgl_verify_gl_main_thread)

/* Module declarations from "kivy.graphics.texture" */

/* Module declarations from "kivy.core.text._text_pango" */
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order = 0;
static FT_Library __pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_library;
static int __pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_error;
static short __pyx_v_4kivy_4core_4text_11_text_pango_RSHIFT;
static short __pyx_v_4kivy_4core_4text_11_text_pango_GSHIFT;
static short __pyx_v_4kivy_4core_4text_11_text_pango_BSHIFT;
static short __pyx_v_4kivy_4core_4text_11_text_pango_ASHIFT;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_base_direction = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_alignment = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_alignment = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_ellipsize_mode = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_ellipsize_mode = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_wrap_mode = 0;
static PyObject *__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_wrap_mode = 0;
static CYTHON_INLINE void __pyx_f_4kivy_4core_4text_11_text_pango__purge_ordered_cache(PyObject *, PyObject *, int); /*proto*/
static int __pyx_f_4kivy_4core_4text_11_text_pango__ft2_scan_fontfile_to_fontfamily_cache(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__byte_option(PyObject *); /*proto*/
static CYTHON_INLINE PangoLanguage *__pyx_f_4kivy_4core_4text_11_text_pango__get_options_text_language(PyObject *); /*proto*/
static void __pyx_f_4kivy_4core_4text_11_text_pango__ft2subst_callback(FcPattern *, gpointer); /*proto*/
static CYTHON_INLINE int __pyx_f_4kivy_4core_4text_11_text_pango__cc_fc_config_create(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *, PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__cc_add_font_file(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *, PyObject *); /*proto*/
static PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__cc_list_families(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *); /*proto*/
static PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__set_cc_options(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *, PyObject *); /*proto*/
static struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc(PyObject *, PyObject *); /*proto*/
static CYTHON_INLINE struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc_from_options(PyObject *); /*proto*/
static void __pyx_f_4kivy_4core_4text_11_text_pango__render_layout(PangoLayout *, unsigned char *, int, int, int, int, unsigned char, unsigned char, unsigned char, unsigned char); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "kivy.core.text._text_pango"
extern int __pyx_module_is_main_kivy__core__text___text_pango;
int __pyx_module_is_main_kivy__core__text___text_pango = 0;

/* Implementation of "kivy.core.text._text_pango" */
/* #### Code section: global_var ### */
/* #### Code section: string_decls ### */
/* #### Code section: decls ### */
static int __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer___cinit__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self); /* proto */
static void __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_2__dealloc__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer___cinit__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self, int __pyx_v_w, int __pyx_v_h); /* proto */
static void __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_2__dealloc__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_4render(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self, PyObject *__pyx_v_kivylabel, PyObject *__pyx_v_text, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_6get_ImageData(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_kpango_get_extents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kivylabel, PyObject *__pyx_v_text); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_2kpango_get_ascent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kivylabel); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_4kpango_get_descent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kivylabel); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_6kpango_find_base_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_8kpango_font_context_exists(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_10kpango_font_context_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context, PyObject *__pyx_v_fontfile); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_12kpango_font_context_add_font(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context, PyObject *__pyx_v_fontfile); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_14kpango_font_context_destroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_16kpango_font_context_list(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_18kpango_font_context_list_families(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_20kpango_font_context_list_custom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context); /* proto */
static int __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout___init__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_font_context); /* proto */
static void __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_2__dealloc__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_4set_markup(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_markup, CYTHON_UNUSED PyObject *__pyx_v_encoding); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_6set_width(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_width); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_8get_width(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_10set_height(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_height); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_12get_height(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_14get_wrap(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_16set_wrap(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_wrap); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_18is_wrapped(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_20set_ellipsize(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_ellipsize); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_22get_ellipsize(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_24is_ellipsized(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_26set_indent(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_indent); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_28get_indent(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_30set_spacing(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_spacing); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_32get_spacing(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_34set_justify(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_justify); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_36get_justify(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_38set_auto_dir(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_autodir); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_40get_auto_dir(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_42set_alignment(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_alignment); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_44get_alignment(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_46set_single_paragraph_mode(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_48get_single_paragraph_mode(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_50get_unknown_glyphs_count(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_52xy_to_index(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_54get_size(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_56get_pixel_size(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_58get_baseline(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_60get_line_count(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_62render_as_bytes(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_color); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_64render_as_ImageData(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_66render_as_Texture(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_mipmap, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_68__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_70__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_4kivy_4core_4text_11_text_pango_ContextContainer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoRenderer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoLayout(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
/* SmallCodeConfig */
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  PyTypeObject *__pyx_ptype_4kivy_8graphics_7texture_Texture;
  PyTypeObject *__pyx_ptype_4kivy_8graphics_7texture_TextureRegion;
  PyObject *__pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer;
  PyObject *__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer;
  PyObject *__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout;
  PyTypeObject *__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer;
  PyTypeObject *__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer;
  PyTypeObject *__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_get;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop;
  __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values;
  __Pyx_CachedCFunction __pyx_umethod_PyList_Type__remove;
  __Pyx_CachedCFunction __pyx_umethod_PySet_Type__update;
  PyObject *__pyx_tuple[4];
  PyObject *__pyx_codeobj_tab[51];
  PyObject *__pyx_string_tab[298];
  PyObject *__pyx_number_tab[2];
/* #### Code section: module_state_contents ### */
/* CommonTypesMetaclass.module_state_decls */
PyTypeObject *__pyx_CommonTypesMetaclassType;

/* CachedMethodType.module_state_decls */
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject *__Pyx_CachedMethodType;
#endif

/* CythonFunctionShared.module_state_decls */
PyTypeObject *__pyx_CyFunctionType;

/* CodeObjectCache.module_state_decls */
struct __Pyx_CodeObjectCache __pyx_code_cache;

/* #### Code section: module_state_end ### */
} __pyx_mstatetype;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef)))

#define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef))
#else
static __pyx_mstatetype __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: constant_name_defines ### */
#define __pyx_kp_u_UTF_8 __pyx_string_tab[0]
#define __pyx_kp_u__3 __pyx_string_tab[1]
#define __pyx_kp_u__4 __pyx_string_tab[2]
#define __pyx_kp_u_disable __pyx_string_tab[3]
#define __pyx_kp_u_enable __pyx_string_tab[4]
#define __pyx_kp_u_gc __pyx_string_tab[5]
#define __pyx_kp_u_isenabled __pyx_string_tab[6]
#define __pyx_kp_u_kivy_core_text__text_pango_pyx __pyx_string_tab[7]
#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[8]
#define __pyx_kp_u_self_layout_cannot_be_converted __pyx_string_tab[9]
#define __pyx_kp_u_stringsource __pyx_string_tab[10]
#define __pyx_kp_u_text_pango_Attempt_to_load_empt __pyx_string_tab[11]
#define __pyx_kp_u_text_pango_Could_not_create_new __pyx_string_tab[12]
#define __pyx_kp_u_text_pango_Could_not_create_new_2 __pyx_string_tab[13]
#define __pyx_kp_u_text_pango_Could_not_create_pan __pyx_string_tab[14]
#define __pyx_kp_u_text_pango_Could_not_create_pan_2 __pyx_string_tab[15]
#define __pyx_kp_u_text_pango_Could_not_get_contai __pyx_string_tab[16]
#define __pyx_kp_u_text_pango_Could_not_get_contai_2 __pyx_string_tab[17]
#define __pyx_kp_u_text_pango_Could_not_get_contai_3 __pyx_string_tab[18]
#define __pyx_kp_u_text_pango_Could_not_get_contex __pyx_string_tab[19]
#define __pyx_kp_u_text_pango_Could_not_get_contex_2 __pyx_string_tab[20]
#define __pyx_kp_u_text_pango_Could_not_malloc_FT __pyx_string_tab[21]
#define __pyx_kp_u_text_pango_Dead_canary_in___dea __pyx_string_tab[22]
#define __pyx_kp_u_text_pango_Dead_canary_in_get_I __pyx_string_tab[23]
#define __pyx_kp_u_text_pango_Detecting_family_for __pyx_string_tab[24]
#define __pyx_kp_u_text_pango_Detecting_family_for_2 __pyx_string_tab[25]
#define __pyx_kp_u_text_pango_Detecting_family_for_3 __pyx_string_tab[26]
#define __pyx_kp_u_text_pango_Detecting_family_for_4 __pyx_string_tab[27]
#define __pyx_kp_u_text_pango_Error_loading_FontCo __pyx_string_tab[28]
#define __pyx_kp_u_text_pango_Error_loading_font __pyx_string_tab[29]
#define __pyx_kp_u_text_pango_Error_loading_font_d __pyx_string_tab[30]
#define __pyx_kp_u_text_pango_Failed_to_initialize __pyx_string_tab[31]
#define __pyx_kp_u_text_pango_Ignoring_out_of_boun __pyx_string_tab[32]
#define __pyx_kp_u_text_pango_Invalid_blit_dstbuf __pyx_string_tab[33]
#define __pyx_kp_u_text_pango_KivyPangoLayout_rend __pyx_string_tab[34]
#define __pyx_kp_u_text_pango_KivyPangoLayout_rend_2 __pyx_string_tab[35]
#define __pyx_kp_u_text_pango_Removed_font_context __pyx_string_tab[36]
#define __pyx_kp_u_text_pango_Unsupported_FreeType __pyx_string_tab[37]
#define __pyx_kp_u_text_pango__cc_create_fcconfig __pyx_string_tab[38]
#define __pyx_kp_u_text_pango__cc_render_with_inva __pyx_string_tab[39]
#define __pyx_kp_u_text_pango__ft2_scan_Attempt_to __pyx_string_tab[40]
#define __pyx_kp_u_text_pango_get_ImageData_self_p __pyx_string_tab[41]
#define __pyx_kp_u_text_pango_get_ImageData_withou __pyx_string_tab[42]
#define __pyx_kp_u_text_pango_kpango_font_context __pyx_string_tab[43]
#define __pyx_kp_u_text_pango_kpango_font_context_2 __pyx_string_tab[44]
#define __pyx_kp_u_text_pango_render_called_but_se __pyx_string_tab[45]
#define __pyx_kp_u_text_pango_set_cc_options_Faile __pyx_string_tab[46]
#define __pyx_kp_u_utf_8 __pyx_string_tab[47]
#define __pyx_n_u_A __pyx_string_tab[48]
#define __pyx_n_u_B __pyx_string_tab[49]
#define __pyx_n_u_ContextContainer __pyx_string_tab[50]
#define __pyx_n_u_ContextContainer___reduce_cython __pyx_string_tab[51]
#define __pyx_n_u_ContextContainer___setstate_cyth __pyx_string_tab[52]
#define __pyx_n_u_G __pyx_string_tab[53]
#define __pyx_n_u_ImageData __pyx_string_tab[54]
#define __pyx_n_u_KivyPangoLayout __pyx_string_tab[55]
#define __pyx_n_u_KivyPangoLayout___reduce_cython __pyx_string_tab[56]
#define __pyx_n_u_KivyPangoLayout___setstate_cytho __pyx_string_tab[57]
#define __pyx_n_u_KivyPangoLayout_get_alignment __pyx_string_tab[58]
#define __pyx_n_u_KivyPangoLayout_get_auto_dir __pyx_string_tab[59]
#define __pyx_n_u_KivyPangoLayout_get_baseline __pyx_string_tab[60]
#define __pyx_n_u_KivyPangoLayout_get_ellipsize __pyx_string_tab[61]
#define __pyx_n_u_KivyPangoLayout_get_height __pyx_string_tab[62]
#define __pyx_n_u_KivyPangoLayout_get_indent __pyx_string_tab[63]
#define __pyx_n_u_KivyPangoLayout_get_justify __pyx_string_tab[64]
#define __pyx_n_u_KivyPangoLayout_get_line_count __pyx_string_tab[65]
#define __pyx_n_u_KivyPangoLayout_get_pixel_size __pyx_string_tab[66]
#define __pyx_n_u_KivyPangoLayout_get_single_parag __pyx_string_tab[67]
#define __pyx_n_u_KivyPangoLayout_get_size __pyx_string_tab[68]
#define __pyx_n_u_KivyPangoLayout_get_spacing __pyx_string_tab[69]
#define __pyx_n_u_KivyPangoLayout_get_unknown_glyp __pyx_string_tab[70]
#define __pyx_n_u_KivyPangoLayout_get_width __pyx_string_tab[71]
#define __pyx_n_u_KivyPangoLayout_get_wrap __pyx_string_tab[72]
#define __pyx_n_u_KivyPangoLayout_is_ellipsized __pyx_string_tab[73]
#define __pyx_n_u_KivyPangoLayout_is_wrapped __pyx_string_tab[74]
#define __pyx_n_u_KivyPangoLayout_render_as_ImageD __pyx_string_tab[75]
#define __pyx_n_u_KivyPangoLayout_render_as_Textur __pyx_string_tab[76]
#define __pyx_n_u_KivyPangoLayout_render_as_bytes __pyx_string_tab[77]
#define __pyx_n_u_KivyPangoLayout_set_alignment __pyx_string_tab[78]
#define __pyx_n_u_KivyPangoLayout_set_auto_dir __pyx_string_tab[79]
#define __pyx_n_u_KivyPangoLayout_set_ellipsize __pyx_string_tab[80]
#define __pyx_n_u_KivyPangoLayout_set_height __pyx_string_tab[81]
#define __pyx_n_u_KivyPangoLayout_set_indent __pyx_string_tab[82]
#define __pyx_n_u_KivyPangoLayout_set_justify __pyx_string_tab[83]
#define __pyx_n_u_KivyPangoLayout_set_markup __pyx_string_tab[84]
#define __pyx_n_u_KivyPangoLayout_set_single_parag __pyx_string_tab[85]
#define __pyx_n_u_KivyPangoLayout_set_spacing __pyx_string_tab[86]
#define __pyx_n_u_KivyPangoLayout_set_width __pyx_string_tab[87]
#define __pyx_n_u_KivyPangoLayout_set_wrap __pyx_string_tab[88]
#define __pyx_n_u_KivyPangoLayout_xy_to_index __pyx_string_tab[89]
#define __pyx_n_u_KivyPangoRenderer __pyx_string_tab[90]
#define __pyx_n_u_KivyPangoRenderer___reduce_cytho __pyx_string_tab[91]
#define __pyx_n_u_KivyPangoRenderer___setstate_cyt __pyx_string_tab[92]
#define __pyx_n_u_KivyPangoRenderer_get_ImageData __pyx_string_tab[93]
#define __pyx_n_u_KivyPangoRenderer_render __pyx_string_tab[94]
#define __pyx_n_u_Logger __pyx_string_tab[95]
#define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[96]
#define __pyx_n_u_R __pyx_string_tab[97]
#define __pyx_n_u_a __pyx_string_tab[98]
#define __pyx_n_u_alignment __pyx_string_tab[99]
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[100]
#define __pyx_n_u_autodir __pyx_string_tab[101]
#define __pyx_n_u_b_pixels __pyx_string_tab[102]
#define __pyx_n_u_bold __pyx_string_tab[103]
#define __pyx_n_u_cc __pyx_string_tab[104]
#define __pyx_n_u_center __pyx_string_tab[105]
#define __pyx_n_u_char __pyx_string_tab[106]
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[107]
#define __pyx_n_u_color __pyx_string_tab[108]
#define __pyx_n_u_create_from_data __pyx_string_tab[109]
#define __pyx_n_u_decode __pyx_string_tab[110]
#define __pyx_n_u_ellipsize __pyx_string_tab[111]
#define __pyx_n_u_em __pyx_string_tab[112]
#define __pyx_n_u_encode __pyx_string_tab[113]
#define __pyx_n_u_encoding __pyx_string_tab[114]
#define __pyx_n_u_end __pyx_string_tab[115]
#define __pyx_n_u_fctx __pyx_string_tab[116]
#define __pyx_n_u_flip_vertical __pyx_string_tab[117]
#define __pyx_n_u_font_context __pyx_string_tab[118]
#define __pyx_n_u_font_family __pyx_string_tab[119]
#define __pyx_n_u_font_features __pyx_string_tab[120]
#define __pyx_n_u_font_hinting __pyx_string_tab[121]
#define __pyx_n_u_font_name __pyx_string_tab[122]
#define __pyx_n_u_font_name_r __pyx_string_tab[123]
#define __pyx_n_u_font_size __pyx_string_tab[124]
#define __pyx_n_u_fontfile __pyx_string_tab[125]
#define __pyx_n_u_format __pyx_string_tab[126]
#define __pyx_n_u_func __pyx_string_tab[127]
#define __pyx_n_u_get __pyx_string_tab[128]
#define __pyx_n_u_get_ImageData __pyx_string_tab[129]
#define __pyx_n_u_get_alignment __pyx_string_tab[130]
#define __pyx_n_u_get_auto_dir __pyx_string_tab[131]
#define __pyx_n_u_get_baseline __pyx_string_tab[132]
#define __pyx_n_u_get_ellipsize __pyx_string_tab[133]
#define __pyx_n_u_get_height __pyx_string_tab[134]
#define __pyx_n_u_get_indent __pyx_string_tab[135]
#define __pyx_n_u_get_justify __pyx_string_tab[136]
#define __pyx_n_u_get_line_count __pyx_string_tab[137]
#define __pyx_n_u_get_pixel_size __pyx_string_tab[138]
#define __pyx_n_u_get_single_paragraph_mode __pyx_string_tab[139]
#define __pyx_n_u_get_size __pyx_string_tab[140]
#define __pyx_n_u_get_spacing __pyx_string_tab[141]
#define __pyx_n_u_get_unknown_glyphs_count __pyx_string_tab[142]
#define __pyx_n_u_get_width __pyx_string_tab[143]
#define __pyx_n_u_get_wrap __pyx_string_tab[144]
#define __pyx_n_u_getstate __pyx_string_tab[145]
#define __pyx_n_u_h __pyx_string_tab[146]
#define __pyx_n_u_height __pyx_string_tab[147]
#define __pyx_n_u_indent __pyx_string_tab[148]
#define __pyx_n_u_index __pyx_string_tab[149]
#define __pyx_n_u_is_coroutine __pyx_string_tab[150]
#define __pyx_n_u_is_ellipsized __pyx_string_tab[151]
#define __pyx_n_u_is_wrapped __pyx_string_tab[152]
#define __pyx_n_u_italic __pyx_string_tab[153]
#define __pyx_n_u_items __pyx_string_tab[154]
#define __pyx_n_u_justify __pyx_string_tab[155]
#define __pyx_n_u_keys __pyx_string_tab[156]
#define __pyx_n_u_kivy_core_image __pyx_string_tab[157]
#define __pyx_n_u_kivy_core_text__text_pango __pyx_string_tab[158]
#define __pyx_n_u_kivy_logger __pyx_string_tab[159]
#define __pyx_n_u_kivylabel __pyx_string_tab[160]
#define __pyx_n_u_kpango_find_base_dir __pyx_string_tab[161]
#define __pyx_n_u_kpango_font_context_add_font __pyx_string_tab[162]
#define __pyx_n_u_kpango_font_context_create __pyx_string_tab[163]
#define __pyx_n_u_kpango_font_context_destroy __pyx_string_tab[164]
#define __pyx_n_u_kpango_font_context_exists __pyx_string_tab[165]
#define __pyx_n_u_kpango_font_context_list __pyx_string_tab[166]
#define __pyx_n_u_kpango_font_context_list_custom __pyx_string_tab[167]
#define __pyx_n_u_kpango_font_context_list_familie __pyx_string_tab[168]
#define __pyx_n_u_kpango_get_ascent __pyx_string_tab[169]
#define __pyx_n_u_kpango_get_descent __pyx_string_tab[170]
#define __pyx_n_u_kpango_get_extents __pyx_string_tab[171]
#define __pyx_n_u_kwargs __pyx_string_tab[172]
#define __pyx_n_u_left __pyx_string_tab[173]
#define __pyx_n_u_ltr __pyx_string_tab[174]
#define __pyx_n_u_m __pyx_string_tab[175]
#define __pyx_n_u_main __pyx_string_tab[176]
#define __pyx_n_u_markup __pyx_string_tab[177]
#define __pyx_n_u_middle __pyx_string_tab[178]
#define __pyx_n_u_mipmap __pyx_string_tab[179]
#define __pyx_n_u_mode __pyx_string_tab[180]
#define __pyx_n_u_module __pyx_string_tab[181]
#define __pyx_n_u_name __pyx_string_tab[182]
#define __pyx_n_u_none __pyx_string_tab[183]
#define __pyx_n_u_options __pyx_string_tab[184]
#define __pyx_n_u_out __pyx_string_tab[185]
#define __pyx_n_u_pixels __pyx_string_tab[186]
#define __pyx_n_u_pop __pyx_string_tab[187]
#define __pyx_n_u_pyx_state __pyx_string_tab[188]
#define __pyx_n_u_pyx_vtable __pyx_string_tab[189]
#define __pyx_n_u_qualname __pyx_string_tab[190]
#define __pyx_n_u_reduce __pyx_string_tab[191]
#define __pyx_n_u_reduce_cython __pyx_string_tab[192]
#define __pyx_n_u_reduce_ex __pyx_string_tab[193]
#define __pyx_n_u_remove __pyx_string_tab[194]
#define __pyx_n_u_render __pyx_string_tab[195]
#define __pyx_n_u_render_as_ImageData __pyx_string_tab[196]
#define __pyx_n_u_render_as_Texture __pyx_string_tab[197]
#define __pyx_n_u_render_as_bytes __pyx_string_tab[198]
#define __pyx_n_u_result __pyx_string_tab[199]
#define __pyx_n_u_rgba __pyx_string_tab[200]
#define __pyx_n_u_right __pyx_string_tab[201]
#define __pyx_n_u_rtl __pyx_string_tab[202]
#define __pyx_n_u_self __pyx_string_tab[203]
#define __pyx_n_u_set_alignment __pyx_string_tab[204]
#define __pyx_n_u_set_auto_dir __pyx_string_tab[205]
#define __pyx_n_u_set_ellipsize __pyx_string_tab[206]
#define __pyx_n_u_set_height __pyx_string_tab[207]
#define __pyx_n_u_set_indent __pyx_string_tab[208]
#define __pyx_n_u_set_justify __pyx_string_tab[209]
#define __pyx_n_u_set_markup __pyx_string_tab[210]
#define __pyx_n_u_set_name __pyx_string_tab[211]
#define __pyx_n_u_set_single_paragraph_mode __pyx_string_tab[212]
#define __pyx_n_u_set_spacing __pyx_string_tab[213]
#define __pyx_n_u_set_width __pyx_string_tab[214]
#define __pyx_n_u_set_wrap __pyx_string_tab[215]
#define __pyx_n_u_setdefault __pyx_string_tab[216]
#define __pyx_n_u_setstate __pyx_string_tab[217]
#define __pyx_n_u_setstate_cython __pyx_string_tab[218]
#define __pyx_n_u_spacing __pyx_string_tab[219]
#define __pyx_n_u_start __pyx_string_tab[220]
#define __pyx_n_u_strikethrough __pyx_string_tab[221]
#define __pyx_n_u_t __pyx_string_tab[222]
#define __pyx_n_u_test __pyx_string_tab[223]
#define __pyx_n_u_tex __pyx_string_tab[224]
#define __pyx_n_u_text __pyx_string_tab[225]
#define __pyx_n_u_text_language __pyx_string_tab[226]
#define __pyx_n_u_trailing __pyx_string_tab[227]
#define __pyx_n_u_underline __pyx_string_tab[228]
#define __pyx_n_u_update __pyx_string_tab[229]
#define __pyx_n_u_utf __pyx_string_tab[230]
#define __pyx_n_u_values __pyx_string_tab[231]
#define __pyx_n_u_w __pyx_string_tab[232]
#define __pyx_n_u_warn __pyx_string_tab[233]
#define __pyx_n_u_weak_ltr __pyx_string_tab[234]
#define __pyx_n_u_weak_rtl __pyx_string_tab[235]
#define __pyx_n_u_width __pyx_string_tab[236]
#define __pyx_n_u_wm __pyx_string_tab[237]
#define __pyx_n_u_word __pyx_string_tab[238]
#define __pyx_n_u_word_char __pyx_string_tab[239]
#define __pyx_n_u_wrap __pyx_string_tab[240]
#define __pyx_n_u_x __pyx_string_tab[241]
#define __pyx_n_u_xx __pyx_string_tab[242]
#define __pyx_n_u_xy_to_index __pyx_string_tab[243]
#define __pyx_n_u_y __pyx_string_tab[244]
#define __pyx_n_u_yy __pyx_string_tab[245]
#define __pyx_kp_b_ __pyx_string_tab[246]
#define __pyx_kp_b__2 __pyx_string_tab[247]
#define __pyx_kp_b_directory __pyx_string_tab[248]
#define __pyx_kp_b_fontconfig __pyx_string_tab[249]
#define __pyx_kp_b_iso88591_1A_q_IS_1A __pyx_string_tab[250]
#define __pyx_kp_b_iso88591_4q_uA __pyx_string_tab[251]
#define __pyx_kp_b_iso88591_A_1D_Qa_1 __pyx_string_tab[252]
#define __pyx_kp_b_iso88591_A_1D_Qa_2S_Rs_q_Fas_6l_2Rr_1_4q __pyx_string_tab[253]
#define __pyx_kp_b_iso88591_A_31D_Cq_qPQ_q __pyx_string_tab[254]
#define __pyx_kp_b_iso88591_A_4AT __pyx_string_tab[255]
#define __pyx_kp_b_iso88591_A_4q __pyx_string_tab[256]
#define __pyx_kp_b_iso88591_A_4t1_q_4t1_q_4q_q_Ja_wd_4s_D_2Q __pyx_string_tab[257]
#define __pyx_kp_b_iso88591_A_4t1_q_IQ_A_4q_q_q_A_Qa_Qb_c_q __pyx_string_tab[258]
#define __pyx_kp_b_iso88591_A_5Qd __pyx_string_tab[259]
#define __pyx_kp_b_iso88591_A_5T_Q_4y __pyx_string_tab[260]
#define __pyx_kp_b_iso88591_A_5T_Qd_1 __pyx_string_tab[261]
#define __pyx_kp_b_iso88591_A_D_C1D_RS __pyx_string_tab[262]
#define __pyx_kp_b_iso88591_A_D_at1 __pyx_string_tab[263]
#define __pyx_kp_b_iso88591_A_Q __pyx_string_tab[264]
#define __pyx_kp_b_iso88591_A_Q_H_ZWX __pyx_string_tab[265]
#define __pyx_kp_b_iso88591_A_Qd __pyx_string_tab[266]
#define __pyx_kp_b_iso88591_A_Qd_1Cq_1 __pyx_string_tab[267]
#define __pyx_kp_b_iso88591_A_S_1_9Ba __pyx_string_tab[268]
#define __pyx_kp_b_iso88591_A_Yc __pyx_string_tab[269]
#define __pyx_kp_b_iso88591_A_Yd_1 __pyx_string_tab[270]
#define __pyx_kp_b_iso88591_A_a __pyx_string_tab[271]
#define __pyx_kp_b_iso88591_A_at1 __pyx_string_tab[272]
#define __pyx_kp_b_iso88591_A_at9Cq __pyx_string_tab[273]
#define __pyx_kp_b_iso88591_A_at9D __pyx_string_tab[274]
#define __pyx_kp_b_iso88591_A_it1A __pyx_string_tab[275]
#define __pyx_kp_b_iso88591_A_q_A __pyx_string_tab[276]
#define __pyx_kp_b_iso88591_A_q_IS __pyx_string_tab[277]
#define __pyx_kp_b_iso88591_A_t1Kq_4y __pyx_string_tab[278]
#define __pyx_kp_b_iso88591_Q __pyx_string_tab[279]
#define __pyx_kp_b_iso88591_Q_l_1_uCq_q_0_q_q_q __pyx_string_tab[280]
#define __pyx_kp_b_iso88591_Qa_t1_e1A_1G1N_K7RSST_q_1D_2Q __pyx_string_tab[281]
#define __pyx_kp_b_iso88591_l_1_5_E_A __pyx_string_tab[282]
#define __pyx_kp_b_iso88591_l_1_6d_1_q_q_7_9D_Rq_1 __pyx_string_tab[283]
#define __pyx_kp_b_iso88591_l_1_t1_e1A_0_q_t1_e1AFMQa_7_A_Q __pyx_string_tab[284]
#define __pyx_kp_b_iso88591_l_1_uD_S_1A __pyx_string_tab[285]
#define __pyx_kp_b_iso88591_l_1_uD_S_q_e_A_TTUUV_1 __pyx_string_tab[286]
#define __pyx_kp_b_iso88591_q_S_1_9Biwa_Q_1 __pyx_string_tab[287]
#define __pyx_kp_b_iso88591_q_T_Qc_AQ __pyx_string_tab[288]
#define __pyx_kp_b_iso88591_uCq_s_Qa_t1_e1A_1G1N_K7RSST_s_I __pyx_string_tab[289]
#define __pyx_kp_b_isolated __pyx_string_tab[290]
#define __pyx_kp_b_pyx_t_4kivy_8graphics_3cgl_GLE __pyx_string_tab[291]
#define __pyx_kp_b_system __pyx_string_tab[292]
#define __pyx_kp_b_systemconfig __pyx_string_tab[293]
#define __pyx_n_b_Sans __pyx_string_tab[294]
#define __pyx_n_b_light __pyx_string_tab[295]
#define __pyx_n_b_mono __pyx_string_tab[296]
#define __pyx_n_b_normal __pyx_string_tab[297]
#define __pyx_int_0 __pyx_number_tab[0]
#define __pyx_int_255 __pyx_number_tab[1]
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) {
  __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __Pyx_State_RemoveModule(NULL);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_4kivy_8graphics_7texture_Texture);
  Py_CLEAR(clear_module_state->__pyx_ptype_4kivy_8graphics_7texture_TextureRegion);
  Py_CLEAR(clear_module_state->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer);
  Py_CLEAR(clear_module_state->__pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer);
  Py_CLEAR(clear_module_state->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer);
  Py_CLEAR(clear_module_state->__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer);
  Py_CLEAR(clear_module_state->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout);
  Py_CLEAR(clear_module_state->__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout);
  for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); }
  for (int i=0; i<51; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<298; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<2; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_clear_contents ### */
/* CommonTypesMetaclass.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_clear */
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_clear_end ### */
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes);
  __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode);
  Py_VISIT(traverse_module_state->__pyx_ptype_4kivy_8graphics_7texture_Texture);
  Py_VISIT(traverse_module_state->__pyx_ptype_4kivy_8graphics_7texture_TextureRegion);
  Py_VISIT(traverse_module_state->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer);
  Py_VISIT(traverse_module_state->__pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer);
  Py_VISIT(traverse_module_state->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer);
  Py_VISIT(traverse_module_state->__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer);
  Py_VISIT(traverse_module_state->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout);
  Py_VISIT(traverse_module_state->__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout);
  for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); }
  for (int i=0; i<51; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); }
  for (int i=0; i<298; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); }
  for (int i=0; i<2; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); }
/* #### Code section: module_state_traverse_contents ### */
/* CommonTypesMetaclass.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType);

/* CythonFunctionShared.module_state_traverse */
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);

/* #### Code section: module_state_traverse_end ### */
return 0;
}
#endif
/* #### Code section: module_code ### */

/* "kivy/core/text/_text_pango.pyx":37
 * # Purge oldest items from cache dict + order list. This is not ideal,
 * # since the oldest item may still be the most used ...
 * cdef inline void _purge_ordered_cache(dict cache, list order, int limit):             # <<<<<<<<<<<<<<
 *     cdef bytes popid
 *     while len(order) >= limit:
*/

static CYTHON_INLINE void __pyx_f_4kivy_4core_4text_11_text_pango__purge_ordered_cache(PyObject *__pyx_v_cache, PyObject *__pyx_v_order, int __pyx_v_limit) {
  PyObject *__pyx_v_popid = 0;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_purge_ordered_cache", 0);

  /* "kivy/core/text/_text_pango.pyx":39
 * cdef inline void _purge_ordered_cache(dict cache, list order, int limit):
 *     cdef bytes popid
 *     while len(order) >= limit:             # <<<<<<<<<<<<<<
 *         popid = order.pop(0)
 *         del cache[popid]
*/
  while (1) {
    if (unlikely(__pyx_v_order == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(0, 39, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyList_GET_SIZE(__pyx_v_order); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 39, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_1 >= __pyx_v_limit);
    if (!__pyx_t_2) break;

    /* "kivy/core/text/_text_pango.pyx":40
 *     cdef bytes popid
 *     while len(order) >= limit:
 *         popid = order.pop(0)             # <<<<<<<<<<<<<<
 *         del cache[popid]
 * 
*/
    if (unlikely(__pyx_v_order == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
      __PYX_ERR(0, 40, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyList_PopIndex(__pyx_v_order, __pyx_mstate_global->__pyx_int_0, 0, 1, Py_ssize_t, PyLong_FromSsize_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(0, 40, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_popid, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":41
 *     while len(order) >= limit:
 *         popid = order.pop(0)
 *         del cache[popid]             # <<<<<<<<<<<<<<
 * 
 * 
*/
    if (unlikely(__pyx_v_cache == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 41, __pyx_L1_error)
    }
    if (unlikely((PyDict_DelItem(__pyx_v_cache, __pyx_v_popid) < 0))) __PYX_ERR(0, 41, __pyx_L1_error)
  }

  /* "kivy/core/text/_text_pango.pyx":37
 * # Purge oldest items from cache dict + order list. This is not ideal,
 * # since the oldest item may still be the most used ...
 * cdef inline void _purge_ordered_cache(dict cache, list order, int limit):             # <<<<<<<<<<<<<<
 *     cdef bytes popid
 *     while len(order) >= limit:
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.core.text._text_pango._purge_ordered_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_popid);
  __Pyx_RefNannyFinishContext();
}

/* "kivy/core/text/_text_pango.pyx":62
 * # this is the most lightweight way to do it, but...
 * # FIXME: Investigate if we can use FC_FILE instead of this.
 * cdef bint _ft2_scan_fontfile_to_fontfamily_cache(bytes fontfile):             # <<<<<<<<<<<<<<
 *     global kivy_fontfamily_cache
 *     global kivy_ft_library
*/

static int __pyx_f_4kivy_4core_4text_11_text_pango__ft2_scan_fontfile_to_fontfamily_cache(PyObject *__pyx_v_fontfile) {
  PyObject *__pyx_v_filename = 0;
  FT_Face __pyx_v_face;
  FT_Error __pyx_v_error;
  PyObject *__pyx_v_unique = NULL;
  PyObject *__pyx_v_order = 0;
  int __pyx_v_e;
  char *__pyx_v_family;
  FcPattern *__pyx_v_pat;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  char const *__pyx_t_9;
  FcChar8 *__pyx_t_10;
  int __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ft2_scan_fontfile_to_fontfamily_cache", 0);

  /* "kivy/core/text/_text_pango.pyx":66
 *     global kivy_ft_library
 *     global kivy_ft_error
 *     if kivy_ft_error:             # <<<<<<<<<<<<<<
 *         return False
 *     # Return from cache if this file has been loaded before
*/
  __pyx_t_1 = (__pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_error != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":67
 *     global kivy_ft_error
 *     if kivy_ft_error:
 *         return False             # <<<<<<<<<<<<<<
 *     # Return from cache if this file has been loaded before
 *     cdef bytes filename = _byte_option(fontfile)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":66
 *     global kivy_ft_library
 *     global kivy_ft_error
 *     if kivy_ft_error:             # <<<<<<<<<<<<<<
 *         return False
 *     # Return from cache if this file has been loaded before
*/
  }

  /* "kivy/core/text/_text_pango.pyx":69
 *         return False
 *     # Return from cache if this file has been loaded before
 *     cdef bytes filename = _byte_option(fontfile)             # <<<<<<<<<<<<<<
 *     if filename in kivy_fontfamily_cache:
 *         Logger.warn("_text_pango: _ft2_scan: Attempt to re-scan file '{}', "
*/
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_fontfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_filename = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":70
 *     # Return from cache if this file has been loaded before
 *     cdef bytes filename = _byte_option(fontfile)
 *     if filename in kivy_fontfamily_cache:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: _ft2_scan: Attempt to re-scan file '{}', "
 *                     "it is already cached with family name '{}'."
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 70, __pyx_L1_error)
  }
  __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_filename, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 70, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":71
 *     cdef bytes filename = _byte_option(fontfile)
 *     if filename in kivy_fontfamily_cache:
 *         Logger.warn("_text_pango: _ft2_scan: Attempt to re-scan file '{}', "             # <<<<<<<<<<<<<<
 *                     "it is already cached with family name '{}'."
 *                     .format(filename, kivy_fontfamily_cache[filename]))
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 71, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "kivy/core/text/_text_pango.pyx":73
 *         Logger.warn("_text_pango: _ft2_scan: Attempt to re-scan file '{}', "
 *                     "it is already cached with family name '{}'."
 *                     .format(filename, kivy_fontfamily_cache[filename]))             # <<<<<<<<<<<<<<
 *         return True
 * 
*/
    __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_text_pango__ft2_scan_Attempt_to;
    __Pyx_INCREF(__pyx_t_6);
    if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 73, __pyx_L1_error)
    }
    __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, __pyx_v_filename); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 73, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_filename, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":74
 *                     "it is already cached with family name '{}'."
 *                     .format(filename, kivy_fontfamily_cache[filename]))
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     # Load font file and get family name(s) for use in font description.
*/
    __pyx_r = 1;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":70
 *     # Return from cache if this file has been loaded before
 *     cdef bytes filename = _byte_option(fontfile)
 *     if filename in kivy_fontfamily_cache:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: _ft2_scan: Attempt to re-scan file '{}', "
 *                     "it is already cached with family name '{}'."
*/
  }

  /* "kivy/core/text/_text_pango.pyx":79
 *     # (there is no way to resolve conflicts for same family name)
 *     cdef FT_Face face
 *     cdef FT_Error error = FT_New_Face(kivy_ft_library, filename, 0, &face)             # <<<<<<<<<<<<<<
 *     if error:
 *         Logger.warn("_text_pango: Detecting family for '{}' failed: "
*/
  if (unlikely(__pyx_v_filename == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 79, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_AsString(__pyx_v_filename); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 79, __pyx_L1_error)
  __pyx_v_error = FT_New_Face(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_library, __pyx_t_9, 0, (&__pyx_v_face));

  /* "kivy/core/text/_text_pango.pyx":80
 *     cdef FT_Face face
 *     cdef FT_Error error = FT_New_Face(kivy_ft_library, filename, 0, &face)
 *     if error:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Detecting family for '{}' failed: "
 *                     "Could not load/create face 0. Error code: ".format(filename, error))
*/
  __pyx_t_1 = (__pyx_v_error != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":81
 *     cdef FT_Error error = FT_New_Face(kivy_ft_library, filename, 0, &face)
 *     if error:
 *         Logger.warn("_text_pango: Detecting family for '{}' failed: "             # <<<<<<<<<<<<<<
 *                     "Could not load/create face 0. Error code: ".format(filename, error))
 *         return False
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "kivy/core/text/_text_pango.pyx":82
 *     if error:
 *         Logger.warn("_text_pango: Detecting family for '{}' failed: "
 *                     "Could not load/create face 0. Error code: ".format(filename, error))             # <<<<<<<<<<<<<<
 *         return False
 *     unique = set()
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_text_pango_Detecting_family_for;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyLong_From_FT_Error(__pyx_v_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_filename, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":83
 *         Logger.warn("_text_pango: Detecting family for '{}' failed: "
 *                     "Could not load/create face 0. Error code: ".format(filename, error))
 *         return False             # <<<<<<<<<<<<<<
 *     unique = set()
 *     cdef bytes order = b''
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":80
 *     cdef FT_Face face
 *     cdef FT_Error error = FT_New_Face(kivy_ft_library, filename, 0, &face)
 *     if error:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Detecting family for '{}' failed: "
 *                     "Could not load/create face 0. Error code: ".format(filename, error))
*/
  }

  /* "kivy/core/text/_text_pango.pyx":84
 *                     "Could not load/create face 0. Error code: ".format(filename, error))
 *         return False
 *     unique = set()             # <<<<<<<<<<<<<<
 *     cdef bytes order = b''
 *     cdef int e = 0
*/
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_unique = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":85
 *         return False
 *     unique = set()
 *     cdef bytes order = b''             # <<<<<<<<<<<<<<
 *     cdef int e = 0
 *     cdef char *family
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b_);
  __pyx_v_order = __pyx_mstate_global->__pyx_kp_b_;

  /* "kivy/core/text/_text_pango.pyx":86
 *     unique = set()
 *     cdef bytes order = b''
 *     cdef int e = 0             # <<<<<<<<<<<<<<
 *     cdef char *family
 *     cdef FcResult result
*/
  __pyx_v_e = 0;

  /* "kivy/core/text/_text_pango.pyx":89
 *     cdef char *family
 *     cdef FcResult result
 *     cdef FcPattern *pat = FcFreeTypeQueryFace(face, <FcChar8 *>filename, 0, NULL)             # <<<<<<<<<<<<<<
 *     while True:
 *         if FcResultMatch == FcPatternGetString(pat, FC_FAMILY, e, <FcChar8 **>&family):
*/
  if (unlikely(__pyx_v_filename == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 89, __pyx_L1_error)
  }
  __pyx_t_10 = __Pyx_PyBytes_AsWritableUString(__pyx_v_filename); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_v_pat = FcFreeTypeQueryFace(__pyx_v_face, ((FcChar8 *)__pyx_t_10), 0, NULL);

  /* "kivy/core/text/_text_pango.pyx":90
 *     cdef FcResult result
 *     cdef FcPattern *pat = FcFreeTypeQueryFace(face, <FcChar8 *>filename, 0, NULL)
 *     while True:             # <<<<<<<<<<<<<<
 *         if FcResultMatch == FcPatternGetString(pat, FC_FAMILY, e, <FcChar8 **>&family):
 *             if family and family not in unique:
*/
  while (1) {

    /* "kivy/core/text/_text_pango.pyx":91
 *     cdef FcPattern *pat = FcFreeTypeQueryFace(face, <FcChar8 *>filename, 0, NULL)
 *     while True:
 *         if FcResultMatch == FcPatternGetString(pat, FC_FAMILY, e, <FcChar8 **>&family):             # <<<<<<<<<<<<<<
 *             if family and family not in unique:
 *                 order += len(order) and b','+family or family
*/
    __pyx_t_1 = (FcResultMatch == FcPatternGetString(__pyx_v_pat, FC_FAMILY, __pyx_v_e, ((FcChar8 **)(&__pyx_v_family))));
    if (__pyx_t_1) {

      /* "kivy/core/text/_text_pango.pyx":92
 *     while True:
 *         if FcResultMatch == FcPatternGetString(pat, FC_FAMILY, e, <FcChar8 **>&family):
 *             if family and family not in unique:             # <<<<<<<<<<<<<<
 *                 order += len(order) and b','+family or family
 *                 unique.update([family])
*/
      __pyx_t_11 = (__pyx_v_family != 0);
      if (__pyx_t_11) {
      } else {
        __pyx_t_1 = __pyx_t_11;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_family); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = (__Pyx_PySet_ContainsTF(__pyx_t_2, __pyx_v_unique, Py_NE)); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 92, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __pyx_t_11;
      __pyx_L10_bool_binop_done:;
      if (__pyx_t_1) {

        /* "kivy/core/text/_text_pango.pyx":93
 *         if FcResultMatch == FcPatternGetString(pat, FC_FAMILY, e, <FcChar8 **>&family):
 *             if family and family not in unique:
 *                 order += len(order) and b','+family or family             # <<<<<<<<<<<<<<
 *                 unique.update([family])
 *                 # FIXME: Enumerate multiple families, if present. I deactivated
*/
        __pyx_t_12 = __Pyx_PyBytes_GET_SIZE(__pyx_v_order); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 93, __pyx_L1_error)
        if (!__pyx_t_12) {
          goto __pyx_L13_next_or;
        } else {
        }
        __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_family); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_b__2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 93, __pyx_L1_error)
        if (!__pyx_t_1) {
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        } else {
          __Pyx_INCREF(__pyx_t_4);
          __pyx_t_2 = __pyx_t_4;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          goto __pyx_L12_bool_binop_done;
        }
        __pyx_L13_next_or:;
        __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __pyx_t_4;
        __pyx_t_4 = 0;
        __pyx_L12_bool_binop_done:;
        __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_order, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_4))) __PYX_ERR(0, 93, __pyx_L1_error)
        __Pyx_DECREF_SET(__pyx_v_order, ((PyObject*)__pyx_t_4));
        __pyx_t_4 = 0;

        /* "kivy/core/text/_text_pango.pyx":94
 *             if family and family not in unique:
 *                 order += len(order) and b','+family or family
 *                 unique.update([family])             # <<<<<<<<<<<<<<
 *                 # FIXME: Enumerate multiple families, if present. I deactivated
 *                 #        this because support for setting a comma-delimited list in
*/
        __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_family); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 94, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__update, __pyx_v_unique, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "kivy/core/text/_text_pango.pyx":101
 *                 #        clear when exactly a font has multiple families; one case
 *                 #        is horizontal *and* vertical in the same file.
 *                 break  # Remove when clarified             # <<<<<<<<<<<<<<
 *             e += 1
 *         else:
*/
        goto __pyx_L7_break;

        /* "kivy/core/text/_text_pango.pyx":92
 *     while True:
 *         if FcResultMatch == FcPatternGetString(pat, FC_FAMILY, e, <FcChar8 **>&family):
 *             if family and family not in unique:             # <<<<<<<<<<<<<<
 *                 order += len(order) and b','+family or family
 *                 unique.update([family])
*/
      }

      /* "kivy/core/text/_text_pango.pyx":102
 *                 #        is horizontal *and* vertical in the same file.
 *                 break  # Remove when clarified
 *             e += 1             # <<<<<<<<<<<<<<
 *         else:
 *             break
*/
      __pyx_v_e = (__pyx_v_e + 1);

      /* "kivy/core/text/_text_pango.pyx":91
 *     cdef FcPattern *pat = FcFreeTypeQueryFace(face, <FcChar8 *>filename, 0, NULL)
 *     while True:
 *         if FcResultMatch == FcPatternGetString(pat, FC_FAMILY, e, <FcChar8 **>&family):             # <<<<<<<<<<<<<<
 *             if family and family not in unique:
 *                 order += len(order) and b','+family or family
*/
      goto __pyx_L8;
    }

    /* "kivy/core/text/_text_pango.pyx":104
 *             e += 1
 *         else:
 *             break             # <<<<<<<<<<<<<<
 *     if not order:
 *         order = FT_Get_Postscript_Name(face)
*/
    /*else*/ {
      goto __pyx_L7_break;
    }
    __pyx_L8:;
  }
  __pyx_L7_break:;

  /* "kivy/core/text/_text_pango.pyx":105
 *         else:
 *             break
 *     if not order:             # <<<<<<<<<<<<<<
 *         order = FT_Get_Postscript_Name(face)
 *         if order:
*/
  if (__pyx_v_order == Py_None) __pyx_t_1 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_order);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 105, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  __pyx_t_11 = (!__pyx_t_1);
  if (__pyx_t_11) {

    /* "kivy/core/text/_text_pango.pyx":106
 *             break
 *     if not order:
 *         order = FT_Get_Postscript_Name(face)             # <<<<<<<<<<<<<<
 *         if order:
 *             # This is not supposed to happen since query falls back to it
*/
    __pyx_t_4 = __Pyx_PyBytes_FromString(FT_Get_Postscript_Name(__pyx_v_face)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_order, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "kivy/core/text/_text_pango.pyx":107
 *     if not order:
 *         order = FT_Get_Postscript_Name(face)
 *         if order:             # <<<<<<<<<<<<<<
 *             # This is not supposed to happen since query falls back to it
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "
*/
    {
      Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_order);
      if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 107, __pyx_L1_error)
      __pyx_t_11 = (__pyx_temp != 0);
    }

    if (__pyx_t_11) {

      /* "kivy/core/text/_text_pango.pyx":109
 *         if order:
 *             # This is not supposed to happen since query falls back to it
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "             # <<<<<<<<<<<<<<
 *                         "Query failed, but found PostScript name: {}."
 *                         .format(filename, order))
*/
      __pyx_t_2 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 109, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "kivy/core/text/_text_pango.pyx":111
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "
 *                         "Query failed, but found PostScript name: {}."
 *                         .format(filename, order))             # <<<<<<<<<<<<<<
 *         else:
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "
*/
      __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_text_pango_Detecting_family_for_2;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_filename, __pyx_v_order};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_2);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "kivy/core/text/_text_pango.pyx":107
 *     if not order:
 *         order = FT_Get_Postscript_Name(face)
 *         if order:             # <<<<<<<<<<<<<<
 *             # This is not supposed to happen since query falls back to it
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "
*/
      goto __pyx_L16;
    }

    /* "kivy/core/text/_text_pango.pyx":113
 *                         .format(filename, order))
 *         else:
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "             # <<<<<<<<<<<<<<
 *                         "No family name found in font, using Sans.".format(filename))
 *             order = b"Sans"
*/
    /*else*/ {
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "kivy/core/text/_text_pango.pyx":114
 *         else:
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "
 *                         "No family name found in font, using Sans.".format(filename))             # <<<<<<<<<<<<<<
 *             order = b"Sans"
 * 
*/
      __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_text_pango_Detecting_family_for_3;
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_8 = 0;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_filename};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_8 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
        __pyx_t_8 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "kivy/core/text/_text_pango.pyx":115
 *             Logger.warn("_text_pango: Detecting family for '{}' warning: "
 *                         "No family name found in font, using Sans.".format(filename))
 *             order = b"Sans"             # <<<<<<<<<<<<<<
 * 
 *     FcPatternDestroy(pat)
*/
      __Pyx_INCREF(__pyx_mstate_global->__pyx_n_b_Sans);
      __Pyx_DECREF_SET(__pyx_v_order, __pyx_mstate_global->__pyx_n_b_Sans);
    }
    __pyx_L16:;

    /* "kivy/core/text/_text_pango.pyx":105
 *         else:
 *             break
 *     if not order:             # <<<<<<<<<<<<<<
 *         order = FT_Get_Postscript_Name(face)
 *         if order:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":117
 *             order = b"Sans"
 * 
 *     FcPatternDestroy(pat)             # <<<<<<<<<<<<<<
 *     if FT_Done_Face(face) != 0:
 *         Logger.warn("_text_pango: Detecting family for '{}' warning: "
*/
  FcPatternDestroy(__pyx_v_pat);

  /* "kivy/core/text/_text_pango.pyx":118
 * 
 *     FcPatternDestroy(pat)
 *     if FT_Done_Face(face) != 0:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Detecting family for '{}' warning: "
 *                     "Could not clean up ft2 font face.".format(filename))
*/
  __pyx_t_11 = (FT_Done_Face(__pyx_v_face) != 0);
  if (__pyx_t_11) {

    /* "kivy/core/text/_text_pango.pyx":119
 *     FcPatternDestroy(pat)
 *     if FT_Done_Face(face) != 0:
 *         Logger.warn("_text_pango: Detecting family for '{}' warning: "             # <<<<<<<<<<<<<<
 *                     "Could not clean up ft2 font face.".format(filename))
 * 
*/
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":120
 *     if FT_Done_Face(face) != 0:
 *         Logger.warn("_text_pango: Detecting family for '{}' warning: "
 *                     "Could not clean up ft2 font face.".format(filename))             # <<<<<<<<<<<<<<
 * 
 *     kivy_fontfamily_cache[filename] = order
*/
    __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_text_pango_Detecting_family_for_4;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_filename};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "kivy/core/text/_text_pango.pyx":118
 * 
 *     FcPatternDestroy(pat)
 *     if FT_Done_Face(face) != 0:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Detecting family for '{}' warning: "
 *                     "Could not clean up ft2 font face.".format(filename))
*/
  }

  /* "kivy/core/text/_text_pango.pyx":122
 *                     "Could not clean up ft2 font face.".format(filename))
 * 
 *     kivy_fontfamily_cache[filename] = order             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 122, __pyx_L1_error)
  }
  if (unlikely((PyDict_SetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, __pyx_v_filename, __pyx_v_order) < 0))) __PYX_ERR(0, 122, __pyx_L1_error)

  /* "kivy/core/text/_text_pango.pyx":123
 * 
 *     kivy_fontfamily_cache[filename] = order
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":62
 * # this is the most lightweight way to do it, but...
 * # FIXME: Investigate if we can use FC_FILE instead of this.
 * cdef bint _ft2_scan_fontfile_to_fontfamily_cache(bytes fontfile):             # <<<<<<<<<<<<<<
 *     global kivy_fontfamily_cache
 *     global kivy_ft_library
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("kivy.core.text._text_pango._ft2_scan_fontfile_to_fontfamily_cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_XDECREF(__pyx_v_unique);
  __Pyx_XDECREF(__pyx_v_order);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":127
 * 
 * # Helper for label's string options
 * cdef inline bytes _byte_option(opt):             # <<<<<<<<<<<<<<
 *     if opt is None:
 *         return
*/

static CYTHON_INLINE PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__byte_option(PyObject *__pyx_v_opt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_byte_option", 0);

  /* "kivy/core/text/_text_pango.pyx":128
 * # Helper for label's string options
 * cdef inline bytes _byte_option(opt):
 *     if opt is None:             # <<<<<<<<<<<<<<
 *         return
 *     if isinstance(opt, bytes):
*/
  __pyx_t_1 = (__pyx_v_opt == Py_None);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":129
 * cdef inline bytes _byte_option(opt):
 *     if opt is None:
 *         return             # <<<<<<<<<<<<<<
 *     if isinstance(opt, bytes):
 *         return opt
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":128
 * # Helper for label's string options
 * cdef inline bytes _byte_option(opt):
 *     if opt is None:             # <<<<<<<<<<<<<<
 *         return
 *     if isinstance(opt, bytes):
*/
  }

  /* "kivy/core/text/_text_pango.pyx":130
 *     if opt is None:
 *         return
 *     if isinstance(opt, bytes):             # <<<<<<<<<<<<<<
 *         return opt
 *     return opt.encode('UTF-8')
*/
  __pyx_t_1 = PyBytes_Check(__pyx_v_opt); 
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":131
 *         return
 *     if isinstance(opt, bytes):
 *         return opt             # <<<<<<<<<<<<<<
 *     return opt.encode('UTF-8')
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __pyx_v_opt;
    __Pyx_INCREF(__pyx_t_2);
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 131, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":130
 *     if opt is None:
 *         return
 *     if isinstance(opt, bytes):             # <<<<<<<<<<<<<<
 *         return opt
 *     return opt.encode('UTF-8')
*/
  }

  /* "kivy/core/text/_text_pango.pyx":132
 *     if isinstance(opt, bytes):
 *         return opt
 *     return opt.encode('UTF-8')             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_v_opt;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_t_4 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_UTF_8};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 132, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":127
 * 
 * # Helper for label's string options
 * cdef inline bytes _byte_option(opt):             # <<<<<<<<<<<<<<
 *     if opt is None:
 *         return
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.core.text._text_pango._byte_option", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":136
 * 
 * # Get PangoLanguage from options
 * cdef inline PangoLanguage *_get_options_text_language(dict options):             # <<<<<<<<<<<<<<
 *     cdef bytes txtlang = _byte_option(options['text_language'])
 *     if txtlang:
*/

static CYTHON_INLINE PangoLanguage *__pyx_f_4kivy_4core_4text_11_text_pango__get_options_text_language(PyObject *__pyx_v_options) {
  PyObject *__pyx_v_txtlang = 0;
  PangoLanguage *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  char const *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_options_text_language", 0);

  /* "kivy/core/text/_text_pango.pyx":137
 * # Get PangoLanguage from options
 * cdef inline PangoLanguage *_get_options_text_language(dict options):
 *     cdef bytes txtlang = _byte_option(options['text_language'])             # <<<<<<<<<<<<<<
 *     if txtlang:
 *         return pango_language_from_string(txtlang)
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 137, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_text_language); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_txtlang = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":138
 * cdef inline PangoLanguage *_get_options_text_language(dict options):
 *     cdef bytes txtlang = _byte_option(options['text_language'])
 *     if txtlang:             # <<<<<<<<<<<<<<
 *         return pango_language_from_string(txtlang)
 *     return pango_language_get_default()
*/
  if (__pyx_v_txtlang == Py_None) __pyx_t_3 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_txtlang);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 138, __pyx_L1_error)
    __pyx_t_3 = (__pyx_temp != 0);
  }

  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":139
 *     cdef bytes txtlang = _byte_option(options['text_language'])
 *     if txtlang:
 *         return pango_language_from_string(txtlang)             # <<<<<<<<<<<<<<
 *     return pango_language_get_default()
 * 
*/
    if (unlikely(__pyx_v_txtlang == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 139, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_v_txtlang); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L1_error)
    __pyx_r = pango_language_from_string(__pyx_t_4);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":138
 * cdef inline PangoLanguage *_get_options_text_language(dict options):
 *     cdef bytes txtlang = _byte_option(options['text_language'])
 *     if txtlang:             # <<<<<<<<<<<<<<
 *         return pango_language_from_string(txtlang)
 *     return pango_language_get_default()
*/
  }

  /* "kivy/core/text/_text_pango.pyx":140
 *     if txtlang:
 *         return pango_language_from_string(txtlang)
 *     return pango_language_get_default()             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = pango_language_get_default();
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":136
 * 
 * # Get PangoLanguage from options
 * cdef inline PangoLanguage *_get_options_text_language(dict options):             # <<<<<<<<<<<<<<
 *     cdef bytes txtlang = _byte_option(options['text_language'])
 *     if txtlang:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango._get_options_text_language", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_txtlang);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":157
 * # https://github.com/SDL-mirror/SDL_ttf/blob/release-2.0.14/SDL_ttf.c#L2160-L2172
 * # https://github.com/GNOME/pango/blob/1.28/pango/pangoft2.c#L186-L222
 * cdef void _ft2subst_callback(FcPattern *pattern, gpointer data):             # <<<<<<<<<<<<<<
 *     cdef ft2subst_callback_data_t *cbdata = <ft2subst_callback_data_t *>data
 *     FcPatternDel(pattern, FC_ANTIALIAS)
*/

static void __pyx_f_4kivy_4core_4text_11_text_pango__ft2subst_callback(FcPattern *__pyx_v_pattern, gpointer __pyx_v_data) {
  __pyx_t_4kivy_4core_4text_11_text_pango_ft2subst_callback_data_t *__pyx_v_cbdata;
  int __pyx_t_1;

  /* "kivy/core/text/_text_pango.pyx":158
 * # https://github.com/GNOME/pango/blob/1.28/pango/pangoft2.c#L186-L222
 * cdef void _ft2subst_callback(FcPattern *pattern, gpointer data):
 *     cdef ft2subst_callback_data_t *cbdata = <ft2subst_callback_data_t *>data             # <<<<<<<<<<<<<<
 *     FcPatternDel(pattern, FC_ANTIALIAS)
 *     FcPatternAddBool(pattern, FC_ANTIALIAS, <FcBool>cbdata.antialias)
*/
  __pyx_v_cbdata = ((__pyx_t_4kivy_4core_4text_11_text_pango_ft2subst_callback_data_t *)__pyx_v_data);

  /* "kivy/core/text/_text_pango.pyx":159
 * cdef void _ft2subst_callback(FcPattern *pattern, gpointer data):
 *     cdef ft2subst_callback_data_t *cbdata = <ft2subst_callback_data_t *>data
 *     FcPatternDel(pattern, FC_ANTIALIAS)             # <<<<<<<<<<<<<<
 *     FcPatternAddBool(pattern, FC_ANTIALIAS, <FcBool>cbdata.antialias)
 *     FcPatternDel(pattern, FC_HINTING)
*/
  (void)(FcPatternDel(__pyx_v_pattern, FC_ANTIALIAS));

  /* "kivy/core/text/_text_pango.pyx":160
 *     cdef ft2subst_callback_data_t *cbdata = <ft2subst_callback_data_t *>data
 *     FcPatternDel(pattern, FC_ANTIALIAS)
 *     FcPatternAddBool(pattern, FC_ANTIALIAS, <FcBool>cbdata.antialias)             # <<<<<<<<<<<<<<
 *     FcPatternDel(pattern, FC_HINTING)
 *     FcPatternAddBool(pattern, FC_HINTING, <FcBool>(cbdata.hintstyle != 0))
*/
  (void)(FcPatternAddBool(__pyx_v_pattern, FC_ANTIALIAS, ((FcBool)__pyx_v_cbdata->antialias)));

  /* "kivy/core/text/_text_pango.pyx":161
 *     FcPatternDel(pattern, FC_ANTIALIAS)
 *     FcPatternAddBool(pattern, FC_ANTIALIAS, <FcBool>cbdata.antialias)
 *     FcPatternDel(pattern, FC_HINTING)             # <<<<<<<<<<<<<<
 *     FcPatternAddBool(pattern, FC_HINTING, <FcBool>(cbdata.hintstyle != 0))
 *     if cbdata.hintstyle != 0:
*/
  (void)(FcPatternDel(__pyx_v_pattern, FC_HINTING));

  /* "kivy/core/text/_text_pango.pyx":162
 *     FcPatternAddBool(pattern, FC_ANTIALIAS, <FcBool>cbdata.antialias)
 *     FcPatternDel(pattern, FC_HINTING)
 *     FcPatternAddBool(pattern, FC_HINTING, <FcBool>(cbdata.hintstyle != 0))             # <<<<<<<<<<<<<<
 *     if cbdata.hintstyle != 0:
 *         FcPatternDel(pattern, FC_HINT_STYLE)
*/
  (void)(FcPatternAddBool(__pyx_v_pattern, FC_HINTING, ((FcBool)(__pyx_v_cbdata->hintstyle != 0))));

  /* "kivy/core/text/_text_pango.pyx":163
 *     FcPatternDel(pattern, FC_HINTING)
 *     FcPatternAddBool(pattern, FC_HINTING, <FcBool>(cbdata.hintstyle != 0))
 *     if cbdata.hintstyle != 0:             # <<<<<<<<<<<<<<
 *         FcPatternDel(pattern, FC_HINT_STYLE)
 *         FcPatternAddInteger(pattern, FC_HINT_STYLE, cbdata.hintstyle)
*/
  __pyx_t_1 = (__pyx_v_cbdata->hintstyle != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":164
 *     FcPatternAddBool(pattern, FC_HINTING, <FcBool>(cbdata.hintstyle != 0))
 *     if cbdata.hintstyle != 0:
 *         FcPatternDel(pattern, FC_HINT_STYLE)             # <<<<<<<<<<<<<<
 *         FcPatternAddInteger(pattern, FC_HINT_STYLE, cbdata.hintstyle)
 * #    FcPatternDel(pattern, FC_AUTOHINT)
*/
    (void)(FcPatternDel(__pyx_v_pattern, FC_HINT_STYLE));

    /* "kivy/core/text/_text_pango.pyx":165
 *     if cbdata.hintstyle != 0:
 *         FcPatternDel(pattern, FC_HINT_STYLE)
 *         FcPatternAddInteger(pattern, FC_HINT_STYLE, cbdata.hintstyle)             # <<<<<<<<<<<<<<
 * #    FcPatternDel(pattern, FC_AUTOHINT)
 * #    FcPatternAddBool(pattern, FC_AUTOHINT, ...)
*/
    (void)(FcPatternAddInteger(__pyx_v_pattern, FC_HINT_STYLE, __pyx_v_cbdata->hintstyle));

    /* "kivy/core/text/_text_pango.pyx":163
 *     FcPatternDel(pattern, FC_HINTING)
 *     FcPatternAddBool(pattern, FC_HINTING, <FcBool>(cbdata.hintstyle != 0))
 *     if cbdata.hintstyle != 0:             # <<<<<<<<<<<<<<
 *         FcPatternDel(pattern, FC_HINT_STYLE)
 *         FcPatternAddInteger(pattern, FC_HINT_STYLE, cbdata.hintstyle)
*/
  }

  /* "kivy/core/text/_text_pango.pyx":157
 * # https://github.com/SDL-mirror/SDL_ttf/blob/release-2.0.14/SDL_ttf.c#L2160-L2172
 * # https://github.com/GNOME/pango/blob/1.28/pango/pangoft2.c#L186-L222
 * cdef void _ft2subst_callback(FcPattern *pattern, gpointer data):             # <<<<<<<<<<<<<<
 *     cdef ft2subst_callback_data_t *cbdata = <ft2subst_callback_data_t *>data
 *     FcPatternDel(pattern, FC_ANTIALIAS)
*/

  /* function exit code */
}

/* "kivy/core/text/_text_pango.pyx":191
 *     # Set of options['font_name_r'] filename strings loaded to fc_config
 *     cdef set loaded_fonts
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.loaded_fonts = set()
 * 
*/

/* Python wrapper */
static int __pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return -1;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer___cinit__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer___cinit__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "kivy/core/text/_text_pango.pyx":192
 *     cdef set loaded_fonts
 *     def __cinit__(self):
 *         self.loaded_fonts = set()             # <<<<<<<<<<<<<<
 * 
 *     # Note: calling a method from __dealloc__ can lead to revived object
*/
  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->loaded_fonts);
  __Pyx_DECREF(__pyx_v_self->loaded_fonts);
  __pyx_v_self->loaded_fonts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":191
 *     # Set of options['font_name_r'] filename strings loaded to fc_config
 *     cdef set loaded_fonts
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.loaded_fonts = set()
 * 
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.ContextContainer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":195
 * 
 *     # Note: calling a method from __dealloc__ can lead to revived object
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.fontdesc:
 *             pango_font_description_free(self.fontdesc)
*/

/* Python wrapper */
static void __pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_2__dealloc__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_2__dealloc__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self) {
  int __pyx_t_1;

  /* "kivy/core/text/_text_pango.pyx":196
 *     # Note: calling a method from __dealloc__ can lead to revived object
 *     def __dealloc__(self):
 *         if self.fontdesc:             # <<<<<<<<<<<<<<
 *             pango_font_description_free(self.fontdesc)
 *         if self.layout:
*/
  __pyx_t_1 = (__pyx_v_self->fontdesc != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":197
 *     def __dealloc__(self):
 *         if self.fontdesc:
 *             pango_font_description_free(self.fontdesc)             # <<<<<<<<<<<<<<
 *         if self.layout:
 *             g_object_unref(self.layout)
*/
    pango_font_description_free(__pyx_v_self->fontdesc);

    /* "kivy/core/text/_text_pango.pyx":196
 *     # Note: calling a method from __dealloc__ can lead to revived object
 *     def __dealloc__(self):
 *         if self.fontdesc:             # <<<<<<<<<<<<<<
 *             pango_font_description_free(self.fontdesc)
 *         if self.layout:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":198
 *         if self.fontdesc:
 *             pango_font_description_free(self.fontdesc)
 *         if self.layout:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.layout)
 *         if self.context:
*/
  __pyx_t_1 = (__pyx_v_self->layout != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":199
 *             pango_font_description_free(self.fontdesc)
 *         if self.layout:
 *             g_object_unref(self.layout)             # <<<<<<<<<<<<<<
 *         if self.context:
 *             g_object_unref(self.context)
*/
    g_object_unref(__pyx_v_self->layout);

    /* "kivy/core/text/_text_pango.pyx":198
 *         if self.fontdesc:
 *             pango_font_description_free(self.fontdesc)
 *         if self.layout:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.layout)
 *         if self.context:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":200
 *         if self.layout:
 *             g_object_unref(self.layout)
 *         if self.context:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.context)
 *         if self.fontmap:
*/
  __pyx_t_1 = (__pyx_v_self->context != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":201
 *             g_object_unref(self.layout)
 *         if self.context:
 *             g_object_unref(self.context)             # <<<<<<<<<<<<<<
 *         if self.fontmap:
 *             g_object_unref(self.fontmap)
*/
    g_object_unref(__pyx_v_self->context);

    /* "kivy/core/text/_text_pango.pyx":200
 *         if self.layout:
 *             g_object_unref(self.layout)
 *         if self.context:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.context)
 *         if self.fontmap:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":202
 *         if self.context:
 *             g_object_unref(self.context)
 *         if self.fontmap:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.fontmap)
 *         if self.fc_config:
*/
  __pyx_t_1 = (__pyx_v_self->fontmap != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":203
 *             g_object_unref(self.context)
 *         if self.fontmap:
 *             g_object_unref(self.fontmap)             # <<<<<<<<<<<<<<
 *         if self.fc_config:
 *             FcConfigAppFontClear(self.fc_config)
*/
    g_object_unref(__pyx_v_self->fontmap);

    /* "kivy/core/text/_text_pango.pyx":202
 *         if self.context:
 *             g_object_unref(self.context)
 *         if self.fontmap:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.fontmap)
 *         if self.fc_config:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":204
 *         if self.fontmap:
 *             g_object_unref(self.fontmap)
 *         if self.fc_config:             # <<<<<<<<<<<<<<
 *             FcConfigAppFontClear(self.fc_config)
 *             FcConfigDestroy(self.fc_config)
*/
  __pyx_t_1 = (__pyx_v_self->fc_config != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":205
 *             g_object_unref(self.fontmap)
 *         if self.fc_config:
 *             FcConfigAppFontClear(self.fc_config)             # <<<<<<<<<<<<<<
 *             FcConfigDestroy(self.fc_config)
 * 
*/
    FcConfigAppFontClear(__pyx_v_self->fc_config);

    /* "kivy/core/text/_text_pango.pyx":206
 *         if self.fc_config:
 *             FcConfigAppFontClear(self.fc_config)
 *             FcConfigDestroy(self.fc_config)             # <<<<<<<<<<<<<<
 * 
 * 
*/
    FcConfigDestroy(__pyx_v_self->fc_config);

    /* "kivy/core/text/_text_pango.pyx":204
 *         if self.fontmap:
 *             g_object_unref(self.fontmap)
 *         if self.fc_config:             # <<<<<<<<<<<<<<
 *             FcConfigAppFontClear(self.fc_config)
 *             FcConfigDestroy(self.fc_config)
*/
  }

  /* "kivy/core/text/_text_pango.pyx":195
 * 
 *     # Note: calling a method from __dealloc__ can lead to revived object
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.fontdesc:
 *             pango_font_description_free(self.fontdesc)
*/

  /* function exit code */
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_16ContextContainer_4__reduce_cython__, "ContextContainer.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_16ContextContainer_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_16ContextContainer_4__reduce_cython__};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_5__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_4__reduce_cython__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.ContextContainer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_16ContextContainer_6__setstate_cython__, "ContextContainer.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_16ContextContainer_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_16ContextContainer_6__setstate_cython__};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_7__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.ContextContainer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_6__setstate_cython__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_16ContextContainer_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.ContextContainer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":210
 * 
 * # Create FcConfig object for initial cc setup
 * cdef inline bint _cc_fc_config_create(ContextContainer cc, bytes font_context):             # <<<<<<<<<<<<<<
 *     if cc.fc_config:
 *         Logger.warn("_text_pango: _cc_create_fcconfig(): cc.fc_config is not NULL")
*/

static CYTHON_INLINE int __pyx_f_4kivy_4core_4text_11_text_pango__cc_fc_config_create(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc, PyObject *__pyx_v_font_context) {
  PyObject *__pyx_v_context_source = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  FcChar8 *__pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cc_fc_config_create", 0);

  /* "kivy/core/text/_text_pango.pyx":211
 * # Create FcConfig object for initial cc setup
 * cdef inline bint _cc_fc_config_create(ContextContainer cc, bytes font_context):
 *     if cc.fc_config:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: _cc_create_fcconfig(): cc.fc_config is not NULL")
 *         return False  # arguably True .. but should not happen
*/
  __pyx_t_1 = (__pyx_v_cc->fc_config != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":212
 * cdef inline bint _cc_fc_config_create(ContextContainer cc, bytes font_context):
 *     if cc.fc_config:
 *         Logger.warn("_text_pango: _cc_create_fcconfig(): cc.fc_config is not NULL")             # <<<<<<<<<<<<<<
 *         return False  # arguably True .. but should not happen
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_text_pango__cc_create_fcconfig};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":213
 *     if cc.fc_config:
 *         Logger.warn("_text_pango: _cc_create_fcconfig(): cc.fc_config is not NULL")
 *         return False  # arguably True .. but should not happen             # <<<<<<<<<<<<<<
 * 
 *     cdef bytes context_source
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":211
 * # Create FcConfig object for initial cc setup
 * cdef inline bint _cc_fc_config_create(ContextContainer cc, bytes font_context):
 *     if cc.fc_config:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: _cc_create_fcconfig(): cc.fc_config is not NULL")
 *         return False  # arguably True .. but should not happen
*/
  }

  /* "kivy/core/text/_text_pango.pyx":216
 * 
 *     cdef bytes context_source
 *     if font_context.startswith(b'systemconfig://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcInitLoadConfig()
 *     elif font_context.startswith(b'system://'):
*/
  if (unlikely(__pyx_v_font_context == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith");
    __PYX_ERR(0, 216, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_Tailmatch(__pyx_v_font_context, __pyx_mstate_global->__pyx_kp_b_systemconfig, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 216, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":217
 *     cdef bytes context_source
 *     if font_context.startswith(b'systemconfig://'):
 *         cc.fc_config = FcInitLoadConfig()             # <<<<<<<<<<<<<<
 *     elif font_context.startswith(b'system://'):
 *         cc.fc_config = FcInitLoadConfigAndFonts()
*/
    __pyx_v_cc->fc_config = FcInitLoadConfig();

    /* "kivy/core/text/_text_pango.pyx":216
 * 
 *     cdef bytes context_source
 *     if font_context.startswith(b'systemconfig://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcInitLoadConfig()
 *     elif font_context.startswith(b'system://'):
*/
    goto __pyx_L4;
  }

  /* "kivy/core/text/_text_pango.pyx":218
 *     if font_context.startswith(b'systemconfig://'):
 *         cc.fc_config = FcInitLoadConfig()
 *     elif font_context.startswith(b'system://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcInitLoadConfigAndFonts()
 *     elif font_context.startswith(b'directory://'):
*/
  if (unlikely(__pyx_v_font_context == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith");
    __PYX_ERR(0, 218, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_Tailmatch(__pyx_v_font_context, __pyx_mstate_global->__pyx_kp_b_system, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 218, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":219
 *         cc.fc_config = FcInitLoadConfig()
 *     elif font_context.startswith(b'system://'):
 *         cc.fc_config = FcInitLoadConfigAndFonts()             # <<<<<<<<<<<<<<
 *     elif font_context.startswith(b'directory://'):
 *         cc.fc_config = FcInitLoadConfig()
*/
    __pyx_v_cc->fc_config = FcInitLoadConfigAndFonts();

    /* "kivy/core/text/_text_pango.pyx":218
 *     if font_context.startswith(b'systemconfig://'):
 *         cc.fc_config = FcInitLoadConfig()
 *     elif font_context.startswith(b'system://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcInitLoadConfigAndFonts()
 *     elif font_context.startswith(b'directory://'):
*/
    goto __pyx_L4;
  }

  /* "kivy/core/text/_text_pango.pyx":220
 *     elif font_context.startswith(b'system://'):
 *         cc.fc_config = FcInitLoadConfigAndFonts()
 *     elif font_context.startswith(b'directory://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcInitLoadConfig()
 *         context_source = font_context[12:]
*/
  if (unlikely(__pyx_v_font_context == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith");
    __PYX_ERR(0, 220, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_Tailmatch(__pyx_v_font_context, __pyx_mstate_global->__pyx_kp_b_directory, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 220, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":221
 *         cc.fc_config = FcInitLoadConfigAndFonts()
 *     elif font_context.startswith(b'directory://'):
 *         cc.fc_config = FcInitLoadConfig()             # <<<<<<<<<<<<<<
 *         context_source = font_context[12:]
 *         if FcConfigAppFontAddDir(cc.fc_config, <FcChar8 *>context_source) == FcFalse:
*/
    __pyx_v_cc->fc_config = FcInitLoadConfig();

    /* "kivy/core/text/_text_pango.pyx":222
 *     elif font_context.startswith(b'directory://'):
 *         cc.fc_config = FcInitLoadConfig()
 *         context_source = font_context[12:]             # <<<<<<<<<<<<<<
 *         if FcConfigAppFontAddDir(cc.fc_config, <FcChar8 *>context_source) == FcFalse:
 *             Logger.warn("_text_pango: Error loading font directory for font_context {}: {}"
*/
    if (unlikely(__pyx_v_font_context == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 222, __pyx_L1_error)
    }
    __pyx_t_2 = PySequence_GetSlice(__pyx_v_font_context, 12, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_context_source = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":223
 *         cc.fc_config = FcInitLoadConfig()
 *         context_source = font_context[12:]
 *         if FcConfigAppFontAddDir(cc.fc_config, <FcChar8 *>context_source) == FcFalse:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Error loading font directory for font_context {}: {}"
 *                         .format(font_context, context_source))
*/
    __pyx_t_7 = __Pyx_PyBytes_AsWritableUString(__pyx_v_context_source); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 223, __pyx_L1_error)
    __pyx_t_1 = (FcConfigAppFontAddDir(__pyx_v_cc->fc_config, ((FcChar8 *)__pyx_t_7)) == FcFalse);
    if (__pyx_t_1) {

      /* "kivy/core/text/_text_pango.pyx":224
 *         context_source = font_context[12:]
 *         if FcConfigAppFontAddDir(cc.fc_config, <FcChar8 *>context_source) == FcFalse:
 *             Logger.warn("_text_pango: Error loading font directory for font_context {}: {}"             # <<<<<<<<<<<<<<
 *                         .format(font_context, context_source))
 *     elif font_context.startswith(b'fontconfig://'):
*/
      __pyx_t_5 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "kivy/core/text/_text_pango.pyx":225
 *         if FcConfigAppFontAddDir(cc.fc_config, <FcChar8 *>context_source) == FcFalse:
 *             Logger.warn("_text_pango: Error loading font directory for font_context {}: {}"
 *                         .format(font_context, context_source))             # <<<<<<<<<<<<<<
 *     elif font_context.startswith(b'fontconfig://'):
 *         cc.fc_config = FcConfigCreate()
*/
      __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_text_pango_Error_loading_font_d;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_font_context, __pyx_v_context_source};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        assert(__pyx_t_5);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "kivy/core/text/_text_pango.pyx":223
 *         cc.fc_config = FcInitLoadConfig()
 *         context_source = font_context[12:]
 *         if FcConfigAppFontAddDir(cc.fc_config, <FcChar8 *>context_source) == FcFalse:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Error loading font directory for font_context {}: {}"
 *                         .format(font_context, context_source))
*/
    }

    /* "kivy/core/text/_text_pango.pyx":220
 *     elif font_context.startswith(b'system://'):
 *         cc.fc_config = FcInitLoadConfigAndFonts()
 *     elif font_context.startswith(b'directory://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcInitLoadConfig()
 *         context_source = font_context[12:]
*/
    goto __pyx_L4;
  }

  /* "kivy/core/text/_text_pango.pyx":226
 *             Logger.warn("_text_pango: Error loading font directory for font_context {}: {}"
 *                         .format(font_context, context_source))
 *     elif font_context.startswith(b'fontconfig://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcConfigCreate()
 *         context_source = font_context[13:]
*/
  if (unlikely(__pyx_v_font_context == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "startswith");
    __PYX_ERR(0, 226, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_Tailmatch(__pyx_v_font_context, __pyx_mstate_global->__pyx_kp_b_fontconfig, 0, PY_SSIZE_T_MAX, -1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":227
 *                         .format(font_context, context_source))
 *     elif font_context.startswith(b'fontconfig://'):
 *         cc.fc_config = FcConfigCreate()             # <<<<<<<<<<<<<<
 *         context_source = font_context[13:]
 *         if FcTrue != FcConfigParseAndLoad(cc.fc_config, <FcChar8 *>context_source, FcTrue):
*/
    __pyx_v_cc->fc_config = FcConfigCreate();

    /* "kivy/core/text/_text_pango.pyx":228
 *     elif font_context.startswith(b'fontconfig://'):
 *         cc.fc_config = FcConfigCreate()
 *         context_source = font_context[13:]             # <<<<<<<<<<<<<<
 *         if FcTrue != FcConfigParseAndLoad(cc.fc_config, <FcChar8 *>context_source, FcTrue):
 *             Logger.warn("_text_pango: Error loading FontConfig configuration "
*/
    if (unlikely(__pyx_v_font_context == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 228, __pyx_L1_error)
    }
    __pyx_t_2 = PySequence_GetSlice(__pyx_v_font_context, 13, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_context_source = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":229
 *         cc.fc_config = FcConfigCreate()
 *         context_source = font_context[13:]
 *         if FcTrue != FcConfigParseAndLoad(cc.fc_config, <FcChar8 *>context_source, FcTrue):             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Error loading FontConfig configuration "
 *                         "for font_context {}: {}".format(font_context, context_source))
*/
    __pyx_t_7 = __Pyx_PyBytes_AsWritableUString(__pyx_v_context_source); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 229, __pyx_L1_error)
    __pyx_t_1 = (FcTrue != FcConfigParseAndLoad(__pyx_v_cc->fc_config, ((FcChar8 *)__pyx_t_7), FcTrue));
    if (__pyx_t_1) {

      /* "kivy/core/text/_text_pango.pyx":230
 *         context_source = font_context[13:]
 *         if FcTrue != FcConfigParseAndLoad(cc.fc_config, <FcChar8 *>context_source, FcTrue):
 *             Logger.warn("_text_pango: Error loading FontConfig configuration "             # <<<<<<<<<<<<<<
 *                         "for font_context {}: {}".format(font_context, context_source))
 *     else:  # isolated context
*/
      __pyx_t_4 = NULL;
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "kivy/core/text/_text_pango.pyx":231
 *         if FcTrue != FcConfigParseAndLoad(cc.fc_config, <FcChar8 *>context_source, FcTrue):
 *             Logger.warn("_text_pango: Error loading FontConfig configuration "
 *                         "for font_context {}: {}".format(font_context, context_source))             # <<<<<<<<<<<<<<
 *     else:  # isolated context
 *         cc.fc_config = FcConfigCreate()
*/
      __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_text_pango_Error_loading_FontCo;
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_6 = 0;
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_font_context, __pyx_v_context_source};
        __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __pyx_t_6 = 1;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        assert(__pyx_t_4);
        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx__function);
        __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
        __pyx_t_6 = 0;
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
        __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "kivy/core/text/_text_pango.pyx":229
 *         cc.fc_config = FcConfigCreate()
 *         context_source = font_context[13:]
 *         if FcTrue != FcConfigParseAndLoad(cc.fc_config, <FcChar8 *>context_source, FcTrue):             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Error loading FontConfig configuration "
 *                         "for font_context {}: {}".format(font_context, context_source))
*/
    }

    /* "kivy/core/text/_text_pango.pyx":226
 *             Logger.warn("_text_pango: Error loading font directory for font_context {}: {}"
 *                         .format(font_context, context_source))
 *     elif font_context.startswith(b'fontconfig://'):             # <<<<<<<<<<<<<<
 *         cc.fc_config = FcConfigCreate()
 *         context_source = font_context[13:]
*/
    goto __pyx_L4;
  }

  /* "kivy/core/text/_text_pango.pyx":233
 *                         "for font_context {}: {}".format(font_context, context_source))
 *     else:  # isolated context
 *         cc.fc_config = FcConfigCreate()             # <<<<<<<<<<<<<<
 * 
 *     if not cc.fc_config:
*/
  /*else*/ {
    __pyx_v_cc->fc_config = FcConfigCreate();
  }
  __pyx_L4:;

  /* "kivy/core/text/_text_pango.pyx":235
 *         cc.fc_config = FcConfigCreate()
 * 
 *     if not cc.fc_config:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create new FcConfig object, out of memory?")
 *         return False
*/
  __pyx_t_1 = (!(__pyx_v_cc->fc_config != 0));
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":236
 * 
 *     if not cc.fc_config:
 *         Logger.warn("_text_pango: Could not create new FcConfig object, out of memory?")             # <<<<<<<<<<<<<<
 *         return False
 *     # Disable rescan interval, maybe we shouldn't do this for system://?
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_create_new};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":237
 *     if not cc.fc_config:
 *         Logger.warn("_text_pango: Could not create new FcConfig object, out of memory?")
 *         return False             # <<<<<<<<<<<<<<
 *     # Disable rescan interval, maybe we shouldn't do this for system://?
 *     FcConfigSetRescanInterval(cc.fc_config, 0)
*/
    __pyx_r = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":235
 *         cc.fc_config = FcConfigCreate()
 * 
 *     if not cc.fc_config:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create new FcConfig object, out of memory?")
 *         return False
*/
  }

  /* "kivy/core/text/_text_pango.pyx":239
 *         return False
 *     # Disable rescan interval, maybe we shouldn't do this for system://?
 *     FcConfigSetRescanInterval(cc.fc_config, 0)             # <<<<<<<<<<<<<<
 *     return True
 * 
*/
  (void)(FcConfigSetRescanInterval(__pyx_v_cc->fc_config, 0));

  /* "kivy/core/text/_text_pango.pyx":240
 *     # Disable rescan interval, maybe we shouldn't do this for system://?
 *     FcConfigSetRescanInterval(cc.fc_config, 0)
 *     return True             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __pyx_r = 1;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":210
 * 
 * # Create FcConfig object for initial cc setup
 * cdef inline bint _cc_fc_config_create(ContextContainer cc, bytes font_context):             # <<<<<<<<<<<<<<
 *     if cc.fc_config:
 *         Logger.warn("_text_pango: _cc_create_fcconfig(): cc.fc_config is not NULL")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("kivy.core.text._text_pango._cc_fc_config_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_context_source);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":244
 * 
 * # Add a font to cc and return its family name for later use
 * cdef inline bytes _cc_add_font_file(ContextContainer cc, bytes font_name_r):             # <<<<<<<<<<<<<<
 *     global kivy_fontfamily_cache
 *     if font_name_r in cc.loaded_fonts:
*/

static CYTHON_INLINE PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__cc_add_font_file(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc, PyObject *__pyx_v_font_name_r) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  FcChar8 *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cc_add_font_file", 0);

  /* "kivy/core/text/_text_pango.pyx":246
 * cdef inline bytes _cc_add_font_file(ContextContainer cc, bytes font_name_r):
 *     global kivy_fontfamily_cache
 *     if font_name_r in cc.loaded_fonts:             # <<<<<<<<<<<<<<
 *         return kivy_fontfamily_cache[font_name_r]
 *     if FcConfigAppFontAddFile(cc.fc_config, <FcChar8 *>font_name_r) == FcFalse:
*/
  if (unlikely(__pyx_v_cc->loaded_fonts == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 246, __pyx_L1_error)
  }
  __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_font_name_r, __pyx_v_cc->loaded_fonts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 246, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":247
 *     global kivy_fontfamily_cache
 *     if font_name_r in cc.loaded_fonts:
 *         return kivy_fontfamily_cache[font_name_r]             # <<<<<<<<<<<<<<
 *     if FcConfigAppFontAddFile(cc.fc_config, <FcChar8 *>font_name_r) == FcFalse:
 *         Logger.warn("_text_pango: Error loading font '{}'".format(font_name_r))
*/
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 247, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, __pyx_v_font_name_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 247, __pyx_L1_error)
    __pyx_r = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":246
 * cdef inline bytes _cc_add_font_file(ContextContainer cc, bytes font_name_r):
 *     global kivy_fontfamily_cache
 *     if font_name_r in cc.loaded_fonts:             # <<<<<<<<<<<<<<
 *         return kivy_fontfamily_cache[font_name_r]
 *     if FcConfigAppFontAddFile(cc.fc_config, <FcChar8 *>font_name_r) == FcFalse:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":248
 *     if font_name_r in cc.loaded_fonts:
 *         return kivy_fontfamily_cache[font_name_r]
 *     if FcConfigAppFontAddFile(cc.fc_config, <FcChar8 *>font_name_r) == FcFalse:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Error loading font '{}'".format(font_name_r))
 *         return
*/
  if (unlikely(__pyx_v_font_name_r == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 248, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyBytes_AsWritableUString(__pyx_v_font_name_r); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L1_error)
  __pyx_t_1 = (FcConfigAppFontAddFile(__pyx_v_cc->fc_config, ((FcChar8 *)__pyx_t_3)) == FcFalse);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":249
 *         return kivy_fontfamily_cache[font_name_r]
 *     if FcConfigAppFontAddFile(cc.fc_config, <FcChar8 *>font_name_r) == FcFalse:
 *         Logger.warn("_text_pango: Error loading font '{}'".format(font_name_r))             # <<<<<<<<<<<<<<
 *         return
 *     cc.loaded_fonts.update([font_name_r])
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_text_pango_Error_loading_font;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_font_name_r};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_8 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_8 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":250
 *     if FcConfigAppFontAddFile(cc.fc_config, <FcChar8 *>font_name_r) == FcFalse:
 *         Logger.warn("_text_pango: Error loading font '{}'".format(font_name_r))
 *         return             # <<<<<<<<<<<<<<
 *     cc.loaded_fonts.update([font_name_r])
 *     if font_name_r not in kivy_fontfamily_cache:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":248
 *     if font_name_r in cc.loaded_fonts:
 *         return kivy_fontfamily_cache[font_name_r]
 *     if FcConfigAppFontAddFile(cc.fc_config, <FcChar8 *>font_name_r) == FcFalse:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Error loading font '{}'".format(font_name_r))
 *         return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":251
 *         Logger.warn("_text_pango: Error loading font '{}'".format(font_name_r))
 *         return
 *     cc.loaded_fonts.update([font_name_r])             # <<<<<<<<<<<<<<
 *     if font_name_r not in kivy_fontfamily_cache:
 *         if not _ft2_scan_fontfile_to_fontfamily_cache(font_name_r):
*/
  __pyx_t_6 = __pyx_v_cc->loaded_fonts;
  __Pyx_INCREF(__pyx_t_6);
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_font_name_r);
  __Pyx_GIVEREF(__pyx_v_font_name_r);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_font_name_r) != (0)) __PYX_ERR(0, 251, __pyx_L1_error);
  __pyx_t_8 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":252
 *         return
 *     cc.loaded_fonts.update([font_name_r])
 *     if font_name_r not in kivy_fontfamily_cache:             # <<<<<<<<<<<<<<
 *         if not _ft2_scan_fontfile_to_fontfamily_cache(font_name_r):
 *             return  # warnings issued in function call
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 252, __pyx_L1_error)
  }
  __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_font_name_r, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 252, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":253
 *     cc.loaded_fonts.update([font_name_r])
 *     if font_name_r not in kivy_fontfamily_cache:
 *         if not _ft2_scan_fontfile_to_fontfamily_cache(font_name_r):             # <<<<<<<<<<<<<<
 *             return  # warnings issued in function call
 *     return kivy_fontfamily_cache[font_name_r]
*/
    __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__ft2_scan_fontfile_to_fontfamily_cache(__pyx_v_font_name_r); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 253, __pyx_L1_error)
    __pyx_t_9 = (!__pyx_t_1);
    if (__pyx_t_9) {

      /* "kivy/core/text/_text_pango.pyx":254
 *     if font_name_r not in kivy_fontfamily_cache:
 *         if not _ft2_scan_fontfile_to_fontfamily_cache(font_name_r):
 *             return  # warnings issued in function call             # <<<<<<<<<<<<<<
 *     return kivy_fontfamily_cache[font_name_r]
 * 
*/
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "kivy/core/text/_text_pango.pyx":253
 *     cc.loaded_fonts.update([font_name_r])
 *     if font_name_r not in kivy_fontfamily_cache:
 *         if not _ft2_scan_fontfile_to_fontfamily_cache(font_name_r):             # <<<<<<<<<<<<<<
 *             return  # warnings issued in function call
 *     return kivy_fontfamily_cache[font_name_r]
*/
    }

    /* "kivy/core/text/_text_pango.pyx":252
 *         return
 *     cc.loaded_fonts.update([font_name_r])
 *     if font_name_r not in kivy_fontfamily_cache:             # <<<<<<<<<<<<<<
 *         if not _ft2_scan_fontfile_to_fontfamily_cache(font_name_r):
 *             return  # warnings issued in function call
*/
  }

  /* "kivy/core/text/_text_pango.pyx":255
 *         if not _ft2_scan_fontfile_to_fontfamily_cache(font_name_r):
 *             return  # warnings issued in function call
 *     return kivy_fontfamily_cache[font_name_r]             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 255, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, __pyx_v_font_name_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_2))) __PYX_ERR(0, 255, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":244
 * 
 * # Add a font to cc and return its family name for later use
 * cdef inline bytes _cc_add_font_file(ContextContainer cc, bytes font_name_r):             # <<<<<<<<<<<<<<
 *     global kivy_fontfamily_cache
 *     if font_name_r in cc.loaded_fonts:
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("kivy.core.text._text_pango._cc_add_font_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":260
 * # Return a list of all font family names available in cc
 * # NOTE: pango adds static "monospace", "sans" and "serif"
 * cdef list _cc_list_families(ContextContainer cc):             # <<<<<<<<<<<<<<
 *     cdef PangoFontFamily **families
 *     cdef int n, i
*/

static PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__cc_list_families(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc) {
  PangoFontFamily **__pyx_v_families;
  int __pyx_v_n;
  int __pyx_v_i;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cc_list_families", 0);

  /* "kivy/core/text/_text_pango.pyx":264
 *     cdef int n, i
 *     cdef bytes famname
 *     cdef list out = list()             # <<<<<<<<<<<<<<
 *     pango_font_map_list_families(cc.fontmap, &families, &n)
 *     for i in range(n):
*/
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":265
 *     cdef bytes famname
 *     cdef list out = list()
 *     pango_font_map_list_families(cc.fontmap, &families, &n)             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         out.append(pango_font_family_get_name(families[i]))
*/
  pango_font_map_list_families(__pyx_v_cc->fontmap, (&__pyx_v_families), (&__pyx_v_n));

  /* "kivy/core/text/_text_pango.pyx":266
 *     cdef list out = list()
 *     pango_font_map_list_families(cc.fontmap, &families, &n)
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         out.append(pango_font_family_get_name(families[i]))
 *     g_free(families)
*/
  __pyx_t_2 = __pyx_v_n;
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "kivy/core/text/_text_pango.pyx":267
 *     pango_font_map_list_families(cc.fontmap, &families, &n)
 *     for i in range(n):
 *         out.append(pango_font_family_get_name(families[i]))             # <<<<<<<<<<<<<<
 *     g_free(families)
 *     return out
*/
    __pyx_t_1 = __Pyx_PyBytes_FromString(pango_font_family_get_name((__pyx_v_families[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_out, __pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 267, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "kivy/core/text/_text_pango.pyx":268
 *     for i in range(n):
 *         out.append(pango_font_family_get_name(families[i]))
 *     g_free(families)             # <<<<<<<<<<<<<<
 *     return out
 * 
*/
  g_free(__pyx_v_families);

  /* "kivy/core/text/_text_pango.pyx":269
 *         out.append(pango_font_family_get_name(families[i]))
 *     g_free(families)
 *     return out             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_out);
  __pyx_r = __pyx_v_out;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":260
 * # Return a list of all font family names available in cc
 * # NOTE: pango adds static "monospace", "sans" and "serif"
 * cdef list _cc_list_families(ContextContainer cc):             # <<<<<<<<<<<<<<
 *     cdef PangoFontFamily **families
 *     cdef int n, i
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango._cc_list_families", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":277
 * # of this impact metrics?
 * # FIXME: Figure out the minimum needed for fontdesc/attrs here
 * cdef _set_cc_options(ContextContainer cc, dict options):             # <<<<<<<<<<<<<<
 *     global kivy_fontfamily_cache
 *     cdef PangoAttrList *attrs = pango_attr_list_new()
*/

static PyObject *__pyx_f_4kivy_4core_4text_11_text_pango__set_cc_options(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc, PyObject *__pyx_v_options) {
  PangoAttrList *__pyx_v_attrs;
  PyObject *__pyx_v_font_name_r = 0;
  PyObject *__pyx_v_font_context = 0;
  PyObject *__pyx_v_family_attr = 0;
  int __pyx_v_font_size;
  PyObject *__pyx_v_features = NULL;
  PyObject *__pyx_v_hinting = 0;
  PangoFontMetrics *__pyx_v_metrics;
  PangoLanguage *__pyx_v_lang;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  char const *__pyx_t_8;
  char const *__pyx_t_9;
  int __pyx_t_10;
  gchar const *__pyx_t_11;
  PangoLanguage *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_cc_options", 0);

  /* "kivy/core/text/_text_pango.pyx":279
 * cdef _set_cc_options(ContextContainer cc, dict options):
 *     global kivy_fontfamily_cache
 *     cdef PangoAttrList *attrs = pango_attr_list_new()             # <<<<<<<<<<<<<<
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])
 *     cdef bytes font_context = _byte_option(options['font_context'])
*/
  __pyx_v_attrs = pango_attr_list_new();

  /* "kivy/core/text/_text_pango.pyx":280
 *     global kivy_fontfamily_cache
 *     cdef PangoAttrList *attrs = pango_attr_list_new()
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])             # <<<<<<<<<<<<<<
 *     cdef bytes font_context = _byte_option(options['font_context'])
 * 
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 280, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_font_name_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":281
 *     cdef PangoAttrList *attrs = pango_attr_list_new()
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])
 *     cdef bytes font_context = _byte_option(options['font_context'])             # <<<<<<<<<<<<<<
 * 
 *     # Set the current FcConfig, needed for Pango to see the contained fonts.
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 281, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_font_context = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":288
 *     #        FontConfig version -- all crashes in FC, it may work with
 *     #        an older pango + newer fontconfig, or not.. need research
 *     if not PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *         if FcConfigGetCurrent() != cc.fc_config:
 *             if FcConfigSetCurrent(cc.fc_config) == FcFalse:
*/
  __pyx_t_3 = (!(PANGO_VERSION_CHECK(1, 38, 0) != 0));
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":289
 *     #        an older pango + newer fontconfig, or not.. need research
 *     if not PANGO_VERSION_CHECK(1, 38, 0):
 *         if FcConfigGetCurrent() != cc.fc_config:             # <<<<<<<<<<<<<<
 *             if FcConfigSetCurrent(cc.fc_config) == FcFalse:
 *                 Logger.warn("_text_pango: set_cc_options(): Failed to set "
*/
    __pyx_t_3 = (FcConfigGetCurrent() != __pyx_v_cc->fc_config);
    if (__pyx_t_3) {

      /* "kivy/core/text/_text_pango.pyx":290
 *     if not PANGO_VERSION_CHECK(1, 38, 0):
 *         if FcConfigGetCurrent() != cc.fc_config:
 *             if FcConfigSetCurrent(cc.fc_config) == FcFalse:             # <<<<<<<<<<<<<<
 *                 Logger.warn("_text_pango: set_cc_options(): Failed to set "
 *                             "current fc_config for font_name_r='{}', font_context='{}'"
*/
      __pyx_t_3 = (FcConfigSetCurrent(__pyx_v_cc->fc_config) == FcFalse);
      if (__pyx_t_3) {

        /* "kivy/core/text/_text_pango.pyx":291
 *         if FcConfigGetCurrent() != cc.fc_config:
 *             if FcConfigSetCurrent(cc.fc_config) == FcFalse:
 *                 Logger.warn("_text_pango: set_cc_options(): Failed to set "             # <<<<<<<<<<<<<<
 *                             "current fc_config for font_name_r='{}', font_context='{}'"
 *                             .format(font_name_r, font_context))
*/
        __pyx_t_2 = NULL;
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "kivy/core/text/_text_pango.pyx":293
 *                 Logger.warn("_text_pango: set_cc_options(): Failed to set "
 *                             "current fc_config for font_name_r='{}', font_context='{}'"
 *                             .format(font_name_r, font_context))             # <<<<<<<<<<<<<<
 * 
 *     # Specify font family for fallback contexts; we don't care for isolated,
*/
        __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_text_pango_set_cc_options_Faile;
        __Pyx_INCREF(__pyx_t_6);
        __pyx_t_7 = 0;
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_font_name_r, __pyx_v_font_context};
          __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
        }
        __pyx_t_7 = 1;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
          assert(__pyx_t_2);
          PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(__pyx__function);
          __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
          __pyx_t_7 = 0;
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4};
          __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "kivy/core/text/_text_pango.pyx":290
 *     if not PANGO_VERSION_CHECK(1, 38, 0):
 *         if FcConfigGetCurrent() != cc.fc_config:
 *             if FcConfigSetCurrent(cc.fc_config) == FcFalse:             # <<<<<<<<<<<<<<
 *                 Logger.warn("_text_pango: set_cc_options(): Failed to set "
 *                             "current fc_config for font_name_r='{}', font_context='{}'"
*/
      }

      /* "kivy/core/text/_text_pango.pyx":289
 *     #        an older pango + newer fontconfig, or not.. need research
 *     if not PANGO_VERSION_CHECK(1, 38, 0):
 *         if FcConfigGetCurrent() != cc.fc_config:             # <<<<<<<<<<<<<<
 *             if FcConfigSetCurrent(cc.fc_config) == FcFalse:
 *                 Logger.warn("_text_pango: set_cc_options(): Failed to set "
*/
    }

    /* "kivy/core/text/_text_pango.pyx":288
 *     #        FontConfig version -- all crashes in FC, it may work with
 *     #        an older pango + newer fontconfig, or not.. need research
 *     if not PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *         if FcConfigGetCurrent() != cc.fc_config:
 *             if FcConfigSetCurrent(cc.fc_config) == FcFalse:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":297
 *     # Specify font family for fallback contexts; we don't care for isolated,
 *     # there is only one font to choose from.
 *     cdef bytes family_attr = b'Sans'             # <<<<<<<<<<<<<<
 *     if font_context:
 *         if options['font_family']:
*/
  __Pyx_INCREF(__pyx_mstate_global->__pyx_n_b_Sans);
  __pyx_v_family_attr = __pyx_mstate_global->__pyx_n_b_Sans;

  /* "kivy/core/text/_text_pango.pyx":298
 *     # there is only one font to choose from.
 *     cdef bytes family_attr = b'Sans'
 *     if font_context:             # <<<<<<<<<<<<<<
 *         if options['font_family']:
 *             family_attr = _byte_option(options['font_family'])
*/
  if (__pyx_v_font_context == Py_None) __pyx_t_3 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_font_context);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
    __pyx_t_3 = (__pyx_temp != 0);
  }

  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":299
 *     cdef bytes family_attr = b'Sans'
 *     if font_context:
 *         if options['font_family']:             # <<<<<<<<<<<<<<
 *             family_attr = _byte_option(options['font_family'])
 *         elif font_name_r:
*/
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 299, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "kivy/core/text/_text_pango.pyx":300
 *     if font_context:
 *         if options['font_family']:
 *             family_attr = _byte_option(options['font_family'])             # <<<<<<<<<<<<<<
 *         elif font_name_r:
 *             family_attr = kivy_fontfamily_cache.get(font_name_r, b'Sans')
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 300, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_family); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 300, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_family_attr, ((PyObject*)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "kivy/core/text/_text_pango.pyx":299
 *     cdef bytes family_attr = b'Sans'
 *     if font_context:
 *         if options['font_family']:             # <<<<<<<<<<<<<<
 *             family_attr = _byte_option(options['font_family'])
 *         elif font_name_r:
*/
      goto __pyx_L7;
    }

    /* "kivy/core/text/_text_pango.pyx":301
 *         if options['font_family']:
 *             family_attr = _byte_option(options['font_family'])
 *         elif font_name_r:             # <<<<<<<<<<<<<<
 *             family_attr = kivy_fontfamily_cache.get(font_name_r, b'Sans')
 *         pango_font_description_set_family(cc.fontdesc, family_attr)
*/
    if (__pyx_v_font_name_r == Py_None) __pyx_t_3 = 0;
    else
    {
      Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_font_name_r);
      if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 301, __pyx_L1_error)
      __pyx_t_3 = (__pyx_temp != 0);
    }

    if (__pyx_t_3) {

      /* "kivy/core/text/_text_pango.pyx":302
 *             family_attr = _byte_option(options['font_family'])
 *         elif font_name_r:
 *             family_attr = kivy_fontfamily_cache.get(font_name_r, b'Sans')             # <<<<<<<<<<<<<<
 *         pango_font_description_set_family(cc.fontdesc, family_attr)
 *         pango_attr_list_insert(attrs, pango_attr_family_new(family_attr))
*/
      if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
        __PYX_ERR(0, 302, __pyx_L1_error)
      }
      __pyx_t_5 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, __pyx_v_font_name_r, __pyx_mstate_global->__pyx_n_b_Sans); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (!(likely(PyBytes_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_5))) __PYX_ERR(0, 302, __pyx_L1_error)
      __Pyx_DECREF_SET(__pyx_v_family_attr, ((PyObject*)__pyx_t_5));
      __pyx_t_5 = 0;

      /* "kivy/core/text/_text_pango.pyx":301
 *         if options['font_family']:
 *             family_attr = _byte_option(options['font_family'])
 *         elif font_name_r:             # <<<<<<<<<<<<<<
 *             family_attr = kivy_fontfamily_cache.get(font_name_r, b'Sans')
 *         pango_font_description_set_family(cc.fontdesc, family_attr)
*/
    }
    __pyx_L7:;

    /* "kivy/core/text/_text_pango.pyx":303
 *         elif font_name_r:
 *             family_attr = kivy_fontfamily_cache.get(font_name_r, b'Sans')
 *         pango_font_description_set_family(cc.fontdesc, family_attr)             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_family_new(family_attr))
 * 
*/
    if (unlikely(__pyx_v_family_attr == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 303, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyBytes_AsString(__pyx_v_family_attr); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error)
    pango_font_description_set_family(__pyx_v_cc->fontdesc, __pyx_t_8);

    /* "kivy/core/text/_text_pango.pyx":304
 *             family_attr = kivy_fontfamily_cache.get(font_name_r, b'Sans')
 *         pango_font_description_set_family(cc.fontdesc, family_attr)
 *         pango_attr_list_insert(attrs, pango_attr_family_new(family_attr))             # <<<<<<<<<<<<<<
 * 
 *     cdef int font_size = int(options['font_size'] * PANGO_SCALE)
*/
    if (unlikely(__pyx_v_family_attr == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
      __PYX_ERR(0, 304, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyBytes_AsString(__pyx_v_family_attr); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error)
    pango_attr_list_insert(__pyx_v_attrs, pango_attr_family_new(__pyx_t_9));

    /* "kivy/core/text/_text_pango.pyx":298
 *     # there is only one font to choose from.
 *     cdef bytes family_attr = b'Sans'
 *     if font_context:             # <<<<<<<<<<<<<<
 *         if options['font_family']:
 *             family_attr = _byte_option(options['font_family'])
*/
  }

  /* "kivy/core/text/_text_pango.pyx":306
 *         pango_attr_list_insert(attrs, pango_attr_family_new(family_attr))
 * 
 *     cdef int font_size = int(options['font_size'] * PANGO_SCALE)             # <<<<<<<<<<<<<<
 *     if PANGO_VERSION_CHECK(1, 8, 0):
 *         pango_attr_list_insert(attrs, pango_attr_size_new_absolute(font_size))
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 306, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyLong_From_unsigned_int(PANGO_SCALE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_10 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_font_size = __pyx_t_10;

  /* "kivy/core/text/_text_pango.pyx":307
 * 
 *     cdef int font_size = int(options['font_size'] * PANGO_SCALE)
 *     if PANGO_VERSION_CHECK(1, 8, 0):             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_size_new_absolute(font_size))
 *         pango_font_description_set_absolute_size(cc.fontdesc, font_size)
*/
  __pyx_t_3 = (PANGO_VERSION_CHECK(1, 8, 0) != 0);
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":308
 *     cdef int font_size = int(options['font_size'] * PANGO_SCALE)
 *     if PANGO_VERSION_CHECK(1, 8, 0):
 *         pango_attr_list_insert(attrs, pango_attr_size_new_absolute(font_size))             # <<<<<<<<<<<<<<
 *         pango_font_description_set_absolute_size(cc.fontdesc, font_size)
 *     else:
*/
    pango_attr_list_insert(__pyx_v_attrs, pango_attr_size_new_absolute(__pyx_v_font_size));

    /* "kivy/core/text/_text_pango.pyx":309
 *     if PANGO_VERSION_CHECK(1, 8, 0):
 *         pango_attr_list_insert(attrs, pango_attr_size_new_absolute(font_size))
 *         pango_font_description_set_absolute_size(cc.fontdesc, font_size)             # <<<<<<<<<<<<<<
 *     else:
 *         pango_attr_list_insert(attrs, pango_attr_size_new(font_size))
*/
    pango_font_description_set_absolute_size(__pyx_v_cc->fontdesc, __pyx_v_font_size);

    /* "kivy/core/text/_text_pango.pyx":307
 * 
 *     cdef int font_size = int(options['font_size'] * PANGO_SCALE)
 *     if PANGO_VERSION_CHECK(1, 8, 0):             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_size_new_absolute(font_size))
 *         pango_font_description_set_absolute_size(cc.fontdesc, font_size)
*/
    goto __pyx_L8;
  }

  /* "kivy/core/text/_text_pango.pyx":311
 *         pango_font_description_set_absolute_size(cc.fontdesc, font_size)
 *     else:
 *         pango_attr_list_insert(attrs, pango_attr_size_new(font_size))             # <<<<<<<<<<<<<<
 *         pango_font_description_set_size(cc.fontdesc, font_size)
 * 
*/
  /*else*/ {
    pango_attr_list_insert(__pyx_v_attrs, pango_attr_size_new(__pyx_v_font_size));

    /* "kivy/core/text/_text_pango.pyx":312
 *     else:
 *         pango_attr_list_insert(attrs, pango_attr_size_new(font_size))
 *         pango_font_description_set_size(cc.fontdesc, font_size)             # <<<<<<<<<<<<<<
 * 
 *     if options['bold']:
*/
    pango_font_description_set_size(__pyx_v_cc->fontdesc, __pyx_v_font_size);
  }
  __pyx_L8:;

  /* "kivy/core/text/_text_pango.pyx":314
 *         pango_font_description_set_size(cc.fontdesc, font_size)
 * 
 *     if options['bold']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_weight_new(PANGO_WEIGHT_BOLD))
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_BOLD)
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 314, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_bold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 314, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":315
 * 
 *     if options['bold']:
 *         pango_attr_list_insert(attrs, pango_attr_weight_new(PANGO_WEIGHT_BOLD))             # <<<<<<<<<<<<<<
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_BOLD)
 *     else:
*/
    pango_attr_list_insert(__pyx_v_attrs, pango_attr_weight_new(PANGO_WEIGHT_BOLD));

    /* "kivy/core/text/_text_pango.pyx":316
 *     if options['bold']:
 *         pango_attr_list_insert(attrs, pango_attr_weight_new(PANGO_WEIGHT_BOLD))
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_BOLD)             # <<<<<<<<<<<<<<
 *     else:
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_NORMAL)
*/
    pango_font_description_set_weight(__pyx_v_cc->fontdesc, PANGO_WEIGHT_BOLD);

    /* "kivy/core/text/_text_pango.pyx":314
 *         pango_font_description_set_size(cc.fontdesc, font_size)
 * 
 *     if options['bold']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_weight_new(PANGO_WEIGHT_BOLD))
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_BOLD)
*/
    goto __pyx_L9;
  }

  /* "kivy/core/text/_text_pango.pyx":318
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_BOLD)
 *     else:
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_NORMAL)             # <<<<<<<<<<<<<<
 * 
 *     if options['italic']:
*/
  /*else*/ {
    pango_font_description_set_weight(__pyx_v_cc->fontdesc, PANGO_WEIGHT_NORMAL);
  }
  __pyx_L9:;

  /* "kivy/core/text/_text_pango.pyx":320
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_NORMAL)
 * 
 *     if options['italic']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_style_new(PANGO_STYLE_ITALIC))
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_ITALIC)
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 320, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_italic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":321
 * 
 *     if options['italic']:
 *         pango_attr_list_insert(attrs, pango_attr_style_new(PANGO_STYLE_ITALIC))             # <<<<<<<<<<<<<<
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_ITALIC)
 *     else:
*/
    pango_attr_list_insert(__pyx_v_attrs, pango_attr_style_new(PANGO_STYLE_ITALIC));

    /* "kivy/core/text/_text_pango.pyx":322
 *     if options['italic']:
 *         pango_attr_list_insert(attrs, pango_attr_style_new(PANGO_STYLE_ITALIC))
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_ITALIC)             # <<<<<<<<<<<<<<
 *     else:
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_NORMAL)
*/
    pango_font_description_set_style(__pyx_v_cc->fontdesc, PANGO_STYLE_ITALIC);

    /* "kivy/core/text/_text_pango.pyx":320
 *         pango_font_description_set_weight(cc.fontdesc, PANGO_WEIGHT_NORMAL)
 * 
 *     if options['italic']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_style_new(PANGO_STYLE_ITALIC))
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_ITALIC)
*/
    goto __pyx_L10;
  }

  /* "kivy/core/text/_text_pango.pyx":324
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_ITALIC)
 *     else:
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_NORMAL)             # <<<<<<<<<<<<<<
 * 
 *     if options['underline']:
*/
  /*else*/ {
    pango_font_description_set_style(__pyx_v_cc->fontdesc, PANGO_STYLE_NORMAL);
  }
  __pyx_L10:;

  /* "kivy/core/text/_text_pango.pyx":326
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_NORMAL)
 * 
 *     if options['underline']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_underline_new(PANGO_UNDERLINE_SINGLE))
 *     if options['strikethrough']:
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 326, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_underline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":327
 * 
 *     if options['underline']:
 *         pango_attr_list_insert(attrs, pango_attr_underline_new(PANGO_UNDERLINE_SINGLE))             # <<<<<<<<<<<<<<
 *     if options['strikethrough']:
 *         pango_attr_list_insert(attrs, pango_attr_strikethrough_new(1))
*/
    pango_attr_list_insert(__pyx_v_attrs, pango_attr_underline_new(PANGO_UNDERLINE_SINGLE));

    /* "kivy/core/text/_text_pango.pyx":326
 *         pango_font_description_set_style(cc.fontdesc, PANGO_STYLE_NORMAL)
 * 
 *     if options['underline']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_underline_new(PANGO_UNDERLINE_SINGLE))
 *     if options['strikethrough']:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":328
 *     if options['underline']:
 *         pango_attr_list_insert(attrs, pango_attr_underline_new(PANGO_UNDERLINE_SINGLE))
 *     if options['strikethrough']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_strikethrough_new(1))
 * 
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 328, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_strikethrough); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 328, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":329
 *         pango_attr_list_insert(attrs, pango_attr_underline_new(PANGO_UNDERLINE_SINGLE))
 *     if options['strikethrough']:
 *         pango_attr_list_insert(attrs, pango_attr_strikethrough_new(1))             # <<<<<<<<<<<<<<
 * 
 *     if PANGO_VERSION_CHECK(1, 38, 0):
*/
    pango_attr_list_insert(__pyx_v_attrs, pango_attr_strikethrough_new(1));

    /* "kivy/core/text/_text_pango.pyx":328
 *     if options['underline']:
 *         pango_attr_list_insert(attrs, pango_attr_underline_new(PANGO_UNDERLINE_SINGLE))
 *     if options['strikethrough']:             # <<<<<<<<<<<<<<
 *         pango_attr_list_insert(attrs, pango_attr_strikethrough_new(1))
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":331
 *         pango_attr_list_insert(attrs, pango_attr_strikethrough_new(1))
 * 
 *     if PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *         if options['font_features']:
 *             features = _byte_option(options['font_features'])
*/
  __pyx_t_3 = (PANGO_VERSION_CHECK(1, 38, 0) != 0);
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":332
 * 
 *     if PANGO_VERSION_CHECK(1, 38, 0):
 *         if options['font_features']:             # <<<<<<<<<<<<<<
 *             features = _byte_option(options['font_features'])
 *             pango_attr_list_insert(attrs, pango_attr_font_features_new(features))
*/
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 332, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 332, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_3) {

      /* "kivy/core/text/_text_pango.pyx":333
 *     if PANGO_VERSION_CHECK(1, 38, 0):
 *         if options['font_features']:
 *             features = _byte_option(options['font_features'])             # <<<<<<<<<<<<<<
 *             pango_attr_list_insert(attrs, pango_attr_font_features_new(features))
 * 
*/
      if (unlikely(__pyx_v_options == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 333, __pyx_L1_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_features); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_features = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "kivy/core/text/_text_pango.pyx":334
 *         if options['font_features']:
 *             features = _byte_option(options['font_features'])
 *             pango_attr_list_insert(attrs, pango_attr_font_features_new(features))             # <<<<<<<<<<<<<<
 * 
 *     # At the moment, this is not needed since we don't use Pango for text layout
*/
      if (unlikely(__pyx_v_features == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
        __PYX_ERR(0, 334, __pyx_L1_error)
      }
      __pyx_t_11 = __Pyx_PyBytes_AsString(__pyx_v_features); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
      pango_attr_list_insert(__pyx_v_attrs, pango_attr_font_features_new(__pyx_t_11));

      /* "kivy/core/text/_text_pango.pyx":332
 * 
 *     if PANGO_VERSION_CHECK(1, 38, 0):
 *         if options['font_features']:             # <<<<<<<<<<<<<<
 *             features = _byte_option(options['font_features'])
 *             pango_attr_list_insert(attrs, pango_attr_font_features_new(features))
*/
    }

    /* "kivy/core/text/_text_pango.pyx":331
 *         pango_attr_list_insert(attrs, pango_attr_strikethrough_new(1))
 * 
 *     if PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *         if options['font_features']:
 *             features = _byte_option(options['font_features'])
*/
  }

  /* "kivy/core/text/_text_pango.pyx":347
 * 
 *     # FIXME: Not clear if this is identical to sdl2 settings
 *     cdef bytes hinting = _byte_option(options['font_hinting'])             # <<<<<<<<<<<<<<
 *     if hinting == b'normal':
 *         cc.ft2subst_callback_data.antialias = 1
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 347, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_hinting); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_hinting = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":348
 *     # FIXME: Not clear if this is identical to sdl2 settings
 *     cdef bytes hinting = _byte_option(options['font_hinting'])
 *     if hinting == b'normal':             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
*/
  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_hinting, __pyx_mstate_global->__pyx_n_b_normal, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 348, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":349
 *     cdef bytes hinting = _byte_option(options['font_hinting'])
 *     if hinting == b'normal':
 *         cc.ft2subst_callback_data.antialias = 1             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
 *     elif hinting == b'light':
*/
    __pyx_v_cc->ft2subst_callback_data.antialias = 1;

    /* "kivy/core/text/_text_pango.pyx":350
 *     if hinting == b'normal':
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL             # <<<<<<<<<<<<<<
 *     elif hinting == b'light':
 *         cc.ft2subst_callback_data.antialias = 1
*/
    __pyx_v_cc->ft2subst_callback_data.hintstyle = FC_HINT_FULL;

    /* "kivy/core/text/_text_pango.pyx":348
 *     # FIXME: Not clear if this is identical to sdl2 settings
 *     cdef bytes hinting = _byte_option(options['font_hinting'])
 *     if hinting == b'normal':             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
*/
    goto __pyx_L15;
  }

  /* "kivy/core/text/_text_pango.pyx":351
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
 *     elif hinting == b'light':             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT
*/
  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_hinting, __pyx_mstate_global->__pyx_n_b_light, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 351, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":352
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
 *     elif hinting == b'light':
 *         cc.ft2subst_callback_data.antialias = 1             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT
 *     elif hinting == b'mono':
*/
    __pyx_v_cc->ft2subst_callback_data.antialias = 1;

    /* "kivy/core/text/_text_pango.pyx":353
 *     elif hinting == b'light':
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT             # <<<<<<<<<<<<<<
 *     elif hinting == b'mono':
 *         cc.ft2subst_callback_data.antialias = 0
*/
    __pyx_v_cc->ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT;

    /* "kivy/core/text/_text_pango.pyx":351
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
 *     elif hinting == b'light':             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT
*/
    goto __pyx_L15;
  }

  /* "kivy/core/text/_text_pango.pyx":354
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT
 *     elif hinting == b'mono':             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.antialias = 0
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
*/
  __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_hinting, __pyx_mstate_global->__pyx_n_b_mono, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 354, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":355
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT
 *     elif hinting == b'mono':
 *         cc.ft2subst_callback_data.antialias = 0             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
 *     else:
*/
    __pyx_v_cc->ft2subst_callback_data.antialias = 0;

    /* "kivy/core/text/_text_pango.pyx":356
 *     elif hinting == b'mono':
 *         cc.ft2subst_callback_data.antialias = 0
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL             # <<<<<<<<<<<<<<
 *     else:
 *         cc.ft2subst_callback_data.antialias = 0
*/
    __pyx_v_cc->ft2subst_callback_data.hintstyle = FC_HINT_FULL;

    /* "kivy/core/text/_text_pango.pyx":354
 *         cc.ft2subst_callback_data.antialias = 1
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_SLIGHT
 *     elif hinting == b'mono':             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.antialias = 0
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
*/
    goto __pyx_L15;
  }

  /* "kivy/core/text/_text_pango.pyx":358
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_FULL
 *     else:
 *         cc.ft2subst_callback_data.antialias = 0             # <<<<<<<<<<<<<<
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_NONE
 *     pango_ft2_font_map_substitute_changed(PANGO_FT2_FONT_MAP(cc.fontmap))
*/
  /*else*/ {
    __pyx_v_cc->ft2subst_callback_data.antialias = 0;

    /* "kivy/core/text/_text_pango.pyx":359
 *     else:
 *         cc.ft2subst_callback_data.antialias = 0
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_NONE             # <<<<<<<<<<<<<<
 *     pango_ft2_font_map_substitute_changed(PANGO_FT2_FONT_MAP(cc.fontmap))
 * 
*/
    __pyx_v_cc->ft2subst_callback_data.hintstyle = FC_HINT_NONE;
  }
  __pyx_L15:;

  /* "kivy/core/text/_text_pango.pyx":360
 *         cc.ft2subst_callback_data.antialias = 0
 *         cc.ft2subst_callback_data.hintstyle = FC_HINT_NONE
 *     pango_ft2_font_map_substitute_changed(PANGO_FT2_FONT_MAP(cc.fontmap))             # <<<<<<<<<<<<<<
 * 
 *     # Apply font description to context before getting metrics
*/
  pango_ft2_font_map_substitute_changed(PANGO_FT2_FONT_MAP(__pyx_v_cc->fontmap));

  /* "kivy/core/text/_text_pango.pyx":363
 * 
 *     # Apply font description to context before getting metrics
 *     pango_context_set_font_description(cc.context, cc.fontdesc)             # <<<<<<<<<<<<<<
 * 
 *     cdef PangoFontMetrics *metrics
*/
  pango_context_set_font_description(__pyx_v_cc->context, __pyx_v_cc->fontdesc);

  /* "kivy/core/text/_text_pango.pyx":366
 * 
 *     cdef PangoFontMetrics *metrics
 *     cdef PangoLanguage *lang = _get_options_text_language(options)             # <<<<<<<<<<<<<<
 *     metrics = pango_context_get_metrics(cc.context, cc.fontdesc, lang)
 *     if metrics:
*/
  __pyx_t_12 = __pyx_f_4kivy_4core_4text_11_text_pango__get_options_text_language(__pyx_v_options); if (unlikely(__pyx_t_12 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 366, __pyx_L1_error)
  __pyx_v_lang = __pyx_t_12;

  /* "kivy/core/text/_text_pango.pyx":367
 *     cdef PangoFontMetrics *metrics
 *     cdef PangoLanguage *lang = _get_options_text_language(options)
 *     metrics = pango_context_get_metrics(cc.context, cc.fontdesc, lang)             # <<<<<<<<<<<<<<
 *     if metrics:
 *         cc.ascent = <double>(pango_font_metrics_get_ascent(metrics) / PANGO_SCALE)
*/
  __pyx_v_metrics = pango_context_get_metrics(__pyx_v_cc->context, __pyx_v_cc->fontdesc, __pyx_v_lang);

  /* "kivy/core/text/_text_pango.pyx":368
 *     cdef PangoLanguage *lang = _get_options_text_language(options)
 *     metrics = pango_context_get_metrics(cc.context, cc.fontdesc, lang)
 *     if metrics:             # <<<<<<<<<<<<<<
 *         cc.ascent = <double>(pango_font_metrics_get_ascent(metrics) / PANGO_SCALE)
 *         cc.descent = <double>(pango_font_metrics_get_descent(metrics) / PANGO_SCALE)
*/
  __pyx_t_3 = (__pyx_v_metrics != 0);
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":369
 *     metrics = pango_context_get_metrics(cc.context, cc.fontdesc, lang)
 *     if metrics:
 *         cc.ascent = <double>(pango_font_metrics_get_ascent(metrics) / PANGO_SCALE)             # <<<<<<<<<<<<<<
 *         cc.descent = <double>(pango_font_metrics_get_descent(metrics) / PANGO_SCALE)
 *         pango_font_metrics_unref(metrics)
*/
    __pyx_t_10 = pango_font_metrics_get_ascent(__pyx_v_metrics);
    if (unlikely(PANGO_SCALE == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 369, __pyx_L1_error)
    }
    __pyx_v_cc->ascent = ((double)(((double)__pyx_t_10) / ((double)PANGO_SCALE)));

    /* "kivy/core/text/_text_pango.pyx":370
 *     if metrics:
 *         cc.ascent = <double>(pango_font_metrics_get_ascent(metrics) / PANGO_SCALE)
 *         cc.descent = <double>(pango_font_metrics_get_descent(metrics) / PANGO_SCALE)             # <<<<<<<<<<<<<<
 *         pango_font_metrics_unref(metrics)
 *     else:
*/
    __pyx_t_10 = pango_font_metrics_get_descent(__pyx_v_metrics);
    if (unlikely(PANGO_SCALE == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(0, 370, __pyx_L1_error)
    }
    __pyx_v_cc->descent = ((double)(((double)__pyx_t_10) / ((double)PANGO_SCALE)));

    /* "kivy/core/text/_text_pango.pyx":371
 *         cc.ascent = <double>(pango_font_metrics_get_ascent(metrics) / PANGO_SCALE)
 *         cc.descent = <double>(pango_font_metrics_get_descent(metrics) / PANGO_SCALE)
 *         pango_font_metrics_unref(metrics)             # <<<<<<<<<<<<<<
 *     else:
 *         Logger.warn("_text_pango: Could not get context metrics requesting "
*/
    pango_font_metrics_unref(__pyx_v_metrics);

    /* "kivy/core/text/_text_pango.pyx":368
 *     cdef PangoLanguage *lang = _get_options_text_language(options)
 *     metrics = pango_context_get_metrics(cc.context, cc.fontdesc, lang)
 *     if metrics:             # <<<<<<<<<<<<<<
 *         cc.ascent = <double>(pango_font_metrics_get_ascent(metrics) / PANGO_SCALE)
 *         cc.descent = <double>(pango_font_metrics_get_descent(metrics) / PANGO_SCALE)
*/
    goto __pyx_L16;
  }

  /* "kivy/core/text/_text_pango.pyx":373
 *         pango_font_metrics_unref(metrics)
 *     else:
 *         Logger.warn("_text_pango: Could not get context metrics requesting "             # <<<<<<<<<<<<<<
 *                     "family_attr='{}', font_context='{}', font_name_r='{}'"
 *                     .format(family_attr, font_context, font_name_r))
*/
  /*else*/ {
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "kivy/core/text/_text_pango.pyx":375
 *         Logger.warn("_text_pango: Could not get context metrics requesting "
 *                     "family_attr='{}', font_context='{}', font_name_r='{}'"
 *                     .format(family_attr, font_context, font_name_r))             # <<<<<<<<<<<<<<
 * 
 *     pango_attr_list_insert(attrs, pango_attr_language_new(lang))
*/
    __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_get_contex;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_family_attr, __pyx_v_font_context, __pyx_v_font_name_r};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 375, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_2, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L16:;

  /* "kivy/core/text/_text_pango.pyx":377
 *                     .format(family_attr, font_context, font_name_r))
 * 
 *     pango_attr_list_insert(attrs, pango_attr_language_new(lang))             # <<<<<<<<<<<<<<
 *     pango_layout_set_attributes(cc.layout, attrs)
 *     pango_attr_list_unref(attrs)  # Layout owns it now
*/
  pango_attr_list_insert(__pyx_v_attrs, pango_attr_language_new(__pyx_v_lang));

  /* "kivy/core/text/_text_pango.pyx":378
 * 
 *     pango_attr_list_insert(attrs, pango_attr_language_new(lang))
 *     pango_layout_set_attributes(cc.layout, attrs)             # <<<<<<<<<<<<<<
 *     pango_attr_list_unref(attrs)  # Layout owns it now
 *     pango_layout_context_changed(cc.layout)
*/
  pango_layout_set_attributes(__pyx_v_cc->layout, __pyx_v_attrs);

  /* "kivy/core/text/_text_pango.pyx":379
 *     pango_attr_list_insert(attrs, pango_attr_language_new(lang))
 *     pango_layout_set_attributes(cc.layout, attrs)
 *     pango_attr_list_unref(attrs)  # Layout owns it now             # <<<<<<<<<<<<<<
 *     pango_layout_context_changed(cc.layout)
 * 
*/
  pango_attr_list_unref(__pyx_v_attrs);

  /* "kivy/core/text/_text_pango.pyx":380
 *     pango_layout_set_attributes(cc.layout, attrs)
 *     pango_attr_list_unref(attrs)  # Layout owns it now
 *     pango_layout_context_changed(cc.layout)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  pango_layout_context_changed(__pyx_v_cc->layout);

  /* "kivy/core/text/_text_pango.pyx":277
 * # of this impact metrics?
 * # FIXME: Figure out the minimum needed for fontdesc/attrs here
 * cdef _set_cc_options(ContextContainer cc, dict options):             # <<<<<<<<<<<<<<
 *     global kivy_fontfamily_cache
 *     cdef PangoAttrList *attrs = pango_attr_list_new()
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("kivy.core.text._text_pango._set_cc_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_font_name_r);
  __Pyx_XDECREF(__pyx_v_font_context);
  __Pyx_XDECREF(__pyx_v_family_attr);
  __Pyx_XDECREF(__pyx_v_features);
  __Pyx_XDECREF(__pyx_v_hinting);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":388
 * # font_name_r can optionally be specified to load the font on top of existing
 * # fonts (for example provided by system:// or directory://)
 * cdef ContextContainer _get_or_create_cc(bytes font_context, bytes font_name_r):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kivy_isolated_cache_order
*/

static struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc(PyObject *__pyx_v_font_context, PyObject *__pyx_v_font_name_r) {
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  int __pyx_v_isolated;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  size_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_or_create_cc", 0);
  __Pyx_INCREF(__pyx_v_font_context);

  /* "kivy/core/text/_text_pango.pyx":392
 *     global kivy_isolated_cache_order
 *     cdef ContextContainer cc
 *     cdef bint isolated = False             # <<<<<<<<<<<<<<
 * 
 *     if not font_context:
*/
  __pyx_v_isolated = 0;

  /* "kivy/core/text/_text_pango.pyx":394
 *     cdef bint isolated = False
 * 
 *     if not font_context:             # <<<<<<<<<<<<<<
 *         if not font_name_r:
 *             raise Exception('_text_pango: Attempt to load empty font_name_r in an'
*/
  if (__pyx_v_font_context == Py_None) __pyx_t_1 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_font_context);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 394, __pyx_L1_error)
    __pyx_t_1 = (__pyx_temp != 0);
  }

  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":395
 * 
 *     if not font_context:
 *         if not font_name_r:             # <<<<<<<<<<<<<<
 *             raise Exception('_text_pango: Attempt to load empty font_name_r in an'
 *                             'isolated context. This is not possible.')
*/
    if (__pyx_v_font_name_r == Py_None) __pyx_t_2 = 0;
    else
    {
      Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_font_name_r);
      if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 395, __pyx_L1_error)
      __pyx_t_2 = (__pyx_temp != 0);
    }

    __pyx_t_1 = (!__pyx_t_2);
    if (unlikely(__pyx_t_1)) {

      /* "kivy/core/text/_text_pango.pyx":396
 *     if not font_context:
 *         if not font_name_r:
 *             raise Exception('_text_pango: Attempt to load empty font_name_r in an'             # <<<<<<<<<<<<<<
 *                             'isolated context. This is not possible.')
 *         isolated = True
*/
      __pyx_t_4 = NULL;
      __pyx_t_5 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_text_pango_Attempt_to_load_empt};
        __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_Exception)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 396, __pyx_L1_error)

      /* "kivy/core/text/_text_pango.pyx":395
 * 
 *     if not font_context:
 *         if not font_name_r:             # <<<<<<<<<<<<<<
 *             raise Exception('_text_pango: Attempt to load empty font_name_r in an'
 *                             'isolated context. This is not possible.')
*/
    }

    /* "kivy/core/text/_text_pango.pyx":398
 *             raise Exception('_text_pango: Attempt to load empty font_name_r in an'
 *                             'isolated context. This is not possible.')
 *         isolated = True             # <<<<<<<<<<<<<<
 *         font_context = b'isolated://' + font_name_r
 * 
*/
    __pyx_v_isolated = 1;

    /* "kivy/core/text/_text_pango.pyx":399
 *                             'isolated context. This is not possible.')
 *         isolated = True
 *         font_context = b'isolated://' + font_name_r             # <<<<<<<<<<<<<<
 * 
 *     # Check for cached context container
*/
    __pyx_t_3 = PyNumber_Add(__pyx_mstate_global->__pyx_kp_b_isolated, __pyx_v_font_name_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_font_context, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":394
 *     cdef bint isolated = False
 * 
 *     if not font_context:             # <<<<<<<<<<<<<<
 *         if not font_name_r:
 *             raise Exception('_text_pango: Attempt to load empty font_name_r in an'
*/
  }

  /* "kivy/core/text/_text_pango.pyx":402
 * 
 *     # Check for cached context container
 *     cc = kivy_font_context_cache.get(font_context)             # <<<<<<<<<<<<<<
 *     if cc:
 *         if not font_name_r or font_name_r in cc.loaded_fonts:
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 402, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, __pyx_v_font_context, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer))))) __PYX_ERR(0, 402, __pyx_L1_error)
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "kivy/core/text/_text_pango.pyx":403
 *     # Check for cached context container
 *     cc = kivy_font_context_cache.get(font_context)
 *     if cc:             # <<<<<<<<<<<<<<
 *         if not font_name_r or font_name_r in cc.loaded_fonts:
 *             return cc
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 403, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":404
 *     cc = kivy_font_context_cache.get(font_context)
 *     if cc:
 *         if not font_name_r or font_name_r in cc.loaded_fonts:             # <<<<<<<<<<<<<<
 *             return cc
 *         if _cc_add_font_file(cc, font_name_r):
*/
    if (__pyx_v_font_name_r == Py_None) __pyx_t_2 = 0;
    else
    {
      Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_font_name_r);
      if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 404, __pyx_L1_error)
      __pyx_t_2 = (__pyx_temp != 0);
    }

    __pyx_t_6 = (!__pyx_t_2);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_1 = __pyx_t_6;
      goto __pyx_L7_bool_binop_done;
    }
    if (unlikely(__pyx_v_cc->loaded_fonts == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
      __PYX_ERR(0, 404, __pyx_L1_error)
    }
    __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_v_font_name_r, __pyx_v_cc->loaded_fonts, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 404, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_6;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_1) {

      /* "kivy/core/text/_text_pango.pyx":405
 *     if cc:
 *         if not font_name_r or font_name_r in cc.loaded_fonts:
 *             return cc             # <<<<<<<<<<<<<<
 *         if _cc_add_font_file(cc, font_name_r):
 *             if PANGO_VERSION_CHECK(1, 38, 0):
*/
      __Pyx_XDECREF((PyObject *)__pyx_r);
      __Pyx_INCREF((PyObject *)__pyx_v_cc);
      __pyx_r = __pyx_v_cc;
      goto __pyx_L0;

      /* "kivy/core/text/_text_pango.pyx":404
 *     cc = kivy_font_context_cache.get(font_context)
 *     if cc:
 *         if not font_name_r or font_name_r in cc.loaded_fonts:             # <<<<<<<<<<<<<<
 *             return cc
 *         if _cc_add_font_file(cc, font_name_r):
*/
    }

    /* "kivy/core/text/_text_pango.pyx":406
 *         if not font_name_r or font_name_r in cc.loaded_fonts:
 *             return cc
 *         if _cc_add_font_file(cc, font_name_r):             # <<<<<<<<<<<<<<
 *             if PANGO_VERSION_CHECK(1, 38, 0):
 *                 # Older versions swap the FcConfig in _set_cc_options()
*/
    __pyx_t_3 = __pyx_f_4kivy_4core_4text_11_text_pango__cc_add_font_file(__pyx_v_cc, __pyx_v_font_name_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_3 == Py_None) __pyx_t_1 = 0;
    else
    {
      Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_t_3);
      if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 406, __pyx_L1_error)
      __pyx_t_1 = (__pyx_temp != 0);
    }

    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "kivy/core/text/_text_pango.pyx":407
 *             return cc
 *         if _cc_add_font_file(cc, font_name_r):
 *             if PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *                 # Older versions swap the FcConfig in _set_cc_options()
 *                 pango_fc_font_map_config_changed(PANGO_FC_FONT_MAP(cc.fontmap))
*/
      __pyx_t_1 = (PANGO_VERSION_CHECK(1, 38, 0) != 0);
      if (__pyx_t_1) {

        /* "kivy/core/text/_text_pango.pyx":409
 *             if PANGO_VERSION_CHECK(1, 38, 0):
 *                 # Older versions swap the FcConfig in _set_cc_options()
 *                 pango_fc_font_map_config_changed(PANGO_FC_FONT_MAP(cc.fontmap))             # <<<<<<<<<<<<<<
 *         return cc
 * 
*/
        pango_fc_font_map_config_changed(PANGO_FC_FONT_MAP(__pyx_v_cc->fontmap));

        /* "kivy/core/text/_text_pango.pyx":407
 *             return cc
 *         if _cc_add_font_file(cc, font_name_r):
 *             if PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *                 # Older versions swap the FcConfig in _set_cc_options()
 *                 pango_fc_font_map_config_changed(PANGO_FC_FONT_MAP(cc.fontmap))
*/
      }

      /* "kivy/core/text/_text_pango.pyx":406
 *         if not font_name_r or font_name_r in cc.loaded_fonts:
 *             return cc
 *         if _cc_add_font_file(cc, font_name_r):             # <<<<<<<<<<<<<<
 *             if PANGO_VERSION_CHECK(1, 38, 0):
 *                 # Older versions swap the FcConfig in _set_cc_options()
*/
    }

    /* "kivy/core/text/_text_pango.pyx":410
 *                 # Older versions swap the FcConfig in _set_cc_options()
 *                 pango_fc_font_map_config_changed(PANGO_FC_FONT_MAP(cc.fontmap))
 *         return cc             # <<<<<<<<<<<<<<
 * 
 *     cc = ContextContainer()
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_cc);
    __pyx_r = __pyx_v_cc;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":403
 *     # Check for cached context container
 *     cc = kivy_font_context_cache.get(font_context)
 *     if cc:             # <<<<<<<<<<<<<<
 *         if not font_name_r or font_name_r in cc.loaded_fonts:
 *             return cc
*/
  }

  /* "kivy/core/text/_text_pango.pyx":412
 *         return cc
 * 
 *     cc = ContextContainer()             # <<<<<<<<<<<<<<
 *     if not _cc_fc_config_create(cc, font_context):
 *         return  # warnings issued in function call
*/
  __pyx_t_4 = NULL;
  __pyx_t_5 = 1;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 412, __pyx_L1_error)
    __Pyx_GOTREF((PyObject *)__pyx_t_3);
  }
  __Pyx_DECREF_SET(__pyx_v_cc, ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_3));
  __pyx_t_3 = 0;

  /* "kivy/core/text/_text_pango.pyx":413
 * 
 *     cc = ContextContainer()
 *     if not _cc_fc_config_create(cc, font_context):             # <<<<<<<<<<<<<<
 *         return  # warnings issued in function call
 * 
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__cc_fc_config_create(__pyx_v_cc, __pyx_v_font_context); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 413, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_1);
  if (__pyx_t_6) {

    /* "kivy/core/text/_text_pango.pyx":414
 *     cc = ContextContainer()
 *     if not _cc_fc_config_create(cc, font_context):
 *         return  # warnings issued in function call             # <<<<<<<<<<<<<<
 * 
 *     # Add the specified font file to context, if any.
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":413
 * 
 *     cc = ContextContainer()
 *     if not _cc_fc_config_create(cc, font_context):             # <<<<<<<<<<<<<<
 *         return  # warnings issued in function call
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":417
 * 
 *     # Add the specified font file to context, if any.
 *     if font_name_r:             # <<<<<<<<<<<<<<
 *         _cc_add_font_file(cc, font_name_r)
 * 
*/
  if (__pyx_v_font_name_r == Py_None) __pyx_t_6 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_font_name_r);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 417, __pyx_L1_error)
    __pyx_t_6 = (__pyx_temp != 0);
  }

  if (__pyx_t_6) {

    /* "kivy/core/text/_text_pango.pyx":418
 *     # Add the specified font file to context, if any.
 *     if font_name_r:
 *         _cc_add_font_file(cc, font_name_r)             # <<<<<<<<<<<<<<
 * 
 *     # Font description is updated from options every time the cc is used.
*/
    __pyx_t_3 = __pyx_f_4kivy_4core_4text_11_text_pango__cc_add_font_file(__pyx_v_cc, __pyx_v_font_name_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":417
 * 
 *     # Add the specified font file to context, if any.
 *     if font_name_r:             # <<<<<<<<<<<<<<
 *         _cc_add_font_file(cc, font_name_r)
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":422
 *     # Font description is updated from options every time the cc is used.
 *     # (it represents an "ideal font", ie what you *want* to draw with)
 *     cc.fontdesc = pango_font_description_new()             # <<<<<<<<<<<<<<
 * 
 *     # Create font map and set its FcConfig if Pango supports it (v1.38+).
*/
  __pyx_v_cc->fontdesc = pango_font_description_new();

  /* "kivy/core/text/_text_pango.pyx":426
 *     # Create font map and set its FcConfig if Pango supports it (v1.38+).
 *     # Older versions swapping the current FcConfig in _set_cc_options()
 *     cc.fontmap = pango_ft2_font_map_new()             # <<<<<<<<<<<<<<
 *     if not cc.fontmap:
 *         Logger.warn("_text_pango: Could not create new font map")
*/
  __pyx_v_cc->fontmap = pango_ft2_font_map_new();

  /* "kivy/core/text/_text_pango.pyx":427
 *     # Older versions swapping the current FcConfig in _set_cc_options()
 *     cc.fontmap = pango_ft2_font_map_new()
 *     if not cc.fontmap:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create new font map")
 *         return
*/
  __pyx_t_6 = (!(__pyx_v_cc->fontmap != 0));
  if (__pyx_t_6) {

    /* "kivy/core/text/_text_pango.pyx":428
 *     cc.fontmap = pango_ft2_font_map_new()
 *     if not cc.fontmap:
 *         Logger.warn("_text_pango: Could not create new font map")             # <<<<<<<<<<<<<<
 *         return
 *     if PANGO_VERSION_CHECK(1, 38, 0):
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_8, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_create_new_2};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":429
 *     if not cc.fontmap:
 *         Logger.warn("_text_pango: Could not create new font map")
 *         return             # <<<<<<<<<<<<<<
 *     if PANGO_VERSION_CHECK(1, 38, 0):
 *         pango_fc_font_map_set_config(PANGO_FC_FONT_MAP(cc.fontmap), cc.fc_config)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":427
 *     # Older versions swapping the current FcConfig in _set_cc_options()
 *     cc.fontmap = pango_ft2_font_map_new()
 *     if not cc.fontmap:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create new font map")
 *         return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":430
 *         Logger.warn("_text_pango: Could not create new font map")
 *         return
 *     if PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *         pango_fc_font_map_set_config(PANGO_FC_FONT_MAP(cc.fontmap), cc.fc_config)
 *     # The default substitute function is used to apply some last-minute
*/
  __pyx_t_6 = (PANGO_VERSION_CHECK(1, 38, 0) != 0);
  if (__pyx_t_6) {

    /* "kivy/core/text/_text_pango.pyx":431
 *         return
 *     if PANGO_VERSION_CHECK(1, 38, 0):
 *         pango_fc_font_map_set_config(PANGO_FC_FONT_MAP(cc.fontmap), cc.fc_config)             # <<<<<<<<<<<<<<
 *     # The default substitute function is used to apply some last-minute
 *     # options to FontConfig pattern.
*/
    pango_fc_font_map_set_config(PANGO_FC_FONT_MAP(__pyx_v_cc->fontmap), __pyx_v_cc->fc_config);

    /* "kivy/core/text/_text_pango.pyx":430
 *         Logger.warn("_text_pango: Could not create new font map")
 *         return
 *     if PANGO_VERSION_CHECK(1, 38, 0):             # <<<<<<<<<<<<<<
 *         pango_fc_font_map_set_config(PANGO_FC_FONT_MAP(cc.fontmap), cc.fc_config)
 *     # The default substitute function is used to apply some last-minute
*/
  }

  /* "kivy/core/text/_text_pango.pyx":434
 *     # The default substitute function is used to apply some last-minute
 *     # options to FontConfig pattern.
 *     pango_ft2_font_map_set_default_substitute(PANGO_FT2_FONT_MAP(cc.fontmap),             # <<<<<<<<<<<<<<
 *                 &_ft2subst_callback, <gpointer>&cc.ft2subst_callback_data, NULL)
 * 
*/
  pango_ft2_font_map_set_default_substitute(PANGO_FT2_FONT_MAP(__pyx_v_cc->fontmap), (&__pyx_f_4kivy_4core_4text_11_text_pango__ft2subst_callback), ((gpointer)(&__pyx_v_cc->ft2subst_callback_data)), NULL);

  /* "kivy/core/text/_text_pango.pyx":437
 *                 &_ft2subst_callback, <gpointer>&cc.ft2subst_callback_data, NULL)
 * 
 *     cc.context = _pango_font_map_create_context(cc.fontmap)             # <<<<<<<<<<<<<<
 *     if not cc.context:
 *         Logger.warn("_text_pango: Could not create pango context")
*/
  __pyx_v_cc->context = _pango_font_map_create_context(__pyx_v_cc->fontmap);

  /* "kivy/core/text/_text_pango.pyx":438
 * 
 *     cc.context = _pango_font_map_create_context(cc.fontmap)
 *     if not cc.context:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create pango context")
 *         return
*/
  __pyx_t_6 = (!(__pyx_v_cc->context != 0));
  if (__pyx_t_6) {

    /* "kivy/core/text/_text_pango.pyx":439
 *     cc.context = _pango_font_map_create_context(cc.fontmap)
 *     if not cc.context:
 *         Logger.warn("_text_pango: Could not create pango context")             # <<<<<<<<<<<<<<
 *         return
 * 
*/
    __pyx_t_8 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      assert(__pyx_t_8);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_create_pan};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":440
 *     if not cc.context:
 *         Logger.warn("_text_pango: Could not create pango context")
 *         return             # <<<<<<<<<<<<<<
 * 
 *     cc.layout = pango_layout_new(cc.context)
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":438
 * 
 *     cc.context = _pango_font_map_create_context(cc.fontmap)
 *     if not cc.context:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create pango context")
 *         return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":442
 *         return
 * 
 *     cc.layout = pango_layout_new(cc.context)             # <<<<<<<<<<<<<<
 *     if not cc.layout:
 *         Logger.warn("_text_pango: Could not create pango layout")
*/
  __pyx_v_cc->layout = pango_layout_new(__pyx_v_cc->context);

  /* "kivy/core/text/_text_pango.pyx":443
 * 
 *     cc.layout = pango_layout_new(cc.context)
 *     if not cc.layout:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create pango layout")
 *         return
*/
  __pyx_t_6 = (!(__pyx_v_cc->layout != 0));
  if (__pyx_t_6) {

    /* "kivy/core/text/_text_pango.pyx":444
 *     cc.layout = pango_layout_new(cc.context)
 *     if not cc.layout:
 *         Logger.warn("_text_pango: Could not create pango layout")             # <<<<<<<<<<<<<<
 *         return
 * 
*/
    __pyx_t_7 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 444, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_7);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_5 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_create_pan_2};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":445
 *     if not cc.layout:
 *         Logger.warn("_text_pango: Could not create pango layout")
 *         return             # <<<<<<<<<<<<<<
 * 
 *     kivy_font_context_cache[font_context] = cc
*/
    __Pyx_XDECREF((PyObject *)__pyx_r);
    __pyx_r = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)Py_None); __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":443
 * 
 *     cc.layout = pango_layout_new(cc.context)
 *     if not cc.layout:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not create pango layout")
 *         return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":447
 *         return
 * 
 *     kivy_font_context_cache[font_context] = cc             # <<<<<<<<<<<<<<
 *     if isolated:
 *         _purge_ordered_cache(kivy_font_context_cache, kivy_isolated_cache_order, 128)
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 447, __pyx_L1_error)
  }
  if (unlikely((PyDict_SetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, __pyx_v_font_context, ((PyObject *)__pyx_v_cc)) < 0))) __PYX_ERR(0, 447, __pyx_L1_error)

  /* "kivy/core/text/_text_pango.pyx":448
 * 
 *     kivy_font_context_cache[font_context] = cc
 *     if isolated:             # <<<<<<<<<<<<<<
 *         _purge_ordered_cache(kivy_font_context_cache, kivy_isolated_cache_order, 128)
 *         kivy_isolated_cache_order.append(font_name_r)
*/
  if (__pyx_v_isolated) {

    /* "kivy/core/text/_text_pango.pyx":449
 *     kivy_font_context_cache[font_context] = cc
 *     if isolated:
 *         _purge_ordered_cache(kivy_font_context_cache, kivy_isolated_cache_order, 128)             # <<<<<<<<<<<<<<
 *         kivy_isolated_cache_order.append(font_name_r)
 *     return cc
*/
    __pyx_t_3 = __pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = __pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_f_4kivy_4core_4text_11_text_pango__purge_ordered_cache(((PyObject*)__pyx_t_3), ((PyObject*)__pyx_t_4), 0x80); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "kivy/core/text/_text_pango.pyx":450
 *     if isolated:
 *         _purge_ordered_cache(kivy_font_context_cache, kivy_isolated_cache_order, 128)
 *         kivy_isolated_cache_order.append(font_name_r)             # <<<<<<<<<<<<<<
 *     return cc
 * 
*/
    if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(0, 450, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order, __pyx_v_font_name_r); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 450, __pyx_L1_error)

    /* "kivy/core/text/_text_pango.pyx":448
 * 
 *     kivy_font_context_cache[font_context] = cc
 *     if isolated:             # <<<<<<<<<<<<<<
 *         _purge_ordered_cache(kivy_font_context_cache, kivy_isolated_cache_order, 128)
 *         kivy_isolated_cache_order.append(font_name_r)
*/
  }

  /* "kivy/core/text/_text_pango.pyx":451
 *         _purge_ordered_cache(kivy_font_context_cache, kivy_isolated_cache_order, 128)
 *         kivy_isolated_cache_order.append(font_name_r)
 *     return cc             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_cc);
  __pyx_r = __pyx_v_cc;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":388
 * # font_name_r can optionally be specified to load the font on top of existing
 * # fonts (for example provided by system:// or directory://)
 * cdef ContextContainer _get_or_create_cc(bytes font_context, bytes font_name_r):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kivy_isolated_cache_order
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("kivy.core.text._text_pango._get_or_create_cc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XDECREF(__pyx_v_font_context);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":454
 * 
 * 
 * cdef inline ContextContainer _get_or_create_cc_from_options(dict options):             # <<<<<<<<<<<<<<
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])
 *     cdef bytes font_context = _byte_option(options['font_context'])
*/

static CYTHON_INLINE struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc_from_options(PyObject *__pyx_v_options) {
  PyObject *__pyx_v_font_name_r = 0;
  PyObject *__pyx_v_font_context = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_or_create_cc_from_options", 0);

  /* "kivy/core/text/_text_pango.pyx":455
 * 
 * cdef inline ContextContainer _get_or_create_cc_from_options(dict options):
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])             # <<<<<<<<<<<<<<
 *     cdef bytes font_context = _byte_option(options['font_context'])
 *     return _get_or_create_cc(font_context, font_name_r)
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 455, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_font_name_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":456
 * cdef inline ContextContainer _get_or_create_cc_from_options(dict options):
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])
 *     cdef bytes font_context = _byte_option(options['font_context'])             # <<<<<<<<<<<<<<
 *     return _get_or_create_cc(font_context, font_name_r)
 * 
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 456, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_font_context = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":457
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])
 *     cdef bytes font_context = _byte_option(options['font_context'])
 *     return _get_or_create_cc(font_context, font_name_r)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF((PyObject *)__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc(__pyx_v_font_context, __pyx_v_font_name_r)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":454
 * 
 * 
 * cdef inline ContextContainer _get_or_create_cc_from_options(dict options):             # <<<<<<<<<<<<<<
 *     cdef bytes font_name_r = _byte_option(options['font_name_r'])
 *     cdef bytes font_context = _byte_option(options['font_context'])
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango._get_or_create_cc_from_options", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_font_name_r);
  __Pyx_XDECREF(__pyx_v_font_context);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":466
 * else:
 *     RSHIFT = 24; GSHIFT = 16; BSHIFT = 8;  ASHIFT = 0
 * @cython.cdivision(True)             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
*/

static void __pyx_f_4kivy_4core_4text_11_text_pango__render_layout(PangoLayout *__pyx_v_layout, unsigned char *__pyx_v_dstbuf, int __pyx_v_dstbuf_w, int __pyx_v_dstbuf_h, int __pyx_v_x, int __pyx_v_y, unsigned char __pyx_v_R, unsigned char __pyx_v_G, unsigned char __pyx_v_B, unsigned char __pyx_v_A) {
  int __pyx_v_layout_w;
  int __pyx_v_layout_h;
  int __pyx_v_w;
  int __pyx_v_h;
  int __pyx_v_clip_x_min;
  int __pyx_v_clip_y_min;
  FT_Bitmap __pyx_v_bitmap;
  int __pyx_v_xi;
  int __pyx_v_yi;
  unsigned char __pyx_v_graysrc;
  unsigned long __pyx_v_grayidx;
  unsigned long __pyx_v_yi_w;
  unsigned long __pyx_v_offset;
  unsigned long __pyx_v_offset_fixed;
  unsigned long __pyx_v_offset_yi;
  unsigned long __pyx_v_maxpos;
  uint32_t __pyx_v_col;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  size_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int __pyx_t_19;
  int __pyx_t_20;
  int __pyx_t_21;
  int __pyx_t_22;
  int __pyx_t_23;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyGILState_STATE __pyx_gilstate_save;
  __Pyx_RefNannySetupContext("_render_layout", 1);

  /* "kivy/core/text/_text_pango.pyx":481
 *     #         '--> '----------------------------------------------' <--'
 *     #              <---------------- dstbuf_w -------------------->
 *     if not dstbuf or dstbuf_w <= 0 or dstbuf_h <= 0 or x > dstbuf_w or y > dstbuf_h:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: _cc_render() with invalid arguments, "
*/
  __pyx_t_2 = (!(__pyx_v_dstbuf != 0));
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dstbuf_w <= 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_dstbuf_h <= 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_x > __pyx_v_dstbuf_w);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_y > __pyx_v_dstbuf_h);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":482
 *     #              <---------------- dstbuf_w -------------------->
 *     if not dstbuf or dstbuf_w <= 0 or dstbuf_h <= 0 or x > dstbuf_w or y > dstbuf_h:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: _cc_render() with invalid arguments, "
 *                         "this usually means text layout could not fit text within user-"
*/
    {
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        /*try:*/ {

          /* "kivy/core/text/_text_pango.pyx":483
 *     if not dstbuf or dstbuf_w <= 0 or dstbuf_h <= 0 or x > dstbuf_w or y > dstbuf_h:
 *         with gil:
 *             Logger.warn("_text_pango: _cc_render() with invalid arguments, "             # <<<<<<<<<<<<<<
 *                         "this usually means text layout could not fit text within user-"
 *                         "specified constraints: dstbuf size={}x{}, x={}, y={}"
*/
          __pyx_t_4 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 483, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 483, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "kivy/core/text/_text_pango.pyx":486
 *                         "this usually means text layout could not fit text within user-"
 *                         "specified constraints: dstbuf size={}x{}, x={}, y={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y))             # <<<<<<<<<<<<<<
 *             return
 * 
*/
          __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_text_pango__cc_render_with_inva;
          __Pyx_INCREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_dstbuf_w); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 486, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_dstbuf_h); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 486, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_x); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 486, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_y); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 486, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = 0;
          {
            PyObject *__pyx_callargs[5] = {__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11};
            __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_12, (5-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_4);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "kivy/core/text/_text_pango.pyx":487
 *                         "specified constraints: dstbuf size={}x{}, x={}, y={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y))
 *             return             # <<<<<<<<<<<<<<
 * 
 *     cdef int layout_w, layout_h
*/
          goto __pyx_L9_return;
        }

        /* "kivy/core/text/_text_pango.pyx":482
 *     #              <---------------- dstbuf_w -------------------->
 *     if not dstbuf or dstbuf_w <= 0 or dstbuf_h <= 0 or x > dstbuf_w or y > dstbuf_h:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: _cc_render() with invalid arguments, "
 *                         "this usually means text layout could not fit text within user-"
*/
        /*finally:*/ {
          __pyx_L9_return: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L0;
          }
          __pyx_L10_error: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L1_error;
          }
        }
    }

    /* "kivy/core/text/_text_pango.pyx":481
 *     #         '--> '----------------------------------------------' <--'
 *     #              <---------------- dstbuf_w -------------------->
 *     if not dstbuf or dstbuf_w <= 0 or dstbuf_h <= 0 or x > dstbuf_w or y > dstbuf_h:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: _cc_render() with invalid arguments, "
*/
  }

  /* "kivy/core/text/_text_pango.pyx":490
 * 
 *     cdef int layout_w, layout_h
 *     pango_layout_get_pixel_size(layout, &layout_w, &layout_h)             # <<<<<<<<<<<<<<
 * 
 *     # If the bitmap is partially outside dstbuf, clip + blit a smaller area
*/
  pango_layout_get_pixel_size(__pyx_v_layout, (&__pyx_v_layout_w), (&__pyx_v_layout_h));

  /* "kivy/core/text/_text_pango.pyx":493
 * 
 *     # If the bitmap is partially outside dstbuf, clip + blit a smaller area
 *     cdef int w = layout_w, h = layout_h             # <<<<<<<<<<<<<<
 *     cdef int clip_x_min = 0, clip_y_min = 0
 *     if x < 0:
*/
  __pyx_v_w = __pyx_v_layout_w;
  __pyx_v_h = __pyx_v_layout_h;

  /* "kivy/core/text/_text_pango.pyx":494
 *     # If the bitmap is partially outside dstbuf, clip + blit a smaller area
 *     cdef int w = layout_w, h = layout_h
 *     cdef int clip_x_min = 0, clip_y_min = 0             # <<<<<<<<<<<<<<
 *     if x < 0:
 *         clip_x_min = -x
*/
  __pyx_v_clip_x_min = 0;
  __pyx_v_clip_y_min = 0;

  /* "kivy/core/text/_text_pango.pyx":495
 *     cdef int w = layout_w, h = layout_h
 *     cdef int clip_x_min = 0, clip_y_min = 0
 *     if x < 0:             # <<<<<<<<<<<<<<
 *         clip_x_min = -x
 *         w -= clip_x_min
*/
  __pyx_t_1 = (__pyx_v_x < 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":496
 *     cdef int clip_x_min = 0, clip_y_min = 0
 *     if x < 0:
 *         clip_x_min = -x             # <<<<<<<<<<<<<<
 *         w -= clip_x_min
 *         x = 0
*/
    __pyx_v_clip_x_min = (-__pyx_v_x);

    /* "kivy/core/text/_text_pango.pyx":497
 *     if x < 0:
 *         clip_x_min = -x
 *         w -= clip_x_min             # <<<<<<<<<<<<<<
 *         x = 0
 *     if y < 0:
*/
    __pyx_v_w = (__pyx_v_w - __pyx_v_clip_x_min);

    /* "kivy/core/text/_text_pango.pyx":498
 *         clip_x_min = -x
 *         w -= clip_x_min
 *         x = 0             # <<<<<<<<<<<<<<
 *     if y < 0:
 *         clip_y_min = -y
*/
    __pyx_v_x = 0;

    /* "kivy/core/text/_text_pango.pyx":495
 *     cdef int w = layout_w, h = layout_h
 *     cdef int clip_x_min = 0, clip_y_min = 0
 *     if x < 0:             # <<<<<<<<<<<<<<
 *         clip_x_min = -x
 *         w -= clip_x_min
*/
  }

  /* "kivy/core/text/_text_pango.pyx":499
 *         w -= clip_x_min
 *         x = 0
 *     if y < 0:             # <<<<<<<<<<<<<<
 *         clip_y_min = -y
 *         h -= clip_y_min
*/
  __pyx_t_1 = (__pyx_v_y < 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":500
 *         x = 0
 *     if y < 0:
 *         clip_y_min = -y             # <<<<<<<<<<<<<<
 *         h -= clip_y_min
 *         y = 0
*/
    __pyx_v_clip_y_min = (-__pyx_v_y);

    /* "kivy/core/text/_text_pango.pyx":501
 *     if y < 0:
 *         clip_y_min = -y
 *         h -= clip_y_min             # <<<<<<<<<<<<<<
 *         y = 0
 *     if x + w > dstbuf_w:
*/
    __pyx_v_h = (__pyx_v_h - __pyx_v_clip_y_min);

    /* "kivy/core/text/_text_pango.pyx":502
 *         clip_y_min = -y
 *         h -= clip_y_min
 *         y = 0             # <<<<<<<<<<<<<<
 *     if x + w > dstbuf_w:
 *         w -= x + w - dstbuf_w
*/
    __pyx_v_y = 0;

    /* "kivy/core/text/_text_pango.pyx":499
 *         w -= clip_x_min
 *         x = 0
 *     if y < 0:             # <<<<<<<<<<<<<<
 *         clip_y_min = -y
 *         h -= clip_y_min
*/
  }

  /* "kivy/core/text/_text_pango.pyx":503
 *         h -= clip_y_min
 *         y = 0
 *     if x + w > dstbuf_w:             # <<<<<<<<<<<<<<
 *         w -= x + w - dstbuf_w
 *     if y + h > dstbuf_h:
*/
  __pyx_t_1 = ((__pyx_v_x + __pyx_v_w) > __pyx_v_dstbuf_w);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":504
 *         y = 0
 *     if x + w > dstbuf_w:
 *         w -= x + w - dstbuf_w             # <<<<<<<<<<<<<<
 *     if y + h > dstbuf_h:
 *         h -= y + h - dstbuf_h
*/
    __pyx_v_w = (__pyx_v_w - ((__pyx_v_x + __pyx_v_w) - __pyx_v_dstbuf_w));

    /* "kivy/core/text/_text_pango.pyx":503
 *         h -= clip_y_min
 *         y = 0
 *     if x + w > dstbuf_w:             # <<<<<<<<<<<<<<
 *         w -= x + w - dstbuf_w
 *     if y + h > dstbuf_h:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":505
 *     if x + w > dstbuf_w:
 *         w -= x + w - dstbuf_w
 *     if y + h > dstbuf_h:             # <<<<<<<<<<<<<<
 *         h -= y + h - dstbuf_h
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:
*/
  __pyx_t_1 = ((__pyx_v_y + __pyx_v_h) > __pyx_v_dstbuf_h);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":506
 *         w -= x + w - dstbuf_w
 *     if y + h > dstbuf_h:
 *         h -= y + h - dstbuf_h             # <<<<<<<<<<<<<<
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:
 *         with gil:
*/
    __pyx_v_h = (__pyx_v_h - ((__pyx_v_y + __pyx_v_h) - __pyx_v_dstbuf_h));

    /* "kivy/core/text/_text_pango.pyx":505
 *     if x + w > dstbuf_w:
 *         w -= x + w - dstbuf_w
 *     if y + h > dstbuf_h:             # <<<<<<<<<<<<<<
 *         h -= y + h - dstbuf_h
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:
*/
  }

  /* "kivy/core/text/_text_pango.pyx":507
 *     if y + h > dstbuf_h:
 *         h -= y + h - dstbuf_h
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: Invalid blit: dstbuf size={}x{}, "
*/
  __pyx_t_2 = (__pyx_v_w <= 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_h <= 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_x + __pyx_v_w) > __pyx_v_dstbuf_w);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_y + __pyx_v_h) > __pyx_v_dstbuf_h);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L17_bool_binop_done:;
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":508
 *         h -= y + h - dstbuf_h
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Invalid blit: dstbuf size={}x{}, "
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}"
*/
    {
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        /*try:*/ {

          /* "kivy/core/text/_text_pango.pyx":509
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:
 *         with gil:
 *             Logger.warn("_text_pango: Invalid blit: dstbuf size={}x{}, "             # <<<<<<<<<<<<<<
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y, clip_x_min, w, clip_y_min, h))
*/
          __pyx_t_6 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 509, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 509, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "kivy/core/text/_text_pango.pyx":511
 *             Logger.warn("_text_pango: Invalid blit: dstbuf size={}x{}, "
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y, clip_x_min, w, clip_y_min, h))             # <<<<<<<<<<<<<<
 *             return
 * 
*/
          __pyx_t_11 = __pyx_mstate_global->__pyx_kp_u_text_pango_Invalid_blit_dstbuf;
          __Pyx_INCREF(__pyx_t_11);
          __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_dstbuf_w); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_dstbuf_h); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_clip_x_min); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_w); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_clip_y_min); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_16 = __Pyx_PyLong_From_int(__pyx_v_h); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 511, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_12 = 0;
          {
            PyObject *__pyx_callargs[9] = {__pyx_t_11, __pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16};
            __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_12, (9-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 511, __pyx_L22_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
            assert(__pyx_t_6);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L22_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "kivy/core/text/_text_pango.pyx":512
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y, clip_x_min, w, clip_y_min, h))
 *             return             # <<<<<<<<<<<<<<
 * 
 *     cdef FT_Bitmap bitmap
*/
          goto __pyx_L21_return;
        }

        /* "kivy/core/text/_text_pango.pyx":508
 *         h -= y + h - dstbuf_h
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Invalid blit: dstbuf size={}x{}, "
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}"
*/
        /*finally:*/ {
          __pyx_L21_return: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L0;
          }
          __pyx_L22_error: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L1_error;
          }
        }
    }

    /* "kivy/core/text/_text_pango.pyx":507
 *     if y + h > dstbuf_h:
 *         h -= y + h - dstbuf_h
 *     if w <= 0 or h <= 0 or x + w > dstbuf_w or y + h > dstbuf_h:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: Invalid blit: dstbuf size={}x{}, "
*/
  }

  /* "kivy/core/text/_text_pango.pyx":520
 *     cdef unsigned long yi_w
 *     cdef unsigned long offset
 *     cdef unsigned long offset_fixed = x + (y * dstbuf_w)             # <<<<<<<<<<<<<<
 *     cdef unsigned long offset_yi = dstbuf_w - w
 *     cdef unsigned long maxpos = dstbuf_w * dstbuf_h
*/
  __pyx_v_offset_fixed = (__pyx_v_x + (__pyx_v_y * __pyx_v_dstbuf_w));

  /* "kivy/core/text/_text_pango.pyx":521
 *     cdef unsigned long offset
 *     cdef unsigned long offset_fixed = x + (y * dstbuf_w)
 *     cdef unsigned long offset_yi = dstbuf_w - w             # <<<<<<<<<<<<<<
 *     cdef unsigned long maxpos = dstbuf_w * dstbuf_h
 * 
*/
  __pyx_v_offset_yi = (__pyx_v_dstbuf_w - __pyx_v_w);

  /* "kivy/core/text/_text_pango.pyx":522
 *     cdef unsigned long offset_fixed = x + (y * dstbuf_w)
 *     cdef unsigned long offset_yi = dstbuf_w - w
 *     cdef unsigned long maxpos = dstbuf_w * dstbuf_h             # <<<<<<<<<<<<<<
 * 
 *     # Sanity check that we don't go out of bounds here, should not happen
*/
  __pyx_v_maxpos = (__pyx_v_dstbuf_w * __pyx_v_dstbuf_h);

  /* "kivy/core/text/_text_pango.pyx":525
 * 
 *     # Sanity check that we don't go out of bounds here, should not happen
 *     if offset_fixed + ((h-1)*offset_yi) + ((h-1)*w) + w - 1 > maxpos:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: Ignoring out of bounds blit: dstbuf size={}x{}, "
*/
  __pyx_t_1 = (((((__pyx_v_offset_fixed + ((__pyx_v_h - 1) * __pyx_v_offset_yi)) + ((__pyx_v_h - 1) * __pyx_v_w)) + __pyx_v_w) - 1) > __pyx_v_maxpos);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":526
 *     # Sanity check that we don't go out of bounds here, should not happen
 *     if offset_fixed + ((h-1)*offset_yi) + ((h-1)*w) + w - 1 > maxpos:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Ignoring out of bounds blit: dstbuf size={}x{}, "
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}, maxpos={}"
*/
    {
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        /*try:*/ {

          /* "kivy/core/text/_text_pango.pyx":527
 *     if offset_fixed + ((h-1)*offset_yi) + ((h-1)*w) + w - 1 > maxpos:
 *         with gil:
 *             Logger.warn("_text_pango: Ignoring out of bounds blit: dstbuf size={}x{}, "             # <<<<<<<<<<<<<<
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}, maxpos={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y, clip_x_min, w, clip_y_min, h, maxpos))
*/
          __pyx_t_4 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 527, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "kivy/core/text/_text_pango.pyx":529
 *             Logger.warn("_text_pango: Ignoring out of bounds blit: dstbuf size={}x{}, "
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}, maxpos={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y, clip_x_min, w, clip_y_min, h, maxpos))             # <<<<<<<<<<<<<<
 *             return
 * 
*/
          __pyx_t_16 = __pyx_mstate_global->__pyx_kp_u_text_pango_Ignoring_out_of_boun;
          __Pyx_INCREF(__pyx_t_16);
          __pyx_t_15 = __Pyx_PyLong_From_int(__pyx_v_dstbuf_w); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_14 = __Pyx_PyLong_From_int(__pyx_v_dstbuf_h); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyLong_From_int(__pyx_v_x); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_y); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_clip_x_min); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_w); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = __Pyx_PyLong_From_int(__pyx_v_clip_y_min); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_h); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_17 = __Pyx_PyLong_From_unsigned_long(__pyx_v_maxpos); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 529, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_17);
          __pyx_t_12 = 0;
          {
            PyObject *__pyx_callargs[10] = {__pyx_t_16, __pyx_t_15, __pyx_t_14, __pyx_t_13, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_17};
            __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_12, (10-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_5);
          }
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
            assert(__pyx_t_4);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "kivy/core/text/_text_pango.pyx":530
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}, maxpos={}"
 *                         .format(dstbuf_w, dstbuf_h, x, y, clip_x_min, w, clip_y_min, h, maxpos))
 *             return             # <<<<<<<<<<<<<<
 * 
 *     # Prepare ft2 bitmap for pango's grayscale data
*/
          goto __pyx_L25_return;
        }

        /* "kivy/core/text/_text_pango.pyx":526
 *     # Sanity check that we don't go out of bounds here, should not happen
 *     if offset_fixed + ((h-1)*offset_yi) + ((h-1)*w) + w - 1 > maxpos:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Ignoring out of bounds blit: dstbuf size={}x{}, "
 *                         "x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}, maxpos={}"
*/
        /*finally:*/ {
          __pyx_L25_return: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L0;
          }
          __pyx_L26_error: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L1_error;
          }
        }
    }

    /* "kivy/core/text/_text_pango.pyx":525
 * 
 *     # Sanity check that we don't go out of bounds here, should not happen
 *     if offset_fixed + ((h-1)*offset_yi) + ((h-1)*w) + w - 1 > maxpos:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: Ignoring out of bounds blit: dstbuf size={}x{}, "
*/
  }

  /* "kivy/core/text/_text_pango.pyx":534
 *     # Prepare ft2 bitmap for pango's grayscale data
 *     # In ft2 2.5 and older, function is called FT_Bitmap_New
 *     if FREETYPE_MAJOR == 2:             # <<<<<<<<<<<<<<
 *         if FREETYPE_MINOR <= 5:
 *             FT_Bitmap_New(&bitmap)
*/
  __pyx_t_1 = (FREETYPE_MAJOR == 2);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":535
 *     # In ft2 2.5 and older, function is called FT_Bitmap_New
 *     if FREETYPE_MAJOR == 2:
 *         if FREETYPE_MINOR <= 5:             # <<<<<<<<<<<<<<
 *             FT_Bitmap_New(&bitmap)
 *         else:
*/
    __pyx_t_1 = (FREETYPE_MINOR <= 5);
    if (__pyx_t_1) {

      /* "kivy/core/text/_text_pango.pyx":536
 *     if FREETYPE_MAJOR == 2:
 *         if FREETYPE_MINOR <= 5:
 *             FT_Bitmap_New(&bitmap)             # <<<<<<<<<<<<<<
 *         else:
 *             FT_Bitmap_Init(&bitmap)
*/
      FT_Bitmap_New((&__pyx_v_bitmap));

      /* "kivy/core/text/_text_pango.pyx":535
 *     # In ft2 2.5 and older, function is called FT_Bitmap_New
 *     if FREETYPE_MAJOR == 2:
 *         if FREETYPE_MINOR <= 5:             # <<<<<<<<<<<<<<
 *             FT_Bitmap_New(&bitmap)
 *         else:
*/
      goto __pyx_L29;
    }

    /* "kivy/core/text/_text_pango.pyx":538
 *             FT_Bitmap_New(&bitmap)
 *         else:
 *             FT_Bitmap_Init(&bitmap)             # <<<<<<<<<<<<<<
 *     else:
 *         with gil:
*/
    /*else*/ {
      FT_Bitmap_Init((&__pyx_v_bitmap));
    }
    __pyx_L29:;

    /* "kivy/core/text/_text_pango.pyx":534
 *     # Prepare ft2 bitmap for pango's grayscale data
 *     # In ft2 2.5 and older, function is called FT_Bitmap_New
 *     if FREETYPE_MAJOR == 2:             # <<<<<<<<<<<<<<
 *         if FREETYPE_MINOR <= 5:
 *             FT_Bitmap_New(&bitmap)
*/
    goto __pyx_L28;
  }

  /* "kivy/core/text/_text_pango.pyx":540
 *             FT_Bitmap_Init(&bitmap)
 *     else:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Unsupported FreeType library version. "
 *                         "Abort rendering.")
*/
  /*else*/ {
    {
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        /*try:*/ {

          /* "kivy/core/text/_text_pango.pyx":541
 *     else:
 *         with gil:
 *             Logger.warn("_text_pango: Unsupported FreeType library version. "             # <<<<<<<<<<<<<<
 *                         "Abort rendering.")
 *             return
*/
          __pyx_t_6 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 541, __pyx_L31_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 541, __pyx_L31_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
            assert(__pyx_t_6);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_text_pango_Unsupported_FreeType};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L31_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "kivy/core/text/_text_pango.pyx":543
 *             Logger.warn("_text_pango: Unsupported FreeType library version. "
 *                         "Abort rendering.")
 *             return             # <<<<<<<<<<<<<<
 * 
 *     bitmap.width = layout_w
*/
          goto __pyx_L30_return;
        }

        /* "kivy/core/text/_text_pango.pyx":540
 *             FT_Bitmap_Init(&bitmap)
 *     else:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Unsupported FreeType library version. "
 *                         "Abort rendering.")
*/
        /*finally:*/ {
          __pyx_L30_return: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L0;
          }
          __pyx_L31_error: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L1_error;
          }
        }
    }
  }
  __pyx_L28:;

  /* "kivy/core/text/_text_pango.pyx":545
 *             return
 * 
 *     bitmap.width = layout_w             # <<<<<<<<<<<<<<
 *     bitmap.rows = layout_h
 *     bitmap.pitch = layout_w # 1-byte grayscale
*/
  __pyx_v_bitmap.width = __pyx_v_layout_w;

  /* "kivy/core/text/_text_pango.pyx":546
 * 
 *     bitmap.width = layout_w
 *     bitmap.rows = layout_h             # <<<<<<<<<<<<<<
 *     bitmap.pitch = layout_w # 1-byte grayscale
 *     bitmap.pixel_mode = FT_PIXEL_MODE_GRAY # no BGRA in pango (ft2 has it)
*/
  __pyx_v_bitmap.rows = __pyx_v_layout_h;

  /* "kivy/core/text/_text_pango.pyx":547
 *     bitmap.width = layout_w
 *     bitmap.rows = layout_h
 *     bitmap.pitch = layout_w # 1-byte grayscale             # <<<<<<<<<<<<<<
 *     bitmap.pixel_mode = FT_PIXEL_MODE_GRAY # no BGRA in pango (ft2 has it)
 *     bitmap.num_grays = 256
*/
  __pyx_v_bitmap.pitch = __pyx_v_layout_w;

  /* "kivy/core/text/_text_pango.pyx":548
 *     bitmap.rows = layout_h
 *     bitmap.pitch = layout_w # 1-byte grayscale
 *     bitmap.pixel_mode = FT_PIXEL_MODE_GRAY # no BGRA in pango (ft2 has it)             # <<<<<<<<<<<<<<
 *     bitmap.num_grays = 256
 *     bitmap.buffer = <unsigned char *>g_malloc0(layout_w * layout_h)
*/
  __pyx_v_bitmap.pixel_mode = FT_PIXEL_MODE_GRAY;

  /* "kivy/core/text/_text_pango.pyx":549
 *     bitmap.pitch = layout_w # 1-byte grayscale
 *     bitmap.pixel_mode = FT_PIXEL_MODE_GRAY # no BGRA in pango (ft2 has it)
 *     bitmap.num_grays = 256             # <<<<<<<<<<<<<<
 *     bitmap.buffer = <unsigned char *>g_malloc0(layout_w * layout_h)
 *     if not bitmap.buffer:
*/
  __pyx_v_bitmap.num_grays = 0x100;

  /* "kivy/core/text/_text_pango.pyx":550
 *     bitmap.pixel_mode = FT_PIXEL_MODE_GRAY # no BGRA in pango (ft2 has it)
 *     bitmap.num_grays = 256
 *     bitmap.buffer = <unsigned char *>g_malloc0(layout_w * layout_h)             # <<<<<<<<<<<<<<
 *     if not bitmap.buffer:
 *         with gil:
*/
  __pyx_v_bitmap.buffer = ((unsigned char *)g_malloc0((__pyx_v_layout_w * __pyx_v_layout_h)));

  /* "kivy/core/text/_text_pango.pyx":551
 *     bitmap.num_grays = 256
 *     bitmap.buffer = <unsigned char *>g_malloc0(layout_w * layout_h)
 *     if not bitmap.buffer:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: Could not malloc FT_Bitmap.buffer")
*/
  __pyx_t_1 = (!(__pyx_v_bitmap.buffer != 0));
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":552
 *     bitmap.buffer = <unsigned char *>g_malloc0(layout_w * layout_h)
 *     if not bitmap.buffer:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Could not malloc FT_Bitmap.buffer")
 *             return
*/
    {
        PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
        /*try:*/ {

          /* "kivy/core/text/_text_pango.pyx":553
 *     if not bitmap.buffer:
 *         with gil:
 *             Logger.warn("_text_pango: Could not malloc FT_Bitmap.buffer")             # <<<<<<<<<<<<<<
 *             return
 * 
*/
          __pyx_t_4 = NULL;
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 553, __pyx_L35_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 553, __pyx_L35_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_12 = 1;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
            assert(__pyx_t_4);
            PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(__pyx__function);
            __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
            __pyx_t_12 = 0;
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_malloc_FT};
            __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "kivy/core/text/_text_pango.pyx":554
 *         with gil:
 *             Logger.warn("_text_pango: Could not malloc FT_Bitmap.buffer")
 *             return             # <<<<<<<<<<<<<<
 * 
 *     # Render the layout as 1 byte per pixel grayscale bitmap
*/
          goto __pyx_L34_return;
        }

        /* "kivy/core/text/_text_pango.pyx":552
 *     bitmap.buffer = <unsigned char *>g_malloc0(layout_w * layout_h)
 *     if not bitmap.buffer:
 *         with gil:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Could not malloc FT_Bitmap.buffer")
 *             return
*/
        /*finally:*/ {
          __pyx_L34_return: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L0;
          }
          __pyx_L35_error: {
            __Pyx_PyGILState_Release(__pyx_gilstate_save);
            goto __pyx_L1_error;
          }
        }
    }

    /* "kivy/core/text/_text_pango.pyx":551
 *     bitmap.num_grays = 256
 *     bitmap.buffer = <unsigned char *>g_malloc0(layout_w * layout_h)
 *     if not bitmap.buffer:             # <<<<<<<<<<<<<<
 *         with gil:
 *             Logger.warn("_text_pango: Could not malloc FT_Bitmap.buffer")
*/
  }

  /* "kivy/core/text/_text_pango.pyx":558
 *     # Render the layout as 1 byte per pixel grayscale bitmap
 *     # FIXME: does render_layout_subpixel() do us any good?
 *     pango_ft2_render_layout(&bitmap, layout, 0, 0)             # <<<<<<<<<<<<<<
 * 
 *     # Blit the bitmap as RGBA at x, y in dstbuf (w/h is the clipped ft2 bitmap)
*/
  pango_ft2_render_layout((&__pyx_v_bitmap), __pyx_v_layout, 0, 0);

  /* "kivy/core/text/_text_pango.pyx":561
 * 
 *     # Blit the bitmap as RGBA at x, y in dstbuf (w/h is the clipped ft2 bitmap)
 *     cdef uint32_t col = R << RSHIFT | G << GSHIFT | B << BSHIFT             # <<<<<<<<<<<<<<
 *     for yi in range(clip_y_min, h):
 *         offset = offset_fixed + (yi * offset_yi)
*/
  __pyx_v_col = (((__pyx_v_R << __pyx_v_4kivy_4core_4text_11_text_pango_RSHIFT) | (__pyx_v_G << __pyx_v_4kivy_4core_4text_11_text_pango_GSHIFT)) | (__pyx_v_B << __pyx_v_4kivy_4core_4text_11_text_pango_BSHIFT));

  /* "kivy/core/text/_text_pango.pyx":562
 *     # Blit the bitmap as RGBA at x, y in dstbuf (w/h is the clipped ft2 bitmap)
 *     cdef uint32_t col = R << RSHIFT | G << GSHIFT | B << BSHIFT
 *     for yi in range(clip_y_min, h):             # <<<<<<<<<<<<<<
 *         offset = offset_fixed + (yi * offset_yi)
 *         yi_w = yi * w
*/
  __pyx_t_18 = __pyx_v_h;
  __pyx_t_19 = __pyx_t_18;
  for (__pyx_t_20 = __pyx_v_clip_y_min; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
    __pyx_v_yi = __pyx_t_20;

    /* "kivy/core/text/_text_pango.pyx":563
 *     cdef uint32_t col = R << RSHIFT | G << GSHIFT | B << BSHIFT
 *     for yi in range(clip_y_min, h):
 *         offset = offset_fixed + (yi * offset_yi)             # <<<<<<<<<<<<<<
 *         yi_w = yi * w
 *         for xi in range(clip_x_min, w):
*/
    __pyx_v_offset = (__pyx_v_offset_fixed + (__pyx_v_yi * __pyx_v_offset_yi));

    /* "kivy/core/text/_text_pango.pyx":564
 *     for yi in range(clip_y_min, h):
 *         offset = offset_fixed + (yi * offset_yi)
 *         yi_w = yi * w             # <<<<<<<<<<<<<<
 *         for xi in range(clip_x_min, w):
 *             grayidx = yi_w + xi
*/
    __pyx_v_yi_w = (__pyx_v_yi * __pyx_v_w);

    /* "kivy/core/text/_text_pango.pyx":565
 *         offset = offset_fixed + (yi * offset_yi)
 *         yi_w = yi * w
 *         for xi in range(clip_x_min, w):             # <<<<<<<<<<<<<<
 *             grayidx = yi_w + xi
 *             graysrc = (bitmap.buffer)[grayidx]
*/
    __pyx_t_21 = __pyx_v_w;
    __pyx_t_22 = __pyx_t_21;
    for (__pyx_t_23 = __pyx_v_clip_x_min; __pyx_t_23 < __pyx_t_22; __pyx_t_23+=1) {
      __pyx_v_xi = __pyx_t_23;

      /* "kivy/core/text/_text_pango.pyx":566
 *         yi_w = yi * w
 *         for xi in range(clip_x_min, w):
 *             grayidx = yi_w + xi             # <<<<<<<<<<<<<<
 *             graysrc = (bitmap.buffer)[grayidx]
 *             (<uint32_t *>dstbuf)[offset + grayidx] = col | ( ((A * graysrc) / 255) << ASHIFT )
*/
      __pyx_v_grayidx = (__pyx_v_yi_w + __pyx_v_xi);

      /* "kivy/core/text/_text_pango.pyx":567
 *         for xi in range(clip_x_min, w):
 *             grayidx = yi_w + xi
 *             graysrc = (bitmap.buffer)[grayidx]             # <<<<<<<<<<<<<<
 *             (<uint32_t *>dstbuf)[offset + grayidx] = col | ( ((A * graysrc) / 255) << ASHIFT )
 *     g_free(bitmap.buffer)
*/
      __pyx_v_graysrc = (__pyx_v_bitmap.buffer[__pyx_v_grayidx]);

      /* "kivy/core/text/_text_pango.pyx":568
 *             grayidx = yi_w + xi
 *             graysrc = (bitmap.buffer)[grayidx]
 *             (<uint32_t *>dstbuf)[offset + grayidx] = col | ( ((A * graysrc) / 255) << ASHIFT )             # <<<<<<<<<<<<<<
 *     g_free(bitmap.buffer)
 *     # /nogil _render_layout()
*/
      (((uint32_t *)__pyx_v_dstbuf)[(__pyx_v_offset + __pyx_v_grayidx)]) = (__pyx_v_col | ((((long)(__pyx_v_A * __pyx_v_graysrc)) / 0xFF) << __pyx_v_4kivy_4core_4text_11_text_pango_ASHIFT));
    }
  }

  /* "kivy/core/text/_text_pango.pyx":569
 *             graysrc = (bitmap.buffer)[grayidx]
 *             (<uint32_t *>dstbuf)[offset + grayidx] = col | ( ((A * graysrc) / 255) << ASHIFT )
 *     g_free(bitmap.buffer)             # <<<<<<<<<<<<<<
 *     # /nogil _render_layout()
 * 
*/
  g_free(__pyx_v_bitmap.buffer);

  /* "kivy/core/text/_text_pango.pyx":466
 * else:
 *     RSHIFT = 24; GSHIFT = 16; BSHIFT = 8;  ASHIFT = 0
 * @cython.cdivision(True)             # <<<<<<<<<<<<<<
 * @cython.boundscheck(False)
 * @cython.wraparound(False)
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("kivy.core.text._text_pango._render_layout", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  __pyx_L0:;
  __Pyx_RefNannyFinishContextNogil()
}

/* "kivy/core/text/_text_pango.pyx":582
 *     cdef unsigned char *pixels
 * 
 *     def __cinit__(self, int w, int h):             # <<<<<<<<<<<<<<
 *         self.w = w
 *         self.h = h
*/

/* Python wrapper */
static int __pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_w;
  int __pyx_v_h;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_w,&__pyx_mstate_global->__pyx_n_u_h,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 582, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 582, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 582, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__cinit__", 0) < (0)) __PYX_ERR(0, 582, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, i); __PYX_ERR(0, 582, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 582, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_VARARGS(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 582, __pyx_L3_error)
    }
    __pyx_v_w = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_w == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 582, __pyx_L3_error)
    __pyx_v_h = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_h == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 582, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 582, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoRenderer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer___cinit__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *)__pyx_v_self), __pyx_v_w, __pyx_v_h);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer___cinit__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self, int __pyx_v_w, int __pyx_v_h) {
  int __pyx_r;
  int __pyx_t_1;

  /* "kivy/core/text/_text_pango.pyx":583
 * 
 *     def __cinit__(self, int w, int h):
 *         self.w = w             # <<<<<<<<<<<<<<
 *         self.h = h
 *         self.canary = 0
*/
  __pyx_v_self->w = __pyx_v_w;

  /* "kivy/core/text/_text_pango.pyx":584
 *     def __cinit__(self, int w, int h):
 *         self.w = w
 *         self.h = h             # <<<<<<<<<<<<<<
 *         self.canary = 0
 *         self.rdrcount = 0
*/
  __pyx_v_self->h = __pyx_v_h;

  /* "kivy/core/text/_text_pango.pyx":585
 *         self.w = w
 *         self.h = h
 *         self.canary = 0             # <<<<<<<<<<<<<<
 *         self.rdrcount = 0
 *         self.pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
*/
  __pyx_v_self->canary = 0;

  /* "kivy/core/text/_text_pango.pyx":586
 *         self.h = h
 *         self.canary = 0
 *         self.rdrcount = 0             # <<<<<<<<<<<<<<
 *         self.pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if self.pixels:
*/
  __pyx_v_self->rdrcount = 0;

  /* "kivy/core/text/_text_pango.pyx":587
 *         self.canary = 0
 *         self.rdrcount = 0
 *         self.pixels = <unsigned char *>PyMem_Malloc(w * h * 4)             # <<<<<<<<<<<<<<
 *         if self.pixels:
 *             memset(self.pixels, 0, w * h * 4)
*/
  __pyx_v_self->pixels = ((unsigned char *)PyMem_Malloc(((__pyx_v_w * __pyx_v_h) * 4)));

  /* "kivy/core/text/_text_pango.pyx":588
 *         self.rdrcount = 0
 *         self.pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if self.pixels:             # <<<<<<<<<<<<<<
 *             memset(self.pixels, 0, w * h * 4)
 * 
*/
  __pyx_t_1 = (__pyx_v_self->pixels != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":589
 *         self.pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if self.pixels:
 *             memset(self.pixels, 0, w * h * 4)             # <<<<<<<<<<<<<<
 * 
 *     # Free pixels if dealloc'd before get_ImageData(), this is just a failsafe,
*/
    (void)(memset(__pyx_v_self->pixels, 0, ((__pyx_v_w * __pyx_v_h) * 4)));

    /* "kivy/core/text/_text_pango.pyx":588
 *         self.rdrcount = 0
 *         self.pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if self.pixels:             # <<<<<<<<<<<<<<
 *             memset(self.pixels, 0, w * h * 4)
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":582
 *     cdef unsigned char *pixels
 * 
 *     def __cinit__(self, int w, int h):             # <<<<<<<<<<<<<<
 *         self.w = w
 *         self.h = h
*/

  /* function exit code */
  __pyx_r = 0;
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":593
 *     # Free pixels if dealloc'd before get_ImageData(), this is just a failsafe,
 *     # should not happen during normal operations.
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if not self.canary and self.pixels:
 *             Logger.warn("_text_pango: Dead canary in __dealloc__()")
*/

/* Python wrapper */
static void __pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_2__dealloc__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_2__dealloc__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "kivy/core/text/_text_pango.pyx":594
 *     # should not happen during normal operations.
 *     def __dealloc__(self):
 *         if not self.canary and self.pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Dead canary in __dealloc__()")
 *             PyMem_Free(self.pixels)
*/
  __pyx_t_2 = (!(__pyx_v_self->canary != 0));
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->pixels != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":595
 *     def __dealloc__(self):
 *         if not self.canary and self.pixels:
 *             Logger.warn("_text_pango: Dead canary in __dealloc__()")             # <<<<<<<<<<<<<<
 *             PyMem_Free(self.pixels)
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_text_pango_Dead_canary_in___dea};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":596
 *         if not self.canary and self.pixels:
 *             Logger.warn("_text_pango: Dead canary in __dealloc__()")
 *             PyMem_Free(self.pixels)             # <<<<<<<<<<<<<<
 * 
 *     # Kivy's markup system breaks labels down to smaller chunks and render
*/
    PyMem_Free(__pyx_v_self->pixels);

    /* "kivy/core/text/_text_pango.pyx":594
 *     # should not happen during normal operations.
 *     def __dealloc__(self):
 *         if not self.canary and self.pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Dead canary in __dealloc__()")
 *             PyMem_Free(self.pixels)
*/
  }

  /* "kivy/core/text/_text_pango.pyx":593
 *     # Free pixels if dealloc'd before get_ImageData(), this is just a failsafe,
 *     # should not happen during normal operations.
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if not self.canary and self.pixels:
 *             Logger.warn("_text_pango: Dead canary in __dealloc__()")
*/

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("kivy.core.text._text_pango.KivyPangoRenderer.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "kivy/core/text/_text_pango.pyx":601
 *     # separately. In that case, we get several calls to render() with misc
 *     # options and x/y positions. End result is stored in self.pixels.
 *     def render(self, kivylabel, text, x, y):             # <<<<<<<<<<<<<<
 *         if not self.pixels:
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_5render(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_4render, "KivyPangoRenderer.render(self, kivylabel, text, x, y)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_5render = {"render", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_5render, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_4render};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_5render(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_kivylabel = 0;
  PyObject *__pyx_v_text = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_kivylabel,&__pyx_mstate_global->__pyx_n_u_text,&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 601, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  4:
        values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 601, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  3:
        values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 601, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 601, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 601, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "render", 0) < (0)) __PYX_ERR(0, 601, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 4; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("render", 1, 4, 4, i); __PYX_ERR(0, 601, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 601, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 601, __pyx_L3_error)
      values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 601, __pyx_L3_error)
      values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 601, __pyx_L3_error)
    }
    __pyx_v_kivylabel = values[0];
    __pyx_v_text = values[1];
    __pyx_v_x = values[2];
    __pyx_v_y = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("render", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 601, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoRenderer.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_4render(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *)__pyx_v_self), __pyx_v_kivylabel, __pyx_v_text, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_4render(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self, PyObject *__pyx_v_kivylabel, PyObject *__pyx_v_text, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_v_options = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  PyObject *__pyx_v_utf = 0;
  unsigned char __pyx_v_R;
  unsigned char __pyx_v_G;
  unsigned char __pyx_v_B;
  unsigned char __pyx_v_A;
  PyObject *__pyx_v_color = NULL;
  int __pyx_v_xx;
  int __pyx_v_yy;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  int __pyx_t_7;
  char const *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  long __pyx_t_10;
  unsigned char __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("render", 0);

  /* "kivy/core/text/_text_pango.pyx":602
 *     # options and x/y positions. End result is stored in self.pixels.
 *     def render(self, kivylabel, text, x, y):
 *         if not self.pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")
 *             return
*/
  __pyx_t_1 = (!(__pyx_v_self->pixels != 0));
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":603
 *     def render(self, kivylabel, text, x, y):
 *         if not self.pixels:
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")             # <<<<<<<<<<<<<<
 *             return
 *         cdef dict options = kivylabel.options
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_text_pango_render_called_but_se};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":604
 *         if not self.pixels:
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")
 *             return             # <<<<<<<<<<<<<<
 *         cdef dict options = kivylabel.options
 *         cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":602
 *     # options and x/y positions. End result is stored in self.pixels.
 *     def render(self, kivylabel, text, x, y):
 *         if not self.pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")
 *             return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":605
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")
 *             return
 *         cdef dict options = kivylabel.options             # <<<<<<<<<<<<<<
 *         cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *         if not cc:
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kivylabel, __pyx_mstate_global->__pyx_n_u_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 605, __pyx_L1_error)
  __pyx_v_options = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":606
 *             return
 *         cdef dict options = kivylabel.options
 *         cdef ContextContainer cc = _get_or_create_cc_from_options(options)             # <<<<<<<<<<<<<<
 *         if not cc:
 *             Logger.warn("_text_pango: Could not get context container, aborting")
*/
  __pyx_t_2 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc_from_options(__pyx_v_options)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":607
 *         cdef dict options = kivylabel.options
 *         cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *         if not cc:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Could not get context container, aborting")
 *             return
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 607, __pyx_L1_error)
  __pyx_t_7 = (!__pyx_t_1);
  if (__pyx_t_7) {

    /* "kivy/core/text/_text_pango.pyx":608
 *         cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *         if not cc:
 *             Logger.warn("_text_pango: Could not get context container, aborting")             # <<<<<<<<<<<<<<
 *             return
 * 
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_get_contex_2};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":609
 *         if not cc:
 *             Logger.warn("_text_pango: Could not get context container, aborting")
 *             return             # <<<<<<<<<<<<<<
 * 
 *         _set_cc_options(cc, options)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":607
 *         cdef dict options = kivylabel.options
 *         cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *         if not cc:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Could not get context container, aborting")
 *             return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":611
 *             return
 * 
 *         _set_cc_options(cc, options)             # <<<<<<<<<<<<<<
 *         cdef bytes utf = _byte_option(text)
 *         pango_layout_set_text(cc.layout, utf, len(utf))
*/
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__set_cc_options(__pyx_v_cc, __pyx_v_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":612
 * 
 *         _set_cc_options(cc, options)
 *         cdef bytes utf = _byte_option(text)             # <<<<<<<<<<<<<<
 *         pango_layout_set_text(cc.layout, utf, len(utf))
 * 
*/
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_utf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":613
 *         _set_cc_options(cc, options)
 *         cdef bytes utf = _byte_option(text)
 *         pango_layout_set_text(cc.layout, utf, len(utf))             # <<<<<<<<<<<<<<
 * 
 *         # Kivy normalized text color -> 0-255 rgba for nogil
*/
  if (unlikely(__pyx_v_utf == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 613, __pyx_L1_error)
  }
  __pyx_t_8 = __Pyx_PyBytes_AsString(__pyx_v_utf); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 613, __pyx_L1_error)
  if (unlikely(__pyx_v_utf == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 613, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_PyBytes_GET_SIZE(__pyx_v_utf); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 613, __pyx_L1_error)
  pango_layout_set_text(__pyx_v_cc->layout, __pyx_t_8, __pyx_t_9);

  /* "kivy/core/text/_text_pango.pyx":616
 * 
 *         # Kivy normalized text color -> 0-255 rgba for nogil
 *         cdef unsigned char R, G, B, A = 255             # <<<<<<<<<<<<<<
 *         color = options['color']
 *         R = min(255, int(color[0] * 255))
*/
  __pyx_v_A = 0xFF;

  /* "kivy/core/text/_text_pango.pyx":617
 *         # Kivy normalized text color -> 0-255 rgba for nogil
 *         cdef unsigned char R, G, B, A = 255
 *         color = options['color']             # <<<<<<<<<<<<<<
 *         R = min(255, int(color[0] * 255))
 *         G = min(255, int(color[1] * 255))
*/
  if (unlikely(__pyx_v_options == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 617, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_color = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":618
 *         cdef unsigned char R, G, B, A = 255
 *         color = options['color']
 *         R = min(255, int(color[0] * 255))             # <<<<<<<<<<<<<<
 *         G = min(255, int(color[1] * 255))
 *         B = min(255, int(color[2] * 255))
*/
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_color, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_10 = 0xFF;
  __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(0, 618, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = __Pyx_PyLong_As_unsigned_char(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_R = __pyx_t_11;

  /* "kivy/core/text/_text_pango.pyx":619
 *         color = options['color']
 *         R = min(255, int(color[0] * 255))
 *         G = min(255, int(color[1] * 255))             # <<<<<<<<<<<<<<
 *         B = min(255, int(color[2] * 255))
 *         if len(color) > 3:  # ran into a situation where a wasn't included
*/
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_color, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyLong_MultiplyObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_10 = 0xFF;
  __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_7) {
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_2 = __pyx_t_4;
  } else {
    __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_PyInt_FromNumber(&__pyx_t_5, NULL, 0) < (0)) __PYX_ERR(0, 619, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_11 = __Pyx_PyLong_As_unsigned_char(__pyx_t_2); if (unlikely((__pyx_t_11 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_G = __pyx_t_11;

  /* "kivy/core/text/_text_pango.pyx":620
 *         R = min(255, int(color[0] * 255))
 *         G = min(255, int(color[1] * 255))
 *         B = min(255, int(color[2] * 255))             # <<<<<<<<<<<<<<
 *         if len(color) > 3:  # ran into a situation where a wasn't included
 *             A = min(255, int(color[3] * 255))
*/
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_color, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_10 = 0xFF;
  __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_4 = __pyx_t_2;
  } else {
    __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(0, 620, __pyx_L1_error)
    __pyx_t_4 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = __Pyx_PyLong_As_unsigned_char(__pyx_t_4); if (unlikely((__pyx_t_11 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_B = __pyx_t_11;

  /* "kivy/core/text/_text_pango.pyx":621
 *         G = min(255, int(color[1] * 255))
 *         B = min(255, int(color[2] * 255))
 *         if len(color) > 3:  # ran into a situation where a wasn't included             # <<<<<<<<<<<<<<
 *             A = min(255, int(color[3] * 255))
 * 
*/
  __pyx_t_9 = PyObject_Length(__pyx_v_color); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 621, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_9 > 3);
  if (__pyx_t_7) {

    /* "kivy/core/text/_text_pango.pyx":622
 *         B = min(255, int(color[2] * 255))
 *         if len(color) > 3:  # ran into a situation where a wasn't included
 *             A = min(255, int(color[3] * 255))             # <<<<<<<<<<<<<<
 * 
 *         # Finally render the layout and blit it to self.pixels
*/
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_color, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyLong_MultiplyObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = 0xFF;
    __pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_7) {
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_2 = __pyx_t_4;
    } else {
      __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_PyInt_FromNumber(&__pyx_t_5, NULL, 0) < (0)) __PYX_ERR(0, 622, __pyx_L1_error)
      __pyx_t_2 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = __Pyx_PyLong_As_unsigned_char(__pyx_t_2); if (unlikely((__pyx_t_11 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_A = __pyx_t_11;

    /* "kivy/core/text/_text_pango.pyx":621
 *         G = min(255, int(color[1] * 255))
 *         B = min(255, int(color[2] * 255))
 *         if len(color) > 3:  # ran into a situation where a wasn't included             # <<<<<<<<<<<<<<
 *             A = min(255, int(color[3] * 255))
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":625
 * 
 *         # Finally render the layout and blit it to self.pixels
 *         cdef int xx = x             # <<<<<<<<<<<<<<
 *         cdef int yy = y
 *         with nogil:
*/
  __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_x); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 625, __pyx_L1_error)
  __pyx_v_xx = __pyx_t_12;

  /* "kivy/core/text/_text_pango.pyx":626
 *         # Finally render the layout and blit it to self.pixels
 *         cdef int xx = x
 *         cdef int yy = y             # <<<<<<<<<<<<<<
 *         with nogil:
 *             _render_layout(cc.layout, self.pixels, self.w, self.h, xx, yy, R, G, B, A)
*/
  __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_y); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 626, __pyx_L1_error)
  __pyx_v_yy = __pyx_t_12;

  /* "kivy/core/text/_text_pango.pyx":627
 *         cdef int xx = x
 *         cdef int yy = y
 *         with nogil:             # <<<<<<<<<<<<<<
 *             _render_layout(cc.layout, self.pixels, self.w, self.h, xx, yy, R, G, B, A)
 *         self.rdrcount += 1
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "kivy/core/text/_text_pango.pyx":628
 *         cdef int yy = y
 *         with nogil:
 *             _render_layout(cc.layout, self.pixels, self.w, self.h, xx, yy, R, G, B, A)             # <<<<<<<<<<<<<<
 *         self.rdrcount += 1
 * 
*/
        __pyx_f_4kivy_4core_4text_11_text_pango__render_layout(__pyx_v_cc->layout, __pyx_v_self->pixels, __pyx_v_self->w, __pyx_v_self->h, __pyx_v_xx, __pyx_v_yy, __pyx_v_R, __pyx_v_G, __pyx_v_B, __pyx_v_A); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 628, __pyx_L7_error)
      }

      /* "kivy/core/text/_text_pango.pyx":627
 *         cdef int xx = x
 *         cdef int yy = y
 *         with nogil:             # <<<<<<<<<<<<<<
 *             _render_layout(cc.layout, self.pixels, self.w, self.h, xx, yy, R, G, B, A)
 *         self.rdrcount += 1
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L8;
        }
        __pyx_L7_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L8:;
      }
  }

  /* "kivy/core/text/_text_pango.pyx":629
 *         with nogil:
 *             _render_layout(cc.layout, self.pixels, self.w, self.h, xx, yy, R, G, B, A)
 *         self.rdrcount += 1             # <<<<<<<<<<<<<<
 * 
 *     # Return ImageData instance with the rendered pixels
*/
  __pyx_v_self->rdrcount = (__pyx_v_self->rdrcount + 1);

  /* "kivy/core/text/_text_pango.pyx":601
 *     # separately. In that case, we get several calls to render() with misc
 *     # options and x/y positions. End result is stored in self.pixels.
 *     def render(self, kivylabel, text, x, y):             # <<<<<<<<<<<<<<
 *         if not self.pixels:
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoRenderer.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_options);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XDECREF(__pyx_v_utf);
  __Pyx_XDECREF(__pyx_v_color);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":632
 * 
 *     # Return ImageData instance with the rendered pixels
 *     def get_ImageData(self):             # <<<<<<<<<<<<<<
 *         if not self.pixels:
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_7get_ImageData(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_6get_ImageData, "KivyPangoRenderer.get_ImageData(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_7get_ImageData = {"get_ImageData", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_7get_ImageData, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_6get_ImageData};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_7get_ImageData(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ImageData (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_ImageData", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_ImageData", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_6get_ImageData(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_6get_ImageData(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self) {
  PyObject *__pyx_v_b_pixels = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  size_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_ImageData", 0);

  /* "kivy/core/text/_text_pango.pyx":633
 *     # Return ImageData instance with the rendered pixels
 *     def get_ImageData(self):
 *         if not self.pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
 *             return
*/
  __pyx_t_1 = (!(__pyx_v_self->pixels != 0));
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":634
 *     def get_ImageData(self):
 *         if not self.pixels:
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")             # <<<<<<<<<<<<<<
 *             return
 *         if not self.rdrcount:
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_text_pango_get_ImageData_self_p};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":635
 *         if not self.pixels:
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
 *             return             # <<<<<<<<<<<<<<
 *         if not self.rdrcount:
 *             Logger.warn("_text_pango: get_ImageData() without render() call")
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":633
 *     # Return ImageData instance with the rendered pixels
 *     def get_ImageData(self):
 *         if not self.pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
 *             return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":636
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
 *             return
 *         if not self.rdrcount:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: get_ImageData() without render() call")
 *             return
*/
  __pyx_t_1 = (!(__pyx_v_self->rdrcount != 0));
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":637
 *             return
 *         if not self.rdrcount:
 *             Logger.warn("_text_pango: get_ImageData() without render() call")             # <<<<<<<<<<<<<<
 *             return
 *         if self.canary:
*/
    __pyx_t_5 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_5);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_text_pango_get_ImageData_withou};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":638
 *         if not self.rdrcount:
 *             Logger.warn("_text_pango: get_ImageData() without render() call")
 *             return             # <<<<<<<<<<<<<<
 *         if self.canary:
 *             Logger.warn("_text_pango: Dead canary in get_ImageData()")
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":636
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
 *             return
 *         if not self.rdrcount:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: get_ImageData() without render() call")
 *             return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":639
 *             Logger.warn("_text_pango: get_ImageData() without render() call")
 *             return
 *         if self.canary:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Dead canary in get_ImageData()")
 *             return
*/
  __pyx_t_1 = (__pyx_v_self->canary != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":640
 *             return
 *         if self.canary:
 *             Logger.warn("_text_pango: Dead canary in get_ImageData()")             # <<<<<<<<<<<<<<
 *             return
 *         self.canary = 1
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_3, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_text_pango_Dead_canary_in_get_I};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":641
 *         if self.canary:
 *             Logger.warn("_text_pango: Dead canary in get_ImageData()")
 *             return             # <<<<<<<<<<<<<<
 *         self.canary = 1
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":639
 *             Logger.warn("_text_pango: get_ImageData() without render() call")
 *             return
 *         if self.canary:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Dead canary in get_ImageData()")
 *             return
*/
  }

  /* "kivy/core/text/_text_pango.pyx":642
 *             Logger.warn("_text_pango: Dead canary in get_ImageData()")
 *             return
 *         self.canary = 1             # <<<<<<<<<<<<<<
 * 
 *         try:
*/
  __pyx_v_self->canary = 1;

  /* "kivy/core/text/_text_pango.pyx":644
 *         self.canary = 1
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             b_pixels = <bytes>self.pixels[:self.w * self.h * 4]
 *             return ImageData(self.w, self.h, 'rgba', b_pixels)
*/
  /*try:*/ {

    /* "kivy/core/text/_text_pango.pyx":645
 * 
 *         try:
 *             b_pixels = <bytes>self.pixels[:self.w * self.h * 4]             # <<<<<<<<<<<<<<
 *             return ImageData(self.w, self.h, 'rgba', b_pixels)
 *         finally:
*/
    __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((char const *)__pyx_v_self->pixels) + 0, ((__pyx_v_self->w * __pyx_v_self->h) * 4) - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_b_pixels = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":646
 *         try:
 *             b_pixels = <bytes>self.pixels[:self.w * self.h * 4]
 *             return ImageData(self.w, self.h, 'rgba', b_pixels)             # <<<<<<<<<<<<<<
 *         finally:
 *             PyMem_Free(self.pixels)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ImageData); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_self->w); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 646, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_self->h); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 646, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_2);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_6 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_t_5, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_rgba, __pyx_v_b_pixels};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L6_return;
  }

  /* "kivy/core/text/_text_pango.pyx":648
 *             return ImageData(self.w, self.h, 'rgba', b_pixels)
 *         finally:
 *             PyMem_Free(self.pixels)             # <<<<<<<<<<<<<<
 * 
 * 
*/
  /*finally:*/ {
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_self->pixels);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
      __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_16 = __pyx_r;
      __pyx_r = 0;
      PyMem_Free(__pyx_v_self->pixels);
      __pyx_r = __pyx_t_16;
      __pyx_t_16 = 0;
      goto __pyx_L0;
    }
  }

  /* "kivy/core/text/_text_pango.pyx":632
 * 
 *     # Return ImageData instance with the rendered pixels
 *     def get_ImageData(self):             # <<<<<<<<<<<<<<
 *         if not self.pixels:
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoRenderer.get_ImageData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b_pixels);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_8__reduce_cython__, "KivyPangoRenderer.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_8__reduce_cython__};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_9__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_8__reduce_cython__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoRenderer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_10__setstate_cython__, "KivyPangoRenderer.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_10__setstate_cython__};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_11__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoRenderer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_10__setstate_cython__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoRenderer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":651
 * 
 * 
 * def kpango_get_extents(kivylabel, text):             # <<<<<<<<<<<<<<
 *     if text is None:  # text='' needs to return size
 *         return 0, 0
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_1kpango_get_extents(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_kpango_get_extents, "kpango_get_extents(kivylabel, text)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_1kpango_get_extents = {"kpango_get_extents", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_1kpango_get_extents, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_kpango_get_extents};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_1kpango_get_extents(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_kivylabel = 0;
  PyObject *__pyx_v_text = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_get_extents (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_kivylabel,&__pyx_mstate_global->__pyx_n_u_text,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 651, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 651, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 651, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_get_extents", 0) < (0)) __PYX_ERR(0, 651, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_get_extents", 1, 2, 2, i); __PYX_ERR(0, 651, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 651, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 651, __pyx_L3_error)
    }
    __pyx_v_kivylabel = values[0];
    __pyx_v_text = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_get_extents", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 651, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_get_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_kpango_get_extents(__pyx_self, __pyx_v_kivylabel, __pyx_v_text);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_kpango_get_extents(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kivylabel, PyObject *__pyx_v_text) {
  PyObject *__pyx_v_options = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  PyObject *__pyx_v_utf = 0;
  int __pyx_v_w;
  int __pyx_v_h;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  char const *__pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_get_extents", 0);

  /* "kivy/core/text/_text_pango.pyx":652
 * 
 * def kpango_get_extents(kivylabel, text):
 *     if text is None:  # text='' needs to return size             # <<<<<<<<<<<<<<
 *         return 0, 0
 *     cdef dict options = kivylabel.options
*/
  __pyx_t_1 = (__pyx_v_text == Py_None);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":653
 * def kpango_get_extents(kivylabel, text):
 *     if text is None:  # text='' needs to return size
 *         return 0, 0             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[0]);
    __pyx_r = __pyx_mstate_global->__pyx_tuple[0];
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":652
 * 
 * def kpango_get_extents(kivylabel, text):
 *     if text is None:  # text='' needs to return size             # <<<<<<<<<<<<<<
 *         return 0, 0
 *     cdef dict options = kivylabel.options
*/
  }

  /* "kivy/core/text/_text_pango.pyx":654
 *     if text is None:  # text='' needs to return size
 *         return 0, 0
 *     cdef dict options = kivylabel.options             # <<<<<<<<<<<<<<
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:
*/
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kivylabel, __pyx_mstate_global->__pyx_n_u_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 654, __pyx_L1_error)
  __pyx_v_options = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":655
 *         return 0, 0
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)             # <<<<<<<<<<<<<<
 *     if not cc:
 *         Logger.warn("_text_pango: Could not get container for extents, "
*/
  __pyx_t_2 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc_from_options(__pyx_v_options)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":656
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not get container for extents, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 656, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_1);
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":657
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:
 *         Logger.warn("_text_pango: Could not get container for extents, "             # <<<<<<<<<<<<<<
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "kivy/core/text/_text_pango.pyx":659
 *         Logger.warn("_text_pango: Could not get container for extents, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))             # <<<<<<<<<<<<<<
 *         return 0, 0
 * 
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_get_contai;
    __Pyx_INCREF(__pyx_t_7);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 659, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 659, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_context); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 659, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name_r); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_11, (4-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":660
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
 *         return 0, 0             # <<<<<<<<<<<<<<
 * 
 *     cdef bytes utf = _byte_option(text)
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[0]);
    __pyx_r = __pyx_mstate_global->__pyx_tuple[0];
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":656
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not get container for extents, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
*/
  }

  /* "kivy/core/text/_text_pango.pyx":662
 *         return 0, 0
 * 
 *     cdef bytes utf = _byte_option(text)             # <<<<<<<<<<<<<<
 *     pango_layout_set_text(cc.layout, utf, len(utf))
 *     _set_cc_options(cc, options)
*/
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_utf = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":663
 * 
 *     cdef bytes utf = _byte_option(text)
 *     pango_layout_set_text(cc.layout, utf, len(utf))             # <<<<<<<<<<<<<<
 *     _set_cc_options(cc, options)
 *     cdef int w, h
*/
  if (unlikely(__pyx_v_utf == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 663, __pyx_L1_error)
  }
  __pyx_t_12 = __Pyx_PyBytes_AsString(__pyx_v_utf); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L1_error)
  if (unlikely(__pyx_v_utf == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 663, __pyx_L1_error)
  }
  __pyx_t_13 = __Pyx_PyBytes_GET_SIZE(__pyx_v_utf); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 663, __pyx_L1_error)
  pango_layout_set_text(__pyx_v_cc->layout, __pyx_t_12, __pyx_t_13);

  /* "kivy/core/text/_text_pango.pyx":664
 *     cdef bytes utf = _byte_option(text)
 *     pango_layout_set_text(cc.layout, utf, len(utf))
 *     _set_cc_options(cc, options)             # <<<<<<<<<<<<<<
 *     cdef int w, h
 *     pango_layout_get_pixel_size(cc.layout, &w, &h)
*/
  __pyx_t_2 = __pyx_f_4kivy_4core_4text_11_text_pango__set_cc_options(__pyx_v_cc, __pyx_v_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":666
 *     _set_cc_options(cc, options)
 *     cdef int w, h
 *     pango_layout_get_pixel_size(cc.layout, &w, &h)             # <<<<<<<<<<<<<<
 *     return w, h
 * 
*/
  pango_layout_get_pixel_size(__pyx_v_cc->layout, (&__pyx_v_w), (&__pyx_v_h));

  /* "kivy/core/text/_text_pango.pyx":667
 *     cdef int w, h
 *     pango_layout_get_pixel_size(cc.layout, &w, &h)
 *     return w, h             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_v_h); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 667, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 667, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":651
 * 
 * 
 * def kpango_get_extents(kivylabel, text):             # <<<<<<<<<<<<<<
 *     if text is None:  # text='' needs to return size
 *         return 0, 0
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_get_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_options);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XDECREF(__pyx_v_utf);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":670
 * 
 * 
 * def kpango_get_ascent(kivylabel):             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_3kpango_get_ascent(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_2kpango_get_ascent, "kpango_get_ascent(kivylabel)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_3kpango_get_ascent = {"kpango_get_ascent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_3kpango_get_ascent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_2kpango_get_ascent};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_3kpango_get_ascent(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_kivylabel = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_get_ascent (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_kivylabel,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 670, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 670, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_get_ascent", 0) < (0)) __PYX_ERR(0, 670, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_get_ascent", 1, 1, 1, i); __PYX_ERR(0, 670, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 670, __pyx_L3_error)
    }
    __pyx_v_kivylabel = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_get_ascent", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 670, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_get_ascent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_2kpango_get_ascent(__pyx_self, __pyx_v_kivylabel);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_2kpango_get_ascent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kivylabel) {
  PyObject *__pyx_v_options = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_get_ascent", 0);

  /* "kivy/core/text/_text_pango.pyx":671
 * 
 * def kpango_get_ascent(kivylabel):
 *     cdef dict options = kivylabel.options             # <<<<<<<<<<<<<<
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kivylabel, __pyx_mstate_global->__pyx_n_u_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 671, __pyx_L1_error)
  __pyx_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":672
 * def kpango_get_ascent(kivylabel):
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)             # <<<<<<<<<<<<<<
 *     if not cc:
 *         Logger.warn("_text_pango: Could not get container for ascent, "
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc_from_options(__pyx_v_options)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":673
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not get container for ascent, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 673, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":674
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:
 *         Logger.warn("_text_pango: Could not get container for ascent, "             # <<<<<<<<<<<<<<
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "kivy/core/text/_text_pango.pyx":676
 *         Logger.warn("_text_pango: Could not get container for ascent, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))             # <<<<<<<<<<<<<<
 *         return 0
 *     _set_cc_options(cc, options)
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_get_contai_2;
    __Pyx_INCREF(__pyx_t_7);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 676, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 676, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_context); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 676, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name_r); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_11, (4-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "kivy/core/text/_text_pango.pyx":677
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
 *         return 0             # <<<<<<<<<<<<<<
 *     _set_cc_options(cc, options)
 *     return cc.ascent
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __pyx_r = __pyx_mstate_global->__pyx_int_0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":673
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not get container for ascent, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
*/
  }

  /* "kivy/core/text/_text_pango.pyx":678
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
 *         return 0
 *     _set_cc_options(cc, options)             # <<<<<<<<<<<<<<
 *     return cc.ascent
 * 
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__set_cc_options(__pyx_v_cc, __pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":679
 *         return 0
 *     _set_cc_options(cc, options)
 *     return cc.ascent             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_cc->ascent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":670
 * 
 * 
 * def kpango_get_ascent(kivylabel):             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_get_ascent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_options);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":682
 * 
 * 
 * def kpango_get_descent(kivylabel):             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_5kpango_get_descent(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_4kpango_get_descent, "kpango_get_descent(kivylabel)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_5kpango_get_descent = {"kpango_get_descent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_5kpango_get_descent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_4kpango_get_descent};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_5kpango_get_descent(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_kivylabel = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_get_descent (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_kivylabel,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 682, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 682, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_get_descent", 0) < (0)) __PYX_ERR(0, 682, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_get_descent", 1, 1, 1, i); __PYX_ERR(0, 682, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 682, __pyx_L3_error)
    }
    __pyx_v_kivylabel = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_get_descent", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 682, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_get_descent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_4kpango_get_descent(__pyx_self, __pyx_v_kivylabel);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_4kpango_get_descent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_kivylabel) {
  PyObject *__pyx_v_options = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_get_descent", 0);

  /* "kivy/core/text/_text_pango.pyx":683
 * 
 * def kpango_get_descent(kivylabel):
 *     cdef dict options = kivylabel.options             # <<<<<<<<<<<<<<
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_kivylabel, __pyx_mstate_global->__pyx_n_u_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(0, 683, __pyx_L1_error)
  __pyx_v_options = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":684
 * def kpango_get_descent(kivylabel):
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)             # <<<<<<<<<<<<<<
 *     if not cc:
 *         Logger.warn("_text_pango: Could not get container for descent, "
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc_from_options(__pyx_v_options)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":685
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not get container for descent, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 685, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":686
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:
 *         Logger.warn("_text_pango: Could not get container for descent, "             # <<<<<<<<<<<<<<
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "kivy/core/text/_text_pango.pyx":688
 *         Logger.warn("_text_pango: Could not get container for descent, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))             # <<<<<<<<<<<<<<
 *         return 0
 *     _set_cc_options(cc, options)
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_text_pango_Could_not_get_contai_3;
    __Pyx_INCREF(__pyx_t_7);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 688, __pyx_L1_error)
    }
    __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 688, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_context); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (unlikely(__pyx_v_options == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 688, __pyx_L1_error)
    }
    __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_options, __pyx_mstate_global->__pyx_n_u_font_name_r); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = 0;
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_11, (4-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_11 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_11 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "kivy/core/text/_text_pango.pyx":689
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
 *         return 0             # <<<<<<<<<<<<<<
 *     _set_cc_options(cc, options)
 *     return cc.descent
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
    __pyx_r = __pyx_mstate_global->__pyx_int_0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":685
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: Could not get container for descent, "
 *                     "font_name='{}', font_context='{}', font_name_r='{}'"
*/
  }

  /* "kivy/core/text/_text_pango.pyx":690
 *                     .format(options['font_name'], options['font_context'], options['font_name_r']))
 *         return 0
 *     _set_cc_options(cc, options)             # <<<<<<<<<<<<<<
 *     return cc.descent
 * 
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__set_cc_options(__pyx_v_cc, __pyx_v_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":691
 *         return 0
 *     _set_cc_options(cc, options)
 *     return cc.descent             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_cc->descent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":682
 * 
 * 
 * def kpango_get_descent(kivylabel):             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_get_descent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_options);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":700
 *     PANGO_DIRECTION_WEAK_RTL: 'weak_rtl'}
 * 
 * def kpango_find_base_dir(text):             # <<<<<<<<<<<<<<
 *     global _pango2kivy_base_direction
 *     cdef bytes t = _byte_option(text)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_7kpango_find_base_dir(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_6kpango_find_base_dir, "kpango_find_base_dir(text)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_7kpango_find_base_dir = {"kpango_find_base_dir", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_7kpango_find_base_dir, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_6kpango_find_base_dir};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_7kpango_find_base_dir(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_text = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_find_base_dir (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_text,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 700, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 700, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_find_base_dir", 0) < (0)) __PYX_ERR(0, 700, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_find_base_dir", 1, 1, 1, i); __PYX_ERR(0, 700, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 700, __pyx_L3_error)
    }
    __pyx_v_text = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_find_base_dir", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 700, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_find_base_dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_6kpango_find_base_dir(__pyx_self, __pyx_v_text);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_6kpango_find_base_dir(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_text) {
  PyObject *__pyx_v_t = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  gchar const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_find_base_dir", 0);

  /* "kivy/core/text/_text_pango.pyx":702
 * def kpango_find_base_dir(text):
 *     global _pango2kivy_base_direction
 *     cdef bytes t = _byte_option(text)             # <<<<<<<<<<<<<<
 *     return _pango2kivy_base_direction.get(pango_find_base_dir(t, len(t)))
 * 
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":703
 *     global _pango2kivy_base_direction
 *     cdef bytes t = _byte_option(text)
 *     return _pango2kivy_base_direction.get(pango_find_base_dir(t, len(t)))             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_base_direction == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 703, __pyx_L1_error)
  }
  if (unlikely(__pyx_v_t == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 703, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_t); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 703, __pyx_L1_error)
  if (unlikely(__pyx_v_t == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 703, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_t); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 703, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyLong_From_PangoDirection(pango_find_base_dir(__pyx_t_2, __pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_base_direction, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":700
 *     PANGO_DIRECTION_WEAK_RTL: 'weak_rtl'}
 * 
 * def kpango_find_base_dir(text):             # <<<<<<<<<<<<<<
 *     global _pango2kivy_base_direction
 *     cdef bytes t = _byte_option(text)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_find_base_dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":706
 * 
 * 
 * def kpango_font_context_exists(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_9kpango_font_context_exists(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_8kpango_font_context_exists, "kpango_font_context_exists(font_context)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_9kpango_font_context_exists = {"kpango_font_context_exists", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_9kpango_font_context_exists, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_8kpango_font_context_exists};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_9kpango_font_context_exists(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_font_context = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_font_context_exists (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_font_context,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 706, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 706, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_font_context_exists", 0) < (0)) __PYX_ERR(0, 706, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_font_context_exists", 1, 1, 1, i); __PYX_ERR(0, 706, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 706, __pyx_L3_error)
    }
    __pyx_v_font_context = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_font_context_exists", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 706, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_8kpango_font_context_exists(__pyx_self, __pyx_v_font_context);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_8kpango_font_context_exists(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context) {
  PyObject *__pyx_v_fctx = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_font_context_exists", 0);

  /* "kivy/core/text/_text_pango.pyx":708
 * def kpango_font_context_exists(font_context):
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)             # <<<<<<<<<<<<<<
 *     return fctx and fctx in kivy_font_context_cache
 * 
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_font_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fctx = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":709
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     return fctx and fctx in kivy_font_context_cache             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_fctx); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 709, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __Pyx_INCREF(__pyx_v_fctx);
    __pyx_t_1 = __pyx_v_fctx;
    goto __pyx_L3_bool_binop_done;
  }
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 709, __pyx_L1_error)
  }
  __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_fctx, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 709, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":706
 * 
 * 
 * def kpango_font_context_exists(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_exists", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":712
 * 
 * 
 * def kpango_font_context_create(font_context, fontfile=None):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_11kpango_font_context_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_10kpango_font_context_create, "kpango_font_context_create(font_context, fontfile=None)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_11kpango_font_context_create = {"kpango_font_context_create", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_11kpango_font_context_create, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_10kpango_font_context_create};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_11kpango_font_context_create(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_font_context = 0;
  PyObject *__pyx_v_fontfile = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_font_context_create (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_font_context,&__pyx_mstate_global->__pyx_n_u_fontfile,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 712, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 712, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 712, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_font_context_create", 0) < (0)) __PYX_ERR(0, 712, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_font_context_create", 0, 1, 2, i); __PYX_ERR(0, 712, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 712, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 712, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_font_context = values[0];
    __pyx_v_fontfile = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_font_context_create", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 712, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_10kpango_font_context_create(__pyx_self, __pyx_v_font_context, __pyx_v_fontfile);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_10kpango_font_context_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context, PyObject *__pyx_v_fontfile) {
  PyObject *__pyx_v_fctx = 0;
  PyObject *__pyx_v_font_name_r = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_font_context_create", 0);

  /* "kivy/core/text/_text_pango.pyx":714
 * def kpango_font_context_create(font_context, fontfile=None):
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)             # <<<<<<<<<<<<<<
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if fctx in kivy_font_context_cache:
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_font_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fctx = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":715
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef bytes font_name_r = _byte_option(fontfile)             # <<<<<<<<<<<<<<
 *     if fctx in kivy_font_context_cache:
 *         return False
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_fontfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_font_name_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":716
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if fctx in kivy_font_context_cache:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, font_name_r)
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 716, __pyx_L1_error)
  }
  __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_fctx, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 716, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":717
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if fctx in kivy_font_context_cache:
 *         return False             # <<<<<<<<<<<<<<
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, font_name_r)
 *     if cc:
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":716
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if fctx in kivy_font_context_cache:             # <<<<<<<<<<<<<<
 *         return False
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, font_name_r)
*/
  }

  /* "kivy/core/text/_text_pango.pyx":718
 *     if fctx in kivy_font_context_cache:
 *         return False
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, font_name_r)             # <<<<<<<<<<<<<<
 *     if cc:
 *         return True
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc(__pyx_v_fctx, __pyx_v_font_name_r)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":719
 *         return False
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, font_name_r)
 *     if cc:             # <<<<<<<<<<<<<<
 *         return True
 * 
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 719, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":720
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, font_name_r)
 *     if cc:
 *         return True             # <<<<<<<<<<<<<<
 * 
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":719
 *         return False
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, font_name_r)
 *     if cc:             # <<<<<<<<<<<<<<
 *         return True
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":712
 * 
 * 
 * def kpango_font_context_create(font_context, fontfile=None):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fctx);
  __Pyx_XDECREF(__pyx_v_font_name_r);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":723
 * 
 * 
 * def kpango_font_context_add_font(font_context, fontfile):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kiby_fontfamily_cache
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_13kpango_font_context_add_font(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_12kpango_font_context_add_font, "kpango_font_context_add_font(font_context, fontfile)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_13kpango_font_context_add_font = {"kpango_font_context_add_font", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_13kpango_font_context_add_font, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_12kpango_font_context_add_font};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_13kpango_font_context_add_font(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_font_context = 0;
  PyObject *__pyx_v_fontfile = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_font_context_add_font (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_font_context,&__pyx_mstate_global->__pyx_n_u_fontfile,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 723, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 723, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 723, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_font_context_add_font", 0) < (0)) __PYX_ERR(0, 723, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_font_context_add_font", 1, 2, 2, i); __PYX_ERR(0, 723, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 723, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 723, __pyx_L3_error)
    }
    __pyx_v_font_context = values[0];
    __pyx_v_fontfile = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_font_context_add_font", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 723, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_add_font", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_12kpango_font_context_add_font(__pyx_self, __pyx_v_font_context, __pyx_v_fontfile);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_12kpango_font_context_add_font(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context, PyObject *__pyx_v_fontfile) {
  PyObject *__pyx_v_fctx = 0;
  PyObject *__pyx_v_font_name_r = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_font_context_add_font", 0);

  /* "kivy/core/text/_text_pango.pyx":726
 *     global kivy_font_context_cache
 *     global kiby_fontfamily_cache
 *     cdef bytes fctx = _byte_option(font_context)             # <<<<<<<<<<<<<<
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if not fctx:
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_font_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fctx = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":727
 *     global kiby_fontfamily_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef bytes font_name_r = _byte_option(fontfile)             # <<<<<<<<<<<<<<
 *     if not fctx:
 *         Logger.warn("_text_pango: kpango_font_context_add_font() called "
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_fontfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_font_name_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":728
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if not fctx:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: kpango_font_context_add_font() called "
 *                     "with empty context")
*/
  if (__pyx_v_fctx == Py_None) __pyx_t_2 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_fctx);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 728, __pyx_L1_error)
    __pyx_t_2 = (__pyx_temp != 0);
  }

  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "kivy/core/text/_text_pango.pyx":729
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if not fctx:
 *         Logger.warn("_text_pango: kpango_font_context_add_font() called "             # <<<<<<<<<<<<<<
 *                     "with empty context")
 *         return
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_text_pango_kpango_font_context};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "kivy/core/text/_text_pango.pyx":731
 *         Logger.warn("_text_pango: kpango_font_context_add_font() called "
 *                     "with empty context")
 *         return             # <<<<<<<<<<<<<<
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *     if not cc:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":728
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef bytes font_name_r = _byte_option(fontfile)
 *     if not fctx:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: kpango_font_context_add_font() called "
 *                     "with empty context")
*/
  }

  /* "kivy/core/text/_text_pango.pyx":732
 *                     "with empty context")
 *         return
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, None)             # <<<<<<<<<<<<<<
 *     if not cc:
 *         Logger.warn("_text_pango: kpango_font_context_add_font() failed, could "
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc(__pyx_v_fctx, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":733
 *         return
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: kpango_font_context_add_font() failed, could "
 *                     "not resolve or create context container for '{}'".format(fctx))
*/
  __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 733, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_3);
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":734
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *     if not cc:
 *         Logger.warn("_text_pango: kpango_font_context_add_font() failed, could "             # <<<<<<<<<<<<<<
 *                     "not resolve or create context container for '{}'".format(fctx))
 *         return
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "kivy/core/text/_text_pango.pyx":735
 *     if not cc:
 *         Logger.warn("_text_pango: kpango_font_context_add_font() failed, could "
 *                     "not resolve or create context container for '{}'".format(fctx))             # <<<<<<<<<<<<<<
 *         return
 *     if font_name_r not in cc.loaded_fonts:
*/
    __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_text_pango_kpango_font_context_2;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_fctx};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 735, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "kivy/core/text/_text_pango.pyx":736
 *         Logger.warn("_text_pango: kpango_font_context_add_font() failed, could "
 *                     "not resolve or create context container for '{}'".format(fctx))
 *         return             # <<<<<<<<<<<<<<
 *     if font_name_r not in cc.loaded_fonts:
 *         return _cc_add_font_file(cc, font_name_r)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":733
 *         return
 *     cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *     if not cc:             # <<<<<<<<<<<<<<
 *         Logger.warn("_text_pango: kpango_font_context_add_font() failed, could "
 *                     "not resolve or create context container for '{}'".format(fctx))
*/
  }

  /* "kivy/core/text/_text_pango.pyx":737
 *                     "not resolve or create context container for '{}'".format(fctx))
 *         return
 *     if font_name_r not in cc.loaded_fonts:             # <<<<<<<<<<<<<<
 *         return _cc_add_font_file(cc, font_name_r)
 *     return kivy_fontfamily_cache[font_name_r].decode('utf-8')
*/
  if (unlikely(__pyx_v_cc->loaded_fonts == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 737, __pyx_L1_error)
  }
  __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_v_font_name_r, __pyx_v_cc->loaded_fonts, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 737, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":738
 *         return
 *     if font_name_r not in cc.loaded_fonts:
 *         return _cc_add_font_file(cc, font_name_r)             # <<<<<<<<<<<<<<
 *     return kivy_fontfamily_cache[font_name_r].decode('utf-8')
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__cc_add_font_file(__pyx_v_cc, __pyx_v_font_name_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":737
 *                     "not resolve or create context container for '{}'".format(fctx))
 *         return
 *     if font_name_r not in cc.loaded_fonts:             # <<<<<<<<<<<<<<
 *         return _cc_add_font_file(cc, font_name_r)
 *     return kivy_fontfamily_cache[font_name_r].decode('utf-8')
*/
  }

  /* "kivy/core/text/_text_pango.pyx":739
 *     if font_name_r not in cc.loaded_fonts:
 *         return _cc_add_font_file(cc, font_name_r)
 *     return kivy_fontfamily_cache[font_name_r].decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 739, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, __pyx_v_font_name_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_t_4;
  __Pyx_INCREF(__pyx_t_5);
  __pyx_t_7 = 0;
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_utf_8};
    __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":723
 * 
 * 
 * def kpango_font_context_add_font(font_context, fontfile):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kiby_fontfamily_cache
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_add_font", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fctx);
  __Pyx_XDECREF(__pyx_v_font_name_r);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":742
 * 
 * 
 * def kpango_font_context_destroy(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15kpango_font_context_destroy(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_14kpango_font_context_destroy, "kpango_font_context_destroy(font_context)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15kpango_font_context_destroy = {"kpango_font_context_destroy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15kpango_font_context_destroy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_14kpango_font_context_destroy};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15kpango_font_context_destroy(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_font_context = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_font_context_destroy (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_font_context,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 742, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 742, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_font_context_destroy", 0) < (0)) __PYX_ERR(0, 742, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_font_context_destroy", 1, 1, 1, i); __PYX_ERR(0, 742, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 742, __pyx_L3_error)
    }
    __pyx_v_font_context = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_font_context_destroy", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 742, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_14kpango_font_context_destroy(__pyx_self, __pyx_v_font_context);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_14kpango_font_context_destroy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context) {
  PyObject *__pyx_v_fctx = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_font_context_destroy", 0);

  /* "kivy/core/text/_text_pango.pyx":744
 * def kpango_font_context_destroy(font_context):
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)             # <<<<<<<<<<<<<<
 *     if fctx and fctx in kivy_font_context_cache:
 *         del kivy_font_context_cache[fctx]
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_font_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fctx = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":745
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     if fctx and fctx in kivy_font_context_cache:             # <<<<<<<<<<<<<<
 *         del kivy_font_context_cache[fctx]
 * 
*/
  if (__pyx_v_fctx == Py_None) __pyx_t_3 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_fctx);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 745, __pyx_L1_error)
    __pyx_t_3 = (__pyx_temp != 0);
  }

  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 745, __pyx_L1_error)
  }
  __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_fctx, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 745, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":746
 *     cdef bytes fctx = _byte_option(font_context)
 *     if fctx and fctx in kivy_font_context_cache:
 *         del kivy_font_context_cache[fctx]             # <<<<<<<<<<<<<<
 * 
 * 
*/
    if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 746, __pyx_L1_error)
    }
    if (unlikely((PyDict_DelItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, __pyx_v_fctx) < 0))) __PYX_ERR(0, 746, __pyx_L1_error)

    /* "kivy/core/text/_text_pango.pyx":745
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     if fctx and fctx in kivy_font_context_cache:             # <<<<<<<<<<<<<<
 *         del kivy_font_context_cache[fctx]
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":742
 * 
 * 
 * def kpango_font_context_destroy(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fctx);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":749
 * 
 * 
 * def kpango_font_context_list():             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     return list(kivy_font_context_cache.keys())
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17kpango_font_context_list(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_16kpango_font_context_list, "kpango_font_context_list()");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_17kpango_font_context_list = {"kpango_font_context_list", (PyCFunction)__pyx_pw_4kivy_4core_4text_11_text_pango_17kpango_font_context_list, METH_NOARGS, __pyx_doc_4kivy_4core_4text_11_text_pango_16kpango_font_context_list};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_17kpango_font_context_list(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_font_context_list (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_16kpango_font_context_list(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_16kpango_font_context_list(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_font_context_list", 0);

  /* "kivy/core/text/_text_pango.pyx":751
 * def kpango_font_context_list():
 *     global kivy_font_context_cache
 *     return list(kivy_font_context_cache.keys())             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
    __PYX_ERR(0, 751, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":749
 * 
 * 
 * def kpango_font_context_list():             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     return list(kivy_font_context_cache.keys())
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":754
 * 
 * 
 * def kpango_font_context_list_families(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_19kpango_font_context_list_families(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_18kpango_font_context_list_families, "kpango_font_context_list_families(font_context)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_19kpango_font_context_list_families = {"kpango_font_context_list_families", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_19kpango_font_context_list_families, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_18kpango_font_context_list_families};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_19kpango_font_context_list_families(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_font_context = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_font_context_list_families (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_font_context,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 754, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 754, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_font_context_list_families", 0) < (0)) __PYX_ERR(0, 754, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_font_context_list_families", 1, 1, 1, i); __PYX_ERR(0, 754, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 754, __pyx_L3_error)
    }
    __pyx_v_font_context = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_font_context_list_families", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 754, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_list_families", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_18kpango_font_context_list_families(__pyx_self, __pyx_v_font_context);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_18kpango_font_context_list_families(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context) {
  PyObject *__pyx_v_fctx = 0;
  PyObject *__pyx_7genexpr__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  size_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_font_context_list_families", 0);

  /* "kivy/core/text/_text_pango.pyx":756
 * def kpango_font_context_list_families(font_context):
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)             # <<<<<<<<<<<<<<
 *     if fctx and fctx in kivy_font_context_cache:
 *         return [x.decode('utf-8') for x in _cc_list_families(kivy_font_context_cache[fctx])]
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_font_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fctx = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":757
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     if fctx and fctx in kivy_font_context_cache:             # <<<<<<<<<<<<<<
 *         return [x.decode('utf-8') for x in _cc_list_families(kivy_font_context_cache[fctx])]
 *     return []
*/
  if (__pyx_v_fctx == Py_None) __pyx_t_3 = 0;
  else
  {
    Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_fctx);
    if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 757, __pyx_L1_error)
    __pyx_t_3 = (__pyx_temp != 0);
  }

  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 757, __pyx_L1_error)
  }
  __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_fctx, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 757, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":758
 *     cdef bytes fctx = _byte_option(font_context)
 *     if fctx and fctx in kivy_font_context_cache:
 *         return [x.decode('utf-8') for x in _cc_list_families(kivy_font_context_cache[fctx])]             # <<<<<<<<<<<<<<
 *     return []
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 758, __pyx_L8_error)
      }
      __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, __pyx_v_fctx); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer))))) __PYX_ERR(0, 758, __pyx_L8_error)
      __pyx_t_5 = __pyx_f_4kivy_4core_4text_11_text_pango__cc_list_families(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(__pyx_t_5 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(0, 758, __pyx_L8_error)
      }
      __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
          #if !CYTHON_ASSUME_SAFE_SIZE
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 758, __pyx_L8_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference);
        ++__pyx_t_6;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_7 = __pyx_7genexpr__pyx_v_x;
        __Pyx_INCREF(__pyx_t_7);
        __pyx_t_8 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_utf_8};
          __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 758, __pyx_L8_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L12_exit_scope;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L12_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":757
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     if fctx and fctx in kivy_font_context_cache:             # <<<<<<<<<<<<<<
 *         return [x.decode('utf-8') for x in _cc_list_families(kivy_font_context_cache[fctx])]
 *     return []
*/
  }

  /* "kivy/core/text/_text_pango.pyx":759
 *     if fctx and fctx in kivy_font_context_cache:
 *         return [x.decode('utf-8') for x in _cc_list_families(kivy_font_context_cache[fctx])]
 *     return []             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":754
 * 
 * 
 * def kpango_font_context_list_families(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_list_families", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fctx);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":762
 * 
 * 
 * def kpango_font_context_list_custom(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kivy_fontfamily_cache
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_21kpango_font_context_list_custom(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_20kpango_font_context_list_custom, "kpango_font_context_list_custom(font_context)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_21kpango_font_context_list_custom = {"kpango_font_context_list_custom", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_21kpango_font_context_list_custom, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_20kpango_font_context_list_custom};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_21kpango_font_context_list_custom(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_font_context = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("kpango_font_context_list_custom (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_font_context,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 762, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 762, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "kpango_font_context_list_custom", 0) < (0)) __PYX_ERR(0, 762, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("kpango_font_context_list_custom", 1, 1, 1, i); __PYX_ERR(0, 762, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 762, __pyx_L3_error)
    }
    __pyx_v_font_context = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("kpango_font_context_list_custom", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 762, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_list_custom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_20kpango_font_context_list_custom(__pyx_self, __pyx_v_font_context);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_20kpango_font_context_list_custom(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_font_context) {
  CYTHON_UNUSED PyObject *__pyx_v_fctx = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  PyObject *__pyx_8genexpr1__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  size_t __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("kpango_font_context_list_custom", 0);

  /* "kivy/core/text/_text_pango.pyx":765
 *     global kivy_font_context_cache
 *     global kivy_fontfamily_cache
 *     cdef bytes fctx = _byte_option(font_context)             # <<<<<<<<<<<<<<
 *     cdef ContextContainer cc = kivy_font_context_cache.get(font_context)
 *     if cc:
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_font_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fctx = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":766
 *     global kivy_fontfamily_cache
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef ContextContainer cc = kivy_font_context_cache.get(font_context)             # <<<<<<<<<<<<<<
 *     if cc:
 *         return {x: kivy_fontfamily_cache[x].decode('utf-8') for x in cc.loaded_fonts}
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 766, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, __pyx_v_font_context, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer))))) __PYX_ERR(0, 766, __pyx_L1_error)
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":767
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef ContextContainer cc = kivy_font_context_cache.get(font_context)
 *     if cc:             # <<<<<<<<<<<<<<
 *         return {x: kivy_fontfamily_cache[x].decode('utf-8') for x in cc.loaded_fonts}
 *     return {}
*/
  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_cc)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 767, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":768
 *     cdef ContextContainer cc = kivy_font_context_cache.get(font_context)
 *     if cc:
 *         return {x: kivy_fontfamily_cache[x].decode('utf-8') for x in cc.loaded_fonts}             # <<<<<<<<<<<<<<
 *     return {}
 * 
*/
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = 0;
      __pyx_t_7 = __Pyx_set_iterator(__pyx_v_cc->loaded_fonts, 1, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_7;
      __pyx_t_7 = 0;
      while (1) {
        __pyx_t_8 = __Pyx_set_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, __pyx_t_6);
        if (unlikely(__pyx_t_8 == 0)) break;
        if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 768, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_7);
        __pyx_t_7 = 0;
        if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 768, __pyx_L6_error)
        }
        __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, __pyx_8genexpr1__pyx_v_x); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 768, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_9 = __pyx_t_10;
        __Pyx_INCREF(__pyx_t_9);
        __pyx_t_11 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_utf_8};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_8genexpr1__pyx_v_x, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 768, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L9_exit_scope;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L9_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":767
 *     cdef bytes fctx = _byte_option(font_context)
 *     cdef ContextContainer cc = kivy_font_context_cache.get(font_context)
 *     if cc:             # <<<<<<<<<<<<<<
 *         return {x: kivy_fontfamily_cache[x].decode('utf-8') for x in cc.loaded_fonts}
 *     return {}
*/
  }

  /* "kivy/core/text/_text_pango.pyx":769
 *     if cc:
 *         return {x: kivy_fontfamily_cache[x].decode('utf-8') for x in cc.loaded_fonts}
 *     return {}             # <<<<<<<<<<<<<<
 * 
 * 
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":762
 * 
 * 
 * def kpango_font_context_list_custom(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kivy_fontfamily_cache
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("kivy.core.text._text_pango.kpango_font_context_list_custom", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fctx);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":810
 *     cdef PangoLayout *layout
 * 
 *     def __init__(self, font_context):             # <<<<<<<<<<<<<<
 *         global kivy_isolated_cache_order
 *         cdef bytes fctx = _byte_option(font_context)
*/

/* Python wrapper */
static int __pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_font_context = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_font_context,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 810, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 810, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 810, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 810, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 810, __pyx_L3_error)
    }
    __pyx_v_font_context = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 810, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout___init__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_font_context);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout___init__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_font_context) {
  PyObject *__pyx_v_fctx = 0;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *__pyx_v_cc = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "kivy/core/text/_text_pango.pyx":812
 *     def __init__(self, font_context):
 *         global kivy_isolated_cache_order
 *         cdef bytes fctx = _byte_option(font_context)             # <<<<<<<<<<<<<<
 *         cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *         self.layout = pango_layout_new(cc.context)
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_font_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_fctx = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":813
 *         global kivy_isolated_cache_order
 *         cdef bytes fctx = _byte_option(font_context)
 *         cdef ContextContainer cc = _get_or_create_cc(fctx, None)             # <<<<<<<<<<<<<<
 *         self.layout = pango_layout_new(cc.context)
 *         if fctx in kivy_isolated_cache_order:
*/
  __pyx_t_1 = ((PyObject *)__pyx_f_4kivy_4core_4text_11_text_pango__get_or_create_cc(__pyx_v_fctx, ((PyObject*)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cc = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":814
 *         cdef bytes fctx = _byte_option(font_context)
 *         cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *         self.layout = pango_layout_new(cc.context)             # <<<<<<<<<<<<<<
 *         if fctx in kivy_isolated_cache_order:
 *             kivy_isolated_cache_order.remove(fctx)
*/
  __pyx_v_self->layout = pango_layout_new(__pyx_v_cc->context);

  /* "kivy/core/text/_text_pango.pyx":815
 *         cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *         self.layout = pango_layout_new(cc.context)
 *         if fctx in kivy_isolated_cache_order:             # <<<<<<<<<<<<<<
 *             kivy_isolated_cache_order.remove(fctx)
 *             Logger.warn("_text_pango: Removed font context {} from ordered cache, "
*/
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_fctx, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 815, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "kivy/core/text/_text_pango.pyx":816
 *         self.layout = pango_layout_new(cc.context)
 *         if fctx in kivy_isolated_cache_order:
 *             kivy_isolated_cache_order.remove(fctx)             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: Removed font context {} from ordered cache, "
 *                         "it was used in a KivyPangoLayout".format(font_context))
*/
    __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyList_Type__remove, __pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order, __pyx_v_fctx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "kivy/core/text/_text_pango.pyx":817
 *         if fctx in kivy_isolated_cache_order:
 *             kivy_isolated_cache_order.remove(fctx)
 *             Logger.warn("_text_pango: Removed font context {} from ordered cache, "             # <<<<<<<<<<<<<<
 *                         "it was used in a KivyPangoLayout".format(font_context))
 * 
*/
    __pyx_t_3 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "kivy/core/text/_text_pango.pyx":818
 *             kivy_isolated_cache_order.remove(fctx)
 *             Logger.warn("_text_pango: Removed font context {} from ordered cache, "
 *                         "it was used in a KivyPangoLayout".format(font_context))             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
*/
    __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_text_pango_Removed_font_context;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_font_context};
      __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 818, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
    }
    __pyx_t_7 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
      assert(__pyx_t_3);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_5, __pyx__function);
      __pyx_t_7 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "kivy/core/text/_text_pango.pyx":815
 *         cdef ContextContainer cc = _get_or_create_cc(fctx, None)
 *         self.layout = pango_layout_new(cc.context)
 *         if fctx in kivy_isolated_cache_order:             # <<<<<<<<<<<<<<
 *             kivy_isolated_cache_order.remove(fctx)
 *             Logger.warn("_text_pango: Removed font context {} from ordered cache, "
*/
  }

  /* "kivy/core/text/_text_pango.pyx":810
 *     cdef PangoLayout *layout
 * 
 *     def __init__(self, font_context):             # <<<<<<<<<<<<<<
 *         global kivy_isolated_cache_order
 *         cdef bytes fctx = _byte_option(font_context)
*/

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fctx);
  __Pyx_XDECREF((PyObject *)__pyx_v_cc);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":820
 *                         "it was used in a KivyPangoLayout".format(font_context))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.layout:
 *             g_object_unref(self.layout)
*/

/* Python wrapper */
static void __pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_3__dealloc__(PyObject *__pyx_v_self) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_2__dealloc__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_2__dealloc__(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  int __pyx_t_1;

  /* "kivy/core/text/_text_pango.pyx":821
 * 
 *     def __dealloc__(self):
 *         if self.layout:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.layout)
 * 
*/
  __pyx_t_1 = (__pyx_v_self->layout != 0);
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":822
 *     def __dealloc__(self):
 *         if self.layout:
 *             g_object_unref(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_markup(self, markup, encoding='utf-8'):
*/
    g_object_unref(__pyx_v_self->layout);

    /* "kivy/core/text/_text_pango.pyx":821
 * 
 *     def __dealloc__(self):
 *         if self.layout:             # <<<<<<<<<<<<<<
 *             g_object_unref(self.layout)
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":820
 *                         "it was used in a KivyPangoLayout".format(font_context))
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.layout:
 *             g_object_unref(self.layout)
*/

  /* function exit code */
}

/* "kivy/core/text/_text_pango.pyx":824
 *             g_object_unref(self.layout)
 * 
 *     def set_markup(self, markup, encoding='utf-8'):             # <<<<<<<<<<<<<<
 *         cdef bytes m = _byte_option(markup)
 *         pango_layout_set_markup(self.layout, m, len(m))
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_5set_markup(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_4set_markup, "KivyPangoLayout.set_markup(self, markup, encoding='utf-8')");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_5set_markup = {"set_markup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_5set_markup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_4set_markup};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_5set_markup(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_markup = 0;
  CYTHON_UNUSED PyObject *__pyx_v_encoding = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_markup (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_markup,&__pyx_mstate_global->__pyx_n_u_encoding,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 824, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 824, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 824, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_markup", 0) < (0)) __PYX_ERR(0, 824, __pyx_L3_error)
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_utf_8));
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_markup", 0, 1, 2, i); __PYX_ERR(0, 824, __pyx_L3_error) }
      }
    } else {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 824, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 824, __pyx_L3_error)
        break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u_utf_8));
    }
    __pyx_v_markup = values[0];
    __pyx_v_encoding = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_markup", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 824, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_markup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_4set_markup(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_markup, __pyx_v_encoding);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_4set_markup(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_markup, CYTHON_UNUSED PyObject *__pyx_v_encoding) {
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_markup", 0);

  /* "kivy/core/text/_text_pango.pyx":825
 * 
 *     def set_markup(self, markup, encoding='utf-8'):
 *         cdef bytes m = _byte_option(markup)             # <<<<<<<<<<<<<<
 *         pango_layout_set_markup(self.layout, m, len(m))
 * 
*/
  __pyx_t_1 = __pyx_f_4kivy_4core_4text_11_text_pango__byte_option(__pyx_v_markup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_m = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "kivy/core/text/_text_pango.pyx":826
 *     def set_markup(self, markup, encoding='utf-8'):
 *         cdef bytes m = _byte_option(markup)
 *         pango_layout_set_markup(self.layout, m, len(m))             # <<<<<<<<<<<<<<
 * 
 *     def set_width(self, width):
*/
  if (unlikely(__pyx_v_m == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 826, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_m); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 826, __pyx_L1_error)
  if (unlikely(__pyx_v_m == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 826, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_m); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 826, __pyx_L1_error)
  pango_layout_set_markup(__pyx_v_self->layout, __pyx_t_2, __pyx_t_3);

  /* "kivy/core/text/_text_pango.pyx":824
 *             g_object_unref(self.layout)
 * 
 *     def set_markup(self, markup, encoding='utf-8'):             # <<<<<<<<<<<<<<
 *         cdef bytes m = _byte_option(markup)
 *         pango_layout_set_markup(self.layout, m, len(m))
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_markup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":828
 *         pango_layout_set_markup(self.layout, m, len(m))
 * 
 *     def set_width(self, width):             # <<<<<<<<<<<<<<
 *         pango_layout_set_width(self.layout, int(width))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_7set_width(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_6set_width, "KivyPangoLayout.set_width(self, width)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_7set_width = {"set_width", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_7set_width, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_6set_width};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_7set_width(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_width = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_width (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_width,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 828, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 828, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_width", 0) < (0)) __PYX_ERR(0, 828, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_width", 1, 1, 1, i); __PYX_ERR(0, 828, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 828, __pyx_L3_error)
    }
    __pyx_v_width = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_width", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 828, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_6set_width(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_width);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_6set_width(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_width) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_width", 0);

  /* "kivy/core/text/_text_pango.pyx":829
 * 
 *     def set_width(self, width):
 *         pango_layout_set_width(self.layout, int(width))             # <<<<<<<<<<<<<<
 * 
 *     def get_width(self):
*/
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  pango_layout_set_width(__pyx_v_self->layout, __pyx_t_2);

  /* "kivy/core/text/_text_pango.pyx":828
 *         pango_layout_set_markup(self.layout, m, len(m))
 * 
 *     def set_width(self, width):             # <<<<<<<<<<<<<<
 *         pango_layout_set_width(self.layout, int(width))
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":831
 *         pango_layout_set_width(self.layout, int(width))
 * 
 *     def get_width(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_width(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_9get_width(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_8get_width, "KivyPangoLayout.get_width(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_9get_width = {"get_width", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_9get_width, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_8get_width};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_9get_width(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_width (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_width", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_width", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_8get_width(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_8get_width(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_width", 0);

  /* "kivy/core/text/_text_pango.pyx":832
 * 
 *     def get_width(self):
 *         return pango_layout_get_width(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_height(self, height):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(pango_layout_get_width(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":831
 *         pango_layout_set_width(self.layout, int(width))
 * 
 *     def get_width(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_width(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_width", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":834
 *         return pango_layout_get_width(self.layout)
 * 
 *     def set_height(self, height):             # <<<<<<<<<<<<<<
 *         pango_layout_set_height(self.layout, int(height))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_11set_height(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_10set_height, "KivyPangoLayout.set_height(self, height)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_11set_height = {"set_height", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_11set_height, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_10set_height};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_11set_height(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_height = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_height (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_height,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 834, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 834, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_height", 0) < (0)) __PYX_ERR(0, 834, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_height", 1, 1, 1, i); __PYX_ERR(0, 834, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 834, __pyx_L3_error)
    }
    __pyx_v_height = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_height", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 834, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_10set_height(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_height);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_10set_height(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_height) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_height", 0);

  /* "kivy/core/text/_text_pango.pyx":835
 * 
 *     def set_height(self, height):
 *         pango_layout_set_height(self.layout, int(height))             # <<<<<<<<<<<<<<
 * 
 *     def get_height(self):
*/
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  pango_layout_set_height(__pyx_v_self->layout, __pyx_t_2);

  /* "kivy/core/text/_text_pango.pyx":834
 *         return pango_layout_get_width(self.layout)
 * 
 *     def set_height(self, height):             # <<<<<<<<<<<<<<
 *         pango_layout_set_height(self.layout, int(height))
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":837
 *         pango_layout_set_height(self.layout, int(height))
 * 
 *     def get_height(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_height(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_13get_height(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_12get_height, "KivyPangoLayout.get_height(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_13get_height = {"get_height", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_13get_height, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_12get_height};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_13get_height(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_height (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_height", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_height", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_12get_height(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_12get_height(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_height", 0);

  /* "kivy/core/text/_text_pango.pyx":838
 * 
 *     def get_height(self):
 *         return pango_layout_get_height(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def get_wrap(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(pango_layout_get_height(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":837
 *         pango_layout_set_height(self.layout, int(height))
 * 
 *     def get_height(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_height(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_height", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":840
 *         return pango_layout_get_height(self.layout)
 * 
 *     def get_wrap(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_wrap_mode
 *         return _pango2kivy_wrap_mode.get(pango_layout_get_wrap(self.layout))
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_15get_wrap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_14get_wrap, "KivyPangoLayout.get_wrap(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_15get_wrap = {"get_wrap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_15get_wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_14get_wrap};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_15get_wrap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_wrap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_wrap", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_wrap", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_14get_wrap(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_14get_wrap(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_wrap", 0);

  /* "kivy/core/text/_text_pango.pyx":842
 *     def get_wrap(self):
 *         global _pango2kivy_wrap_mode
 *         return _pango2kivy_wrap_mode.get(pango_layout_get_wrap(self.layout))             # <<<<<<<<<<<<<<
 * 
 *     def set_wrap(self, wrap):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_wrap_mode == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 842, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_PangoWrapMode(pango_layout_get_wrap(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_wrap_mode, __pyx_t_1, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":840
 *         return pango_layout_get_height(self.layout)
 * 
 *     def get_wrap(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_wrap_mode
 *         return _pango2kivy_wrap_mode.get(pango_layout_get_wrap(self.layout))
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":844
 *         return _pango2kivy_wrap_mode.get(pango_layout_get_wrap(self.layout))
 * 
 *     def set_wrap(self, wrap):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_wrap_mode
 *         cdef PangoWrapMode wm = _kivy2pango_wrap_mode.get(wrap, PANGO_WRAP_WORD)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_17set_wrap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_16set_wrap, "KivyPangoLayout.set_wrap(self, wrap)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_17set_wrap = {"set_wrap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_17set_wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_16set_wrap};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_17set_wrap(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_wrap = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_wrap (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_wrap,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 844, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 844, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_wrap", 0) < (0)) __PYX_ERR(0, 844, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_wrap", 1, 1, 1, i); __PYX_ERR(0, 844, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 844, __pyx_L3_error)
    }
    __pyx_v_wrap = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_wrap", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 844, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_16set_wrap(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_wrap);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_16set_wrap(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_wrap) {
  PangoWrapMode __pyx_v_wm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PangoWrapMode __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_wrap", 0);

  /* "kivy/core/text/_text_pango.pyx":846
 *     def set_wrap(self, wrap):
 *         global _kivy2pango_wrap_mode
 *         cdef PangoWrapMode wm = _kivy2pango_wrap_mode.get(wrap, PANGO_WRAP_WORD)             # <<<<<<<<<<<<<<
 *         pango_layout_set_wrap(self.layout, wm)
 * 
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_wrap_mode == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 846, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_PangoWrapMode(PANGO_WRAP_WORD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_wrap_mode, __pyx_v_wrap, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((PangoWrapMode)__Pyx_PyLong_As_PangoWrapMode(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_wm = __pyx_t_3;

  /* "kivy/core/text/_text_pango.pyx":847
 *         global _kivy2pango_wrap_mode
 *         cdef PangoWrapMode wm = _kivy2pango_wrap_mode.get(wrap, PANGO_WRAP_WORD)
 *         pango_layout_set_wrap(self.layout, wm)             # <<<<<<<<<<<<<<
 * 
 *     def is_wrapped(self):
*/
  pango_layout_set_wrap(__pyx_v_self->layout, __pyx_v_wm);

  /* "kivy/core/text/_text_pango.pyx":844
 *         return _pango2kivy_wrap_mode.get(pango_layout_get_wrap(self.layout))
 * 
 *     def set_wrap(self, wrap):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_wrap_mode
 *         cdef PangoWrapMode wm = _kivy2pango_wrap_mode.get(wrap, PANGO_WRAP_WORD)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_wrap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":849
 *         pango_layout_set_wrap(self.layout, wm)
 * 
 *     def is_wrapped(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_is_wrapped(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_19is_wrapped(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_18is_wrapped, "KivyPangoLayout.is_wrapped(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_19is_wrapped = {"is_wrapped", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_19is_wrapped, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_18is_wrapped};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_19is_wrapped(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_wrapped (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_wrapped", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_wrapped", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_18is_wrapped(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_18is_wrapped(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_wrapped", 0);

  /* "kivy/core/text/_text_pango.pyx":850
 * 
 *     def is_wrapped(self):
 *         return pango_layout_is_wrapped(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_ellipsize(self, ellipsize):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_gint(pango_layout_is_wrapped(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":849
 *         pango_layout_set_wrap(self.layout, wm)
 * 
 *     def is_wrapped(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_is_wrapped(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.is_wrapped", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":852
 *         return pango_layout_is_wrapped(self.layout)
 * 
 *     def set_ellipsize(self, ellipsize):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_ellipsize_mode
 *         cdef PangoEllipsizeMode em = _kivy2pango_ellipsize_mode.get(ellipsize, PANGO_ELLIPSIZE_NONE)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_21set_ellipsize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_20set_ellipsize, "KivyPangoLayout.set_ellipsize(self, ellipsize)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_21set_ellipsize = {"set_ellipsize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_21set_ellipsize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_20set_ellipsize};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_21set_ellipsize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_ellipsize = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_ellipsize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ellipsize,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 852, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 852, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_ellipsize", 0) < (0)) __PYX_ERR(0, 852, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_ellipsize", 1, 1, 1, i); __PYX_ERR(0, 852, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 852, __pyx_L3_error)
    }
    __pyx_v_ellipsize = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_ellipsize", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 852, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_ellipsize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_20set_ellipsize(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_ellipsize);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_20set_ellipsize(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_ellipsize) {
  PangoEllipsizeMode __pyx_v_em;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PangoEllipsizeMode __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_ellipsize", 0);

  /* "kivy/core/text/_text_pango.pyx":854
 *     def set_ellipsize(self, ellipsize):
 *         global _kivy2pango_ellipsize_mode
 *         cdef PangoEllipsizeMode em = _kivy2pango_ellipsize_mode.get(ellipsize, PANGO_ELLIPSIZE_NONE)             # <<<<<<<<<<<<<<
 *         pango_layout_set_ellipsize(self.layout, em)
 * 
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_ellipsize_mode == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 854, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_NONE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_ellipsize_mode, __pyx_v_ellipsize, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((PangoEllipsizeMode)__Pyx_PyLong_As_PangoEllipsizeMode(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_em = __pyx_t_3;

  /* "kivy/core/text/_text_pango.pyx":855
 *         global _kivy2pango_ellipsize_mode
 *         cdef PangoEllipsizeMode em = _kivy2pango_ellipsize_mode.get(ellipsize, PANGO_ELLIPSIZE_NONE)
 *         pango_layout_set_ellipsize(self.layout, em)             # <<<<<<<<<<<<<<
 * 
 *     def get_ellipsize(self):
*/
  pango_layout_set_ellipsize(__pyx_v_self->layout, __pyx_v_em);

  /* "kivy/core/text/_text_pango.pyx":852
 *         return pango_layout_is_wrapped(self.layout)
 * 
 *     def set_ellipsize(self, ellipsize):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_ellipsize_mode
 *         cdef PangoEllipsizeMode em = _kivy2pango_ellipsize_mode.get(ellipsize, PANGO_ELLIPSIZE_NONE)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_ellipsize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":857
 *         pango_layout_set_ellipsize(self.layout, em)
 * 
 *     def get_ellipsize(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_ellipsize_mode
 *         return _pango2kivy_ellipsize_mode.get(pango_layout_get_ellipsize(self.layout), 'none')
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_23get_ellipsize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_22get_ellipsize, "KivyPangoLayout.get_ellipsize(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_23get_ellipsize = {"get_ellipsize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_23get_ellipsize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_22get_ellipsize};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_23get_ellipsize(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_ellipsize (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_ellipsize", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_ellipsize", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_22get_ellipsize(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_22get_ellipsize(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_ellipsize", 0);

  /* "kivy/core/text/_text_pango.pyx":859
 *     def get_ellipsize(self):
 *         global _pango2kivy_ellipsize_mode
 *         return _pango2kivy_ellipsize_mode.get(pango_layout_get_ellipsize(self.layout), 'none')             # <<<<<<<<<<<<<<
 * 
 *     def is_ellipsized(self):
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_ellipsize_mode == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 859, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_PangoEllipsizeMode(pango_layout_get_ellipsize(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_ellipsize_mode, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_none); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":857
 *         pango_layout_set_ellipsize(self.layout, em)
 * 
 *     def get_ellipsize(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_ellipsize_mode
 *         return _pango2kivy_ellipsize_mode.get(pango_layout_get_ellipsize(self.layout), 'none')
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_ellipsize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":861
 *         return _pango2kivy_ellipsize_mode.get(pango_layout_get_ellipsize(self.layout), 'none')
 * 
 *     def is_ellipsized(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_is_ellipsized(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_25is_ellipsized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_24is_ellipsized, "KivyPangoLayout.is_ellipsized(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_25is_ellipsized = {"is_ellipsized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_25is_ellipsized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_24is_ellipsized};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_25is_ellipsized(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ellipsized (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("is_ellipsized", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("is_ellipsized", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_24is_ellipsized(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_24is_ellipsized(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ellipsized", 0);

  /* "kivy/core/text/_text_pango.pyx":862
 * 
 *     def is_ellipsized(self):
 *         return pango_layout_is_ellipsized(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_indent(self, indent):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_gint(pango_layout_is_ellipsized(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":861
 *         return _pango2kivy_ellipsize_mode.get(pango_layout_get_ellipsize(self.layout), 'none')
 * 
 *     def is_ellipsized(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_is_ellipsized(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.is_ellipsized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":864
 *         return pango_layout_is_ellipsized(self.layout)
 * 
 *     def set_indent(self, indent):             # <<<<<<<<<<<<<<
 *         pango_layout_set_indent(self.layout, int(indent))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_27set_indent(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_26set_indent, "KivyPangoLayout.set_indent(self, indent)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_27set_indent = {"set_indent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_27set_indent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_26set_indent};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_27set_indent(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_indent = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_indent (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_indent,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 864, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 864, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_indent", 0) < (0)) __PYX_ERR(0, 864, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_indent", 1, 1, 1, i); __PYX_ERR(0, 864, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 864, __pyx_L3_error)
    }
    __pyx_v_indent = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_indent", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 864, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_indent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_26set_indent(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_indent);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_26set_indent(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_indent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_indent", 0);

  /* "kivy/core/text/_text_pango.pyx":865
 * 
 *     def set_indent(self, indent):
 *         pango_layout_set_indent(self.layout, int(indent))             # <<<<<<<<<<<<<<
 * 
 *     def get_indent(self):
*/
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_indent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 865, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  pango_layout_set_indent(__pyx_v_self->layout, __pyx_t_2);

  /* "kivy/core/text/_text_pango.pyx":864
 *         return pango_layout_is_ellipsized(self.layout)
 * 
 *     def set_indent(self, indent):             # <<<<<<<<<<<<<<
 *         pango_layout_set_indent(self.layout, int(indent))
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_indent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":867
 *         pango_layout_set_indent(self.layout, int(indent))
 * 
 *     def get_indent(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_indent(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_29get_indent(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_28get_indent, "KivyPangoLayout.get_indent(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_29get_indent = {"get_indent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_29get_indent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_28get_indent};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_29get_indent(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_indent (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_indent", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_indent", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_28get_indent(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_28get_indent(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_indent", 0);

  /* "kivy/core/text/_text_pango.pyx":868
 * 
 *     def get_indent(self):
 *         return pango_layout_get_indent(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_spacing(self, spacing):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(pango_layout_get_indent(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":867
 *         pango_layout_set_indent(self.layout, int(indent))
 * 
 *     def get_indent(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_indent(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_indent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":870
 *         return pango_layout_get_indent(self.layout)
 * 
 *     def set_spacing(self, spacing):             # <<<<<<<<<<<<<<
 *         pango_layout_set_spacing(self.layout, int(spacing))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_31set_spacing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_30set_spacing, "KivyPangoLayout.set_spacing(self, spacing)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_31set_spacing = {"set_spacing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_31set_spacing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_30set_spacing};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_31set_spacing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_spacing = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_spacing (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_spacing,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 870, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 870, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_spacing", 0) < (0)) __PYX_ERR(0, 870, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_spacing", 1, 1, 1, i); __PYX_ERR(0, 870, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 870, __pyx_L3_error)
    }
    __pyx_v_spacing = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_spacing", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 870, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_spacing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_30set_spacing(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_spacing);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_30set_spacing(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_spacing) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_spacing", 0);

  /* "kivy/core/text/_text_pango.pyx":871
 * 
 *     def set_spacing(self, spacing):
 *         pango_layout_set_spacing(self.layout, int(spacing))             # <<<<<<<<<<<<<<
 * 
 *     def get_spacing(self):
*/
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_spacing); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  pango_layout_set_spacing(__pyx_v_self->layout, __pyx_t_2);

  /* "kivy/core/text/_text_pango.pyx":870
 *         return pango_layout_get_indent(self.layout)
 * 
 *     def set_spacing(self, spacing):             # <<<<<<<<<<<<<<
 *         pango_layout_set_spacing(self.layout, int(spacing))
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_spacing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":873
 *         pango_layout_set_spacing(self.layout, int(spacing))
 * 
 *     def get_spacing(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_spacing(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_33get_spacing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_32get_spacing, "KivyPangoLayout.get_spacing(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_33get_spacing = {"get_spacing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_33get_spacing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_32get_spacing};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_33get_spacing(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_spacing (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_spacing", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_spacing", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_32get_spacing(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_32get_spacing(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_spacing", 0);

  /* "kivy/core/text/_text_pango.pyx":874
 * 
 *     def get_spacing(self):
 *         return pango_layout_get_spacing(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_justify(self, justify):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(pango_layout_get_spacing(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":873
 *         pango_layout_set_spacing(self.layout, int(spacing))
 * 
 *     def get_spacing(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_spacing(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_spacing", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":876
 *         return pango_layout_get_spacing(self.layout)
 * 
 *     def set_justify(self, justify):             # <<<<<<<<<<<<<<
 *         pango_layout_set_justify(self.layout, bool(justify))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_35set_justify(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_34set_justify, "KivyPangoLayout.set_justify(self, justify)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_35set_justify = {"set_justify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_35set_justify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_34set_justify};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_35set_justify(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_justify = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_justify (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_justify,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 876, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 876, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_justify", 0) < (0)) __PYX_ERR(0, 876, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_justify", 1, 1, 1, i); __PYX_ERR(0, 876, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 876, __pyx_L3_error)
    }
    __pyx_v_justify = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_justify", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 876, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_justify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_34set_justify(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_justify);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_34set_justify(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_justify) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_justify", 0);

  /* "kivy/core/text/_text_pango.pyx":877
 * 
 *     def set_justify(self, justify):
 *         pango_layout_set_justify(self.layout, bool(justify))             # <<<<<<<<<<<<<<
 * 
 *     def get_justify(self):
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_justify); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 877, __pyx_L1_error)
  pango_layout_set_justify(__pyx_v_self->layout, (!(!__pyx_t_1)));

  /* "kivy/core/text/_text_pango.pyx":876
 *         return pango_layout_get_spacing(self.layout)
 * 
 *     def set_justify(self, justify):             # <<<<<<<<<<<<<<
 *         pango_layout_set_justify(self.layout, bool(justify))
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_justify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":879
 *         pango_layout_set_justify(self.layout, bool(justify))
 * 
 *     def get_justify(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_justify(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_37get_justify(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_36get_justify, "KivyPangoLayout.get_justify(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_37get_justify = {"get_justify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_37get_justify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_36get_justify};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_37get_justify(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_justify (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_justify", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_justify", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_36get_justify(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_36get_justify(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_justify", 0);

  /* "kivy/core/text/_text_pango.pyx":880
 * 
 *     def get_justify(self):
 *         return pango_layout_get_justify(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_auto_dir(self, autodir):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_gint(pango_layout_get_justify(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":879
 *         pango_layout_set_justify(self.layout, bool(justify))
 * 
 *     def get_justify(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_justify(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_justify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":882
 *         return pango_layout_get_justify(self.layout)
 * 
 *     def set_auto_dir(self, autodir):             # <<<<<<<<<<<<<<
 *         pango_layout_set_auto_dir(self.layout, bool(autodir))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_39set_auto_dir(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_38set_auto_dir, "KivyPangoLayout.set_auto_dir(self, autodir)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_39set_auto_dir = {"set_auto_dir", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_39set_auto_dir, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_38set_auto_dir};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_39set_auto_dir(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_autodir = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_dir (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_autodir,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 882, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 882, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_auto_dir", 0) < (0)) __PYX_ERR(0, 882, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_auto_dir", 1, 1, 1, i); __PYX_ERR(0, 882, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 882, __pyx_L3_error)
    }
    __pyx_v_autodir = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_auto_dir", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 882, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_auto_dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_38set_auto_dir(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_autodir);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_38set_auto_dir(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_autodir) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_auto_dir", 0);

  /* "kivy/core/text/_text_pango.pyx":883
 * 
 *     def set_auto_dir(self, autodir):
 *         pango_layout_set_auto_dir(self.layout, bool(autodir))             # <<<<<<<<<<<<<<
 * 
 *     def get_auto_dir(self):
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_autodir); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 883, __pyx_L1_error)
  pango_layout_set_auto_dir(__pyx_v_self->layout, (!(!__pyx_t_1)));

  /* "kivy/core/text/_text_pango.pyx":882
 *         return pango_layout_get_justify(self.layout)
 * 
 *     def set_auto_dir(self, autodir):             # <<<<<<<<<<<<<<
 *         pango_layout_set_auto_dir(self.layout, bool(autodir))
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_auto_dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":885
 *         pango_layout_set_auto_dir(self.layout, bool(autodir))
 * 
 *     def get_auto_dir(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_auto_dir(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_41get_auto_dir(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_40get_auto_dir, "KivyPangoLayout.get_auto_dir(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_41get_auto_dir = {"get_auto_dir", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_41get_auto_dir, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_40get_auto_dir};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_41get_auto_dir(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_auto_dir (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_auto_dir", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_auto_dir", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_40get_auto_dir(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_40get_auto_dir(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_auto_dir", 0);

  /* "kivy/core/text/_text_pango.pyx":886
 * 
 *     def get_auto_dir(self):
 *         return pango_layout_get_auto_dir(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def set_alignment(self, alignment):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_gint(pango_layout_get_auto_dir(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":885
 *         pango_layout_set_auto_dir(self.layout, bool(autodir))
 * 
 *     def get_auto_dir(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_auto_dir(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_auto_dir", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":888
 *         return pango_layout_get_auto_dir(self.layout)
 * 
 *     def set_alignment(self, alignment):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_alignment
 *         cdef PangoAlignment a = _kivy2pango_alignment.get(alignment, PANGO_ALIGN_LEFT)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_43set_alignment(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_42set_alignment, "KivyPangoLayout.set_alignment(self, alignment)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_43set_alignment = {"set_alignment", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_43set_alignment, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_42set_alignment};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_43set_alignment(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_alignment = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_alignment (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_alignment,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 888, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 888, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_alignment", 0) < (0)) __PYX_ERR(0, 888, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_alignment", 1, 1, 1, i); __PYX_ERR(0, 888, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 888, __pyx_L3_error)
    }
    __pyx_v_alignment = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_alignment", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 888, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_42set_alignment(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_alignment);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_42set_alignment(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_alignment) {
  PangoAlignment __pyx_v_a;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PangoAlignment __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_alignment", 0);

  /* "kivy/core/text/_text_pango.pyx":890
 *     def set_alignment(self, alignment):
 *         global _kivy2pango_alignment
 *         cdef PangoAlignment a = _kivy2pango_alignment.get(alignment, PANGO_ALIGN_LEFT)             # <<<<<<<<<<<<<<
 *         pango_layout_set_alignment(self.layout, a)
 * 
*/
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_alignment == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 890, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_PangoAlignment(PANGO_ALIGN_LEFT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_alignment, __pyx_v_alignment, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((PangoAlignment)__Pyx_PyLong_As_PangoAlignment(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_a = __pyx_t_3;

  /* "kivy/core/text/_text_pango.pyx":891
 *         global _kivy2pango_alignment
 *         cdef PangoAlignment a = _kivy2pango_alignment.get(alignment, PANGO_ALIGN_LEFT)
 *         pango_layout_set_alignment(self.layout, a)             # <<<<<<<<<<<<<<
 * 
 *     def get_alignment(self):
*/
  pango_layout_set_alignment(__pyx_v_self->layout, __pyx_v_a);

  /* "kivy/core/text/_text_pango.pyx":888
 *         return pango_layout_get_auto_dir(self.layout)
 * 
 *     def set_alignment(self, alignment):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_alignment
 *         cdef PangoAlignment a = _kivy2pango_alignment.get(alignment, PANGO_ALIGN_LEFT)
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":893
 *         pango_layout_set_alignment(self.layout, a)
 * 
 *     def get_alignment(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_alignment
 *         return _pango2kivy_alignment.get(pango_layout_get_alignment(self.layout), 'left')
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_45get_alignment(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_44get_alignment, "KivyPangoLayout.get_alignment(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_45get_alignment = {"get_alignment", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_45get_alignment, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_44get_alignment};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_45get_alignment(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_alignment (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_alignment", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_alignment", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_44get_alignment(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_44get_alignment(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_alignment", 0);

  /* "kivy/core/text/_text_pango.pyx":895
 *     def get_alignment(self):
 *         global _pango2kivy_alignment
 *         return _pango2kivy_alignment.get(pango_layout_get_alignment(self.layout), 'left')             # <<<<<<<<<<<<<<
 * 
 *     # set_tabs, get_tabs
*/
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_alignment == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(0, 895, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyLong_From_PangoAlignment(pango_layout_get_alignment(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_alignment, __pyx_t_1, __pyx_mstate_global->__pyx_n_u_left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":893
 *         pango_layout_set_alignment(self.layout, a)
 * 
 *     def get_alignment(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_alignment
 *         return _pango2kivy_alignment.get(pango_layout_get_alignment(self.layout), 'left')
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_alignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":899
 *     # set_tabs, get_tabs
 * 
 *     def set_single_paragraph_mode(self, mode):             # <<<<<<<<<<<<<<
 *         pango_layout_set_single_paragraph_mode(self.layout, bool(mode))
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_47set_single_paragraph_mode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_46set_single_paragraph_mode, "KivyPangoLayout.set_single_paragraph_mode(self, mode)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_47set_single_paragraph_mode = {"set_single_paragraph_mode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_47set_single_paragraph_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_46set_single_paragraph_mode};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_47set_single_paragraph_mode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_mode = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_single_paragraph_mode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mode,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 899, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 899, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_single_paragraph_mode", 0) < (0)) __PYX_ERR(0, 899, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_single_paragraph_mode", 1, 1, 1, i); __PYX_ERR(0, 899, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 899, __pyx_L3_error)
    }
    __pyx_v_mode = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_single_paragraph_mode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 899, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_single_paragraph_mode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_46set_single_paragraph_mode(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_mode);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_46set_single_paragraph_mode(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_mode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_single_paragraph_mode", 0);

  /* "kivy/core/text/_text_pango.pyx":900
 * 
 *     def set_single_paragraph_mode(self, mode):
 *         pango_layout_set_single_paragraph_mode(self.layout, bool(mode))             # <<<<<<<<<<<<<<
 * 
 *     def get_single_paragraph_mode(self):
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mode); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 900, __pyx_L1_error)
  pango_layout_set_single_paragraph_mode(__pyx_v_self->layout, (!(!__pyx_t_1)));

  /* "kivy/core/text/_text_pango.pyx":899
 *     # set_tabs, get_tabs
 * 
 *     def set_single_paragraph_mode(self, mode):             # <<<<<<<<<<<<<<
 *         pango_layout_set_single_paragraph_mode(self.layout, bool(mode))
 * 
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.set_single_paragraph_mode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":902
 *         pango_layout_set_single_paragraph_mode(self.layout, bool(mode))
 * 
 *     def get_single_paragraph_mode(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_single_paragraph_mode(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_49get_single_paragraph_mode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_48get_single_paragraph_mode, "KivyPangoLayout.get_single_paragraph_mode(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_49get_single_paragraph_mode = {"get_single_paragraph_mode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_49get_single_paragraph_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_48get_single_paragraph_mode};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_49get_single_paragraph_mode(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_single_paragraph_mode (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_single_paragraph_mode", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_single_paragraph_mode", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_48get_single_paragraph_mode(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_48get_single_paragraph_mode(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_single_paragraph_mode", 0);

  /* "kivy/core/text/_text_pango.pyx":903
 * 
 *     def get_single_paragraph_mode(self):
 *         return pango_layout_get_single_paragraph_mode(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def get_unknown_glyphs_count(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_gint(pango_layout_get_single_paragraph_mode(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":902
 *         pango_layout_set_single_paragraph_mode(self.layout, bool(mode))
 * 
 *     def get_single_paragraph_mode(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_single_paragraph_mode(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_single_paragraph_mode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":905
 *         return pango_layout_get_single_paragraph_mode(self.layout)
 * 
 *     def get_unknown_glyphs_count(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_unknown_glyphs_count(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_51get_unknown_glyphs_count(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_50get_unknown_glyphs_count, "KivyPangoLayout.get_unknown_glyphs_count(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_51get_unknown_glyphs_count = {"get_unknown_glyphs_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_51get_unknown_glyphs_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_50get_unknown_glyphs_count};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_51get_unknown_glyphs_count(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_unknown_glyphs_count (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_unknown_glyphs_count", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_unknown_glyphs_count", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_50get_unknown_glyphs_count(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_50get_unknown_glyphs_count(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_unknown_glyphs_count", 0);

  /* "kivy/core/text/_text_pango.pyx":906
 * 
 *     def get_unknown_glyphs_count(self):
 *         return pango_layout_get_unknown_glyphs_count(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     # pango_layout_get_log_attrs, pango_layout_get_log_attrs_readonly
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(pango_layout_get_unknown_glyphs_count(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":905
 *         return pango_layout_get_single_paragraph_mode(self.layout)
 * 
 *     def get_unknown_glyphs_count(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_unknown_glyphs_count(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_unknown_glyphs_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":912
 *     # pango_layout_index_to_line_x
 * 
 *     def xy_to_index(self, x, y):             # <<<<<<<<<<<<<<
 *         cdef int index, trailing
 *         cdef bint result = pango_layout_xy_to_index(self.layout, x, y, &index, &trailing)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_53xy_to_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_52xy_to_index, "KivyPangoLayout.xy_to_index(self, x, y)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_53xy_to_index = {"xy_to_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_53xy_to_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_52xy_to_index};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_53xy_to_index(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("xy_to_index (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,&__pyx_mstate_global->__pyx_n_u_y,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 912, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  2:
        values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 912, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 912, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "xy_to_index", 0) < (0)) __PYX_ERR(0, 912, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("xy_to_index", 1, 2, 2, i); __PYX_ERR(0, 912, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 912, __pyx_L3_error)
      values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 912, __pyx_L3_error)
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("xy_to_index", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 912, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.xy_to_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_52xy_to_index(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_52xy_to_index(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  int __pyx_v_index;
  int __pyx_v_trailing;
  int __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("xy_to_index", 0);

  /* "kivy/core/text/_text_pango.pyx":914
 *     def xy_to_index(self, x, y):
 *         cdef int index, trailing
 *         cdef bint result = pango_layout_xy_to_index(self.layout, x, y, &index, &trailing)             # <<<<<<<<<<<<<<
 *         return (result, index, trailing)
 * 
*/
  __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_x); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 914, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_y); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 914, __pyx_L1_error)
  __pyx_v_result = pango_layout_xy_to_index(__pyx_v_self->layout, __pyx_t_1, __pyx_t_2, (&__pyx_v_index), (&__pyx_v_trailing));

  /* "kivy/core/text/_text_pango.pyx":915
 *         cdef int index, trailing
 *         cdef bint result = pango_layout_xy_to_index(self.layout, x, y, &index, &trailing)
 *         return (result, index, trailing)             # <<<<<<<<<<<<<<
 * 
 *     # pango_layout_get_cursor_pos
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_trailing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 915, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 915, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 915, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":912
 *     # pango_layout_index_to_line_x
 * 
 *     def xy_to_index(self, x, y):             # <<<<<<<<<<<<<<
 *         cdef int index, trailing
 *         cdef bint result = pango_layout_xy_to_index(self.layout, x, y, &index, &trailing)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.xy_to_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":922
 *     # pango_layout_get_pixel_extents
 * 
 *     def get_size(self):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_size(self.layout, &w, &h)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_55get_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_54get_size, "KivyPangoLayout.get_size(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_55get_size = {"get_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_55get_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_54get_size};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_55get_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_size (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_size", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_size", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_54get_size(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_54get_size(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  int __pyx_v_w;
  int __pyx_v_h;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_size", 0);

  /* "kivy/core/text/_text_pango.pyx":924
 *     def get_size(self):
 *         cdef int w, h
 *         pango_layout_get_size(self.layout, &w, &h)             # <<<<<<<<<<<<<<
 *         return (w, h)
 * 
*/
  pango_layout_get_size(__pyx_v_self->layout, (&__pyx_v_w), (&__pyx_v_h));

  /* "kivy/core/text/_text_pango.pyx":925
 *         cdef int w, h
 *         pango_layout_get_size(self.layout, &w, &h)
 *         return (w, h)             # <<<<<<<<<<<<<<
 * 
 *     def get_pixel_size(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 925, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 925, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":922
 *     # pango_layout_get_pixel_extents
 * 
 *     def get_size(self):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_size(self.layout, &w, &h)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":927
 *         return (w, h)
 * 
 *     def get_pixel_size(self):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_57get_pixel_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_56get_pixel_size, "KivyPangoLayout.get_pixel_size(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_57get_pixel_size = {"get_pixel_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_57get_pixel_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_56get_pixel_size};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_57get_pixel_size(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_pixel_size (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_pixel_size", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_pixel_size", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_56get_pixel_size(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_56get_pixel_size(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  int __pyx_v_w;
  int __pyx_v_h;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_pixel_size", 0);

  /* "kivy/core/text/_text_pango.pyx":929
 *     def get_pixel_size(self):
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)             # <<<<<<<<<<<<<<
 *         return (w, h)
 * 
*/
  pango_layout_get_pixel_size(__pyx_v_self->layout, (&__pyx_v_w), (&__pyx_v_h));

  /* "kivy/core/text/_text_pango.pyx":930
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
 *         return (w, h)             # <<<<<<<<<<<<<<
 * 
 *     def get_baseline(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_h); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 930, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 930, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 930, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":927
 *         return (w, h)
 * 
 *     def get_pixel_size(self):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_pixel_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":932
 *         return (w, h)
 * 
 *     def get_baseline(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_baseline(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_59get_baseline(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_58get_baseline, "KivyPangoLayout.get_baseline(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_59get_baseline = {"get_baseline", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_59get_baseline, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_58get_baseline};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_59get_baseline(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_baseline (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_baseline", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_baseline", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_58get_baseline(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_58get_baseline(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_baseline", 0);

  /* "kivy/core/text/_text_pango.pyx":933
 * 
 *     def get_baseline(self):
 *         return pango_layout_get_baseline(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     def get_line_count(self):
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(pango_layout_get_baseline(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 933, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":932
 *         return (w, h)
 * 
 *     def get_baseline(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_baseline(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_baseline", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":935
 *         return pango_layout_get_baseline(self.layout)
 * 
 *     def get_line_count(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_line_count(self.layout)
 * 
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_61get_line_count(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_60get_line_count, "KivyPangoLayout.get_line_count(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_61get_line_count = {"get_line_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_61get_line_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_60get_line_count};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_61get_line_count(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_line_count (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("get_line_count", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_line_count", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_60get_line_count(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_60get_line_count(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_line_count", 0);

  /* "kivy/core/text/_text_pango.pyx":936
 * 
 *     def get_line_count(self):
 *         return pango_layout_get_line_count(self.layout)             # <<<<<<<<<<<<<<
 * 
 *     # pango_layout_get_line, pango_layout_get_line_readonly
*/
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyLong_From_int(pango_layout_get_line_count(__pyx_v_self->layout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "kivy/core/text/_text_pango.pyx":935
 *         return pango_layout_get_baseline(self.layout)
 * 
 *     def get_line_count(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_line_count(self.layout)
 * 
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.get_line_count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":943
 *     # pango_layout_line_*
 * 
 *     def render_as_bytes(self, color=None):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_63render_as_bytes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_62render_as_bytes, "KivyPangoLayout.render_as_bytes(self, color=None)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_63render_as_bytes = {"render_as_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_63render_as_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_62render_as_bytes};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_63render_as_bytes(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_color = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render_as_bytes (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_color,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 943, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 943, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "render_as_bytes", 0) < (0)) __PYX_ERR(0, 943, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 943, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_None));
    }
    __pyx_v_color = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("render_as_bytes", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 943, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.render_as_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_62render_as_bytes(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_color);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_62render_as_bytes(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_color) {
  int __pyx_v_w;
  int __pyx_v_h;
  unsigned char *__pyx_v_pixels;
  unsigned char __pyx_v_R;
  unsigned char __pyx_v_G;
  unsigned char __pyx_v_B;
  unsigned char __pyx_v_A;
  PyObject *__pyx_v_out = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  long __pyx_t_11;
  unsigned char __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  char const *__pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("render_as_bytes", 0);

  /* "kivy/core/text/_text_pango.pyx":945
 *     def render_as_bytes(self, color=None):
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)             # <<<<<<<<<<<<<<
 *         if w <= 0 or h <= 0:
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
*/
  pango_layout_get_pixel_size(__pyx_v_self->layout, (&__pyx_v_w), (&__pyx_v_h));

  /* "kivy/core/text/_text_pango.pyx":946
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
 *         if w <= 0 or h <= 0:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
 *                         "failed - layout pixel size is {} x {}".format(w, h))
*/
  __pyx_t_2 = (__pyx_v_w <= 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_h <= 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":947
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
 *         if w <= 0 or h <= 0:
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "             # <<<<<<<<<<<<<<
 *                         "failed - layout pixel size is {} x {}".format(w, h))
 *             return
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 947, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "kivy/core/text/_text_pango.pyx":948
 *         if w <= 0 or h <= 0:
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
 *                         "failed - layout pixel size is {} x {}".format(w, h))             # <<<<<<<<<<<<<<
 *             return
 *         cdef unsigned char *pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
*/
    __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_text_pango_KivyPangoLayout_rend;
    __Pyx_INCREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyLong_From_int(__pyx_v_w); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_h); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 948, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_8, __pyx_t_9};
      __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 948, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
    }
    __pyx_t_10 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
      assert(__pyx_t_4);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
      __pyx_t_10 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 947, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":949
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
 *                         "failed - layout pixel size is {} x {}".format(w, h))
 *             return             # <<<<<<<<<<<<<<
 *         cdef unsigned char *pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if not pixels:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":946
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
 *         if w <= 0 or h <= 0:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
 *                         "failed - layout pixel size is {} x {}".format(w, h))
*/
  }

  /* "kivy/core/text/_text_pango.pyx":950
 *                         "failed - layout pixel size is {} x {}".format(w, h))
 *             return
 *         cdef unsigned char *pixels = <unsigned char *>PyMem_Malloc(w * h * 4)             # <<<<<<<<<<<<<<
 *         if not pixels:
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
*/
  __pyx_v_pixels = ((unsigned char *)PyMem_Malloc(((__pyx_v_w * __pyx_v_h) * 4)));

  /* "kivy/core/text/_text_pango.pyx":951
 *             return
 *         cdef unsigned char *pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if not pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
 *                         "failed - out of memory?")
*/
  __pyx_t_1 = (!(__pyx_v_pixels != 0));
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":952
 *         cdef unsigned char *pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if not pixels:
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "             # <<<<<<<<<<<<<<
 *                         "failed - out of memory?")
 *             return
*/
    __pyx_t_6 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_10 = 1;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      assert(__pyx_t_6);
      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx__function);
      __Pyx_DECREF_SET(__pyx_t_4, __pyx__function);
      __pyx_t_10 = 0;
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_text_pango_KivyPangoLayout_rend_2};
      __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":954
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
 *                         "failed - out of memory?")
 *             return             # <<<<<<<<<<<<<<
 *         cdef unsigned char R = 255, G = 255, B = 255, A = 255
 *         if color:
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":951
 *             return
 *         cdef unsigned char *pixels = <unsigned char *>PyMem_Malloc(w * h * 4)
 *         if not pixels:             # <<<<<<<<<<<<<<
 *             Logger.warn("_text_pango: KivyPangoLayout.render_as_bytes "
 *                         "failed - out of memory?")
*/
  }

  /* "kivy/core/text/_text_pango.pyx":955
 *                         "failed - out of memory?")
 *             return
 *         cdef unsigned char R = 255, G = 255, B = 255, A = 255             # <<<<<<<<<<<<<<
 *         if color:
 *             R = min(255, int(color[0] * 255))
*/
  __pyx_v_R = 0xFF;
  __pyx_v_G = 0xFF;
  __pyx_v_B = 0xFF;
  __pyx_v_A = 0xFF;

  /* "kivy/core/text/_text_pango.pyx":956
 *             return
 *         cdef unsigned char R = 255, G = 255, B = 255, A = 255
 *         if color:             # <<<<<<<<<<<<<<
 *             R = min(255, int(color[0] * 255))
 *             G = min(255, int(color[1] * 255))
*/
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_color); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 956, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "kivy/core/text/_text_pango.pyx":957
 *         cdef unsigned char R = 255, G = 255, B = 255, A = 255
 *         if color:
 *             R = min(255, int(color[0] * 255))             # <<<<<<<<<<<<<<
 *             G = min(255, int(color[1] * 255))
 *             B = min(255, int(color[2] * 255))
*/
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_color, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = 0xFF;
    __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_PyInt_FromNumber(&__pyx_t_5, NULL, 0) < (0)) __PYX_ERR(0, 957, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = __Pyx_PyLong_As_unsigned_char(__pyx_t_4); if (unlikely((__pyx_t_12 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 957, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_R = __pyx_t_12;

    /* "kivy/core/text/_text_pango.pyx":958
 *         if color:
 *             R = min(255, int(color[0] * 255))
 *             G = min(255, int(color[1] * 255))             # <<<<<<<<<<<<<<
 *             B = min(255, int(color[2] * 255))
 *             if len(color) > 3:
*/
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_color, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_MultiplyObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_11 = 0xFF;
    __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = __pyx_t_4;
    } else {
      __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_PyInt_FromNumber(&__pyx_t_6, NULL, 0) < (0)) __PYX_ERR(0, 958, __pyx_L1_error)
      __pyx_t_3 = __pyx_t_6;
      __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_12 = __Pyx_PyLong_As_unsigned_char(__pyx_t_3); if (unlikely((__pyx_t_12 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_G = __pyx_t_12;

    /* "kivy/core/text/_text_pango.pyx":959
 *             R = min(255, int(color[0] * 255))
 *             G = min(255, int(color[1] * 255))
 *             B = min(255, int(color[2] * 255))             # <<<<<<<<<<<<<<
 *             if len(color) > 3:
 *                 A = min(255, int(color[3] * 255))
*/
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_color, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyLong_MultiplyObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_11 = 0xFF;
    __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {
      __Pyx_INCREF(__pyx_t_3);
      __pyx_t_4 = __pyx_t_3;
    } else {
      __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_PyInt_FromNumber(&__pyx_t_5, NULL, 0) < (0)) __PYX_ERR(0, 959, __pyx_L1_error)
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = __Pyx_PyLong_As_unsigned_char(__pyx_t_4); if (unlikely((__pyx_t_12 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_B = __pyx_t_12;

    /* "kivy/core/text/_text_pango.pyx":960
 *             G = min(255, int(color[1] * 255))
 *             B = min(255, int(color[2] * 255))
 *             if len(color) > 3:             # <<<<<<<<<<<<<<
 *                 A = min(255, int(color[3] * 255))
 *         with nogil:
*/
    __pyx_t_13 = PyObject_Length(__pyx_v_color); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 960, __pyx_L1_error)
    __pyx_t_1 = (__pyx_t_13 > 3);
    if (__pyx_t_1) {

      /* "kivy/core/text/_text_pango.pyx":961
 *             B = min(255, int(color[2] * 255))
 *             if len(color) > 3:
 *                 A = min(255, int(color[3] * 255))             # <<<<<<<<<<<<<<
 *         with nogil:
 *             memset(pixels, 0, w * h * 4)
*/
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_color, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyLong_MultiplyObjC(__pyx_t_4, __pyx_mstate_global->__pyx_int_255, 0xFF, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = 0xFF;
      __pyx_t_5 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_1) {
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_3 = __pyx_t_4;
      } else {
        __pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_PyInt_FromNumber(&__pyx_t_6, NULL, 0) < (0)) __PYX_ERR(0, 961, __pyx_L1_error)
        __pyx_t_3 = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_12 = __Pyx_PyLong_As_unsigned_char(__pyx_t_3); if (unlikely((__pyx_t_12 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(0, 961, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_A = __pyx_t_12;

      /* "kivy/core/text/_text_pango.pyx":960
 *             G = min(255, int(color[1] * 255))
 *             B = min(255, int(color[2] * 255))
 *             if len(color) > 3:             # <<<<<<<<<<<<<<
 *                 A = min(255, int(color[3] * 255))
 *         with nogil:
*/
    }

    /* "kivy/core/text/_text_pango.pyx":956
 *             return
 *         cdef unsigned char R = 255, G = 255, B = 255, A = 255
 *         if color:             # <<<<<<<<<<<<<<
 *             R = min(255, int(color[0] * 255))
 *             G = min(255, int(color[1] * 255))
*/
  }

  /* "kivy/core/text/_text_pango.pyx":962
 *             if len(color) > 3:
 *                 A = min(255, int(color[3] * 255))
 *         with nogil:             # <<<<<<<<<<<<<<
 *             memset(pixels, 0, w * h * 4)
 *             _render_layout(self.layout, pixels, w, h, 0, 0, R, G, B, A)
*/
  {
      PyThreadState * _save;
      _save = PyEval_SaveThread();
      __Pyx_FastGIL_Remember();
      /*try:*/ {

        /* "kivy/core/text/_text_pango.pyx":963
 *                 A = min(255, int(color[3] * 255))
 *         with nogil:
 *             memset(pixels, 0, w * h * 4)             # <<<<<<<<<<<<<<
 *             _render_layout(self.layout, pixels, w, h, 0, 0, R, G, B, A)
 *         cdef bytes out = <bytes>pixels[:w * h * 4]
*/
        (void)(memset(__pyx_v_pixels, 0, ((__pyx_v_w * __pyx_v_h) * 4)));

        /* "kivy/core/text/_text_pango.pyx":964
 *         with nogil:
 *             memset(pixels, 0, w * h * 4)
 *             _render_layout(self.layout, pixels, w, h, 0, 0, R, G, B, A)             # <<<<<<<<<<<<<<
 *         cdef bytes out = <bytes>pixels[:w * h * 4]
 *         try:
*/
        __pyx_f_4kivy_4core_4text_11_text_pango__render_layout(__pyx_v_self->layout, __pyx_v_pixels, __pyx_v_w, __pyx_v_h, 0, 0, __pyx_v_R, __pyx_v_G, __pyx_v_B, __pyx_v_A); if (unlikely(__Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 964, __pyx_L10_error)
      }

      /* "kivy/core/text/_text_pango.pyx":962
 *             if len(color) > 3:
 *                 A = min(255, int(color[3] * 255))
 *         with nogil:             # <<<<<<<<<<<<<<
 *             memset(pixels, 0, w * h * 4)
 *             _render_layout(self.layout, pixels, w, h, 0, 0, R, G, B, A)
*/
      /*finally:*/ {
        /*normal exit:*/{
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L11;
        }
        __pyx_L10_error: {
          __Pyx_FastGIL_Forget();
          PyEval_RestoreThread(_save);
          goto __pyx_L1_error;
        }
        __pyx_L11:;
      }
  }

  /* "kivy/core/text/_text_pango.pyx":965
 *             memset(pixels, 0, w * h * 4)
 *             _render_layout(self.layout, pixels, w, h, 0, 0, R, G, B, A)
 *         cdef bytes out = <bytes>pixels[:w * h * 4]             # <<<<<<<<<<<<<<
 *         try:
 *             return (w, h, 'rgba', out)
*/
  __pyx_t_3 = __Pyx_PyBytes_FromStringAndSize(((char const *)__pyx_v_pixels) + 0, ((__pyx_v_w * __pyx_v_h) * 4) - 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __pyx_t_3;
  __Pyx_INCREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_out = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "kivy/core/text/_text_pango.pyx":966
 *             _render_layout(self.layout, pixels, w, h, 0, 0, R, G, B, A)
 *         cdef bytes out = <bytes>pixels[:w * h * 4]
 *         try:             # <<<<<<<<<<<<<<
 *             return (w, h, 'rgba', out)
 *         finally:
*/
  /*try:*/ {

    /* "kivy/core/text/_text_pango.pyx":967
 *         cdef bytes out = <bytes>pixels[:w * h * 4]
 *         try:
 *             return (w, h, 'rgba', out)             # <<<<<<<<<<<<<<
 *         finally:
 *             PyMem_Free(pixels)
*/
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_v_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_h); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 967, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4) != (0)) __PYX_ERR(0, 967, __pyx_L13_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 967, __pyx_L13_error);
    __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_rgba);
    __Pyx_GIVEREF(__pyx_mstate_global->__pyx_n_u_rgba);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_mstate_global->__pyx_n_u_rgba) != (0)) __PYX_ERR(0, 967, __pyx_L13_error);
    __Pyx_INCREF(__pyx_v_out);
    __Pyx_GIVEREF(__pyx_v_out);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_v_out) != (0)) __PYX_ERR(0, 967, __pyx_L13_error);
    __pyx_t_4 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L12_return;
  }

  /* "kivy/core/text/_text_pango.pyx":969
 *             return (w, h, 'rgba', out)
 *         finally:
 *             PyMem_Free(pixels)             # <<<<<<<<<<<<<<
 * 
 *     def render_as_ImageData(self, **kwargs):
*/
  /*finally:*/ {
    __pyx_L13_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
       __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
      if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __pyx_t_14 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename;
      {
        PyMem_Free(__pyx_v_pixels);
      }
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_XGIVEREF(__pyx_t_22);
      __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      __Pyx_XGIVEREF(__pyx_t_17);
      __Pyx_XGIVEREF(__pyx_t_18);
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16;
      goto __pyx_L1_error;
    }
    __pyx_L12_return: {
      __pyx_t_22 = __pyx_r;
      __pyx_r = 0;
      PyMem_Free(__pyx_v_pixels);
      __pyx_r = __pyx_t_22;
      __pyx_t_22 = 0;
      goto __pyx_L0;
    }
  }

  /* "kivy/core/text/_text_pango.pyx":943
 *     # pango_layout_line_*
 * 
 *     def render_as_bytes(self, color=None):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.render_as_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":971
 *             PyMem_Free(pixels)
 * 
 *     def render_as_ImageData(self, **kwargs):             # <<<<<<<<<<<<<<
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_65render_as_ImageData(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_64render_as_ImageData, "KivyPangoLayout.render_as_ImageData(self, **kwargs)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_65render_as_ImageData = {"render_as_ImageData", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_65render_as_ImageData, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_64render_as_ImageData};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_65render_as_ImageData(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render_as_ImageData (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("render_as_ImageData", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (__pyx_kwds_len > 0) {
    if (unlikely(__Pyx_CheckKeywordStrings("render_as_ImageData", __pyx_kwds) == -1)) return NULL;
    __pyx_v_kwargs = __Pyx_KwargsAsDict_FASTCALL(__pyx_kwds, __pyx_kwvalues);
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = PyDict_New();
    if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  }
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_64render_as_ImageData(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_64render_as_ImageData(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("render_as_ImageData", 0);

  /* "kivy/core/text/_text_pango.pyx":972
 * 
 *     def render_as_ImageData(self, **kwargs):
 *         result = self.render_as_bytes(**kwargs)             # <<<<<<<<<<<<<<
 *         if result:
 *             return ImageData(*result)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_render_as_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "kivy/core/text/_text_pango.pyx":973
 *     def render_as_ImageData(self, **kwargs):
 *         result = self.render_as_bytes(**kwargs)
 *         if result:             # <<<<<<<<<<<<<<
 *             return ImageData(*result)
 * 
*/
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 973, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "kivy/core/text/_text_pango.pyx":974
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
 *             return ImageData(*result)             # <<<<<<<<<<<<<<
 * 
 *     def render_as_Texture(self, mipmap=False, **kwargs):
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ImageData); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":973
 *     def render_as_ImageData(self, **kwargs):
 *         result = self.render_as_bytes(**kwargs)
 *         if result:             # <<<<<<<<<<<<<<
 *             return ImageData(*result)
 * 
*/
  }

  /* "kivy/core/text/_text_pango.pyx":971
 *             PyMem_Free(pixels)
 * 
 *     def render_as_ImageData(self, **kwargs):             # <<<<<<<<<<<<<<
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.render_as_ImageData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "kivy/core/text/_text_pango.pyx":976
 *             return ImageData(*result)
 * 
 *     def render_as_Texture(self, mipmap=False, **kwargs):             # <<<<<<<<<<<<<<
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_67render_as_Texture(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_66render_as_Texture, "KivyPangoLayout.render_as_Texture(self, mipmap=False, **kwargs)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_67render_as_Texture = {"render_as_Texture", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_67render_as_Texture, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_66render_as_Texture};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_67render_as_Texture(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_mipmap = 0;
  PyObject *__pyx_v_kwargs = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render_as_Texture (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_mipmap,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 976, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "render_as_Texture", 1) < (0)) __PYX_ERR(0, 976, __pyx_L3_error)
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
    } else {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 976, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      if (!values[0]) values[0] = __Pyx_NewRef(((PyObject *)Py_False));
    }
    __pyx_v_mipmap = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("render_as_Texture", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 976, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.render_as_Texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_66render_as_Texture(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v_mipmap, __pyx_v_kwargs);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_DECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_66render_as_Texture(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, PyObject *__pyx_v_mipmap, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_tex = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("render_as_Texture", 0);

  /* "kivy/core/text/_text_pango.pyx":977
 * 
 *     def render_as_Texture(self, mipmap=False, **kwargs):
 *         result = self.render_as_bytes(**kwargs)             # <<<<<<<<<<<<<<
 *         if result:
 *             tex = Texture.create_from_data(ImageData(*result), mipmap=mipmap)
*/
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_render_as_bytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "kivy/core/text/_text_pango.pyx":978
 *     def render_as_Texture(self, mipmap=False, **kwargs):
 *         result = self.render_as_bytes(**kwargs)
 *         if result:             # <<<<<<<<<<<<<<
 *             tex = Texture.create_from_data(ImageData(*result), mipmap=mipmap)
 *             tex.flip_vertical()
*/
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 978, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "kivy/core/text/_text_pango.pyx":979
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
 *             tex = Texture.create_from_data(ImageData(*result), mipmap=mipmap)             # <<<<<<<<<<<<<<
 *             tex.flip_vertical()
 *             return tex
*/
    __pyx_t_2 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4kivy_8graphics_7texture_Texture);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ImageData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 979, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_6};
      __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_mipmap, __pyx_v_mipmap, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 979, __pyx_L1_error)
      __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_create_from_data, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __pyx_v_tex = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":980
 *         if result:
 *             tex = Texture.create_from_data(ImageData(*result), mipmap=mipmap)
 *             tex.flip_vertical()             # <<<<<<<<<<<<<<
 *             return tex
*/
    __pyx_t_5 = __pyx_v_tex;
    __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_flip_vertical, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "kivy/core/text/_text_pango.pyx":981
 *             tex = Texture.create_from_data(ImageData(*result), mipmap=mipmap)
 *             tex.flip_vertical()
 *             return tex             # <<<<<<<<<<<<<<
*/
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_tex);
    __pyx_r = __pyx_v_tex;
    goto __pyx_L0;

    /* "kivy/core/text/_text_pango.pyx":978
 *     def render_as_Texture(self, mipmap=False, **kwargs):
 *         result = self.render_as_bytes(**kwargs)
 *         if result:             # <<<<<<<<<<<<<<
 *             tex = Texture.create_from_data(ImageData(*result), mipmap=mipmap)
 *             tex.flip_vertical()
*/
  }

  /* "kivy/core/text/_text_pango.pyx":976
 *             return ImageData(*result)
 * 
 *     def render_as_Texture(self, mipmap=False, **kwargs):             # <<<<<<<<<<<<<<
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
*/

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.render_as_Texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_tex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_69__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_68__reduce_cython__, "KivyPangoLayout.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_69__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_69__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_68__reduce_cython__};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_69__reduce_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL; }
  const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
  if (unlikely(__pyx_kwds_len < 0)) return NULL;
  if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;}
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_68__reduce_cython__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_68__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_layout_cannot_be_converted, 0, 0);
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
*/

/* Python wrapper */
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_71__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_70__setstate_cython__, "KivyPangoLayout.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_71__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_71__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_70__setstate_cython__};
static PyObject *__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_71__setstate_cython__(PyObject *__pyx_v_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_SIZE
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_state,0};
    const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
    if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 3, __pyx_L3_error)
    if (__pyx_kwds_len > 0) {
      switch (__pyx_nargs) {
        case  1:
        values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
        if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      const Py_ssize_t kwd_pos_args = __pyx_nargs;
      if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__setstate_cython__", 0) < (0)) __PYX_ERR(1, 3, __pyx_L3_error)
      for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
        if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, i); __PYX_ERR(1, 3, __pyx_L3_error) }
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
      if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 3, __pyx_L3_error)
    }
    __pyx_v___pyx_state = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_70__setstate_cython__(((struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *)__pyx_v_self), __pyx_v___pyx_state);

  /* function exit code */
  for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    Py_XDECREF(values[__pyx_temp]);
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_70__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"             # <<<<<<<<<<<<<<
*/
  __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_self_layout_cannot_be_converted, 0, 0);
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
*/

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("kivy.core.text._text_pango.KivyPangoLayout.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
/* #### Code section: module_exttypes ### */

static PyObject *__pyx_tp_new_4kivy_4core_4text_11_text_pango_ContextContainer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *p;
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)o);
  p->loaded_fonts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_ContextContainer(PyObject *o) {
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *p = (struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_ContextContainer) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->loaded_fonts);
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static int __pyx_tp_traverse_4kivy_4core_4text_11_text_pango_ContextContainer(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *p = (struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)o;
  {
    e = __Pyx_call_type_traverse(o, 1, v, a);
    if (e) return e;
  }
  if (p->loaded_fonts) {
    e = (*v)(p->loaded_fonts, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4kivy_4core_4text_11_text_pango_ContextContainer(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *p = (struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer *)o;
  tmp = ((PyObject*)p->loaded_fonts);
  p->loaded_fonts = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_4kivy_4core_4text_11_text_pango_ContextContainer[] = {
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_5__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_16ContextContainer_4__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_16ContextContainer_7__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_16ContextContainer_6__setstate_cython__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_ContextContainer},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_4kivy_4core_4text_11_text_pango_ContextContainer},
  {Py_tp_clear, (void *)__pyx_tp_clear_4kivy_4core_4text_11_text_pango_ContextContainer},
  {Py_tp_methods, (void *)__pyx_methods_4kivy_4core_4text_11_text_pango_ContextContainer},
  {Py_tp_new, (void *)__pyx_tp_new_4kivy_4core_4text_11_text_pango_ContextContainer},
  {0, 0},
};
static PyType_Spec __pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer_spec = {
  "kivy.core.text._text_pango.ContextContainer",
  sizeof(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
  __pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer_slots,
};
#else

static PyTypeObject __pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer = {
  PyVarObject_HEAD_INIT(0, 0)
  "kivy.core.text._text_pango.""ContextContainer", /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_4core_4text_11_text_pango_ContextContainer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_ContextContainer, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4kivy_4core_4text_11_text_pango_ContextContainer, /*tp_traverse*/
  __pyx_tp_clear_4kivy_4core_4text_11_text_pango_ContextContainer, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_4core_4text_11_text_pango_ContextContainer, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_4core_4text_11_text_pango_ContextContainer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoRenderer(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoRenderer(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoRenderer) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyMethodDef __pyx_methods_4kivy_4core_4text_11_text_pango_KivyPangoRenderer[] = {
  {"render", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_5render, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_4render},
  {"get_ImageData", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_7get_ImageData, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_6get_ImageData},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_10__setstate_cython__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoRenderer},
  {Py_tp_methods, (void *)__pyx_methods_4kivy_4core_4text_11_text_pango_KivyPangoRenderer},
  {Py_tp_new, (void *)__pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoRenderer},
  {0, 0},
};
static PyType_Spec __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer_spec = {
  "kivy.core.text._text_pango.KivyPangoRenderer",
  sizeof(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer_slots,
};
#else

static PyTypeObject __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer = {
  PyVarObject_HEAD_INIT(0, 0)
  "kivy.core.text._text_pango.""KivyPangoRenderer", /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoRenderer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoRenderer, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_4core_4text_11_text_pango_KivyPangoRenderer, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoRenderer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyObject *__pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoLayout(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  o = __Pyx_AllocateExtensionType(t, 0);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoLayout(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoLayout) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  PyTypeObject *tp = Py_TYPE(o);
  #if CYTHON_USE_TYPE_SLOTS
  (*tp->tp_free)(o);
  #else
  {
    freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free);
    if (tp_free) tp_free(o);
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  Py_DECREF(tp);
  #endif
}

static PyMethodDef __pyx_methods_4kivy_4core_4text_11_text_pango_KivyPangoLayout[] = {
  {"set_markup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_5set_markup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_4set_markup},
  {"set_width", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_7set_width, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_6set_width},
  {"get_width", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_9get_width, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_8get_width},
  {"set_height", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_11set_height, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_10set_height},
  {"get_height", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_13get_height, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_12get_height},
  {"get_wrap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_15get_wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_14get_wrap},
  {"set_wrap", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_17set_wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_16set_wrap},
  {"is_wrapped", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_19is_wrapped, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_18is_wrapped},
  {"set_ellipsize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_21set_ellipsize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_20set_ellipsize},
  {"get_ellipsize", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_23get_ellipsize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_22get_ellipsize},
  {"is_ellipsized", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_25is_ellipsized, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_24is_ellipsized},
  {"set_indent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_27set_indent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_26set_indent},
  {"get_indent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_29get_indent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_28get_indent},
  {"set_spacing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_31set_spacing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_30set_spacing},
  {"get_spacing", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_33get_spacing, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_32get_spacing},
  {"set_justify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_35set_justify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_34set_justify},
  {"get_justify", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_37get_justify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_36get_justify},
  {"set_auto_dir", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_39set_auto_dir, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_38set_auto_dir},
  {"get_auto_dir", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_41get_auto_dir, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_40get_auto_dir},
  {"set_alignment", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_43set_alignment, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_42set_alignment},
  {"get_alignment", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_45get_alignment, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_44get_alignment},
  {"set_single_paragraph_mode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_47set_single_paragraph_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_46set_single_paragraph_mode},
  {"get_single_paragraph_mode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_49get_single_paragraph_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_48get_single_paragraph_mode},
  {"get_unknown_glyphs_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_51get_unknown_glyphs_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_50get_unknown_glyphs_count},
  {"xy_to_index", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_53xy_to_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_52xy_to_index},
  {"get_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_55get_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_54get_size},
  {"get_pixel_size", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_57get_pixel_size, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_56get_pixel_size},
  {"get_baseline", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_59get_baseline, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_58get_baseline},
  {"get_line_count", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_61get_line_count, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_60get_line_count},
  {"render_as_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_63render_as_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_62render_as_bytes},
  {"render_as_ImageData", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_65render_as_ImageData, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_64render_as_ImageData},
  {"render_as_Texture", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_67render_as_Texture, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_66render_as_Texture},
  {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_69__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_68__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_71__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_70__setstate_cython__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoLayout},
  {Py_tp_doc, (void *)PyDoc_STR("KivyPangoLayout(font_context)")},
  {Py_tp_methods, (void *)__pyx_methods_4kivy_4core_4text_11_text_pango_KivyPangoLayout},
  {Py_tp_init, (void *)__pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoLayout},
  {0, 0},
};
static PyType_Spec __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout_spec = {
  "kivy.core.text._text_pango.KivyPangoLayout",
  sizeof(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout_slots,
};
#else

static PyTypeObject __pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout = {
  PyVarObject_HEAD_INIT(0, 0)
  "kivy.core.text._text_pango.""KivyPangoLayout", /*tp_name*/
  sizeof(struct __pyx_obj_4kivy_4core_4text_11_text_pango_KivyPangoLayout), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4kivy_4core_4text_11_text_pango_KivyPangoLayout, /*tp_dealloc*/
  0, /*tp_vectorcall_offset*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_as_async*/
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  PyDoc_STR("KivyPangoLayout(font_context)"), /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4kivy_4core_4text_11_text_pango_KivyPangoLayout, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  __pyx_pw_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4kivy_4core_4text_11_text_pango_KivyPangoLayout, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};
/* #### Code section: initfunc_declarations ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/
/* #### Code section: init_module ### */

static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_base_direction = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_alignment = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_alignment = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_ellipsize_mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_ellipsize_mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_wrap_mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_wrap_mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer)) __PYX_ERR(0, 175, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer_spec, __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer) < (0)) __PYX_ERR(0, 175, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer = &__pyx_type_4kivy_4core_4text_11_text_pango_ContextContainer;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer) < (0)) __PYX_ERR(0, 175, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer->tp_dictoffset && __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ContextContainer, (PyObject *) __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer) < (0)) __PYX_ERR(0, 175, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_ContextContainer) < (0)) __PYX_ERR(0, 175, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer)) __PYX_ERR(0, 576, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer_spec, __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer) < (0)) __PYX_ERR(0, 576, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer = &__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoRenderer;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer) < (0)) __PYX_ERR(0, 576, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer->tp_dictoffset && __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_KivyPangoRenderer, (PyObject *) __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer) < (0)) __PYX_ERR(0, 576, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer) < (0)) __PYX_ERR(0, 576, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout)) __PYX_ERR(0, 807, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout_spec, __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout) < (0)) __PYX_ERR(0, 807, __pyx_L1_error)
  #else
  __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout = &__pyx_type_4kivy_4core_4text_11_text_pango_KivyPangoLayout;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout) < (0)) __PYX_ERR(0, 807, __pyx_L1_error)
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout);
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout->tp_dictoffset && __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout->tp_getattro = PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout, (PyObject *) __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout) < (0)) __PYX_ERR(0, 807, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout) < (0)) __PYX_ERR(0, 807, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule("kivy.graphics.texture"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_mstate->__pyx_ptype_4kivy_8graphics_7texture_Texture = __Pyx_ImportType_3_2_3(__pyx_t_1, "kivy.graphics.texture", "Texture",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_4kivy_8graphics_7texture_Texture), __PYX_GET_STRUCT_ALIGNMENT_3_2_3(struct __pyx_obj_4kivy_8graphics_7texture_Texture),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_4kivy_8graphics_7texture_Texture), __PYX_GET_STRUCT_ALIGNMENT_3_2_3(struct __pyx_obj_4kivy_8graphics_7texture_Texture),
  #else
  sizeof(struct __pyx_obj_4kivy_8graphics_7texture_Texture), __PYX_GET_STRUCT_ALIGNMENT_3_2_3(struct __pyx_obj_4kivy_8graphics_7texture_Texture),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_3); if (!__pyx_mstate->__pyx_ptype_4kivy_8graphics_7texture_Texture) __PYX_ERR(2, 3, __pyx_L1_error)
  __pyx_vtabptr_4kivy_8graphics_7texture_Texture = (struct __pyx_vtabstruct_4kivy_8graphics_7texture_Texture*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_4kivy_8graphics_7texture_Texture); if (unlikely(!__pyx_vtabptr_4kivy_8graphics_7texture_Texture)) __PYX_ERR(2, 3, __pyx_L1_error)
  __pyx_mstate->__pyx_ptype_4kivy_8graphics_7texture_TextureRegion = __Pyx_ImportType_3_2_3(__pyx_t_1, "kivy.graphics.texture", "TextureRegion",
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion), __PYX_GET_STRUCT_ALIGNMENT_3_2_3(struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion),
  #elif CYTHON_COMPILING_IN_LIMITED_API
  sizeof(struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion), __PYX_GET_STRUCT_ALIGNMENT_3_2_3(struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion),
  #else
  sizeof(struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion), __PYX_GET_STRUCT_ALIGNMENT_3_2_3(struct __pyx_obj_4kivy_8graphics_7texture_TextureRegion),
  #endif
  __Pyx_ImportType_CheckSize_Warn_3_2_3); if (!__pyx_mstate->__pyx_ptype_4kivy_8graphics_7texture_TextureRegion) __PYX_ERR(2, 44, __pyx_L1_error)
  __pyx_vtabptr_4kivy_8graphics_7texture_TextureRegion = (struct __pyx_vtabstruct_4kivy_8graphics_7texture_TextureRegion*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_4kivy_8graphics_7texture_TextureRegion); if (unlikely(!__pyx_vtabptr_4kivy_8graphics_7texture_TextureRegion)) __PYX_ERR(2, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  {
    __pyx_t_1 = PyImport_ImportModule("kivy.graphics.cgl"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    const char * __pyx_import_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_pyx_t_4kivy_8graphics_3cgl_GLE);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (unlikely(!__pyx_import_signature)) __PYX_ERR(0, 1, __pyx_L1_error)
    #endif
    const char * __pyx_import_name = __pyx_import_signature + 71;
    void **const __pyx_import_pointers[] = {(void **)&__pyx_vp_4kivy_8graphics_3cgl_cgl, (void **)&__pyx_vp_4kivy_8graphics_3cgl_pi, (void **)&__pyx_vp_4kivy_8graphics_3cgl_kivy_opengl_es2, (void **)&__pyx_vp_4kivy_8graphics_3cgl_verify_gl_main_thread, (void **)&__pyx_vp_4kivy_8graphics_3cgl_initialized_tid, (void **) NULL};
    void **const *__pyx_import_pointer = __pyx_import_pointers;
    const char *__pyx_import_current_signature = __pyx_import_signature;
    while (*__pyx_import_pointer) {
      if (__Pyx_ImportVoidPtr_3_2_3(__pyx_t_1, __pyx_import_name, *__pyx_import_pointer, __pyx_import_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      ++__pyx_import_pointer;
      __pyx_import_name = strchr(__pyx_import_name, '\0') + 1;
      __pyx_import_signature = strchr(__pyx_import_signature, '\0') + 1;
      if (*__pyx_import_signature != '\0') __pyx_import_current_signature = __pyx_import_signature;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec__text_pango(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec__text_pango},
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE},
  #endif
  #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE
  {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED},
  #endif
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "_text_pango",
      0, /* m_doc */
    #if CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstatetype), /* m_size */
    #else
      (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif

/* PyModInitFuncType */
#ifndef CYTHON_NO_PYINIT_EXPORT
  #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#else
  #ifdef __cplusplus
  #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
  #else
  #define __Pyx_PyMODINIT_FUNC PyObject *
  #endif
#endif

__Pyx_PyMODINIT_FUNC PyInit__text_pango(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit__text_pango(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
/* ModuleCreationPEP489 */
#if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) {
    {
        PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think
        if (!module) {
            PyErr_Clear(); // just try the 3.8-3.12 version
            module = PyImport_ImportModule("_xxsubinterpreters");
            if (!module) goto bad;
        }
        PyObject *current = PyObject_CallMethod(module, "get_current", NULL);
        Py_DECREF(module);
        if (!current) goto bad;
        if (PyTuple_Check(current)) {
            PyObject *new_current = PySequence_GetItem(current, 0);
            Py_DECREF(current);
            current = new_current;
            if (!new_current) goto bad;
        }
        long long as_c_int = PyLong_AsLongLong(current);
        Py_DECREF(current);
        return as_c_int;
    }
  bad:
    PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n");
    return -1;
}
#endif
#if !CYTHON_USE_MODULE_STATE
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    static PY_INT64_T main_interpreter_id = -1;
#if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000
    PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_GRAAL
    PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get());
#elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\
      || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000))
    PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId();
#elif CYTHON_COMPILING_IN_LIMITED_API
    PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get());
#else
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
#endif
    if (unlikely(current_id == -1)) {
        return -1;
    }
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return 0;
    } else if (unlikely(main_interpreter_id != current_id)) {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#endif
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    #if !CYTHON_USE_MODULE_STATE
    if (__Pyx_check_single_interpreter())
        return NULL;
    #endif
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec__text_pango(PyObject *__pyx_pyinit_module)
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  __pyx_mstatetype *__pyx_mstate = NULL;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  size_t __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module '_text_pango' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #else
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_t_1 = __pyx_pyinit_module;
  Py_INCREF(__pyx_t_1);
  #else
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #if CYTHON_USE_MODULE_STATE
  {
    int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_text_pango" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = __pyx_t_1;
  #endif
  #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED);
  #endif
  __pyx_mstate = __pyx_mstate_global;
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_mstate->__pyx_d);
  __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /* ImportRefnannyAPI */
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
    PyErr_Clear();
    __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
    if (!__Pyx_RefNanny)
        Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  
__Pyx_RefNannySetupContext("PyInit__text_pango", 0);
  __Pyx_init_runtime_version();
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Library function declarations ---*/
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__pyx_module_is_main_kivy__core__text___text_pango) {
    if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "kivy.core.text._text_pango")) {
      if (unlikely((PyDict_SetItemString(modules, "kivy.core.text._text_pango", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code(__pyx_mstate);
  (void)__Pyx_modinit_variable_export_code(__pyx_mstate);
  (void)__Pyx_modinit_function_export_code(__pyx_mstate);
  if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  if (unlikely((__Pyx_modinit_variable_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_function_import_code(__pyx_mstate);
  /*--- Execution code ---*/

  /* "kivy/core/text/_text_pango.pyx":14
 * from libc.string cimport memset
 * from cpython.mem cimport PyMem_Malloc, PyMem_Free
 * from kivy.logger import Logger             # <<<<<<<<<<<<<<
 * from kivy.core.image import ImageData
 * from kivy.graphics.texture cimport Texture
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Logger};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_kivy_logger, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Logger};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 14, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 14, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":15
 * from cpython.mem cimport PyMem_Malloc, PyMem_Free
 * from kivy.logger import Logger
 * from kivy.core.image import ImageData             # <<<<<<<<<<<<<<
 * from kivy.graphics.texture cimport Texture
 * 
*/
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ImageData};
    __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_kivy_core_image, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  }
  __pyx_t_2 = __pyx_t_1;
  __Pyx_GOTREF(__pyx_t_2);
  {
    PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ImageData};
    __pyx_t_3 = 0; {
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 15, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":26
 * # name(s) so the file doesn't have to be opened twice for every future load to
 * # a different context.
 * cdef dict kivy_fontfamily_cache = {}             # <<<<<<<<<<<<<<
 * 
 * # All font contexts (including isolated) are stored in a shared dictionary.
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_fontfamily_cache, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":32
 * # oldest context will be purged from cache.
 * # FIXME: Fallback contexts are not purged, maybe they should be... ?
 * cdef dict kivy_font_context_cache = {}             # <<<<<<<<<<<<<<
 * cdef list kivy_isolated_cache_order = []
 * 
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_font_context_cache, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":33
 * # FIXME: Fallback contexts are not purged, maybe they should be... ?
 * cdef dict kivy_font_context_cache = {}
 * cdef list kivy_isolated_cache_order = []             # <<<<<<<<<<<<<<
 * 
 * # Purge oldest items from cache dict + order list. This is not ideal,
*/
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_isolated_cache_order, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":50
 * # to do with ft2 directly due to vast number of encodings + huge tables etc)
 * cdef FT_Library kivy_ft_library
 * cdef int kivy_ft_error = FT_Init_FreeType(&kivy_ft_library)             # <<<<<<<<<<<<<<
 * if kivy_ft_error:
 *     Logger.warn("_text_pango: Failed to initialize FreeType2 "
*/
  __pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_error = FT_Init_FreeType((&__pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_library));

  /* "kivy/core/text/_text_pango.pyx":51
 * cdef FT_Library kivy_ft_library
 * cdef int kivy_ft_error = FT_Init_FreeType(&kivy_ft_library)
 * if kivy_ft_error:             # <<<<<<<<<<<<<<
 *     Logger.warn("_text_pango: Failed to initialize FreeType2 "
 *                 "library. Error code: {}".format(kivy_ft_error))
*/
  __pyx_t_5 = (__pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_error != 0);
  if (__pyx_t_5) {

    /* "kivy/core/text/_text_pango.pyx":52
 * cdef int kivy_ft_error = FT_Init_FreeType(&kivy_ft_library)
 * if kivy_ft_error:
 *     Logger.warn("_text_pango: Failed to initialize FreeType2 "             # <<<<<<<<<<<<<<
 *                 "library. Error code: {}".format(kivy_ft_error))
 * 
*/
    __pyx_t_4 = NULL;
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "kivy/core/text/_text_pango.pyx":53
 * if kivy_ft_error:
 *     Logger.warn("_text_pango: Failed to initialize FreeType2 "
 *                 "library. Error code: {}".format(kivy_ft_error))             # <<<<<<<<<<<<<<
 * 
 * # Return a string that can be used to (hopefully) render with the font
*/
    __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_text_pango_Failed_to_initialize;
    __Pyx_INCREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyLong_From_int(__pyx_v_4kivy_4core_4text_11_text_pango_kivy_ft_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = 0;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
    }
    __pyx_t_10 = 1;
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "kivy/core/text/_text_pango.pyx":51
 * cdef FT_Library kivy_ft_library
 * cdef int kivy_ft_error = FT_Init_FreeType(&kivy_ft_library)
 * if kivy_ft_error:             # <<<<<<<<<<<<<<
 *     Logger.warn("_text_pango: Failed to initialize FreeType2 "
 *                 "library. Error code: {}".format(kivy_ft_error))
*/
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_16ContextContainer_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ContextContainer___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_16ContextContainer_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ContextContainer___setstate_cyth, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":462
 * # Renders the pango layout to a grayscale bitmap, and blits RGBA at x, y
 * cdef short RSHIFT, GSHIFT, BSHIFT, ASHIFT
 * if KIVY_BYTEORDER == KIVY_LIL_ENDIAN:             # <<<<<<<<<<<<<<
 *     RSHIFT = 0;  GSHIFT = 8;  BSHIFT = 16; ASHIFT = 24
 * else:
*/
  __pyx_t_5 = (KIVY_BYTEORDER == KIVY_LIL_ENDIAN);
  if (__pyx_t_5) {

    /* "kivy/core/text/_text_pango.pyx":463
 * cdef short RSHIFT, GSHIFT, BSHIFT, ASHIFT
 * if KIVY_BYTEORDER == KIVY_LIL_ENDIAN:
 *     RSHIFT = 0;  GSHIFT = 8;  BSHIFT = 16; ASHIFT = 24             # <<<<<<<<<<<<<<
 * else:
 *     RSHIFT = 24; GSHIFT = 16; BSHIFT = 8;  ASHIFT = 0
*/
    __pyx_v_4kivy_4core_4text_11_text_pango_RSHIFT = 0;
    __pyx_v_4kivy_4core_4text_11_text_pango_GSHIFT = 8;
    __pyx_v_4kivy_4core_4text_11_text_pango_BSHIFT = 16;
    __pyx_v_4kivy_4core_4text_11_text_pango_ASHIFT = 24;

    /* "kivy/core/text/_text_pango.pyx":462
 * # Renders the pango layout to a grayscale bitmap, and blits RGBA at x, y
 * cdef short RSHIFT, GSHIFT, BSHIFT, ASHIFT
 * if KIVY_BYTEORDER == KIVY_LIL_ENDIAN:             # <<<<<<<<<<<<<<
 *     RSHIFT = 0;  GSHIFT = 8;  BSHIFT = 16; ASHIFT = 24
 * else:
*/
    goto __pyx_L3;
  }

  /* "kivy/core/text/_text_pango.pyx":465
 *     RSHIFT = 0;  GSHIFT = 8;  BSHIFT = 16; ASHIFT = 24
 * else:
 *     RSHIFT = 24; GSHIFT = 16; BSHIFT = 8;  ASHIFT = 0             # <<<<<<<<<<<<<<
 * @cython.cdivision(True)
 * @cython.boundscheck(False)
*/
  /*else*/ {
    __pyx_v_4kivy_4core_4text_11_text_pango_RSHIFT = 24;
    __pyx_v_4kivy_4core_4text_11_text_pango_GSHIFT = 16;
    __pyx_v_4kivy_4core_4text_11_text_pango_BSHIFT = 8;
    __pyx_v_4kivy_4core_4text_11_text_pango_ASHIFT = 0;
  }
  __pyx_L3:;

  /* "kivy/core/text/_text_pango.pyx":601
 *     # separately. In that case, we get several calls to render() with misc
 *     # options and x/y positions. End result is stored in self.pixels.
 *     def render(self, kivylabel, text, x, y):             # <<<<<<<<<<<<<<
 *         if not self.pixels:
 *             Logger.warn("_text_pango: render() called, but self.pixels is NULL")
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_5render, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoRenderer_render, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer, __pyx_mstate_global->__pyx_n_u_render, __pyx_t_2) < (0)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":632
 * 
 *     # Return ImageData instance with the rendered pixels
 *     def get_ImageData(self):             # <<<<<<<<<<<<<<
 *         if not self.pixels:
 *             Logger.warn("_text_pango: get_ImageData() self.pixels == NULL")
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_7get_ImageData, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoRenderer_get_ImageData, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoRenderer, __pyx_mstate_global->__pyx_n_u_get_ImageData, __pyx_t_2) < (0)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoRenderer___reduce_cytho, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_17KivyPangoRenderer_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoRenderer___setstate_cyt, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":651
 * 
 * 
 * def kpango_get_extents(kivylabel, text):             # <<<<<<<<<<<<<<
 *     if text is None:  # text='' needs to return size
 *         return 0, 0
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_1kpango_get_extents, 0, __pyx_mstate_global->__pyx_n_u_kpango_get_extents, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_get_extents, __pyx_t_2) < (0)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":670
 * 
 * 
 * def kpango_get_ascent(kivylabel):             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_3kpango_get_ascent, 0, __pyx_mstate_global->__pyx_n_u_kpango_get_ascent, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_get_ascent, __pyx_t_2) < (0)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":682
 * 
 * 
 * def kpango_get_descent(kivylabel):             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_5kpango_get_descent, 0, __pyx_mstate_global->__pyx_n_u_kpango_get_descent, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_get_descent, __pyx_t_2) < (0)) __PYX_ERR(0, 682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":695
 * 
 * cdef dict _pango2kivy_base_direction = {
 *     PANGO_DIRECTION_LTR: 'ltr',             # <<<<<<<<<<<<<<
 *     PANGO_DIRECTION_RTL: 'rtl',
 *     PANGO_DIRECTION_WEAK_LTR: 'weak_ltr',
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyLong_From_PangoDirection(PANGO_DIRECTION_LTR); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_ltr) < (0)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":696
 * cdef dict _pango2kivy_base_direction = {
 *     PANGO_DIRECTION_LTR: 'ltr',
 *     PANGO_DIRECTION_RTL: 'rtl',             # <<<<<<<<<<<<<<
 *     PANGO_DIRECTION_WEAK_LTR: 'weak_ltr',
 *     PANGO_DIRECTION_WEAK_RTL: 'weak_rtl'}
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoDirection(PANGO_DIRECTION_RTL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 696, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_rtl) < (0)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":697
 *     PANGO_DIRECTION_LTR: 'ltr',
 *     PANGO_DIRECTION_RTL: 'rtl',
 *     PANGO_DIRECTION_WEAK_LTR: 'weak_ltr',             # <<<<<<<<<<<<<<
 *     PANGO_DIRECTION_WEAK_RTL: 'weak_rtl'}
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoDirection(PANGO_DIRECTION_WEAK_LTR); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_weak_ltr) < (0)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":698
 *     PANGO_DIRECTION_RTL: 'rtl',
 *     PANGO_DIRECTION_WEAK_LTR: 'weak_ltr',
 *     PANGO_DIRECTION_WEAK_RTL: 'weak_rtl'}             # <<<<<<<<<<<<<<
 * 
 * def kpango_find_base_dir(text):
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoDirection(PANGO_DIRECTION_WEAK_RTL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_weak_rtl) < (0)) __PYX_ERR(0, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_base_direction);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_base_direction, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":700
 *     PANGO_DIRECTION_WEAK_RTL: 'weak_rtl'}
 * 
 * def kpango_find_base_dir(text):             # <<<<<<<<<<<<<<
 *     global _pango2kivy_base_direction
 *     cdef bytes t = _byte_option(text)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_7kpango_find_base_dir, 0, __pyx_mstate_global->__pyx_n_u_kpango_find_base_dir, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_find_base_dir, __pyx_t_2) < (0)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":706
 * 
 * 
 * def kpango_font_context_exists(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_9kpango_font_context_exists, 0, __pyx_mstate_global->__pyx_n_u_kpango_font_context_exists, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_font_context_exists, __pyx_t_2) < (0)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":712
 * 
 * 
 * def kpango_font_context_create(font_context, fontfile=None):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_11kpango_font_context_create, 0, __pyx_mstate_global->__pyx_n_u_kpango_font_context_create, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1]);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_font_context_create, __pyx_t_2) < (0)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":723
 * 
 * 
 * def kpango_font_context_add_font(font_context, fontfile):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kiby_fontfamily_cache
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_13kpango_font_context_add_font, 0, __pyx_mstate_global->__pyx_n_u_kpango_font_context_add_font, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_font_context_add_font, __pyx_t_2) < (0)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":742
 * 
 * 
 * def kpango_font_context_destroy(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15kpango_font_context_destroy, 0, __pyx_mstate_global->__pyx_n_u_kpango_font_context_destroy, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_font_context_destroy, __pyx_t_2) < (0)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":749
 * 
 * 
 * def kpango_font_context_list():             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     return list(kivy_font_context_cache.keys())
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_17kpango_font_context_list, 0, __pyx_mstate_global->__pyx_n_u_kpango_font_context_list, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_font_context_list, __pyx_t_2) < (0)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":754
 * 
 * 
 * def kpango_font_context_list_families(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_19kpango_font_context_list_families, 0, __pyx_mstate_global->__pyx_n_u_kpango_font_context_list_familie, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_font_context_list_familie, __pyx_t_2) < (0)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":762
 * 
 * 
 * def kpango_font_context_list_custom(font_context):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     global kivy_fontfamily_cache
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_21kpango_font_context_list_custom, 0, __pyx_mstate_global->__pyx_n_u_kpango_font_context_list_custom, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_kpango_font_context_list_custom, __pyx_t_2) < (0)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":779
 * 
 * cdef dict _pango2kivy_alignment = {
 *         PANGO_ALIGN_LEFT: 'left',             # <<<<<<<<<<<<<<
 *         PANGO_ALIGN_CENTER: 'center',
 *         PANGO_ALIGN_RIGHT: 'right'}
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyLong_From_PangoAlignment(PANGO_ALIGN_LEFT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_left) < (0)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":780
 * cdef dict _pango2kivy_alignment = {
 *         PANGO_ALIGN_LEFT: 'left',
 *         PANGO_ALIGN_CENTER: 'center',             # <<<<<<<<<<<<<<
 *         PANGO_ALIGN_RIGHT: 'right'}
 * cdef dict _kivy2pango_alignment = {
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoAlignment(PANGO_ALIGN_CENTER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_center) < (0)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":781
 *         PANGO_ALIGN_LEFT: 'left',
 *         PANGO_ALIGN_CENTER: 'center',
 *         PANGO_ALIGN_RIGHT: 'right'}             # <<<<<<<<<<<<<<
 * cdef dict _kivy2pango_alignment = {
 *         'left': PANGO_ALIGN_LEFT,
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoAlignment(PANGO_ALIGN_RIGHT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_right) < (0)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_alignment);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_alignment, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":783
 *         PANGO_ALIGN_RIGHT: 'right'}
 * cdef dict _kivy2pango_alignment = {
 *         'left': PANGO_ALIGN_LEFT,             # <<<<<<<<<<<<<<
 *         'center': PANGO_ALIGN_CENTER,
 *         'right': PANGO_ALIGN_RIGHT}
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyLong_From_PangoAlignment(PANGO_ALIGN_LEFT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_left, __pyx_t_7) < (0)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":784
 * cdef dict _kivy2pango_alignment = {
 *         'left': PANGO_ALIGN_LEFT,
 *         'center': PANGO_ALIGN_CENTER,             # <<<<<<<<<<<<<<
 *         'right': PANGO_ALIGN_RIGHT}
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoAlignment(PANGO_ALIGN_CENTER); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_center, __pyx_t_7) < (0)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":785
 *         'left': PANGO_ALIGN_LEFT,
 *         'center': PANGO_ALIGN_CENTER,
 *         'right': PANGO_ALIGN_RIGHT}             # <<<<<<<<<<<<<<
 * 
 * cdef dict _pango2kivy_ellipsize_mode = {
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoAlignment(PANGO_ALIGN_RIGHT); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_right, __pyx_t_7) < (0)) __PYX_ERR(0, 783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_alignment);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_alignment, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":788
 * 
 * cdef dict _pango2kivy_ellipsize_mode = {
 *         PANGO_ELLIPSIZE_NONE: 'none',             # <<<<<<<<<<<<<<
 *         PANGO_ELLIPSIZE_START: 'start',
 *         PANGO_ELLIPSIZE_MIDDLE: 'middle',
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_NONE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_none) < (0)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":789
 * cdef dict _pango2kivy_ellipsize_mode = {
 *         PANGO_ELLIPSIZE_NONE: 'none',
 *         PANGO_ELLIPSIZE_START: 'start',             # <<<<<<<<<<<<<<
 *         PANGO_ELLIPSIZE_MIDDLE: 'middle',
 *         PANGO_ELLIPSIZE_END: 'end'}
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_START); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_start) < (0)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":790
 *         PANGO_ELLIPSIZE_NONE: 'none',
 *         PANGO_ELLIPSIZE_START: 'start',
 *         PANGO_ELLIPSIZE_MIDDLE: 'middle',             # <<<<<<<<<<<<<<
 *         PANGO_ELLIPSIZE_END: 'end'}
 * cdef dict _kivy2pango_ellipsize_mode = {
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_MIDDLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_middle) < (0)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":791
 *         PANGO_ELLIPSIZE_START: 'start',
 *         PANGO_ELLIPSIZE_MIDDLE: 'middle',
 *         PANGO_ELLIPSIZE_END: 'end'}             # <<<<<<<<<<<<<<
 * cdef dict _kivy2pango_ellipsize_mode = {
 *         'none': PANGO_ELLIPSIZE_NONE,
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_END); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_end) < (0)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_ellipsize_mode);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_ellipsize_mode, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":793
 *         PANGO_ELLIPSIZE_END: 'end'}
 * cdef dict _kivy2pango_ellipsize_mode = {
 *         'none': PANGO_ELLIPSIZE_NONE,             # <<<<<<<<<<<<<<
 *         'start': PANGO_ELLIPSIZE_START,
 *         'middle': PANGO_ELLIPSIZE_MIDDLE,
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_NONE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_none, __pyx_t_7) < (0)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":794
 * cdef dict _kivy2pango_ellipsize_mode = {
 *         'none': PANGO_ELLIPSIZE_NONE,
 *         'start': PANGO_ELLIPSIZE_START,             # <<<<<<<<<<<<<<
 *         'middle': PANGO_ELLIPSIZE_MIDDLE,
 *         'end': PANGO_ELLIPSIZE_END}
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_START); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_7) < (0)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":795
 *         'none': PANGO_ELLIPSIZE_NONE,
 *         'start': PANGO_ELLIPSIZE_START,
 *         'middle': PANGO_ELLIPSIZE_MIDDLE,             # <<<<<<<<<<<<<<
 *         'end': PANGO_ELLIPSIZE_END}
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_MIDDLE); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_middle, __pyx_t_7) < (0)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":796
 *         'start': PANGO_ELLIPSIZE_START,
 *         'middle': PANGO_ELLIPSIZE_MIDDLE,
 *         'end': PANGO_ELLIPSIZE_END}             # <<<<<<<<<<<<<<
 * 
 * cdef dict _pango2kivy_wrap_mode = {
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoEllipsizeMode(PANGO_ELLIPSIZE_END); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_end, __pyx_t_7) < (0)) __PYX_ERR(0, 793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_ellipsize_mode);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_ellipsize_mode, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":799
 * 
 * cdef dict _pango2kivy_wrap_mode = {
 *         PANGO_WRAP_WORD: 'word',             # <<<<<<<<<<<<<<
 *         PANGO_WRAP_CHAR: 'char',
 *         PANGO_WRAP_WORD_CHAR: 'word_char'}
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyLong_From_PangoWrapMode(PANGO_WRAP_WORD); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_word) < (0)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":800
 * cdef dict _pango2kivy_wrap_mode = {
 *         PANGO_WRAP_WORD: 'word',
 *         PANGO_WRAP_CHAR: 'char',             # <<<<<<<<<<<<<<
 *         PANGO_WRAP_WORD_CHAR: 'word_char'}
 * cdef dict _kivy2pango_wrap_mode = {
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoWrapMode(PANGO_WRAP_CHAR); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_char) < (0)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":801
 *         PANGO_WRAP_WORD: 'word',
 *         PANGO_WRAP_CHAR: 'char',
 *         PANGO_WRAP_WORD_CHAR: 'word_char'}             # <<<<<<<<<<<<<<
 * cdef dict _kivy2pango_wrap_mode = {
 *         'word': PANGO_WRAP_WORD,
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoWrapMode(PANGO_WRAP_WORD_CHAR); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_7, __pyx_mstate_global->__pyx_n_u_word_char) < (0)) __PYX_ERR(0, 799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_wrap_mode);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango__pango2kivy_wrap_mode, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":803
 *         PANGO_WRAP_WORD_CHAR: 'word_char'}
 * cdef dict _kivy2pango_wrap_mode = {
 *         'word': PANGO_WRAP_WORD,             # <<<<<<<<<<<<<<
 *         'char': PANGO_WRAP_CHAR,
 *         'word_char': PANGO_WRAP_WORD_CHAR}
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyLong_From_PangoWrapMode(PANGO_WRAP_WORD); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_word, __pyx_t_7) < (0)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":804
 * cdef dict _kivy2pango_wrap_mode = {
 *         'word': PANGO_WRAP_WORD,
 *         'char': PANGO_WRAP_CHAR,             # <<<<<<<<<<<<<<
 *         'word_char': PANGO_WRAP_WORD_CHAR}
 * 
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoWrapMode(PANGO_WRAP_CHAR); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_char, __pyx_t_7) < (0)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "kivy/core/text/_text_pango.pyx":805
 *         'word': PANGO_WRAP_WORD,
 *         'char': PANGO_WRAP_CHAR,
 *         'word_char': PANGO_WRAP_WORD_CHAR}             # <<<<<<<<<<<<<<
 * 
 * cdef class KivyPangoLayout:
*/
  __pyx_t_7 = __Pyx_PyLong_From_PangoWrapMode(PANGO_WRAP_WORD_CHAR); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_word_char, __pyx_t_7) < (0)) __PYX_ERR(0, 803, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_XGOTREF(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_wrap_mode);
  __Pyx_DECREF_SET(__pyx_v_4kivy_4core_4text_11_text_pango__kivy2pango_wrap_mode, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":824
 *             g_object_unref(self.layout)
 * 
 *     def set_markup(self, markup, encoding='utf-8'):             # <<<<<<<<<<<<<<
 *         cdef bytes m = _byte_option(markup)
 *         pango_layout_set_markup(self.layout, m, len(m))
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_5set_markup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_markup, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[2]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_markup, __pyx_t_2) < (0)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":828
 *         pango_layout_set_markup(self.layout, m, len(m))
 * 
 *     def set_width(self, width):             # <<<<<<<<<<<<<<
 *         pango_layout_set_width(self.layout, int(width))
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_7set_width, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_width, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_width, __pyx_t_2) < (0)) __PYX_ERR(0, 828, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":831
 *         pango_layout_set_width(self.layout, int(width))
 * 
 *     def get_width(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_width(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_9get_width, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_width, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_width, __pyx_t_2) < (0)) __PYX_ERR(0, 831, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":834
 *         return pango_layout_get_width(self.layout)
 * 
 *     def set_height(self, height):             # <<<<<<<<<<<<<<
 *         pango_layout_set_height(self.layout, int(height))
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_11set_height, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_height, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_height, __pyx_t_2) < (0)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":837
 *         pango_layout_set_height(self.layout, int(height))
 * 
 *     def get_height(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_height(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_13get_height, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_height, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_height, __pyx_t_2) < (0)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":840
 *         return pango_layout_get_height(self.layout)
 * 
 *     def get_wrap(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_wrap_mode
 *         return _pango2kivy_wrap_mode.get(pango_layout_get_wrap(self.layout))
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_15get_wrap, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_wrap, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_wrap, __pyx_t_2) < (0)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":844
 *         return _pango2kivy_wrap_mode.get(pango_layout_get_wrap(self.layout))
 * 
 *     def set_wrap(self, wrap):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_wrap_mode
 *         cdef PangoWrapMode wm = _kivy2pango_wrap_mode.get(wrap, PANGO_WRAP_WORD)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_17set_wrap, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_wrap, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_wrap, __pyx_t_2) < (0)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":849
 *         pango_layout_set_wrap(self.layout, wm)
 * 
 *     def is_wrapped(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_is_wrapped(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_19is_wrapped, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_is_wrapped, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_is_wrapped, __pyx_t_2) < (0)) __PYX_ERR(0, 849, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":852
 *         return pango_layout_is_wrapped(self.layout)
 * 
 *     def set_ellipsize(self, ellipsize):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_ellipsize_mode
 *         cdef PangoEllipsizeMode em = _kivy2pango_ellipsize_mode.get(ellipsize, PANGO_ELLIPSIZE_NONE)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_21set_ellipsize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_ellipsize, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_ellipsize, __pyx_t_2) < (0)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":857
 *         pango_layout_set_ellipsize(self.layout, em)
 * 
 *     def get_ellipsize(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_ellipsize_mode
 *         return _pango2kivy_ellipsize_mode.get(pango_layout_get_ellipsize(self.layout), 'none')
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_23get_ellipsize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_ellipsize, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_ellipsize, __pyx_t_2) < (0)) __PYX_ERR(0, 857, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":861
 *         return _pango2kivy_ellipsize_mode.get(pango_layout_get_ellipsize(self.layout), 'none')
 * 
 *     def is_ellipsized(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_is_ellipsized(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_25is_ellipsized, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_is_ellipsized, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_is_ellipsized, __pyx_t_2) < (0)) __PYX_ERR(0, 861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":864
 *         return pango_layout_is_ellipsized(self.layout)
 * 
 *     def set_indent(self, indent):             # <<<<<<<<<<<<<<
 *         pango_layout_set_indent(self.layout, int(indent))
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_27set_indent, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_indent, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_indent, __pyx_t_2) < (0)) __PYX_ERR(0, 864, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":867
 *         pango_layout_set_indent(self.layout, int(indent))
 * 
 *     def get_indent(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_indent(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_29get_indent, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_indent, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_indent, __pyx_t_2) < (0)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":870
 *         return pango_layout_get_indent(self.layout)
 * 
 *     def set_spacing(self, spacing):             # <<<<<<<<<<<<<<
 *         pango_layout_set_spacing(self.layout, int(spacing))
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_31set_spacing, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_spacing, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_spacing, __pyx_t_2) < (0)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":873
 *         pango_layout_set_spacing(self.layout, int(spacing))
 * 
 *     def get_spacing(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_spacing(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_33get_spacing, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_spacing, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_spacing, __pyx_t_2) < (0)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":876
 *         return pango_layout_get_spacing(self.layout)
 * 
 *     def set_justify(self, justify):             # <<<<<<<<<<<<<<
 *         pango_layout_set_justify(self.layout, bool(justify))
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_35set_justify, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_justify, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_justify, __pyx_t_2) < (0)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":879
 *         pango_layout_set_justify(self.layout, bool(justify))
 * 
 *     def get_justify(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_justify(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_37get_justify, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_justify, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_justify, __pyx_t_2) < (0)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":882
 *         return pango_layout_get_justify(self.layout)
 * 
 *     def set_auto_dir(self, autodir):             # <<<<<<<<<<<<<<
 *         pango_layout_set_auto_dir(self.layout, bool(autodir))
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_39set_auto_dir, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_auto_dir, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_auto_dir, __pyx_t_2) < (0)) __PYX_ERR(0, 882, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":885
 *         pango_layout_set_auto_dir(self.layout, bool(autodir))
 * 
 *     def get_auto_dir(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_auto_dir(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_41get_auto_dir, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_auto_dir, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_auto_dir, __pyx_t_2) < (0)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":888
 *         return pango_layout_get_auto_dir(self.layout)
 * 
 *     def set_alignment(self, alignment):             # <<<<<<<<<<<<<<
 *         global _kivy2pango_alignment
 *         cdef PangoAlignment a = _kivy2pango_alignment.get(alignment, PANGO_ALIGN_LEFT)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_43set_alignment, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_alignment, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_alignment, __pyx_t_2) < (0)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":893
 *         pango_layout_set_alignment(self.layout, a)
 * 
 *     def get_alignment(self):             # <<<<<<<<<<<<<<
 *         global _pango2kivy_alignment
 *         return _pango2kivy_alignment.get(pango_layout_get_alignment(self.layout), 'left')
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_45get_alignment, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_alignment, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_alignment, __pyx_t_2) < (0)) __PYX_ERR(0, 893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":899
 *     # set_tabs, get_tabs
 * 
 *     def set_single_paragraph_mode(self, mode):             # <<<<<<<<<<<<<<
 *         pango_layout_set_single_paragraph_mode(self.layout, bool(mode))
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_47set_single_paragraph_mode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_set_single_parag, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_set_single_paragraph_mode, __pyx_t_2) < (0)) __PYX_ERR(0, 899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":902
 *         pango_layout_set_single_paragraph_mode(self.layout, bool(mode))
 * 
 *     def get_single_paragraph_mode(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_single_paragraph_mode(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_49get_single_paragraph_mode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_single_parag, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_single_paragraph_mode, __pyx_t_2) < (0)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":905
 *         return pango_layout_get_single_paragraph_mode(self.layout)
 * 
 *     def get_unknown_glyphs_count(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_unknown_glyphs_count(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_51get_unknown_glyphs_count, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_unknown_glyp, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_unknown_glyphs_count, __pyx_t_2) < (0)) __PYX_ERR(0, 905, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":912
 *     # pango_layout_index_to_line_x
 * 
 *     def xy_to_index(self, x, y):             # <<<<<<<<<<<<<<
 *         cdef int index, trailing
 *         cdef bint result = pango_layout_xy_to_index(self.layout, x, y, &index, &trailing)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_53xy_to_index, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_xy_to_index, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_xy_to_index, __pyx_t_2) < (0)) __PYX_ERR(0, 912, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":922
 *     # pango_layout_get_pixel_extents
 * 
 *     def get_size(self):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_size(self.layout, &w, &h)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_55get_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_size, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_size, __pyx_t_2) < (0)) __PYX_ERR(0, 922, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":927
 *         return (w, h)
 * 
 *     def get_pixel_size(self):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_57get_pixel_size, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_pixel_size, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_pixel_size, __pyx_t_2) < (0)) __PYX_ERR(0, 927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":932
 *         return (w, h)
 * 
 *     def get_baseline(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_baseline(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_59get_baseline, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_baseline, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_baseline, __pyx_t_2) < (0)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":935
 *         return pango_layout_get_baseline(self.layout)
 * 
 *     def get_line_count(self):             # <<<<<<<<<<<<<<
 *         return pango_layout_get_line_count(self.layout)
 * 
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_61get_line_count, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_get_line_count, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_get_line_count, __pyx_t_2) < (0)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":943
 *     # pango_layout_line_*
 * 
 *     def render_as_bytes(self, color=None):             # <<<<<<<<<<<<<<
 *         cdef int w, h
 *         pango_layout_get_pixel_size(self.layout, &w, &h)
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_63render_as_bytes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_render_as_bytes, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_render_as_bytes, __pyx_t_2) < (0)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":971
 *             PyMem_Free(pixels)
 * 
 *     def render_as_ImageData(self, **kwargs):             # <<<<<<<<<<<<<<
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_65render_as_ImageData, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_render_as_ImageD, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_render_as_ImageData, __pyx_t_2) < (0)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":976
 *             return ImageData(*result)
 * 
 *     def render_as_Texture(self, mipmap=False, **kwargs):             # <<<<<<<<<<<<<<
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_67render_as_Texture, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout_render_as_Textur, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3]);
  if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4kivy_4core_4text_11_text_pango_KivyPangoLayout, __pyx_mstate_global->__pyx_n_u_render_as_Texture, __pyx_t_2) < (0)) __PYX_ERR(0, 976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_69__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError, "self.layout cannot be converted to a Python object for pickling"
*/
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4kivy_4core_4text_11_text_pango_15KivyPangoLayout_71__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_KivyPangoLayout___setstate_cytho, NULL, __pyx_mstate_global->__pyx_n_u_kivy_core_text__text_pango, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000
  PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2);
  #endif
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "kivy/core/text/_text_pango.pyx":1
 * # TODO:             # <<<<<<<<<<<<<<
 * # - We only render lines, can we use line-level pango layout functionality??
 * # - Support style/weight/different underlines
*/
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  if (__pyx_m) {
    if (__pyx_mstate->__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init kivy.core.text._text_pango", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init kivy.core.text._text_pango");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #else
  return __pyx_m;
  #endif
}
/* #### Code section: pystring_table ### */
/* #### Code section: cached_builtins ### */

static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);

  /* Cached unbound methods */
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_get.method_name = &__pyx_mstate->__pyx_n_u_get;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items;
  __pyx_mstate->__pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_keys.method_name = &__pyx_mstate->__pyx_n_u_keys;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values;
  __pyx_mstate->__pyx_umethod_PyList_Type__remove.type = (PyObject*)(&PyList_Type);
  __pyx_mstate->__pyx_umethod_PyList_Type__remove.method_name = &__pyx_mstate->__pyx_n_u_remove;
  __pyx_mstate->__pyx_umethod_PySet_Type__update.type = (PyObject*)(&PySet_Type);
  __pyx_mstate->__pyx_umethod_PySet_Type__update.method_name = &__pyx_mstate->__pyx_n_u_update;
  return 0;
}
/* #### Code section: cached_constants ### */

static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) {
  __Pyx_RefNannyDeclarations
  CYTHON_UNUSED_VAR(__pyx_mstate);
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "kivy/core/text/_text_pango.pyx":653
 * def kpango_get_extents(kivylabel, text):
 *     if text is None:  # text='' needs to return size
 *         return 0, 0             # <<<<<<<<<<<<<<
 *     cdef dict options = kivylabel.options
 *     cdef ContextContainer cc = _get_or_create_cc_from_options(options)
*/
  __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

  /* "kivy/core/text/_text_pango.pyx":712
 * 
 * 
 * def kpango_font_context_create(font_context, fontfile=None):             # <<<<<<<<<<<<<<
 *     global kivy_font_context_cache
 *     cdef bytes fctx = _byte_option(font_context)
*/
  __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]);

  /* "kivy/core/text/_text_pango.pyx":824
 *             g_object_unref(self.layout)
 * 
 *     def set_markup(self, markup, encoding='utf-8'):             # <<<<<<<<<<<<<<
 *         cdef bytes m = _byte_option(markup)
 *         pango_layout_set_markup(self.layout, m, len(m))
*/
  __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_kp_u_utf_8); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]);

  /* "kivy/core/text/_text_pango.pyx":976
 *             return ImageData(*result)
 * 
 *     def render_as_Texture(self, mipmap=False, **kwargs):             # <<<<<<<<<<<<<<
 *         result = self.render_as_bytes(**kwargs)
 *         if result:
*/
  __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]);
  __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]);
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_tuple;
    for (Py_ssize_t i=0; i<4; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
  CYTHON_UNUSED_VAR(__pyx_mstate);
  {
    const struct { const unsigned int length: 9; } index[] = {{5},{1},{1},{7},{6},{2},{9},{30},{50},{63},{14},{91},{65},{42},{43},{42},{101},{100},{101},{107},{54},{46},{41},{43},{89},{92},{89},{81},{75},{36},{65},{67},{124},{98},{82},{68},{89},{67},{60},{164},{97},{48},{50},{69},{106},{53},{102},{5},{1},{1},{16},{34},{36},{1},{9},{15},{33},{35},{29},{28},{28},{29},{26},{26},{27},{30},{30},{41},{24},{27},{40},{25},{24},{29},{26},{35},{33},{31},{29},{28},{29},{26},{26},{27},{26},{41},{27},{25},{24},{27},{17},{35},{37},{31},{24},{6},{20},{1},{1},{9},{18},{7},{8},{4},{2},{6},{4},{18},{5},{16},{6},{9},{2},{6},{8},{3},{4},{13},{12},{11},{13},{12},{9},{11},{9},{8},{6},{8},{3},{13},{13},{12},{12},{13},{10},{10},{11},{14},{14},{25},{8},{11},{24},{9},{8},{12},{1},{6},{6},{5},{13},{13},{10},{6},{5},{7},{4},{15},{26},{11},{9},{20},{28},{26},{27},{26},{24},{31},{33},{17},{18},{18},{6},{4},{3},{1},{8},{6},{6},{6},{4},{10},{8},{4},{7},{3},{6},{3},{11},{14},{12},{10},{17},{13},{6},{6},{19},{17},{15},{6},{4},{5},{3},{4},{13},{12},{13},{10},{10},{11},{10},{12},{25},{11},{9},{8},{10},{12},{19},{7},{5},{13},{1},{8},{3},{4},{13},{8},{9},{6},{3},{6},{1},{4},{8},{8},{5},{2},{4},{9},{4},{1},{2},{11},{1},{2},{0},{1},{12},{13},{31},{19},{26},{301},{36},{14},{14},{126},{264},{14},{30},{30},{27},{24},{14},{27},{14},{26},{28},{17},{17},{14},{14},{17},{17},{17},{14},{17},{30},{9},{62},{82},{27},{67},{122},{37},{63},{54},{37},{143},{11},{131},{9},{15},{4},{5},{4},{6}};
    #if (CYTHON_COMPRESS_STRINGS) == 3 && __PYX_LIMITED_VERSION_HEX >= 0x030e0000 /* compression: zstd (3065 bytes) */
const char* const cstring = "(\265/\375`\217\035}_\000jwH\030E\340\262\270\0010\314c-\306G\030\214\2170\030\037a \014\204\2010\020\006\343\020\"\344MWDzS\350@6QfJY\231SU\376\335-\024\241\t\034\000$*\240\2601\306\200\347\356\336\005\275\031p\274\337\370\177S\001O\001\216\0018l\254p\330x\361\363\373;]~\326\330\364\030\337\332\211\216e=W0\347\2350\3563\023\327\310\272\346\231\236\357\346\371\327\336\331\231\225\237M\256\233\273b\355w\255\361\335\316\234\305\010\207\215\334m\315\367\274\305\274\273\373\0356Q\274\216;\323t\331\275\252\246\013\276\235\367Nb\2166LlU.\326\331\342_\177\225\301Z\335N\320\023\014\224\342K\251\327\353\255X\246\343,\353\260\321\3170\36443-\327\272n\235cu\242\364\377+\365t\336j6\277\307]\n\367\351-\276\326W\023\0346L^P\374\337\270\343\235\353\307\032W\2679\302\353|\303\333\314\370D\321r\266y\214\235\231*\274'\356\366\352\216\307\214\262\367\234\233>\243NsT5\367y\327\271\363\354\024ou\323\277\275y+\327\237\333\360\377\245\351\"\002\333\336q\337\277\017\241\355\254ol\346f\347\331\374\026\323\300\370\334\034\365\275\026\263^\374;\306\331\334N\214\315\317\367\256v\376\216{U\2172\215=\245?\357lu\3158\271\377\224\315\367\344\177\342\356NJ\261\355.\356\224\316\257\273\232\341;\371^y\334\210k\273r\224\252\374\025\376*\270s\253\342\341\344\233\353\263\3256\306\032\253>\337\021\243\017)3'\233Wc\254j\235G#\357\341\033\277\341\237m\326\365g\3523EQJ\355\3562J\177\335\376\316(_\261\2566\377\216qh\266\3726\303\370r\213o\375\365\322\3165\2677\266b\330\326\376\351\316\266W\224\355\330Z{5\307<\346;\267#\236\355\366|\2554\031\246\371+\314\202~\233eV^\013J;\3264\256\242c\232\025\377\324[y\357\271\356\246\327\315{\357\275\307\275;]\314]\237Q\377f\225Gq\236\326\350V\361}\263;[\271\3137\212\342j\327j\257\034\305\232v^\226\277\357h\334\235QZ\306(.k\2155\366\025\353\371R\376\273\255\225\370\365{J\355(\006\246\364!%\373\335\374\275\363\371s\334\373\334\371\3048\232{\334\357\255\224\336\330\227\227\351\347\365n\305]W\254Sp\337\325z\232k\377>g\331b\316\247\364\235\177\316\354\364\264\256]F\375\255\323z""\315\023\365\263j\236`P\241\302\206\005\265\331\310\332\351r\202\301f\224ZKgi\2166\317~r\216\353\374\266\361?O\024\214\262\270\363\271\361\236\315\213qh\346j\372<5^\245L\217\277\207Q_\357\306}\244\242E\212\233u\305\331/\253\272\241<\325\316\033]Q.k\353\275\254&Jd\210,\221\224$\341\tP\002\t\374\246\021\206\030\"\236\302\220\360\004\302\324Zi\005\030\031\375\002\321$\274\240\352\023\311\251\037\n\326G\212\364}\261E\014\265NcilIP&\000\275@\002 \310\324\242L\271\010\270Rd\014\tBz\264dX\"\224\021R_\375\032|\344\210B\0141_\310\307\313\003\364\362\214\230\010\003`@(\002>\000\275L$\t\351[1-\220\226\035Y@-\240\010\204\360\361\252!L8\022\002\0101\220\005\374\200\340\300\253$\216\210>\254!\203\320\023\326\200\002D\024\274J\340\010\350\341\023}\236\225\300#b!K(\nm\300\022\010\002\222\370H\037\310\307\213$j=\360rH\256\005\256N\322\220+\244\210\324c\207\222\262\004\364:\340\362d%gF\274<`\352+\371\026|\274D\240\377h>\222\017\300W\303Za\031\010-|J\322\027\340S\000z\325\3214\222\214\241\321C\224!\001\345\224t\224\304.4QP\246X-,\003\237\227\200\317\313\243\2434\222\306\000c\215x\"\374\204)\260\002\350U\nI\341\215O\004\364\022\211\031>\245\212\212\013\212\347y+z;Wm*zS\261J\345q\247+N\366\273\313uY\347\332k\267Bi\035\357\250\217or\247\372\367^1\255\323\265Ka\365\343p\234\303\233S\335Q\256n\\\336\260\2767ot\347\272Q\272\365\257\177\206\265\327zU\335\340\353q\336\270\366\337\347\025\366x\377\036\007\272n\235o\276\371\2467\374\275\347o\376\364vn\305\035\365\251\227\345\216q:+\036o\314\361N\346:\035ms=/\336Z\366\273\353t\376\316\035\254\261\216\337N\206\271RCBE\t\2525\313B\275\315\037h\013\375\037\000\237\234*\232D\022\321f\004\014\201\017f|\014>9d\311f(C%!\300\034\225T\265\362\0103\202xP\232\270\260)_\312R+\204\206\022?\020\371<$\037\245\314\013Q\202\201\322t\243\272L\256\0253/\001\036@\312\000\037\251\325\341\363q0\2012\247\232\322\203+\205K\031j\231\214,BRX\002$\201\021BrJ\230\205\000\364k\313\324z\t\205\036\240\203\324\330`C\205\262\302'\305\212au:\010|B\342\014p\302\347E\322_\003\223""\230\322)M\237\006V\201\224+\0059\"4z>b*4\311\241\2050\024\212H\017)\323\0021~\261\212#\020\341\247\360/T\321\202\030\032E\343\215\341\tg\005a<bMX\302\240\014\371B)1F\3141\205%0^\2242\\!.\217\313\304\250<1yD\014\265%\242\206\246,\340\222!Id\314I\351\261@\022O<\344\005\317\350\205-#\032Z\034f9A\242\326\345\000\256\2609\225'Si],\256O\266\220\277\325\322\372c\313x\"\3360\006\270\362\211\200\330\247bU\026K)\034\t=XA\006\240\007\254\371\004|)\026\201\023\217\316\200\035\"+2\020=L\340\204\320\024J(\201\037P\216(\202\244\250\342\233\220:GhdFR\220\244\320\030B\030\010\006F\003=\230\314\035\262\3114G2\n!\342\0101\206\310\210\214\210\210\004\"\022$I\222t\1779\354\224M\373\201\217\334\261\207\000\271\002\266\244%7\307a \331\220 S\024\237\303\225\264C\260p\034d\347(\232Ez\351Og\021\256\254\212\261o\327\020\036\206\250\0351\034\274\252A\305\353\344\317.\204\224\340\201\360\257/\227\351\346\323\344\273\361$!k\305\361E)\305D\336v\311h\304|\301\250\224\010\002;f\300\360\214\274\245@\340\200w\213\327QQ\207\230\007\227\3233n\276\216\333\206&\312v\037\224_\333\353\311KI\002\354\230fz+\332\332+\220=:Q\343\212F\212\215\261'4\375AgyZ\354O\366-\372\"\303E\213\273\0054\027GI9\236\010\361\254\022\205v\302\314r\336\267\315\300\333;0\tl\344\001\225/T\205-\271\337ps\244p#u@\370\304\016\336\355\230\344.\201\360\366\375\260\344Pi9\374O\372\363hF\230~\0248vBS\033\245\275n\236,QX\302T\356\303\"@n`k\032\215\352\340\001\323?C\200\205\310&\027\220\370\337K\331D/R\035Q)\002LH(PZ\n\305a\302&\2340\023\360\260AQ\350\002\245\376\335\324O\"\002\024\212\226\004f\264\354T\352\212fGF/y\247\241\2648]\237\020\013g\310\351B\312\0051\304)\\\221\267\017\237\365\205V\204\262\241\303\013\014\323\022j\266d\250]g\365!$\006\226\201h\360\323\214\261\\\243p\342\235\2664\362,1\006M8,\005\030I-\302\376?\263\231\220\330\342\374\014\251\267i7+\365v\000\332\201\026\204%+\245\222C7\320m\2609R\214\240\205\220\202\373\367J\nS\362f\315n=\373\030F\r\321\002+\355\240\033\222\211\227\035\243\202\353\024\320N\313\n\341\373\272\023""\253\222\350g\322[\201u\345\2710_\036\241e\326\020\360{\230\303\213\227\222\317\034\341\312>\2160\236E\256\324;_\036\321\241\341\372#\013\025/\245o\036\3566b\271\007\333\341q\275\350\213GF\347\276\027\373\277T\0172\365!\366\305R\375(\364\244R\265c]\240H\257\232\331\272$\r\312\022\031\322\204\270a #]^\241D\322azp\263\013\252\351?0\367\316\"\372\013\260\003\345\373U&\220\247\214@\316\263y\332vgR\202Y1\200\n\027\263|\357(\346\212\347\204_\361qE\004\335J\026e}\001\356\307\220\"rf\305\"\3412\272\312\375\222\312k\177\340p\303\257\"Lj\016\032A-\334{\235\233\255\035\023\3361C\271\227C`\262O\361}\"\002\221c\3308\347\003\232\273\003\226\024\303\304\010'JFx} \214\3568\n\037\310\257\221\340\021\312HbY5\0304G\223\206p\362\306C> \222\210z\022\222\020c\022\n*\347\223\351;\217B\177y\0304\350e\213@\337\253\365\3608V\000b\250\305\351i\263\023\270\005\266\324\306\010\020I\356e&\000\365\275Q7\006Q`\204\334\217Ap\303\246.G\353^\304\323\241\277\2133Nj|\253cC\277\256\177\264\200\221\261O\221\256\373\t\006\356\372O \035\252\245\233O5\251\205KXt\256\312g\237\010\251(\335\330\243,C\330\244\022*f\314#\003\375\223\031\013\031E\325\325S\3113\363\304<`f\256_\241\016\372\365k\351\345\255\004\303\374\205\2674=O\353\250\222X\342\2145f\340\272:tH(Q\036\037\345\017\231\273\023~\014\021J\306\022\004\351\264\342\326U\222\362\037\270\300\017\256+\330.\217{M\021\320\256d\240!\375\212@R\007\314\234\001\2342#\267(Z\274\230;\323\332\025\363\341s\224\037\330\206\206\003\223\373\253\037\nc\"~;\266\375\322w\260B\026\353x\024\221\006\033\360gD\3631\036s\247\305>\330\225t\306\357\351CYrR=}\207\324\241Z<&\212KuN\201~\025\004\217\314\266Vkycj\030\030&)\347\201\341\024o\221\t_\266\013W\223\250y\230\255D\3410\222\310\373\272\363y\343j\372\326\357R\016^\030\001\376\343d\363\217)c&/\224\260c@\321l\260eM\273Aa\256c\305~6\244|\251\370\344\305\274\345\374\265\235\362\227\271\375)\237\030\323\007\3358\014\330`\335\237\202W\3657\210\330\0371I(\370\022\365\263\034\335\204\373\322\022\243\033$&\264\005\nF;mJ|[\375\240S.S@""\253\325)\027\365\031\034yc\000\034\267\213\246\241j~\320P?#\351\333\245\002\322\205_\313\357\250\274\022\000w+@\362!\351<\305\342\2556?\334\016\375\232%U\250;\215\rM\372{\034\013\214\036\352\2678\310\307C\3572=Z\323}\304\2352\221\r\216!\177\326\017\352T^%\224\314\334\030\204p\014\347\321\211\334O\031\030\274\276\215{\375@\301-\014\310\271\264\217\316\334\274\221\310\237\025\3679\271,\027o\006$\342\224\327z\353z\303p\np\255\204AK\275CN\330\323uX\341\232\020{\034\360\331\234\262RR`\004\223S\026l\341\366\337\210\230\340\204\230\231y^\273\333\303u\352V\002\"o\037\246m\001[\275\r\323\262\363\036\323PLy\017\265g.\273\226M\305\2674\325\033]\310?Q\335\274`\226\330M\010\373YF\331&\367\270\024\022|Z\351i\325R\200\023c\034\036\333=\367\330g\365\023\272\233\216h[\200E\201\274(\356G\004u\205P\2557\242\225\320\334\212\305\255w.R\314.";
    PyObject *data = __Pyx_DecompressString(cstring, 3065, 3);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (3241 bytes) */
const char* const cstring = "BZh91AY&SYS\223\251\301\000\003{\377\377\377\377\377\377\377\377\377\367\277\377\177\364\277\377\377\377@@@@@@@@@@@@@\000@\000`\r;\343\226\306\333\256\010 \005\n\017@\032\000\252\000\023\260\200\037L\341(I\250P\311\247\251\211\3454\364O40\246\246M\001\220\320i\223 i\243@\320\032\017Q\241\265\032\003F\232\0314\332\202P\204bd )='\351O\321\2452zd\236\241\240i\243@\000\000\000\000\r\000\r=@4\000\032\224\363MD\365@\000\r\000\323\3244z\200\006\200\000\000\000\000\000\0004\0006\243@T\377U$d\323F\232i\241\240\006\230\2154\031\000\000\000i\240\321\221\211\223\020b\031\000\006F#L2hL\230\230\014\020F\001\250\320\300\000\232`\020\3022b2110L\000\020\3020@\221 @ \232i\243S\t\246T\3625?SM&5M\352\rM=L\200d\323#\004\000b1\r\006\217Bd\323\023\251\241\033}\335\335\356\035\316G\310\014\267\210\362>>@\212\200\360$}\306P\372@\006\263RH\022\022\223\222!0v\251\020P\377\350\375(\003\3654\206\321\312\245u\305\322D\257\342#\365\225\204\212S;\360i6\222Ci\264\332C\030N\375eK\244\262\353\021\206\031\220I6\333bk\000\305\241\014jsPy\022\200\356&\t\200r\212\240\217s\0062\246/\032\245R\300\260\261\314<\222\003\212\311\325\024E\222\026\304\251\t\004\222X\023'4\262\313J@J\033\035\327A\247+I\253\307]R\236r\2051\205a\321\021\t\243\361\207\023\262\037I*\237\223\350}0C\032\377f\"\301m\262\002#4\330F\264\206\230\230>\257\324\002}\262X\246I\264J\3620\227\262\220\220l|\260D\254\036\206*\215I=\366\332\310A\232)\301\371J\021\262\244\351\345T%F\267\005k\227\233\242\0251\002\214\300\300\300\346\262%\377\347Q\310e-\221\032MZ\267\344\225Z\262.!\347\306\030\263\350\224b4\3169\205\211m\326\240\212\267\326\304\263\250\351\325\345,&\267\255\317s\234\367\352U\246\032\021\203\215(\351\032\240\345U\251\224=\324\024\255\224\r{\177/\254\371L:\344*\200\340[\200 \202\301\272\240\322\310\212\255\2636\224\206\302\2000T\347\010\302\326\037\273\231RE\222$\210\376\364\276#\257\316\"\036@p (\240\242\276\235}p)\273\245V\303-\032\330.\241\221s\236\201\276\024\304q\273J7s \313\273u\272\023\341(\202\325B\362\364`\200^[9\352\300r\257:[""\366\317\177\267_R3\366\362Z\345\025cZ\266\336\026s\246qv\263\202\"E\232\352\312\322`\024}\377\035\037\\\225\333\344U\357\372g?\177W\223\317\345\234\330\211\235\242\2215B\225\353\250\274$\023Mtk\323\375\342fW\341\354L\236!\364\263\316\265J\2654>5\260\302\323\330l\372\333K\363=\343I\254\351\231\321\335\331\01084\217u\204\206\216io8LS\355\035m\307\337\227p\365}\217M\307ky\203\007\302\354\017Y\260\365\263\324\266\312\230.'\303\034\277\005\017\231\325\341\251wq\351}$\221\007\326\356\357\370Ef2\260\201\262\030Z^\"D\333\037\016\364!d\372\276%K6\327\342\300\023\230RI~\234y\000Z&\230\2210\014\t\021\372\242\205\210}\373ND\351bg9/p|\352\214\362\245\372 .\214\243\031U\223\226\332\373Na\335\324\267z\331\271\211\305\323\233\245(\334;\255\354\316\253/\032m'\020\210\022\315\320\242Qt\0349\221\004\034\365W7Ymw6\222CA5\247e\270\362\0358\215\033crs\365W*\024\231\364\332C\237o\036H\241[\314H\034\211\2323\224\326JFT\347q\364\0164\361\3519\004\270\013\341\217\342\266Xj\315#`\036]\375Y\177\r\rTUc\220GtHb\337\350\365\013\3111L$\367\027W\315?]`\227\\[\301e}i\023V\204\030\200\365\260\360f\201\2049i\2414\0050m\312D\200\322\222;\224\334\025\031\256p\r\316\341\240r\276\323L\303\"\301'V\0245@\217\315L$E\305\017\000\224\3019\351! \274\031\377\224R\023D\342\375\323J\241\203\033D`=\337\207w\247}\276\021\263\334\341\356\2267\277\202\255\027\335?L\3425N\262\236\2349\371\210\261\253l%\3209\006\204\013\317\234Z\256\236\203o9z::\027\210\326\261\205.\224\022\377\333\303\003\300j(P\010\366\254\177-3\257\3502=L\251E[dk\273b\0034\026\253[\022A\357$!\211n\272t\364\030\354M\241\260\260w\354\371\327\357\262\220N\232\027\023\332\005\316\345k\277\344^&f)\244\315C\236\027Ka\001\317}\227R\0207\341\354\364y\310\017\002~\257S#\321\357\226\255\\\030\343\303\212i\335\3367v8\036h\356\234\347\233I\276\342A\\\346\010f\256\316Snj\036\223*\326\261\206K\246\225\326r\362%\027\024g\357\177\235o\251\314\321\031\363i7\245\230\255S\334\270\313\263\205\222&6$\306\370\036\231D\210\007&\021\203\362\344d6.J\321\0071\323\327\327""\266\345\267\002$1\262O\264I\201&\022\317\235K\037-\254\256\342\212J\r9#\024\006,\t\326nAU)\016\177VK\037m\231\361\276\313!Q(\276\353\267\023p\317\234\310mr\177\274\373\352\367iq\315Sg\016\023\233%\272f\252\223Hn\201\245\304\026\3169J\336]\031\024\224;\211\311\266\333\362D\022\250Q+\375\221\371\313\351I\240\354\277J\376\203\020\251q\021\30694\322U[XF\314X\345z\014g(\366\231\252sW\3017z%\311\207\241d-\375\201\275\223\n\022\307#=(u\017\013U\320\025P\314u\306\342\273\033p\340\202\371\022\215Ta$\360rm7+\230\034\265\211\362B\033\243!p\241\261\335Cs\273\225\320\264\345\027\243\026&\333\033lll\020\000\000\000\201! \004\200\022\000\001\014P\204\357\205\265\t\210F7\262\374\233\220#\326\304\013t\241z\212a\350\016\276\325\251[\235s\342\226-'\004{2\305\363]\313\254\013aX\342\321\003\001\240\306~\347%\020g\273\233\317+\350\n\032\213\342$\357\310Y&\322i\266\014au;\320K\002\3406\\\351|I\335(\272\"\034\333y\270rm\267s\223\354\255\317\016A\344lh\351%F\014\220\276)\000\n\301\363\343SM\323%\254g``\030,\334\334\3428\302\024\207\254\007\035\220o\345!\317;\372\346u\327\271\034g\244\313\232\232\\\002\223\214d\211\315\356I\337\014\016\033Q\234\202f\332\265\213\033\275\0210\034x\261\222 \304\345T\320\245\034T\035]\036^c<%;\256e\221\233J\374\000\261{\033\313MN\206:g\202\351\277[\221K[b$|:x\303\362$!\255\351_\271\003ix\374\336Srz\345/\333\331\r;3t\365e\226s\035#\365N\215\252\243\020F\327\215\252\310\304\243\223\023U\023xJ[\2679<\003d\303\006\3311\347\033\263Z<HU\254\"y\227\306\256\026\361P2J\313\"\362\366\232L1E\rq\256t[^\305\027\316\222\310/a\260\371\002\341\\6Gp\026\304\236x\2763S\225\331\200Cdp\rNV\242\013\005q\202m_4\035X\253;7\021\004@BM\310\202e\312\313_D \270\313\236\304\027\n\004\020\3418\200\332\314X\214\010A\010E\030X\000M7\251D+\026D\272\356\302\3729ki.\005\246\356p|\030@d\323\030\312\014\200\020\333hI\2209J\002\032|\222\317nYy\245&\026\200\004@4&mF\2039\316\224\3069\304\327\252\225\351<WFE\370y3\210\002>+\r\206\031\316\244\372\300\367\330\001\010\262\207\000\232`\240}<\346\207""\211S+ \310\264\333z\305(A\214\223\\L\007\035\305\250\006\312`\204\225\021fa\001\311\324h\236\346\222\013\211\346bK\243\3046tDs\"\310\300\336\204\035(\"\241e\3043\022\222\0175\310\211\260]4\2727]\271'\220[\000\304\250\243\246\261\313\243\343\373~\236\371!\210\200\362\315|\232{\336bR?pei\013P\226\001\234\004$o\222#`\301KX3\265w\241\207Y\313gk^\033\332\237Wwb\013\213\263\346i\235\344`>s\261\346\325\250\347\020\214\210\352\266\334o\"\321\032\245\031\270\245\024J\204\203\264\305\032\346R\271~\332/\225\006:c\2049\316\001\256}\266;\352JKN\353\244E\343\254_\025\250\025\314h\235\337\305\225f\333\322[J\314\265'\311\265\347(\332\360sm\367c\r\315\363\275;\250\034+\315\273J\006Y\205\322\0306\307\344\317L\036\230k')\\\216NJr\216\305\256,\303z\300\324\213Z1\257\305JR(\367\335\356\365.\363\275v\367\372\372\361<\273\271^\247-I\262\223\230JJ;'\010\331X)\034\364\t\2761\025\230\350\025\0138\240\330\200}\205\010D\332\234u\260n]]\031\"\376k\364\276\327+\002\275\001\022\2240n$@6\004\230\323!6\004\t\004%\r\021\200\340E\302\371\014\240\027\305\244\304:I$\303T6L\350+qn!\245\244\272\333a\343\343\002W\265Q cwi\021\031\313SY&\244[\252\200\322\266\003\214\037\202\022\224\314\240\373\037\216q\236\243\363\254\345x\223\013\205\215\303b\373\341\235\230\326\346\223T\031\\\260\022\235\0236E\026\271\r\360\326\232\365\353\326KM)\303\275\332\207\000\014\267Q\224\036\210\217\273&\316\246\361\226\221\033\005>\021IgM}4\276\232\276R\"&h\320\332H?g\0104C\342\034;\r\234\2246cM\275\315\210\026$\316F\274\035{l\030M\036LNo=En\036?\037W\223\020\327\345e\344-\251x\247.\020$\202\307w\261/\234\266]\255\356\010M<\037\234\036\211\236\236$\301\"\261\254\226\234iC\232\233\366\210G\254\251]\224;\003/\030\017\2246i\354\035\207\001\006\343\264H\314@\230\212\216\021EP\253\177\376\004\023\203\367\302\027\005\224\263c)\360A\365\2651\3738\033\207\017z\260\350&A6c\237\246\210Z\364\021\202\242&(Y3\214\323\336\036!3\024\311\031\031\025'\265\325\355\221\265\225:\343\213\322\366]E=\354\006\227\303\014\030F\240\233t\210\022\3744""\324\322P\263\347\370\241k\344|\327c\246\302R\213I\022a\345\250\367\034\024[\3660\004\346+\2254\376\246\316\246\202\020\243*\352\225\177\205v\251\361*YXv\024?UU\325O\313\265\322\335ld8\360\036\330\323\367\311\307\225I=:\251\030c6RH\261H\251+[\245\254E\236\241\236%\240\244E\371\2151\354A\341\034\270\274\2655K\240L).\021v\031F,\n`\343c\35223)\036\315yd\r\227m\334\235\262Ad)\030\344\207\336$$\320x\262\017\217s\030\347I\017\354\256,qI\003\347UR\266`\265\263b1\243+J\272\221\222\272\247\252\264u\345Z\371H\276\t*\225\343\376\r\"\273.-\022!\205\206\034\226\211O\261\016lX\215\033\240\204\327\241Z\274\031\021\035\256\373\230\204\335\256\325U\316.8\347\0258\305+\343\231\277\003\030W\275\243\001@\207f\220\210s\254\320\027@}`\217\306 \357\304\0343@\212\010`(\000\272\211qE\371\210bX\003\013\273\211B\325\033\316\205\346\271\336\346\323\302\316{\267\346\266\211\243\345\004\237cta\350w\020\356\025;F\370\213\311=\212\3678>ny\220b\235\213w\010\226.\027s|\270q\2132\003\021\237m\211\257\234\347\316z#\247\023\007\316i\345\266\n\305\234\245\372\247X\220\363\254\302\370t#I\016X\r\r\251\336\362\254\347\204\345\204\353%&Xv\2519\316\201f[\373\260/n\216/\251\016\"\342\266\271\272\270\263:L\016|\\9\337\370\273\222)\302\204\202\234\235N\010";
    PyObject *data = __Pyx_DecompressString(cstring, 3241, 2);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (3074 bytes) */
const char* const cstring = "x\332\265YAw\023G\022\266@\0049\220\020\203\t\313&YZ\030\002Nl\021\031'\001\2778<a\307Y6\204\207\260\275I\366\345\275y\255\231\226<\361hF\232\356\301\322\022\366\345\350\343\034\3478\3079\352\250\243\216:\316QG\377\204\374\204\255\352\031I#K2\260\233\370\331\322LWwuu\325W_\325\214ww\266\226\357\345\036h:\247%\2031\023?+\252\316\243+m_\177\336\274\243Z6\273#XC\334Q\360S\251Q\263b\345j\315\206i\021\215\225\251c\010\242(6\323\034\225)\n\321\034F\204EL\313\\\026\266\376\\\247\006HU\335\324\205\242pf\224s\006mZ\216 *5MK\220\022#\252e>g\266`\032\256\243\344iS\354Y&\261J\2770U\220\262e\223\232\256\356\033\272Y\371\212\203F\263\302-\307V\331\327\tk\326HA\010V\255\t\324`XT#x\323\204\305\246PLZe\212Mt\223PS\347\226Aq'\330\023\227\347\310\316\236\316\t\374\242-5\213s\035\316\235\033Q\275a9\206&\345\252\315`11\331\001\331R7,\263\254Wb3\227\010\036\311*\223*\253Zv\363\301\253\025\240i\244Jk'\317\224\343}c_gj\344\334)3+LH]T7\231-=\013\323\230)\370\322\320S\353\267^\274\274\025\337\307\373&\207\"g\312\221\327\336\204r\0256\371s\367\320\330\237\266\t\010!\254\200<\225\023\233\325\035\306\005\200\220\224iU7\232\n\025\302\376C\267\032\234k\211\320\222e\343^SVU\251aX*\331\332Q\036\352\002\240\224+9\3452\263Gfo2H\006H5j71\003\024Ecr\225\242\334^<i\"X\244<\252\322\n\333\244\202\216M\025\000\371\241\017d\000\360tp\257\003k$m\304d\274\023#\264LUF>\313\221ol\033\026\250\226\306\326\310k*>\240\266\t\343k\244\350000\332g\211\224\034$\010\307\324\310S\213\213m\325\326\201\002\320\335k\344\305\313\334\233\352~b\365e\250\"V\014\276\300 .\021\207\343\342mj\3627V\234\310U\203Q\22385R\026+\021\005\240SF\025F\356A\307\241\322-\230\024S\215*\277\034\233\n\3352\3456I\304\301\211\361\324'\250\222\373\215\241p\302\034M\267\341H\226\335|\255M\266d0\220y\221\344\201\357\365\1773\262e3\266\323\254\261\025b\350%\033@5\032\366c*\036UL\013\231\275\317\242%t='%C\027kD\343\002\200M8\250]\177\361\262\361\342\345\022i\254\343gS~\252\206^S\032JU7\345\355\301p\2609\030\334\223\237U\332\000\206_?\276\267\371\034L""\326\376\330\315Fv\370\016\252\350S\274|,\3119g3S\2034\245\\)5\005\3431\232\311rL\336P\356\032\314\220&`az\361\2224\310\377\252\361\204\252\364\014\306\236\303$\031\361axI\331\266\252\304\262A\037\226I\252\356\261%\242\013\0003\207\024`2!\350q\003F\024\357\232\334\251\325,Y\320\3730\350\243\200@\241\347\200\336\034) \267\221\310p\210\374h\n(\252\252D\244\241\224\325\010\366\267\027\327\210\252\346\312\252\022\335\367k\366\223\335\307\217\307\326Fjo/\222\003]\354\201\305Q\204\251]q\252Q\271\023X\365\035\356\000\0276\301;\220\324D\236\277\337\233\014\022\266\014G\227\022\324\004G\007\027\330\313\274\306T\275\254Gm\004\364$@\327\202\277\002;\2436B\372+\034\330v\244q\261\3312\216\301\236\006#Q\375\200\335\301Pj\200/\264f\024\r-:T\222\251p\356\250\003\217\3217\221\215\227\304\025'\353\353\343N;>\037\267@G\014\034\251\202\247FV\354\313o%I\016\n\32549\020\317\357\233\032\365b\223\232\230W(\351\323\3740\0346\203\006\3569#H$QQ\031+\233\003\376\035\331i\344 \375\322\221\364\n\270y\314+\034\274\002h\262jH\270\034\0218\344:\216%\333\261A/\200d\000\312\001_&j\376\204\306\300\021\345\345{\205\207\033\321\320F\337\364\343\367\271A[\255\312\236XQ&\314\000C\270\300L\351\317\371v\020\310cYz\2345\306\264\217O\030S~|\n\002\007\222\253bbbM\024:\302R\240\240L\222\225(D\000\2161I\306\014`UL\245I\302=\246W\366&n\247C\230'\033\362\213\003}[\2719I\2046@|\234\311\013%@\224i\246`W`0@\214M+6\255\355)U(p\223'NQP\243\360tT\231$r\314}\323:0\225\212\321\254\355\361\351\026\036\350\232\330\233(\000\213\216\217\353|\350[m\202\020\327\324\306%\303\0223\r^\211);\200Q\307f\257(S\307\305\374$,\361\023\260\304O\302\013\237\212\027>\025/|:^PT\245\366\276S\233$y-4\360\351Q\347\323\242\311\247D\263\321T\300'x\212\306@\364L\272\231\331c\003'd|b\312\364\234\037L\032)\027\343\342(\316\217\255J\005\242\255<m6\340oSW\205\362\004p\361\214\225\237\321A\230)o\232\252n\345T\313\206\343@\036r\0142\304\270\024\345\035/Y\206\246\252\370l\307lu\217\332\252LV\335T\240\354\252\254D\325}\3252,\273\337-@\363\242h`\224\306""\260\321\034\200\202\301^r\000?\301\357``Y\025\2152vn\370\356A\207\262\220diy\035\225\330\350\022\264\003\240\271\274\201>\000\373\375\001\317'\010_^\342\206x\201u\034\nB\225\nE);&<s\201\337F\\7\302\236I\266L\262\343\010\033\016\331o\310v\tv\033e\263Q\366\232\312V}vJ\260\3214\366\031\260M\237]\344\231\"\270({\221a\221Q\022\222\212\216\353\342\310\216\020\317\220ht\001\036Pu\350\202x|\210}\326\344\370\346\tA\301r::kx+\337\332$\252\264\224\030\022jxi\320\0223\372m\005\330 \275\210\036=\251\325\230$\213\0005I\2421h\371\254\346$\021k\350\\\360I\022\003\004\323\306\025\025\316mU\247\212%\016u\326\327+q\"\337v$\006\342\367\037\211\221\370\325\316><\205V8\000Q\030\302\256*\300]\220;1\203UuM3XU\257Ui\r\201\240 \034\034\300\007\374H<+\246e\262\270\375\201 F\031Y\263 \3525H\3528\354x\371\\\340\373B\\W\207\236:Z;|'8F;\203\001\200\010\\\342\203H\304\031\023\252\314XU9VE +\0358Z\245DmD\237-\014l\353FjI\262v\214\324\212am\030\326\202\004\367\017\271^\262b\354\223\251<\237\340\365\001\217\367y\033\276\343w\245\t\202U&\220m_\001\034\\\340\353\316}&\366 \201\300D\005P\317\345g\003\177#|@\270\035\244\021x\006\3017\244\016\272\006\t\300\251\001\0132\3503\341\321\307a\374\000\337E\0340\272\257\200\253\3447\370I\032xP=\200\207=\374S\220^\321\326\006\374\014\313J\263\331\\\032\274\020X\273s\007\361\031u\273p\023\246?\t\262\275\314\025\367W?\357\027z\231k^\335O\373\217\202\355\326\351V\276U\370-\325K\237\351\245\317\035\256\036\326\303\367n\371NP\370\255p\224Y\200\311\233\301lk\256\265\320*\266h/\363\236{\332\315\207\351\033\376$\341\271\303\225\303m\367\224\273\340>s\271\227\355\235\277\350\336t\353^\252\367`\253C;\274\013#\357\36427\303\233_\264\214N\266\263\322y\326\261\273\027\273y\\\t\373\016\346\037\341\264k^\023t_mgQ\232\357\235\277\344\346\335o\274K^\301\333\365\263\376]\277\024\244\336d\360\302!w\263\356\227\336u\257\320{\357\n\354r\306\333\366S\376e\237\372<\270\036\024z\357\274\213\373g\335{\336]\257\344\237\362\257\373\017}\332;\377W/\353\255\202)\031\360\323\335\226\332\276""\324\336h\363\316B\247\330\313\\\365\256\370o\201\366S\260\376aPj\245z\231\331\336\371yw\003\016\177\333\317\036\235\177\337\245n\035\335\370A\370\301]\360\362f{\266s\251\263\321\251w\317v\353\341\323\"\2723\343\235\365`N/s!\274\260\332*\264v\332s\361\035\304+X\r\244\014\335#\334\374\320\241\350\240\251\203\365\321\241\363\207\377p\351\021\232v\305=\3604\377Vp\021\364\362\326u\260\347t{\245]D\217\335\007o\355\370\363\376N0\037\374\330*F\266\013/?u\367\017\275G>\034`!\\(t\346:\331\t;\037e\320\315i\3607x\352C\277\010\336\314|\344\025\301\271\263\301\345@\005\330d\177\177kfv\021\242\003~8+We.\034\326\3353\356\266\227\362.{\324\343\020\205\302\233\014\236;\274{H\017\017\334\2227\031\007\270\341\025\027\014\201\343\311\210cxW\274\237|-Xl\255\266D{\265-:\253\035\321\275\333U\303\342N\270\263\213\376\373\336\353\307\344s\000\272\326\316\342\335l/CB\3629\006\254\375)\302\341:l\262\3527[\251\343\322\217;\251\350\344\232\277\030\344c)(\273\001\331\223\n\0277:\371\316f\367\355\360\331\366\230\350\3536\005{\362\361\346\267\203\024D\2478\234\265\210\267a\356\357\335Tw\276\373\257\360\207\037\343\2117\301\331Z\220E\344\r\266\r6\202z+\025'0\316\233s\347\303\3137\375mt\177\234`\367\275\207\036E\031\201\314\230\367\177\212\202\224\034\320Z\331V\337\234\305`.\270\021\320\370\356cH$\021\235\356o\020\017\341\337\217v\304\201\\@\003\321\272\337\336\354\244:\322\223Y\177\316\277\341\3530\210\324\023)\270\345\327\203t \357\206\334\224j\315\305\307\005\326x\200\276\350|\327\255'}\r\274\365\366\341\247n1\234Y\016\212\222\303\336w\r\220\346{\351\217\274\237\301\304l/}\3667\347p\003\300\211\230\351\245\257\205\327>\003\305\357\267\352(\211FQ\315_\274Y\177N\212\327\333\3056E\241\000\277d\336=d\000\244\302\321\374\007^\336\373\0268\357I\353V{.\\\373\256\373%\304,\334\336\211\365\"\3346\001wi\244\301bL\250\003c\316\035~\356\246#8\306\242\244\0246\375\002\201\325\316\017mrO\207\2270\344\027\203/\301\353\350\2753@\230uT\225\237\240\"q\332\021\263\301y\307\216\234\024\367\266\276\357\026\273\024]""\014\222_c\202\304xD!\007\227\236\013\317\341\365\207\301\017@Oc\347B\337nF\211\010\251\022\236\307\242P8q\022\036-\345^\201\304\275\n `\341\247_\265\013\341:\346Z\270\373Oy\2720\r`\230\200\320\213\356\255\360*\322\342\375\326\303\226\336>\350P\344\365\377x\222\301\372>\271\344~\005\360II\273o\002\237\315\205\237`<U`\336BG\232\237\200\003\324\204\3773\360\240\341(}\331\375\031\020\r\252\256zs\340\300G\376n\260\020\024\003:\000\305Q\0321}*\221\210iIU\375\377rB\201\216\3323\241\254bs\254\334\223\315\212\256r\345\256Z1\224o\037\177\263\275\322\177\247D>\231\321,\007\272\270\031x\274\231\231qL\016\335\023\323\210a\231\225\031\230=S\323g\244\022\253\306\240\371Q\030_\231\201\266\r\332$xB\210\332J\350T\030\325f\206\377\006\320\024\241k\274\311\241\271\007[\242\213A\357\200\377J1\260\367\252Z\320f\342s\222\361_\013X\334\177";
    PyObject *data = __Pyx_DecompressString(cstring, 3074, 1);
    if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error)
    const char* const bytes = __Pyx_PyBytes_AsString(data);
    #if !CYTHON_ASSUME_SAFE_MACROS
    if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) }
    #endif
    #else /* compression: none (7823 bytes) */
const char* const bytes = "UTF-8.?disableenablegcisenabledkivy/core/text/_text_pango.pyxno default __reduce__ due to non-trivial __cinit__self.layout cannot be converted to a Python object for pickling<stringsource>_text_pango: Attempt to load empty font_name_r in anisolated context. This is not possible._text_pango: Could not create new FcConfig object, out of memory?_text_pango: Could not create new font map_text_pango: Could not create pango context_text_pango: Could not create pango layout_text_pango: Could not get container for extents, font_name='{}', font_context='{}', font_name_r='{}'_text_pango: Could not get container for ascent, font_name='{}', font_context='{}', font_name_r='{}'_text_pango: Could not get container for descent, font_name='{}', font_context='{}', font_name_r='{}'_text_pango: Could not get context metrics requesting family_attr='{}', font_context='{}', font_name_r='{}'_text_pango: Could not get context container, aborting_text_pango: Could not malloc FT_Bitmap.buffer_text_pango: Dead canary in __dealloc__()_text_pango: Dead canary in get_ImageData()_text_pango: Detecting family for '{}' failed: Could not load/create face 0. Error code: _text_pango: Detecting family for '{}' warning: Query failed, but found PostScript name: {}._text_pango: Detecting family for '{}' warning: No family name found in font, using Sans._text_pango: Detecting family for '{}' warning: Could not clean up ft2 font face._text_pango: Error loading FontConfig configuration for font_context {}: {}_text_pango: Error loading font '{}'_text_pango: Error loading font directory for font_context {}: {}_text_pango: Failed to initialize FreeType2 library. Error code: {}_text_pango: Ignoring out of bounds blit: dstbuf size={}x{}, x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}, maxpos={}_text_pango: Invalid blit: dstbuf size={}x{}, x={}, y={}, clip_x_min={}, w={}, clip_y_min={}, h={}_text_pango: KivyPangoLayout.render_as_bytes failed - layout pixel size is {} x {}_text_pango: KivyPangoLayout.render_as""_bytes failed - out of memory?_text_pango: Removed font context {} from ordered cache, it was used in a KivyPangoLayout_text_pango: Unsupported FreeType library version. Abort rendering._text_pango: _cc_create_fcconfig(): cc.fc_config is not NULL_text_pango: _cc_render() with invalid arguments, this usually means text layout could not fit text within user-specified constraints: dstbuf size={}x{}, x={}, y={}_text_pango: _ft2_scan: Attempt to re-scan file '{}', it is already cached with family name '{}'._text_pango: get_ImageData() self.pixels == NULL_text_pango: get_ImageData() without render() call_text_pango: kpango_font_context_add_font() called with empty context_text_pango: kpango_font_context_add_font() failed, could not resolve or create context container for '{}'_text_pango: render() called, but self.pixels is NULL_text_pango: set_cc_options(): Failed to set current fc_config for font_name_r='{}', font_context='{}'utf-8ABContextContainerContextContainer.__reduce_cython__ContextContainer.__setstate_cython__GImageDataKivyPangoLayoutKivyPangoLayout.__reduce_cython__KivyPangoLayout.__setstate_cython__KivyPangoLayout.get_alignmentKivyPangoLayout.get_auto_dirKivyPangoLayout.get_baselineKivyPangoLayout.get_ellipsizeKivyPangoLayout.get_heightKivyPangoLayout.get_indentKivyPangoLayout.get_justifyKivyPangoLayout.get_line_countKivyPangoLayout.get_pixel_sizeKivyPangoLayout.get_single_paragraph_modeKivyPangoLayout.get_sizeKivyPangoLayout.get_spacingKivyPangoLayout.get_unknown_glyphs_countKivyPangoLayout.get_widthKivyPangoLayout.get_wrapKivyPangoLayout.is_ellipsizedKivyPangoLayout.is_wrappedKivyPangoLayout.render_as_ImageDataKivyPangoLayout.render_as_TextureKivyPangoLayout.render_as_bytesKivyPangoLayout.set_alignmentKivyPangoLayout.set_auto_dirKivyPangoLayout.set_ellipsizeKivyPangoLayout.set_heightKivyPangoLayout.set_indentKivyPangoLayout.set_justifyKivyPangoLayout.set_markupKivyPangoLayout.set_single_paragraph_modeKivyPangoLayout.set_spacingKivyPangoLayout.set_widthKivyPan""goLayout.set_wrapKivyPangoLayout.xy_to_indexKivyPangoRendererKivyPangoRenderer.__reduce_cython__KivyPangoRenderer.__setstate_cython__KivyPangoRenderer.get_ImageDataKivyPangoRenderer.renderLogger__Pyx_PyDict_NextRefRaalignmentasyncio.coroutinesautodirb_pixelsboldcccentercharcline_in_tracebackcolorcreate_from_datadecodeellipsizeemencodeencodingendfctxflip_verticalfont_contextfont_familyfont_featuresfont_hintingfont_namefont_name_rfont_sizefontfileformat__func__getget_ImageDataget_alignmentget_auto_dirget_baselineget_ellipsizeget_heightget_indentget_justifyget_line_countget_pixel_sizeget_single_paragraph_modeget_sizeget_spacingget_unknown_glyphs_countget_widthget_wrap__getstate__hheightindentindex_is_coroutineis_ellipsizedis_wrappeditalicitemsjustifykeyskivy.core.imagekivy.core.text._text_pangokivy.loggerkivylabelkpango_find_base_dirkpango_font_context_add_fontkpango_font_context_createkpango_font_context_destroykpango_font_context_existskpango_font_context_listkpango_font_context_list_customkpango_font_context_list_familieskpango_get_ascentkpango_get_descentkpango_get_extentskwargsleftltrm__main__markupmiddlemipmapmode__module____name__noneoptionsoutpixelspop__pyx_state__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex__removerenderrender_as_ImageDatarender_as_Texturerender_as_bytesresultrgbarightrtlselfset_alignmentset_auto_dirset_ellipsizeset_heightset_indentset_justifyset_markup__set_name__set_single_paragraph_modeset_spacingset_widthset_wrapsetdefault__setstate____setstate_cython__spacingstartstrikethrought__test__textexttext_languagetrailingunderlineupdateutfvalueswwarnweak_ltrweak_rtlwidthwmwordword_charwrapxxxxy_to_indexyyy,directory://fontconfig://\320\004*\250!\330\010\027\220|\2401\240A\330\010\037\230q\240\004\240I\250S\260\003\2601\260A\200\001\330\004\005\330\004\013\2104\210q\320\020'\240u\250A\200A\340\010#\2401\240D\250\t\260\021\260#\260Q\260a\330\010\020\220\003\2201\320\004$\240A\340\010#\2401\240D\250\t\260\021\260#\260Q\260a\330\010""\013\2102\210S\220\002\220#\220R\220s\230!\330\014\022\220%\220q\230\001\330?F\300a\300s\310!\330\014\r\330\010%\320%6\260l\300!\3002\300R\300r\310\022\3101\330\010\013\2104\210q\330\014\022\220%\220q\230\001\340\014\r\330\010\037\230y\250\t\260\031\270!\330\010\013\2101\330\014\023\2201\220E\230\023\230A\230U\240!\2403\240b\250\001\330\014\023\2201\220E\230\023\230A\230U\240!\2403\240b\250\001\330\014\023\2201\220E\230\023\230A\230U\240!\2403\240b\250\001\330\014\017\210s\220!\2207\230\"\230A\330\020\027\220q\230\005\230S\240\001\240\025\240a\240s\250\"\250A\330\r\016\330\014\022\220!\2208\2303\230b\240\002\240\"\240B\240a\330\014\032\230!\2304\230y\250\010\260\003\2603\260c\270\023\270C\270s\300#\300Q\330\010\031\230\027\240\006\240b\250\002\250\"\250B\250b\260\001\330\010\t\330\014\024\220C\220s\230(\240!\340\014\026\220a\220q\200A\340\010\033\320\0333\2601\260D\270\t\300\023\300C\300q\310\007\310q\320PQ\330\010\020\220\010\230\007\230q\200A\330\010\017\320\0174\260A\260T\270\021\200A\330\010\017\320\017*\250!\2504\250q\200A\330\010\013\2104\210t\2201\330\014\022\220%\220q\230\001\330\014\r\330\010\013\2104\210t\2201\330\014\022\220%\220q\230\001\330\014\r\330\010\013\2104\210q\330\014\022\220%\220q\230\001\330\014\r\330\010\014\210J\220a\340\010\t\330\014\027\220w\230d\240'\250\022\2504\250s\260\"\260D\270\003\2702\270Q\330\014\023\2209\230A\230T\240\024\240T\250\024\250X\260Q\340\014\026\220a\220t\2301\200A\330\010\013\2104\210t\2201\330\014\022\220%\220q\230\001\330\014\r\330\010\034\230I\240Q\330\010#\320#A\300\021\300!\330\010\013\2104\210q\330\014\022\220%\220q\230\001\330\014\r\340\010\027\220q\230\004\230A\330\010\031\230\034\240Q\240a\330\010\035\230Q\230b\240\t\250\025\250c\260\021\260!\360\006\000\t)\250\001\330\010\020\220\007\220q\230\001\330\010\017\210q\220\005\220S\230\001\230\025\230a\230s\240\"\240A\330\010\017\210q\220\005\220S\230\001\230\025\230a\230s\240\"\240A\330\010\017\210q\220\005\220S\230\001\230\025\230a\230s\240\"\240A\330\010\013""\2103\210a\210w\220b\230\001\330\014\023\2201\220E\230\023\230A\230U\240!\2403\240b\250\001\360\006\000\t\027\220a\330\010\026\220a\330\r\016\330\014\032\230!\2302\230Y\240d\250)\2604\260t\2704\270t\3004\300t\3103\310c\320QT\320TU\330\010\014\210M\230\021\200A\330\010\017\320\0175\260Q\260d\270!\200A\330\010\t\330\010 \320 5\260T\270\021\270+\300Q\330\010\"\240!\2404\240y\260\001\200A\330\010\t\330\010 \320 5\260T\270\021\270&\300\001\330\010\035\230Q\230d\240)\2501\200A\330\010\t\330\010\017\320\017$\240D\250\001\320)C\3001\300D\310\n\320RS\200A\330\010\t\330\010\017\320\017$\240D\250\001\320)>\270a\270t\3001\200A\330\010\017\320\017(\250\001\250\024\250Q\200A\330\010\t\330\010\017\320\017)\250\024\250Q\320.H\310\001\310\024\310Z\320WX\200A\330\010\017\320\017%\240Q\240d\250!\200A\340\010\035\230Q\230d\240)\2501\250C\250q\260\001\330\010\020\220\003\2201\200A\330\010\021\220\024\320\025%\240S\250\001\330\010\013\2101\330\014\023\2209\230B\230a\200A\330\010 \240\001\240\024\240Y\250c\260\021\260!\200A\330\010 \240\001\240\024\240Y\250d\260!\2601\200A\330\010\017\320\017)\250\021\250$\250a\200A\330\010\017\320\017&\240a\240t\2501\200A\330\010\036\230a\230t\2409\250C\250q\260\001\200A\330\010.\250a\250t\2609\270D\300\001\300\021\200A\330\010!\240\021\240$\240i\250t\2601\260A\200A\330\010\017\320\017'\240q\250\004\250A\200A\330\010\037\230q\240\004\240I\250S\260\001\260\021\200A\330\010\t\330\010%\320%?\270t\3001\300K\310q\330\010\"\240!\2404\240y\260\001\200\001\330\004\n\210+\220Q\320\000-\250Q\330\004\005\330\004\026\220l\240!\2401\330\004\035\230\\\250\021\250!\330\004\007\200u\210C\210q\330\010\017\210q\330\004\037\320\0370\260\001\260\026\260q\330\004\007\200q\330\010\017\210q\200\001\330\004\030\230\t\240\021\330\004\037\320\037=\270Q\270a\330\004\007\200t\2101\330\010\016\210e\2201\220A\340\024\033\2301\230G\2401\240N\260'\270\021\320:K\3107\320RS\320ST\330\010\017\210q\330\004\023\2201\220D\230\001\330\004\013\2102\210Q\200\001\330\004\005\330\004\026\220l""\240!\2401\330\004\013\2105\220\004\220E\230\023\230A\200\001\330\004\005\330\004\005\330\004\026\220l\240!\2401\330\004\037\320\0376\260d\270!\2701\330\004\007\200q\330\010\017\210q\220\003\320\023(\250\001\250\022\2507\260!\2609\270D\300\005\300R\300q\330\004\013\2101\200\001\330\004\005\330\004\005\330\004\026\220l\240!\2401\330\004\035\230\\\250\021\250!\330\004\007\200t\2101\330\010\016\210e\2201\220A\340\010\t\330\004\037\320\0370\260\001\260\026\260q\330\004\007\200t\2101\330\010\016\210e\2201\220A\330FM\310Q\310a\330\010\t\330\004\007\200|\2207\230\"\230A\330\010\017\320\017 \240\001\240\024\240Q\330\004\013\320\013 \240\001\240\034\250W\260A\260Q\200\001\330\004\005\330\004\026\220l\240!\2401\330\004\007\200u\210D\220\005\220S\230\001\330\010\014\320\014#\2401\240A\200\001\330\004\005\330\004\026\220l\240!\2401\330\004\007\200u\210D\220\005\220S\230\001\330\010\017\210q\220\001\220\027\230\001\230\031\240$\240e\320+<\270A\320=T\320TU\320UV\330\004\013\2101\320\004'\240q\330\010\021\220\024\320\025%\240S\250\001\330\010\013\2101\330\014\022\220'\320\031*\250!\2509\260B\260i\270w\300a\330\014\017\210~\230Q\330\014\023\2201\200\001\330\004\005\330\004\023\220<\230q\240\001\330\004\013\320\013%\240T\250\021\320*=\270Q\270c\300\023\300A\300Q\200\001\330\004\007\200u\210C\210q\330\010\017\210s\220!\330\004\030\230\t\240\021\330\004\037\320\037=\270Q\270a\330\004\007\200t\2101\330\010\016\210e\2201\220A\340\024\033\2301\230G\2401\240N\260'\270\021\320:K\3107\320RS\320ST\330\010\017\210s\220!\340\004\025\220\\\240\021\240!\330\004\031\230\021\230\"\230I\240U\250#\250Q\250a\330\004\023\2201\220D\230\001\340\004\037\230q\240\002\240)\2501\250C\250q\260\001\330\004\013\2103\210aisolated://__pyx_t_4kivy_8graphics_3cgl_GLES2_Context *\000double\000int\000\000unsigned long\000cgl\000pi\000kivy_opengl_es2\000verify_gl_main_thread\000initialized_tidsystem://systemconfig://Sanslightmononormal";
    PyObject *data = NULL;
    CYTHON_UNUSED_VAR(__Pyx_DecompressString);
    #endif
    PyObject **stringtab = __pyx_mstate->__pyx_string_tab;
    Py_ssize_t pos = 0;
    for (int i = 0; i < 246; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL);
      if (likely(string) && i >= 48) PyUnicode_InternInPlace(&string);
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
      stringtab[i] = string;
      pos += bytes_length;
    }
    for (int i = 246; i < 298; i++) {
      Py_ssize_t bytes_length = index[i].length;
      PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length);
      stringtab[i] = string;
      pos += bytes_length;
      if (unlikely(!string)) {
        Py_XDECREF(data);
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    Py_XDECREF(data);
    for (Py_ssize_t i = 0; i < 298; i++) {
      if (unlikely(PyObject_Hash(stringtab[i]) == -1)) {
        __PYX_ERR(0, 1, __pyx_L1_error)
      }
    }
    #if CYTHON_IMMORTAL_CONSTANTS
    {
      PyObject **table = stringtab + 246;
      for (Py_ssize_t i=0; i<52; ++i) {
        #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
        #else
        Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
        #endif
      }
    }
    #endif
  }
  {
    PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0;
    int8_t const cint_constants_1[] = {0};
    int16_t const cint_constants_2[] = {255};
    for (int i = 0; i < 2; i++) {
      numbertab[i] = PyLong_FromLong((i < 1 ? cint_constants_1[i - 0] : cint_constants_2[i - 1]));
      if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #if CYTHON_IMMORTAL_CONSTANTS
  {
    PyObject **table = __pyx_mstate->__pyx_number_tab;
    for (Py_ssize_t i=0; i<2; ++i) {
      #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL);
      #else
      Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT);
      #endif
    }
  }
  #endif
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_codeobjects ### */
typedef struct {
    unsigned int argcount : 3;
    unsigned int num_posonly_args : 1;
    unsigned int num_kwonly_args : 1;
    unsigned int nlocals : 4;
    unsigned int flags : 10;
    unsigned int first_line : 10;
} __Pyx_PyCode_New_function_description;
/* NewCodeObj.proto */
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
);


static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
  PyObject* tuple_dedup_map = PyDict_New();
  if (unlikely(!tuple_dedup_map)) return -1;
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 601};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_kivylabel, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_cc, __pyx_mstate->__pyx_n_u_utf, __pyx_mstate->__pyx_n_u_R, __pyx_mstate->__pyx_n_u_G, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_color, __pyx_mstate->__pyx_n_u_xx, __pyx_mstate->__pyx_n_u_yy};
    __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_render, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_q_IQ_A_4q_q_q_A_Qa_Qb_c_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 632};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_b_pixels};
    __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_ImageData, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_q_4t1_q_4q_q_Ja_wd_4s_D_2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 651};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_kivylabel, __pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_cc, __pyx_mstate->__pyx_n_u_utf, __pyx_mstate->__pyx_n_u_w, __pyx_mstate->__pyx_n_u_h};
    __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_get_extents, __pyx_mstate->__pyx_kp_b_iso88591_uCq_s_Qa_t1_e1A_1G1N_K7RSST_s_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 670};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_kivylabel, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_cc};
    __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_get_ascent, __pyx_mstate->__pyx_kp_b_iso88591_Qa_t1_e1A_1G1N_K7RSST_q_1D_2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 682};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_kivylabel, __pyx_mstate->__pyx_n_u_options, __pyx_mstate->__pyx_n_u_cc};
    __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_get_descent, __pyx_mstate->__pyx_kp_b_iso88591_Qa_t1_e1A_1G1N_K7RSST_q_1D_2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 700};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_text, __pyx_mstate->__pyx_n_u_t};
    __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_find_base_dir, __pyx_mstate->__pyx_kp_b_iso88591_q_T_Qc_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 706};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_font_context, __pyx_mstate->__pyx_n_u_fctx};
    __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_font_context_exists, __pyx_mstate->__pyx_kp_b_iso88591_l_1_5_E_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 712};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_font_context, __pyx_mstate->__pyx_n_u_fontfile, __pyx_mstate->__pyx_n_u_fctx, __pyx_mstate->__pyx_n_u_font_name_r, __pyx_mstate->__pyx_n_u_cc};
    __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_font_context_create, __pyx_mstate->__pyx_kp_b_iso88591_Q_l_1_uCq_q_0_q_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 723};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_font_context, __pyx_mstate->__pyx_n_u_fontfile, __pyx_mstate->__pyx_n_u_fctx, __pyx_mstate->__pyx_n_u_font_name_r, __pyx_mstate->__pyx_n_u_cc};
    __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_font_context_add_font, __pyx_mstate->__pyx_kp_b_iso88591_l_1_t1_e1A_0_q_t1_e1AFMQa_7_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 742};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_font_context, __pyx_mstate->__pyx_n_u_fctx};
    __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_font_context_destroy, __pyx_mstate->__pyx_kp_b_iso88591_l_1_uD_S_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 749};
    PyObject* const varnames[] = {0};
    __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_font_context_list, __pyx_mstate->__pyx_kp_b_iso88591_4q_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 754};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_font_context, __pyx_mstate->__pyx_n_u_fctx, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_font_context_list_familie, __pyx_mstate->__pyx_kp_b_iso88591_l_1_uD_S_q_e_A_TTUUV_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 762};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_font_context, __pyx_mstate->__pyx_n_u_fctx, __pyx_mstate->__pyx_n_u_cc, __pyx_mstate->__pyx_n_u_x};
    __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_kpango_font_context_list_custom, __pyx_mstate->__pyx_kp_b_iso88591_l_1_6d_1_q_q_7_9D_Rq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 824};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_markup, __pyx_mstate->__pyx_n_u_encoding, __pyx_mstate->__pyx_n_u_m};
    __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_markup, __pyx_mstate->__pyx_kp_b_iso88591_1A_q_IS_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 828};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_width};
    __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_width, __pyx_mstate->__pyx_kp_b_iso88591_A_at9Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 831};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_width, __pyx_mstate->__pyx_kp_b_iso88591_A_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 834};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_height};
    __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_height, __pyx_mstate->__pyx_kp_b_iso88591_A_q_IS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 837};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_height, __pyx_mstate->__pyx_kp_b_iso88591_A_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 840};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_wrap, __pyx_mstate->__pyx_kp_b_iso88591_A_D_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 844};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_wrap, __pyx_mstate->__pyx_n_u_wm};
    __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_wrap, __pyx_mstate->__pyx_kp_b_iso88591_A_5T_Qd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 849};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_is_wrapped, __pyx_mstate->__pyx_kp_b_iso88591_A_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 852};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ellipsize, __pyx_mstate->__pyx_n_u_em};
    __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_ellipsize, __pyx_mstate->__pyx_kp_b_iso88591_A_t1Kq_4y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 857};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_ellipsize, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_H_ZWX, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 861};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_is_ellipsized, __pyx_mstate->__pyx_kp_b_iso88591_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 864};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_indent};
    __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_indent, __pyx_mstate->__pyx_kp_b_iso88591_A_q_IS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 867};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_indent, __pyx_mstate->__pyx_kp_b_iso88591_A_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 870};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_spacing};
    __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_spacing, __pyx_mstate->__pyx_kp_b_iso88591_A_Yc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 873};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_spacing, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 876};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_justify};
    __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_justify, __pyx_mstate->__pyx_kp_b_iso88591_A_Yd_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 879};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_justify, __pyx_mstate->__pyx_kp_b_iso88591_A_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 882};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_autodir};
    __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_auto_dir, __pyx_mstate->__pyx_kp_b_iso88591_A_it1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 885};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_auto_dir, __pyx_mstate->__pyx_kp_b_iso88591_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 888};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_alignment, __pyx_mstate->__pyx_n_u_a};
    __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_alignment, __pyx_mstate->__pyx_kp_b_iso88591_A_5T_Q_4y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 893};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_alignment, __pyx_mstate->__pyx_kp_b_iso88591_A_D_C1D_RS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 899};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_mode};
    __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_set_single_paragraph_mode, __pyx_mstate->__pyx_kp_b_iso88591_A_at9D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 902};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_single_paragraph_mode, __pyx_mstate->__pyx_kp_b_iso88591_A_5Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 905};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_unknown_glyphs_count, __pyx_mstate->__pyx_kp_b_iso88591_A_4AT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 912};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_x, __pyx_mstate->__pyx_n_u_y, __pyx_mstate->__pyx_n_u_index, __pyx_mstate->__pyx_n_u_trailing, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_xy_to_index, __pyx_mstate->__pyx_kp_b_iso88591_A_31D_Cq_qPQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 922};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_w, __pyx_mstate->__pyx_n_u_h};
    __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_size, __pyx_mstate->__pyx_kp_b_iso88591_A_Qd_1Cq_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 927};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_w, __pyx_mstate->__pyx_n_u_h};
    __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_pixel_size, __pyx_mstate->__pyx_kp_b_iso88591_A_1D_Qa_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 932};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_baseline, __pyx_mstate->__pyx_kp_b_iso88591_A_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 935};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_get_line_count, __pyx_mstate->__pyx_kp_b_iso88591_A_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 943};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_color, __pyx_mstate->__pyx_n_u_w, __pyx_mstate->__pyx_n_u_h, __pyx_mstate->__pyx_n_u_pixels, __pyx_mstate->__pyx_n_u_R, __pyx_mstate->__pyx_n_u_G, __pyx_mstate->__pyx_n_u_B, __pyx_mstate->__pyx_n_u_A, __pyx_mstate->__pyx_n_u_out};
    __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_render_as_bytes, __pyx_mstate->__pyx_kp_b_iso88591_A_1D_Qa_2S_Rs_q_Fas_6l_2Rr_1_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 971};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_result};
    __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_render_as_ImageData, __pyx_mstate->__pyx_kp_b_iso88591_A_S_1_9Ba, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 976};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_mipmap, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_n_u_tex};
    __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_kivy_core_text__text_pango_pyx, __pyx_mstate->__pyx_n_u_render_as_Texture, __pyx_mstate->__pyx_kp_b_iso88591_q_S_1_9Biwa_Q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self};
    __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad;
  }
  {
    const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3};
    PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state};
    __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad;
  }
  Py_DECREF(tuple_dedup_map);
  return 0;
  bad:
  Py_DECREF(tuple_dedup_map);
  return -1;
}
/* #### Code section: init_globals ### */

static int __Pyx_InitGlobals(void) {
  /* PythonCompatibility.init */
  if (likely(__Pyx_init_co_variables() == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CommonTypesMetaclass.init */
  if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CachedMethodType.init */
  #if CYTHON_COMPILING_IN_LIMITED_API
  {
      PyObject *typesModule=NULL;
      typesModule = PyImport_ImportModule("types");
      if (typesModule) {
          __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType");
          Py_DECREF(typesModule);
      }
  } // error handling follows
  #endif
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  /* CythonFunctionShared.init */
  if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else
  
  if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)

  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectCall (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO (used by PyObjectFastCall) */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall (used by PyObjectCall2Args) */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
  #if PY_VERSION_HEX < 0x03090000
    #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
  #elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
    PyTypeObject *tp = Py_TYPE(callable);
    #if defined(__Pyx_CyFunction_USED)
    if (__Pyx_CyFunction_CheckExact(callable)) {
        return __Pyx_CyFunction_func_vectorcall(callable);
    }
    #endif
    if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
        return NULL;
    }
    assert(PyCallable_Check(callable));
    Py_ssize_t offset = tp->tp_vectorcall_offset;
    assert(offset > 0);
    vectorcallfunc ptr;
    memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
    return ptr;
}
  #else
    #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
  #endif
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
          #if CYTHON_COMPILING_IN_LIMITED_API
            return PyObject_Vectorcall(func, args, _nargs, NULL);
          #else
            vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
            if (f) {
                return f(func, args, _nargs, NULL);
            }
          #endif
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* PyObjectCall2Args (used by PyObjectCallMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallOneArg (used by PyObjectCallMethod1) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetAttrStr (used by PyObjectGetMethod) */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetMethod (used by PyObjectCallMethod1) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetFullyQualifiedName(tp);
    PyErr_Format(PyExc_AttributeError,
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}
#endif

/* PyObjectCallMethod1 (used by pop_index) */
#if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)))
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* pop_index */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) {
    PyObject *r;
    if (unlikely(!py_ix)) return NULL;
    r = __Pyx__PyObject_PopIndex(L, py_ix);
    Py_DECREF(py_ix);
    return r;
}
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) {
    return __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_pop, py_ix);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) {
    Py_ssize_t size = PyList_GET_SIZE(L);
    if (likely(size > (((PyListObject*)L)->allocated >> 1))) {
        Py_ssize_t cix = ix;
        if (cix < 0) {
            cix += size;
        }
        if (likely(__Pyx_is_valid_index(cix, size))) {
            PyObject* v = PyList_GET_ITEM(L, cix);
            __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
            size -= 1;
            memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*));
            return v;
        }
    }
    if (py_ix == Py_None) {
        return __Pyx__PyObject_PopNewIndex(L, PyLong_FromSsize_t(ix));
    } else {
        return __Pyx__PyObject_PopIndex(L, py_ix);
    }
}
#endif

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStrNoError (used by GetBuiltinName) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName (used by GetModuleGlobalName) */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
            "name '%U' is not defined", name);
    }
    return result;
}

/* PyDictVersioning (used by GetModuleGlobalName) */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        if (!PyErr_Occurred())
            PyErr_SetNone(PyExc_NameError);
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
    PyErr_Clear();
#elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS
    if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear();
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return result;
    }
#else
    result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* DictGetItem */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error
        if (unlikely(PyTuple_Check(key))) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args)) {
                PyErr_SetObject(PyExc_KeyError, args);
                Py_DECREF(args);
            }
        } else {
            PyErr_SetObject(PyExc_KeyError, key);
        }
    }
    return value;
}
#endif

/* PyObjectFastCallMethod */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) {
    PyObject *result;
    PyObject *attr = PyObject_GetAttr(args[0], name);
    if (unlikely(!attr))
        return NULL;
    result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1);
    Py_DECREF(attr);
    return result;
}
#endif

/* PyObjectCallNoArg (used by pyfrozenset_new) */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* pyfrozenset_new (used by PySetContains) */
static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) {
    if (it) {
        PyObject* result;
#if CYTHON_COMPILING_IN_PYPY
        PyObject* args;
        args = PyTuple_Pack(1, it);
        if (unlikely(!args))
            return NULL;
        result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL);
        Py_DECREF(args);
        return result;
#else
        if (PyFrozenSet_CheckExact(it)) {
            Py_INCREF(it);
            return it;
        }
        result = PyFrozenSet_New(it);
        if (unlikely(!result))
            return NULL;
        if ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000)
#if CYTHON_COMPILING_IN_LIMITED_API
            || __Pyx_get_runtime_version() >= 0x030A0000
#endif
            )
            return result;
        {
            Py_ssize_t size = __Pyx_PySet_GET_SIZE(result);
            if (likely(size > 0))
                return result;
#if !CYTHON_ASSUME_SAFE_SIZE
            if (unlikely(size < 0)) {
                Py_DECREF(result);
                return NULL;
            }
#endif
        }
        Py_DECREF(result);
#endif
    }
    return __Pyx_PyObject_CallNoArg((PyObject*) &PyFrozenSet_Type);
}

/* PySetContains */
static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) {
    int result = -1;
    if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) {
        PyObject *tmpkey;
        PyErr_Clear();
        tmpkey = __Pyx_PyFrozenSet_New(key);
        if (tmpkey != NULL) {
            result = PySet_Contains(set, tmpkey);
            Py_DECREF(tmpkey);
        }
    }
    return result;
}
static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) {
    int result = PySet_Contains(set, key);
    if (unlikely(result < 0)) {
        result = __Pyx_PySet_ContainsUnhashable(set, key);
    }
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* UnpackUnboundCMethod (used by CallUnboundCMethod1) */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
#elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) {
        return _PyObject_Vectorcall
            (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames);
}
#else
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
    return
#if PY_VERSION_HEX < 0x03090000
    _PyObject_Vectorcall
#else
    PyObject_Vectorcall
#endif
        (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames);
}
#endif
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000
     METH_VARARGS | METH_KEYWORDS,
#else
     METH_FASTCALL | METH_KEYWORDS,
#endif
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method, *result=NULL;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    result = method;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            result = unbound_method;
        }
    }
#if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    if (unlikely(target->method)) {
        Py_DECREF(result);
    } else
#endif
    target->method = result;
    return 0;
}

/* CallUnboundCMethod1 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    int was_initialized =  __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return __Pyx_CallCFunction(cfunc, self, arg);
        } else if (flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1);
        } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL);
        }
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg);
    }
#endif
    PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *args = PyTuple_New(1);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
    } else
#endif
    {
        result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg);
    }
    return result;
}

/* TupleAndListFromArray (used by fastcall) */
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    Py_ssize_t i;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    for (i = 0; i < n; i++) {
        if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) {
            Py_DECREF(res);
            return NULL;
        }
        Py_INCREF(src[i]);
    }
    return res;
}
#elif CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple);
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals (used by UnicodeEquals) */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\
        !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS)
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals (used by fastcall) */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length, length2;
        int kind;
        void *data1, *data2;
        #if !CYTHON_COMPILING_IN_LIMITED_API
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        #endif
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length < 0)) return -1;
        #endif
        length2 = __Pyx_PyUnicode_GET_LENGTH(s2);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(length2 < 0)) return -1;
        #endif
        if (length != length2) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    return (equals == Py_EQ);
return_ne:
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(n == -1)) return NULL;
    #endif
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        if (s == namei) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!namei)) return NULL;
        #endif
        int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs;
    PyObject *dict;
#if !CYTHON_ASSUME_SAFE_SIZE
    nkwargs = PyTuple_Size(kwnames);
    if (unlikely(nkwargs < 0)) return NULL;
#else
    nkwargs = PyTuple_GET_SIZE(kwnames);
#endif
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
#if !CYTHON_ASSUME_SAFE_MACROS
        PyObject *key = PyTuple_GetItem(kwnames, i);
        if (!key) goto bad;
#else
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
#endif
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* CallUnboundCMethod0 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        if (likely(cfunc->flag == METH_NOARGS))
            return __Pyx_CallCFunction(cfunc, self, NULL);
        if (likely(cfunc->flag == METH_FASTCALL))
            return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0);
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL);
        if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS)))
            return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL);
        if (cfunc->flag == METH_VARARGS)
            return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple);
        return __Pyx__CallUnboundCMethod0(cfunc, self);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *result;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
    result = __Pyx_PyObject_CallOneArg(cfunc->method, self);
    return result;
}

/* py_dict_items (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d);
}

/* py_dict_values (used by OwnedDictNext) */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d);
}

/* OwnedDictNext (used by RejectKeywords) */
#if CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) {
    PyObject *next = NULL;
    if (!*ppos) {
        if (pvalue) {
            PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p);
            if (unlikely(!dictview)) goto bad;
            *ppos = PyObject_GetIter(dictview);
            Py_DECREF(dictview);
        } else {
            *ppos = PyObject_GetIter(p);
        }
        if (unlikely(!*ppos)) goto bad;
    }
    next = PyIter_Next(*ppos);
    if (!next) {
        if (PyErr_Occurred()) goto bad;
        return 0;
    }
    if (pkey && pvalue) {
        *pkey = __Pyx_PySequence_ITEM(next, 0);
        if (unlikely(*pkey)) goto bad;
        *pvalue = __Pyx_PySequence_ITEM(next, 1);
        if (unlikely(*pvalue)) goto bad;
        Py_DECREF(next);
    } else if (pkey) {
        *pkey = next;
    } else {
        assert(pvalue);
        *pvalue = next;
    }
    return 1;
  bad:
    Py_XDECREF(next);
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
    PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef");
#else
    PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef);
#endif
    if (pkey) *pkey = NULL;
    if (pvalue) *pvalue = NULL;
    return 0;
}
#else // !CYTHON_AVOID_BORROWED_REFS
static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) {
    int result = PyDict_Next(p, ppos, pkey, pvalue);
    if (likely(result == 1)) {
        if (pkey) Py_INCREF(*pkey);
        if (pvalue) Py_INCREF(*pvalue);
    }
    return result;
}
#endif

/* RejectKeywords */
static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) {
    PyObject *key = NULL;
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) {
        key = __Pyx_PySequence_ITEM(kwds, 0);
    } else {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *pos = NULL;
#else
        Py_ssize_t pos = 0;
#endif
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
        if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return;
#endif
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL);
#if CYTHON_AVOID_BORROWED_REFS
        Py_XDECREF(pos);
#endif
    }
    if (likely(key)) {
        PyErr_Format(PyExc_TypeError,
            "%s() got an unexpected keyword argument '%U'",
            function_name, key);
        Py_DECREF(key);
    }
}

/* RaiseException */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
#elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}

/* RaiseDoubleKeywords (used by ParseKeywordsImpl) */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
}

/* CallUnboundCMethod2 */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) {
    int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc);
    if (likely(was_initialized == 2 && cfunc->func)) {
        PyObject *args[2] = {arg1, arg2};
        if (cfunc->flag == METH_FASTCALL) {
            return __Pyx_CallCFunctionFast(cfunc, self, args, 2);
        }
        if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS))
            return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL);
    }
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    else if (unlikely(was_initialized == 1)) {
        __Pyx_CachedCFunction tmp_cfunc = {
#ifndef __cplusplus
            0
#endif
        };
        tmp_cfunc.type = cfunc->type;
        tmp_cfunc.method_name = cfunc->method_name;
        return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2);
    }
#endif
    PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2);
    __Pyx_CachedCFunction_SetFinishedInitializing(cfunc);
    return result;
}
#endif
static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        PyObject *result = NULL;
        PyObject *args = PyTuple_New(2);
        if (unlikely(!args)) return NULL;
        Py_INCREF(arg1);
        PyTuple_SET_ITEM(args, 0, arg1);
        Py_INCREF(arg2);
        PyTuple_SET_ITEM(args, 1, arg2);
        if (cfunc->flag & METH_KEYWORDS)
            result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL);
        else
            result = __Pyx_CallCFunction(cfunc, self, args);
        Py_DECREF(args);
        return result;
    }
#endif
    {
        PyObject *args[4] = {NULL, self, arg1, arg2};
        return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
    }
}

/* ParseKeywordsImpl (used by ParseKeywords) */
static int __Pyx_ValidateDuplicatePosArgs(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char* function_name)
{
    PyObject ** const *name = argnames;
    while (name != first_kw_arg) {
        PyObject *key = **name;
        int found = PyDict_Contains(kwds, key);
        if (unlikely(found)) {
            if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key);
            goto bad;
        }
        name++;
    }
    return 0;
bad:
    return -1;
}
#if CYTHON_USE_UNICODE_INTERNALS
static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) {
    int kind;
    Py_ssize_t len = PyUnicode_GET_LENGTH(s1);
    if (len != PyUnicode_GET_LENGTH(s2)) return 0;
    kind = PyUnicode_KIND(s1);
    if (kind != PyUnicode_KIND(s2)) return 0;
    const void *data1 = PyUnicode_DATA(s1);
    const void *data2 = PyUnicode_DATA(s2);
    return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0);
}
#endif
static int __Pyx_MatchKeywordArg_str(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    #if CYTHON_USE_UNICODE_INTERNALS
    Py_hash_t key_hash = ((PyASCIIObject*)key)->hash;
    if (unlikely(key_hash == -1)) {
        key_hash = PyObject_Hash(key);
        if (unlikely(key_hash == -1))
            goto bad;
    }
    #endif
    name = first_kw_arg;
    while (*name) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) {
                *index_found = (size_t) (name - argnames);
                return 1;
            }
        }
        #endif
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        PyObject *name_str = **name;
        #if CYTHON_USE_UNICODE_INTERNALS
        if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) {
            if (__Pyx_UnicodeKeywordsEqual(name_str, key))
                goto arg_passed_twice;
        }
        #else
        #if CYTHON_ASSUME_SAFE_SIZE
        if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key))
        #endif
        {
            if (unlikely(name_str == key)) goto arg_passed_twice;
            int cmp = PyUnicode_Compare(name_str, key);
            if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
            if (cmp == 0) goto arg_passed_twice;
        }
        #endif
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
bad:
    return -1;
}
static int __Pyx_MatchKeywordArg_nostr(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    PyObject ** const *name;
    if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type;
    name = first_kw_arg;
    while (*name) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (cmp == 1) {
            *index_found = (size_t) (name - argnames);
            return 1;
        }
        if (unlikely(cmp == -1)) goto bad;
        name++;
    }
    name = argnames;
    while (name != first_kw_arg) {
        int cmp = PyObject_RichCompareBool(**name, key, Py_EQ);
        if (unlikely(cmp != 0)) {
            if (cmp == 1) goto arg_passed_twice;
            else goto bad;
        }
        name++;
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
bad:
    return -1;
}
static CYTHON_INLINE int __Pyx_MatchKeywordArg(
    PyObject *key,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    size_t *index_found,
    const char *function_name)
{
    return likely(PyUnicode_CheckExact(key)) ?
        __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) :
        __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name);
}
static void __Pyx_RejectUnknownKeyword(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject ** const *first_kw_arg,
    const char *function_name)
{
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos = NULL;
    #else
    Py_ssize_t pos = 0;
    #endif
    PyObject *key = NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(kwds);
    while (
        #if CYTHON_AVOID_BORROWED_REFS
        __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL)
        #else
        PyDict_Next(kwds, &pos, &key, NULL)
        #endif
    ) {
        PyObject** const *name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (!*name) {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp != 1) {
                if (cmp == 0) {
                    PyErr_Format(PyExc_TypeError,
                        "%s() got an unexpected keyword argument '%U'",
                        function_name, key);
                }
                #if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(key);
                #endif
                break;
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        #endif
    }
    __Pyx_END_CRITICAL_SECTION();
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(pos);
    #endif
    assert(PyErr_Occurred());
}
static int __Pyx_ParseKeywordDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t extracted = 0;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    name = first_kw_arg;
    while (*name && num_kwargs > extracted) {
        PyObject * key = **name;
        PyObject *value;
        int found = 0;
        #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        found = PyDict_GetItemRef(kwds, key, &value);
        #else
        value = PyDict_GetItemWithError(kwds, key);
        if (value) {
            Py_INCREF(value);
            found = 1;
        } else {
            if (unlikely(PyErr_Occurred())) goto bad;
        }
        #endif
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            extracted++;
        }
        name++;
    }
    if (num_kwargs > extracted) {
        if (ignore_unknown_kwargs) {
            if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1))
                goto bad;
        } else {
            __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name);
            goto bad;
        }
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordDictToDict(
    PyObject *kwds,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject** const *name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    Py_ssize_t len;
#if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments)
    if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1;
#endif
    if (PyDict_Update(kwds2, kwds) < 0) goto bad;
    name = first_kw_arg;
    while (*name) {
        PyObject *key = **name;
        PyObject *value;
#if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop))
        int found = PyDict_Pop(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
        }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
        int found = PyDict_GetItemRef(kwds2, key, &value);
        if (found) {
            if (unlikely(found < 0)) goto bad;
            values[name-argnames] = value;
            if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad;
        }
#else
    #if CYTHON_COMPILING_IN_CPYTHON
        value = _PyDict_Pop(kwds2, key, kwds2);
    #else
        value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2);
    #endif
        if (value == kwds2) {
            Py_DECREF(value);
        } else {
            if (unlikely(!value)) goto bad;
            values[name-argnames] = value;
        }
#endif
        name++;
    }
    len = PyDict_Size(kwds2);
    if (len > 0) {
        return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name);
    } else if (unlikely(len == -1)) {
        goto bad;
    }
    return 0;
bad:
    return -1;
}
static int __Pyx_ParseKeywordsTuple(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    PyObject *key = NULL;
    PyObject** const * name;
    PyObject** const *first_kw_arg = argnames + num_pos_args;
    for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) {
#if CYTHON_AVOID_BORROWED_REFS
        key = __Pyx_PySequence_ITEM(kwds, pos);
#else
        key = __Pyx_PyTuple_GET_ITEM(kwds, pos);
#endif
#if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(!key)) goto bad;
#endif
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            PyObject *value = kwvalues[pos];
            values[name-argnames] = __Pyx_NewRef(value);
        } else {
            size_t index_found = 0;
            int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name);
            if (cmp == 1) {
                PyObject *value = kwvalues[pos];
                values[index_found] = __Pyx_NewRef(value);
            } else {
                if (unlikely(cmp == -1)) goto bad;
                if (kwds2) {
                    PyObject *value = kwvalues[pos];
                    if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                } else if (!ignore_unknown_kwargs) {
                    goto invalid_keyword;
                }
            }
        }
        #if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(key);
        key = NULL;
        #endif
    }
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    goto bad;
bad:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(key);
    #endif
    return -1;
}

/* ParseKeywords */
static int __Pyx_ParseKeywords(
    PyObject *kwds,
    PyObject * const *kwvalues,
    PyObject ** const argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    Py_ssize_t num_kwargs,
    const char* function_name,
    int ignore_unknown_kwargs)
{
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)))
        return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
    else if (kwds2)
        return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name);
    else
        return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs);
}

/* bytes_tailmatch */
static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
                                         Py_ssize_t start, Py_ssize_t end, int direction) {
    char* self_ptr;
    Py_ssize_t self_len;
    char* sub_ptr;
    Py_ssize_t sub_len;
    int retval;
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030b0000
    PyObject *converted_arg = NULL;
    #else
    Py_buffer view;
    view.obj = NULL;
    #endif
    #if !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
    if (PyBytes_AsStringAndSize(self, &self_ptr, &self_len) == -1) return -1;
    #else
    self_ptr = PyBytes_AS_STRING(self);
    self_len = PyBytes_GET_SIZE(self);
    #endif
    if (PyBytes_Check(arg)) {
        #if !(CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE)
        if (PyBytes_AsStringAndSize(arg, &sub_ptr, &sub_len) == -1) return -1;
        #else
        sub_ptr = PyBytes_AS_STRING(arg);
        sub_len = PyBytes_GET_SIZE(arg);
        #endif
    }
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030b0000
    else if (PyByteArray_Check(arg)) {
        sub_ptr = PyByteArray_AsString(arg);
        if (unlikely(!sub_ptr)) return -1;
        sub_len = PyByteArray_Size(arg);
        if (unlikely(sub_len < 0)) return -1;
    } else {
        PyObject *as_memoryview = PyMemoryView_FromObject(arg);
        if (!as_memoryview) return -1;
        Py_DECREF(as_memoryview);
        converted_arg = PyBytes_FromObject(arg);
        if (!converted_arg) return -1;
        if (PyBytes_AsStringAndSize(converted_arg, &sub_ptr, &sub_len) == -1) {
            Py_DECREF(converted_arg);
            return -1;
        }
    }
    #else // LIMITED_API >= 030B0000 or !LIMITED_API
    else {
        if (unlikely(PyObject_GetBuffer(arg, &view, PyBUF_SIMPLE) == -1))
            return -1;
        sub_ptr = (char*) view.buf;
        sub_len = view.len;
    }
    #endif
    if (end > self_len)
        end = self_len;
    else if (end < 0)
        end += self_len;
    if (end < 0)
        end = 0;
    if (start < 0)
        start += self_len;
    if (start < 0)
        start = 0;
    if (direction > 0) {
        if (end-sub_len > start)
            start = end - sub_len;
    }
    if (start + sub_len <= end)
        retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len);
    else
        retval = 0;
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030b0000
    Py_XDECREF(converted_arg);
    #else
    if (view.obj)
        PyBuffer_Release(&view);
    #endif
    return retval;
}
static int __Pyx_PyBytes_TailmatchTuple(PyObject* self, PyObject* substrings,
                                        Py_ssize_t start, Py_ssize_t end, int direction) {
    Py_ssize_t i, count = __Pyx_PyTuple_GET_SIZE(substrings);
    #if !CYTHON_ASSUME_SAFE_SIZE
    if (unlikely(count < 0)) return -1;
    #endif
    for (i = 0; i < count; i++) {
        int result;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substrings, i),
                                               start, end, direction);
#else
        PyObject* sub = __Pyx_PySequence_ITEM(substrings, i);
        if (unlikely(!sub)) return -1;
        result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction);
        Py_DECREF(sub);
#endif
        if (result) {
            return result;
        }
    }
    return 0;
}
static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
                                   Py_ssize_t start, Py_ssize_t end, int direction) {
    if (unlikely(PyTuple_Check(substr))) {
        return __Pyx_PyBytes_TailmatchTuple(self, substr, start, end, direction);
    }
    return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction);
}

/* dict_getitem_default */
static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
    PyObject* value;
#if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (unlikely(PyErr_Occurred()))
            return NULL;
        value = default_value;
    }
    Py_INCREF(value);
    if ((1));
#else
    if (PyBytes_CheckExact(key) || PyUnicode_CheckExact(key) || PyLong_CheckExact(key)) {
        value = PyDict_GetItem(d, key);
        if (unlikely(!value)) {
            value = default_value;
        }
        Py_INCREF(value);
    }
#endif
    else {
        if (default_value == Py_None)
            value = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key);
        else
            value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_get, d, key, default_value);
    }
    return value;
}

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    __Pyx_TypeName obj_type_name;
    __Pyx_TypeName type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    type_name = __Pyx_PyType_GetFullyQualifiedName(type);
    PyErr_Format(PyExc_TypeError,
                 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
                 obj_type_name, type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    return 0;
}

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
    CYTHON_UNUSED_VAR(clineno);
    CYTHON_UNUSED_VAR(lineno);
    CYTHON_UNUSED_VAR(filename);
    CYTHON_MAYBE_UNUSED_VAR(nogil);
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(0);
    }
    ctx = PyUnicode_FromString(name);
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
    if (nogil)
        PyGILState_Release(state);
}

/* PyLongBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, int inplace) {
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    long a;
    const PY_LONG_LONG llb = intval;
    PY_LONG_LONG lla;
    if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        return __Pyx_NewRef(op1);
    }
    const int is_positive = __Pyx_PyLong_IsPos(op1);
    const digit* digits = __Pyx_PyLong_Digits(op1);
    const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
    if (likely(size == 1)) {
        a = (long) digits[0];
        if (!is_positive) a *= -1;
    } else {
        switch (size) {
            case 2:
                if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                    a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                    lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 3:
                if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                    a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                    lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
            case 4:
                if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                    a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if (!is_positive) a *= -1;
                    goto calculate_long;
                } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                    lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                    if (!is_positive) lla *= -1;
                    goto calculate_long_long;
                }
                break;
        }
        return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
    }
    calculate_long:
        CYTHON_UNUSED_VAR(a);
        CYTHON_UNUSED_VAR(b);
        lla = a;
        goto calculate_long_long;
    calculate_long_long:
        {
            PY_LONG_LONG llx;
            llx = lla * llb;
            return PyLong_FromLongLong(llx);
        }
    
}
#endif
static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyObjC(PyObject *float_val, long intval, int zerodivision_check) {
    CYTHON_UNUSED_VAR(zerodivision_check);
    const long b = intval;
    double a = __Pyx_PyFloat_AS_DOUBLE(float_val);
        double result;
        
        result = ((double)a) * (double)b;
        return PyFloat_FromDouble(result);
}
static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        return __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        return __Pyx_Float___Pyx_PyLong_MultiplyObjC(op1, intval, zerodivision_check);
    }
    return __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(op1, op2, inplace);
}
#endif

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) {
        return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared);
    } else
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i));
    }
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
#else
    (void)wraparound;
    (void)boundscheck;
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     int wraparound, int boundscheck, int unsafe_shared) {
    CYTHON_MAYBE_UNUSED_VAR(unsafe_shared);
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) {
            return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared);
        } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            return __Pyx_NewRef(PyList_GET_ITEM(o, n));
        }
    } else
    #if !CYTHON_AVOID_BORROWED_REFS
    if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            return __Pyx_NewRef(PyTuple_GET_ITEM(o, n));
        }
    } else
    #endif
#endif
#if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY
    {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (!is_list && mm && mm->mp_subscript) {
            PyObject *r, *key = PyLong_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (is_list || likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    (void)wraparound;
    (void)boundscheck;
    return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i));
}

/* pybuiltin_invalid (used by pyint_simplify) */
static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) {
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj));
    if (argname) {
        PyErr_Format(PyExc_TypeError,
            "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")",
            argname, type_name, obj_type_name
        );
    } else {
        PyErr_Format(PyExc_TypeError,
            "Expected %.200s, got " __Pyx_FMT_TYPENAME,
            type_name, obj_type_name
        );
    }
    __Pyx_DECREF_TypeName(obj_type_name);
}

/* pyint_simplify */
static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) {
    PyObject *number = *number_var;
    if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) {
        return 0;
    }
    PyObject *int_object;
    if (likely(PyNumber_Check(number))) {
        int_object = PyNumber_Long(number);
        if (unlikely(!int_object)) goto bad;
    } else {
        __Pyx_PyBuiltin_Invalid(number, "int", argname);
        goto bad;
    }
    *number_var = int_object;
    Py_DECREF(number);
    return 0;
bad:
    *number_var = NULL;
    Py_DECREF(number);
    return -1;
}

/* ErrOccurredWithGIL */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  PyGILState_STATE _save = PyGILState_Ensure();
  err = !!PyErr_Occurred();
  PyGILState_Release(_save);
  return err;
}

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C0000
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#elif __PYX_LIMITED_VERSION_HEX > 0x030C0000
    local_value = PyErr_GetRaisedException();
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
#if __PYX_LIMITED_VERSION_HEX > 0x030C0000
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
#else
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
#endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    PyErr_SetHandledException(local_value);
    Py_XDECREF(local_value);
    Py_XDECREF(local_type);
    Py_XDECREF(local_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
#if __PYX_LIMITED_VERSION_HEX <= 0x030C0000
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
#endif
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* GetTopmostException (used by SaveResetException) */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* py_dict_keys */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
    return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_keys, d);
}

/* IterFinish (used by set_iter) */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* set_iter */
static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
                                                  Py_ssize_t* p_orig_length, int* p_source_is_set) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable));
    *p_source_is_set = is_set;
    if (likely(is_set)) {
        *p_orig_length = PySet_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#else
    CYTHON_UNUSED_VAR(is_set);
    *p_source_is_set = 0;
#endif
    *p_orig_length = 0;
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_set_iter_next(
        PyObject* iter_obj, Py_ssize_t orig_length,
        Py_ssize_t* ppos, PyObject **value,
        int source_is_set) {
    if (!CYTHON_COMPILING_IN_CPYTHON || PY_VERSION_HEX >= 0x030d0000 || unlikely(!source_is_set)) {
        *value = PyIter_Next(iter_obj);
        if (unlikely(!*value)) {
            return __Pyx_IterFinish();
        }
        CYTHON_UNUSED_VAR(orig_length);
        CYTHON_UNUSED_VAR(ppos);
        return 1;
    }
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) {
        PyErr_SetString(
            PyExc_RuntimeError,
            "set changed size during iteration");
        return -1;
    }
    {
        Py_hash_t hash;
        int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash);
        assert (ret != -1);
        if (likely(ret)) {
            Py_INCREF(*value);
            return 1;
        }
    }
#endif
    return 0;
}

/* KeywordStringCheck */
static int __Pyx_CheckKeywordStrings(
    const char* function_name,
    PyObject *kw)
{
#if CYTHON_COMPILING_IN_PYPY && !defined(PyArg_ValidateKeywordArguments)
    CYTHON_UNUSED_VAR(function_name);
    CYTHON_UNUSED_VAR(kw);
    return 0;
#else
    if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
#if PY_VERSION_HEX >= 0x03090000
        CYTHON_UNUSED_VAR(function_name);
#else
        Py_ssize_t kwsize;
        #if CYTHON_ASSUME_SAFE_SIZE
        kwsize = PyTuple_GET_SIZE(kw);
        #else
        kwsize = PyTuple_Size(kw);
        if (unlikely(kwsize < 0)) return -1;
        #endif
        for (Py_ssize_t pos = 0; pos < kwsize; pos++) {
            PyObject* key = NULL;
            #if CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kw, pos);
            #else
            key = PyTuple_GetItem(kw, pos);
            if (unlikely(!key)) return -1;
            #endif
            if (unlikely(!PyUnicode_Check(key))) {
                PyErr_Format(PyExc_TypeError,
                    "%.200s() keywords must be strings", function_name);
                return -1;
            }
        }
#endif
    } else {
        if (unlikely(!PyArg_ValidateKeywordArguments(kw))) return -1;
    }
    return 0;
#endif
}

/* PyObjectVectorCallKwBuilder (used by PyObjectVectorCallMethodKwBuilder) */
#if CYTHON_VECTORCALL
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_PyObject_FastCallDict;
    if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1;
    Py_INCREF(key);
    args[n] = value;
    return 0;
}
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    (void)__Pyx_VectorcallBuilder_AddArgStr;
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n);
}
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) {
    PyObject *pyKey = PyUnicode_FromString(key);
    if (!pyKey) return -1;
    return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n);
}
#else // CYTHON_VECTORCALL
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) {
    if (unlikely(!PyUnicode_Check(key))) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        return -1;
    }
    return PyDict_SetItem(builder, key, value);
}
#endif

/* PyObjectVectorCallMethodKwBuilder */
#if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000
static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) {
    PyObject *result;
    PyObject *obj = PyObject_GetAttr(args[0], name);
    if (unlikely(!obj))
        return NULL;
    result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames);
    Py_DECREF(obj);
    return result;
}
#endif

/* AllocateExtensionType */
static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) {
    if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
        allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc);
        return alloc_func(t, 0);
    } else {
        newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc);
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (!tp_new) {
            PyObject *new_str = PyUnicode_FromString("__new__");
            if (likely(new_str)) {
                PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL);
                Py_DECREF(new_str);
                return o;
            } else
                return NULL;
        } else
    #endif
        return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0);
    }
}

/* CallTypeTraverse */
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000)
#else
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) {
    #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000
    if (__Pyx_get_runtime_version() < 0x03090000) return 0;
    #endif
    if (!always_call) {
        PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*);
        unsigned long flags = PyType_GetFlags(base);
        if (flags & Py_TPFLAGS_HEAPTYPE) {
            return 0;
        }
    }
    Py_VISIT((PyObject*)Py_TYPE(o));
    return 0;
}
#endif

/* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */
#if CYTHON_COMPILING_IN_LIMITED_API
static Py_ssize_t __Pyx_GetTypeDictOffset(void) {
    PyObject *tp_dictoffset_o;
    Py_ssize_t tp_dictoffset;
    tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__");
    if (unlikely(!tp_dictoffset_o)) return -1;
    tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o);
    Py_DECREF(tp_dictoffset_o);
    if (unlikely(tp_dictoffset == 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' doesn't have a dictoffset");
        return -1;
    } else if (unlikely(tp_dictoffset < 0)) {
        PyErr_SetString(
            PyExc_TypeError,
            "'type' has an unexpected negative dictoffset. "
            "Please report this as Cython bug");
        return -1;
    }
    return tp_dictoffset;
}
static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) {
    static Py_ssize_t tp_dictoffset = 0;
    if (unlikely(tp_dictoffset == 0)) {
        tp_dictoffset = __Pyx_GetTypeDictOffset();
        if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) {
            tp_dictoffset = 0; // try again next time?
            return NULL;
        }
    }
    return *(PyObject**)((char*)tp + tp_dictoffset);
}
#endif

/* SetItemOnTypeDict (used by FixUpExtensionType) */
static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_SetItem(tp_dict, k, v);
    if (likely(!result)) {
        PyType_Modified(tp);
        if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) {
            PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name,  (PyObject *) tp, k, NULL);
            if (!setNameResult) return -1;
            Py_DECREF(setNameResult);
        }
    }
    return result;
}

/* FixUpExtensionType */
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if __PYX_LIMITED_VERSION_HEX > 0x030900B1
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#else
    const PyType_Slot *slot = spec->slots;
    int changed = 0;
#if !CYTHON_COMPILING_IN_LIMITED_API
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
#if !CYTHON_COMPILING_IN_CPYTHON
        const
#endif  // !CYTHON_COMPILING_IN_CPYTHON)
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_vectorcall_offset = memb->offset;
                    changed = 1;
                }
#endif  // CYTHON_METH_FASTCALL
#if !CYTHON_COMPILING_IN_PYPY
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                    Py_DECREF(descr);
                    if (unlikely(set_item_result < 0)) {
                        return -1;
                    }
                    changed = 1;
                }
#endif  // !CYTHON_COMPILING_IN_PYPY
            }
            memb++;
        }
    }
#endif  // !CYTHON_COMPILING_IN_LIMITED_API
#if !CYTHON_COMPILING_IN_PYPY
    slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_getset)
        slot++;
    if (slot && slot->slot == Py_tp_getset) {
        PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc;
        while (getset && getset->name) {
            if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) {
                PyObject *descr = PyDescr_NewGetSet(type, getset);
                if (unlikely(!descr))
                    return -1;
                #if CYTHON_COMPILING_IN_LIMITED_API
                PyObject *pyname = PyUnicode_FromString(getset->name);
                if (unlikely(!pyname)) {
                    Py_DECREF(descr);
                    return -1;
                }
                int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr);
                Py_DECREF(pyname);
                #else
                CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
                int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr);
                #endif
                Py_DECREF(descr);
                if (unlikely(set_item_result < 0)) {
                    return -1;
                }
                changed = 1;
            }
            ++getset;
        }
    }
#else
    CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict);
#endif  // !CYTHON_COMPILING_IN_PYPY
    if (changed)
        PyType_Modified(type);
#endif  // PY_VERSION_HEX > 0x030900B1
    return 0;
}

/* PyObjectCallMethod0 (used by PyType_Ready) */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
#if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))
    PyObject *args[1] = {obj};
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_CallNoArg;
    return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
#endif
}

/* ValidateBasesTuple (used by PyType_Ready) */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_SIZE
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (unlikely(n < 0)) return -1;
#endif
    for (i = 1; i < n; i++)
    {
        PyTypeObject *b;
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !CYTHON_USE_TYPE_SLOTS
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) {
    while (t) {
        PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
        if (bases) {
            return 1;
        }
        t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*);
    }
    return 0;
}
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    if (!__Pyx_PyType_HasMultipleInheritance(t)) {
        return PyType_Ready(t);
    }
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\
                !CYTHON_COMPILING_IN_GRAAL
        gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* DelItemOnTypeDict (used by SetupReduce) */
static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) {
    int result;
    PyObject *tp_dict;
#if CYTHON_COMPILING_IN_LIMITED_API
    tp_dict = __Pyx_GetTypeDict(tp);
    if (unlikely(!tp_dict)) return -1;
#else
    tp_dict = tp->tp_dict;
#endif
    result = PyDict_DelItem(tp_dict, k);
    if (likely(!result)) PyType_Modified(tp);
    return result;
}

/* SetupReduce */
static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython);
            if (likely(reduce_cython)) {
                ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred()) {
        __Pyx_TypeName type_obj_name =
            __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj);
        PyErr_Format(PyExc_RuntimeError,
            "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
        __Pyx_DECREF_TypeName(type_obj_name);
    }
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType_3_2_3
#define __PYX_HAVE_RT_ImportType_3_2_3
static PyTypeObject *__Pyx_ImportType_3_2_3(PyObject *module, const char *module_name, const char *class_name,
    size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_3 check_size)
{
    PyObject *result = 0;
    Py_ssize_t basicsize;
    Py_ssize_t itemsize;
#if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API)
    PyObject *py_basicsize;
    PyObject *py_itemsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) )
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
    itemsize = ((PyTypeObject *)result)->tp_itemsize;
#else
    if (size == 0) {
        return (PyTypeObject *)result;
    }
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
    py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
    if (!py_itemsize)
        goto bad;
    itemsize = PyLong_AsSsize_t(py_itemsize);
    Py_DECREF(py_itemsize);
    py_itemsize = 0;
    if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (itemsize) {
        if (size % alignment) {
            alignment = size % alignment;
        }
        if (itemsize < (Py_ssize_t)alignment)
            itemsize = (Py_ssize_t)alignment;
    }
    if ((size_t)(basicsize + itemsize) < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize+itemsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_3 &&
            ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd-%zd from PyObject",
            module_name, class_name, size, basicsize, basicsize+itemsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_3 && (size_t)basicsize > size) {
        if (PyErr_WarnFormat(NULL, 0,
                "%.200s.%.200s size changed, may indicate binary incompatibility. "
                "Expected %zd from C header, got %zd from PyObject",
                module_name, class_name, size, basicsize) < 0) {
            goto bad;
        }
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

/* GetVTable */
static void* __Pyx_GetVtable(PyTypeObject *type) {
    void* ptr;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#else
    PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable);
#endif
    if (!ob)
        goto bad;
    ptr = PyCapsule_GetPointer(ob, 0);
    if (!ptr && !PyErr_Occurred())
        PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
    Py_DECREF(ob);
    return ptr;
bad:
    Py_XDECREF(ob);
    return NULL;
}

/* PxdImportShared (used by VoidPtrImport) */
#ifndef __PYX_HAVE_RT_ImportFromPxd_3_2_3
#define __PYX_HAVE_RT_ImportFromPxd_3_2_3
static int __Pyx_ImportFromPxd_3_2_3(PyObject *module, const char *name, void **p, const char *sig, const char *what) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    d = PyObject_GetAttrString(module, "__pyx_capi__");
    if (!d)
        goto bad;
#if (defined(Py_LIMITED_API) && Py_LIMITED_API >= 0x030d0000) || (!defined(Py_LIMITED_API) && PY_VERSION_HEX >= 0x030d0000)
    PyDict_GetItemStringRef(d, name, &cobj);
#else
    cobj = PyDict_GetItemString(d, name);
    Py_XINCREF(cobj);
#endif
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C %.8s %.200s",
                PyModule_GetName(module), what, name);
        goto bad;
    }
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C %.8s %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             what, PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    *p = PyCapsule_GetPointer(cobj, sig);
    if (!(*p))
        goto bad;
    Py_DECREF(d);
    Py_DECREF(cobj);
    return 0;
bad:
    Py_XDECREF(d);
    Py_XDECREF(cobj);
    return -1;
}
#endif

/* VoidPtrImport */
#ifndef __PYX_HAVE_RT_ImportVoidPtr_3_2_3
#define __PYX_HAVE_RT_ImportVoidPtr_3_2_3
static int __Pyx_ImportVoidPtr_3_2_3(PyObject *module, const char *name, void **p, const char *sig) {
    return __Pyx_ImportFromPxd_3_2_3(module, name, p, sig, "variable");
}
#endif

/* HasAttr (used by ImportImpl) */
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!PyUnicode_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_PyObject_GetAttrStrNoError(o, n);
    if (!r) {
        return (unlikely(PyErr_Occurred())) ? -1 : 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}
#endif

/* ImportImpl (used by Import) */
static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) {
    PyObject *imported_module = PyImport_GetModule(qualname);
    if (unlikely(!imported_module)) {
        *module = NULL;
        if (PyErr_Occurred()) {
            return -1;
        }
        return 0;
    }
    *module = imported_module;
    return 1;
}
static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) {
    PyObject *imported_module;
    PyObject *top_level_package_name;
    Py_ssize_t i;
    int status, module_found;
    Py_ssize_t dot_index;
    module_found = __Pyx__Import_GetModule(qualname, &imported_module);
    if (unlikely(!module_found || module_found == -1)) {
        *module = NULL;
        return module_found;
    }
    if (imported_names) {
        for (i = 0; i < len_imported_names; i++) {
            PyObject *imported_name = imported_names[i];
#if __PYX_LIMITED_VERSION_HEX < 0x030d0000
            int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name);
#else
            int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name);
            if (unlikely(has_imported_attribute == -1)) goto error;
#endif
            if (!has_imported_attribute) {
                goto not_found;
            }
        }
        *module = imported_module;
        return 1;
    }
    dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1);
    if (dot_index == -1) {
        *module = imported_module;
        return 1;
    }
    if (unlikely(dot_index == -2)) goto error;
    top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index);
    if (unlikely(!top_level_package_name)) goto error;
    Py_DECREF(imported_module);
    status = __Pyx__Import_GetModule(top_level_package_name, module);
    Py_DECREF(top_level_package_name);
    return status;
error:
    Py_DECREF(imported_module);
    *module = NULL;
    return -1;
not_found:
    Py_DECREF(imported_module);
    *module = NULL;
    return 0;
}
static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *from_list = 0;
    int module_found;
    if (!qualname) {
        qualname = name;
    }
    module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module);
    if (likely(module_found == 1)) {
        return module;
    } else if (unlikely(module_found == -1)) {
        return NULL;
    }
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    if (imported_names) {
#if CYTHON_COMPILING_IN_CPYTHON
        from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names);
        if (unlikely(!from_list))
            goto bad;
#else
        from_list = PyList_New(len_imported_names);
        if (unlikely(!from_list)) goto bad;
        for (Py_ssize_t i=0; i<len_imported_names; ++i) {
            if (PyList_SetItem(from_list, i, __Pyx_NewRef(imported_names[i])) < 0) goto bad;
        }
#endif
    }
    if (level == -1) {
        const char* package_sep = strchr(__Pyx_MODULE_NAME, '.');
        if (package_sep != (0)) {
            module = PyImport_ImportModuleLevelObject(
                name, moddict, empty_dict, from_list, 1);
            if (unlikely(!module)) {
                if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                    goto bad;
                PyErr_Clear();
            }
        }
        level = 0;
    }
    if (!module) {
        module = PyImport_ImportModuleLevelObject(
            name, moddict, empty_dict, from_list, level);
    }
bad:
    Py_XDECREF(from_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level) {
    return __Pyx__Import(name, imported_names, len_imported_names, qualname, __pyx_mstate_global->__pyx_d, level);
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u__3);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400) ||\
                CYTHON_COMPILING_IN_GRAAL
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError, "cannot import name %S", name);
    }
    return value;
}

/* dict_setdefault (used by FetchCommonType) */
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) {
    PyObject* value;
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    PyObject *args[] = {d, key, default_value};
    value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#elif CYTHON_COMPILING_IN_LIMITED_API
    value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL);
#elif PY_VERSION_HEX >= 0x030d0000
    PyDict_SetDefaultRef(d, key, default_value, &value);
#else
    value = PyDict_SetDefault(d, key, default_value);
    if (unlikely(!value)) return NULL;
    Py_INCREF(value);
#endif
    return value;
}

/* AddModuleRef (used by FetchSharedCythonModule) */
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
  static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) {
      PyObject *module_dict = PyImport_GetModuleDict();
      PyObject *m;
      if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) {
          return NULL;
      }
      if (m != NULL && PyModule_Check(m)) {
          return m;
      }
      Py_XDECREF(m);
      m = PyModule_NewObject(name);
      if (m == NULL)
          return NULL;
      if (PyDict_CheckExact(module_dict)) {
          PyObject *new_m;
          (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m);
          Py_DECREF(m);
          return new_m;
      } else {
           if (PyObject_SetItem(module_dict, name, m) != 0) {
                Py_DECREF(m);
                return NULL;
            }
            return m;
      }
  }
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *py_name = PyUnicode_FromString(name);
      if (!py_name) return NULL;
      PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name);
      Py_DECREF(py_name);
      return module;
  }
#elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif

/* FetchSharedCythonModule (used by FetchCommonType) */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME);
}

/* FetchCommonType (used by CommonTypesMetaclass) */
#if __PYX_LIMITED_VERSION_HEX < 0x030C0000
static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases);
    if (result && metaclass) {
        PyObject *old_tp = (PyObject*)Py_TYPE(result);
    Py_INCREF((PyObject*)metaclass);
#if __PYX_LIMITED_VERSION_HEX >= 0x03090000
        Py_SET_TYPE(result, metaclass);
#else
        result->ob_type = metaclass;
#endif
        Py_DECREF(old_tp);
    }
    return result;
}
#else
#define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b)
#endif
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t expected_basicsize) {
    Py_ssize_t basicsize;
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (expected_basicsize == 0) {
        return 0; // size is inherited, nothing useful to check
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_basicsize;
    py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
    if (unlikely(!py_basicsize)) return -1;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = NULL;
    if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1;
#else
    basicsize = ((PyTypeObject*) cached_type)->tp_basicsize;
#endif
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name;
    int get_item_ref_result;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    py_object_name = PyUnicode_FromString(object_name);
    if (!py_object_name) return NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) goto done;
    abi_module_dict = PyModule_GetDict(abi_module);
    if (!abi_module_dict) goto done;
    get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type);
    if (get_item_ref_result == 1) {
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else if (unlikely(get_item_ref_result == -1)) {
        goto bad;
    }
    cached_type = __Pyx_PyType_FromMetaclass(
        metaclass,
        CYTHON_USE_MODULE_STATE ? module : abi_module,
        spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type);
    if (unlikely(new_cached_type != cached_type)) {
        if (unlikely(!new_cached_type)) goto bad;
        Py_DECREF(cached_type);
        cached_type = new_cached_type;
        if (__Pyx_VerifyCachedType(
                cached_type,
                object_name,
                spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    } else {
        Py_DECREF(new_cached_type);
    }
done:
    Py_XDECREF(abi_module);
    Py_DECREF(py_object_name);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

/* CommonTypesMetaclass (used by CythonFunctionShared) */
static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) {
    return PyUnicode_FromString(__PYX_ABI_MODULE_NAME);
}
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) {
    PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types");
    return NULL;
}
static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) {
    PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable");
    return -1;
}
#endif
static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = {
    {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL},
    {0, 0, 0, 0, 0}
};
static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = {
    {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset},
    #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call},
    {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr},
    #endif
    {0, 0}
};
static PyType_Spec __pyx_CommonTypesMetaclass_spec = {
    __PYX_TYPE_MODULE_PREFIX "_common_types_metatype",
    0,
    0,
    Py_TPFLAGS_IMMUTABLETYPE |
    Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT,
    __pyx_CommonTypesMetaclass_slots
};
static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    PyObject *bases = PyTuple_Pack(1, &PyType_Type);
    if (unlikely(!bases)) {
        return -1;
    }
    mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
    Py_DECREF(bases);
    if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
        return -1;
    }
    return 0;
}

/* PyMethodNew (used by CythonFunctionShared) */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *result;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000
    {
        PyObject *args[] = {func, self};
        result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL);
    }
    #else
    result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL);
    #endif
    return result;
}
#else
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#endif

/* PyVectorcallFastCallDict (used by CythonFunctionShared) */
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i;
    #if CYTHON_AVOID_BORROWED_REFS
    PyObject *pos;
    #else
    Py_ssize_t pos;
    #endif
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    #if !CYTHON_ASSUME_SAFE_SIZE
    Py_ssize_t nkw = PyDict_Size(kw);
    if (unlikely(nkw == -1)) return NULL;
    #else
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    #endif
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = 0;
    i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) {
        keys_are_strings &=
        #if CYTHON_COMPILING_IN_LIMITED_API
            PyType_GetFlags(Py_TYPE(key));
        #else
            Py_TYPE(key)->tp_flags;
        #endif
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup;
        #else
        PyTuple_SET_ITEM(kwnames, i, key);
        #endif
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(pos);
    #endif
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    Py_ssize_t kw_size =
        likely(kw == NULL) ?
        0 :
#if !CYTHON_ASSUME_SAFE_SIZE
        PyDict_Size(kw);
#else
        PyDict_GET_SIZE(kw);
#endif
    if (kw_size == 0) {
        return vc(func, args, nargs, NULL);
    }
#if !CYTHON_ASSUME_SAFE_SIZE
    else if (unlikely(kw_size == -1)) {
        return NULL;
    }
#endif
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared (used by CythonFunction) */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) {
        int result;
        PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func);
        if (unlikely(!newFunc)) {
            PyErr_Clear(); // It's only an optimization, so don't throw an error
            return 0;
        }
        result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc);
        Py_DECREF(newFunc);
        return result;
    }
    return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc);
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) {
    if (PyMethod_Check(func)) {
        func = PyMethod_GET_FUNCTION(func);
    }
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) {
    PyObject *result;
    CYTHON_UNUSED_VAR(closure);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_doc_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op)
{
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#else
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_name_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    PyObject *result;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    Py_INCREF(op->func_qualname);
    result = op->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
#endif
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_tuple;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = NULL;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_defaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->defaults_kwdict;
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_kwdefaults_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    __Pyx_END_CRITICAL_SECTION();
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) {
    PyObject* result = op->func_annotations;
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    result = __Pyx_CyFunction_get_annotations_locked(op);
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) {
    int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
    if (is_coroutine) {
        PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(is_coroutine_value)) {
            return is_coroutine_value;
        }
ignore:
        PyErr_Clear();
    }
    return __Pyx_PyBool_FromLong(is_coroutine);
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    PyObject *result;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    result = __Pyx_CyFunction_get_is_coroutine_value(op);
    if (unlikely(!result))
        return NULL;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    if (op->func_is_coroutine) {
        Py_DECREF(result);
        result = __Pyx_NewRef(op->func_is_coroutine);
    } else {
        op->func_is_coroutine = __Pyx_NewRef(result);
    }
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        py_name, message, size);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)",
        name, message, size);
#endif
}
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL);
    if (!py_name) return;
    PyErr_Format(PyExc_TypeError,
        "%.200S() %s",
        py_name, message);
    Py_DECREF(py_name);
#else
    const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name;
    PyErr_Format(PyExc_TypeError,
        "%.200s() %s",
        name, message);
#endif
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
    {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0},
#else
    {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
    {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0},
#endif
    {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#endif
#if CYTHON_METH_FASTCALL
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
    {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    PyObject *result = NULL;
    CYTHON_UNUSED_VAR(args);
    __Pyx_BEGIN_CRITICAL_SECTION(m);
    Py_INCREF(m->func_qualname);
    result = m->func_qualname;
    __Pyx_END_CRITICAL_SECTION();
    return result;
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_dict = NULL;
#endif
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func_dict);
#elif PY_VERSION_HEX < 0x030d0000
    _PyObject_ClearManagedDict((PyObject*)m);
#else
    PyObject_ClearManagedDict((PyObject*)m);
#endif
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    Py_CLEAR(m->defaults);
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    {
        int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg);
        if (e) return e;
    }
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
#if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func_dict);
#else
    {
        int e =
#if PY_VERSION_HEX < 0x030d0000
            _PyObject_VisitManagedDict
#else
            PyObject_VisitManagedDict
#endif
                ((PyObject*)m, visit, arg);
        if (e != 0) return e;
    }
#endif
    __Pyx_VISIT_CONST(m->func_name);
    __Pyx_VISIT_CONST(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    __Pyx_VISIT_CONST(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    Py_VISIT(m->defaults);
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
    PyObject *repr;
    __Pyx_BEGIN_CRITICAL_SECTION(op);
    repr = PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
    __Pyx_END_CRITICAL_SECTION();
    return repr;
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes no arguments", size);
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_SIZE
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
            __Pyx_CyFunction_raise_argument_count_error(
                (__pyx_CyFunctionObject*)func,
                "takes exactly one argument", size);
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
    __Pyx_CyFunction_raise_type_error(
        (__pyx_CyFunctionObject*)func, "takes no keyword arguments");
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_SIZE
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(argc < 0)) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            __Pyx_CyFunction_raise_type_error(
                cyfunc, "needs an argument");
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) {
        __Pyx_CyFunction_raise_type_error(
            cyfunc, "takes no keyword arguments");
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes no arguments", nargs);
        return NULL;
    }
    return meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        __Pyx_CyFunction_raise_argument_count_error(
            cyfunc, "takes exactly one argument", nargs);
        return NULL;
    }
    return meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
    PyObject *self;
#if CYTHON_COMPILING_IN_LIMITED_API
    PyCFunction meth = PyCFunction_GetFunction(cyfunc->func);
    if (unlikely(!meth)) return NULL;
#else
    PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth;
#endif
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
#if CYTHON_COMPILING_IN_LIMITED_API
        self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func);
        if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
        self = ((PyCFunctionObject*)cyfunc)->m_self;
#endif
        break;
    default:
        return NULL;
    }
    #if PY_VERSION_HEX < 0x030e00A6
    size_t nargs_value = (size_t) nargs;
    #else
    Py_ssize_t nargs_value = nargs;
    #endif
    return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames);
}
#endif
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if CYTHON_METH_FASTCALL
#if defined(Py_TPFLAGS_HAVE_VECTORCALL)
    Py_TPFLAGS_HAVE_VECTORCALL |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
#endif // CYTHON_METH_FASTCALL
#if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API
    Py_TPFLAGS_MANAGED_DICT |
#endif
    Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION |
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
static int __pyx_CyFunction_init(PyObject *module) {
    __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module);
    mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(
        mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL);
    if (unlikely(mstate->__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type);
    if (unlikely(!m->defaults))
        return NULL;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* CLineInTraceback (used by AddTraceback) */
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000
#define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o))
#elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
#define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL);
#else
PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) {
    PyObject **dict_ptr = _PyObject_GetDictPtr(o);
    return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL;
}
#endif
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline = NULL;
    PyObject *ptype, *pvalue, *ptraceback;
    PyObject *cython_runtime_dict;
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
    cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, cython_runtime_dict,
            __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False))
    }
    if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    Py_XDECREF(use_cline);
    Py_XDECREF(cython_runtime_dict);
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache (used by AddTraceback) */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) {
    __Pyx_CachedCodeObjectType* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!code_cache->entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = code_cache->entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__find_code_object;
    return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count);
    if (old_count < 0) {
        __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
        return NULL;
    }
#endif
    __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_decr_acq_rel(&code_cache->accessor_count);
#endif
    return result;
#endif
}
static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object)
{
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = code_cache->entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            code_cache->entries = entries;
            code_cache->max_count = 64;
            code_cache->count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line);
    if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) {
        __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_INCREF(code_object);
        Py_DECREF(tmp);
        return;
    }
    if (code_cache->count == code_cache->max_count) {
        int new_max = code_cache->max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        code_cache->entries = entries;
        code_cache->max_count = new_max;
    }
    for (i=code_cache->count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    code_cache->count++;
    Py_INCREF(code_object);
}
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) {
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS
    (void)__pyx__insert_code_object;
    return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail.
#else
    struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache;
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_nonatomic_int_type expected = 0;
    if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) {
        return;
    }
#endif
    __pyx__insert_code_object(code_cache, code_line, code_object);
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING
    __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN);
#endif
#endif
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION)
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!code_object) {
        code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
        if (unlikely(!code_object)) goto bad;
        py_py_line = PyLong_FromLong(py_line);
        if (unlikely(!py_py_line)) goto bad;
        if (c_line) {
            py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        } else {
            py_funcname = PyUnicode_FromString(funcname);
        }
        if (unlikely(!py_funcname)) goto bad;
        dict = PyDict_New();
        if (unlikely(!dict)) goto bad;
        {
            PyObject *old_code_object = code_object;
            code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
            Py_DECREF(old_code_object);
        }
        if (unlikely(!code_object)) goto bad;
        __pyx_insert_code_object(c_line ? -c_line : py_line, code_object);
    } else {
        dict = PyDict_New();
    }
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    if (c_line) {
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
    }
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_mstate_global->__pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyLong_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoDirection(PangoDirection value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PangoDirection neg_one = (PangoDirection) -1, const_zero = (PangoDirection) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PangoDirection) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoDirection) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(PangoDirection) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PangoDirection) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoDirection) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PangoDirection),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PangoDirection));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoAlignment(PangoAlignment value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PangoAlignment neg_one = (PangoAlignment) -1, const_zero = (PangoAlignment) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PangoAlignment) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoAlignment) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(PangoAlignment) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PangoAlignment) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoAlignment) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PangoAlignment),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PangoAlignment));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoEllipsizeMode(PangoEllipsizeMode value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PangoEllipsizeMode neg_one = (PangoEllipsizeMode) -1, const_zero = (PangoEllipsizeMode) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PangoEllipsizeMode) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoEllipsizeMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(PangoEllipsizeMode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PangoEllipsizeMode) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoEllipsizeMode) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PangoEllipsizeMode),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PangoEllipsizeMode));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PangoWrapMode(PangoWrapMode value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PangoWrapMode neg_one = (PangoWrapMode) -1, const_zero = (PangoWrapMode) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(PangoWrapMode) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoWrapMode) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(PangoWrapMode) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(PangoWrapMode) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(PangoWrapMode) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(PangoWrapMode),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PangoWrapMode));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_FT_Error(FT_Error value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const FT_Error neg_one = (FT_Error) -1, const_zero = (FT_Error) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(FT_Error) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(FT_Error) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(FT_Error) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(FT_Error) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(FT_Error) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(FT_Error),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(FT_Error));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_int(unsigned int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned int));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_unsigned_long(unsigned long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned long neg_one = (unsigned long) -1, const_zero = (unsigned long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(unsigned long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(unsigned long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(unsigned long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(unsigned long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE unsigned char __Pyx_PyLong_As_unsigned_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        unsigned char val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (unsigned char) -1;
        val = __Pyx_PyLong_As_unsigned_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT)) {
                            return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT)) {
                            return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT)) {
                            return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (unsigned char) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(unsigned char) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(unsigned char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) {
                            return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) {
                            return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT)) {
                            return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(unsigned char) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x))
        } else if ((sizeof(unsigned char) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        unsigned char val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (unsigned char) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (unsigned char) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (unsigned char) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (unsigned char) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(unsigned char) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((unsigned char) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(unsigned char) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((unsigned char) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((unsigned char) 1) << (sizeof(unsigned char) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (unsigned char) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned char");
    return (unsigned char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned char");
    return (unsigned char) -1;
}

/* CIntFromPy */
static CYTHON_INLINE PangoWrapMode __Pyx_PyLong_As_PangoWrapMode(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PangoWrapMode neg_one = (PangoWrapMode) -1, const_zero = (PangoWrapMode) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        PangoWrapMode val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (PangoWrapMode) -1;
        val = __Pyx_PyLong_As_PangoWrapMode(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PangoWrapMode, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(PangoWrapMode) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) >= 2 * PyLong_SHIFT)) {
                            return (PangoWrapMode) (((((PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PangoWrapMode) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) >= 3 * PyLong_SHIFT)) {
                            return (PangoWrapMode) (((((((PangoWrapMode)digits[2]) << PyLong_SHIFT) | (PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PangoWrapMode) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) >= 4 * PyLong_SHIFT)) {
                            return (PangoWrapMode) (((((((((PangoWrapMode)digits[3]) << PyLong_SHIFT) | (PangoWrapMode)digits[2]) << PyLong_SHIFT) | (PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (PangoWrapMode) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(PangoWrapMode) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoWrapMode, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(PangoWrapMode) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoWrapMode, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PangoWrapMode, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(PangoWrapMode) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) - 1 > 2 * PyLong_SHIFT)) {
                            return (PangoWrapMode) (((PangoWrapMode)-1)*(((((PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(PangoWrapMode) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) - 1 > 2 * PyLong_SHIFT)) {
                            return (PangoWrapMode) ((((((PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(PangoWrapMode) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) - 1 > 3 * PyLong_SHIFT)) {
                            return (PangoWrapMode) (((PangoWrapMode)-1)*(((((((PangoWrapMode)digits[2]) << PyLong_SHIFT) | (PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PangoWrapMode) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) - 1 > 3 * PyLong_SHIFT)) {
                            return (PangoWrapMode) ((((((((PangoWrapMode)digits[2]) << PyLong_SHIFT) | (PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(PangoWrapMode) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) - 1 > 4 * PyLong_SHIFT)) {
                            return (PangoWrapMode) (((PangoWrapMode)-1)*(((((((((PangoWrapMode)digits[3]) << PyLong_SHIFT) | (PangoWrapMode)digits[2]) << PyLong_SHIFT) | (PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PangoWrapMode) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoWrapMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoWrapMode) - 1 > 4 * PyLong_SHIFT)) {
                            return (PangoWrapMode) ((((((((((PangoWrapMode)digits[3]) << PyLong_SHIFT) | (PangoWrapMode)digits[2]) << PyLong_SHIFT) | (PangoWrapMode)digits[1]) << PyLong_SHIFT) | (PangoWrapMode)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(PangoWrapMode) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoWrapMode, long, PyLong_AsLong(x))
        } else if ((sizeof(PangoWrapMode) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoWrapMode, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        PangoWrapMode val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (PangoWrapMode) -1;
#endif
        if (unlikely(ret))
            return (PangoWrapMode) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PangoWrapMode");
    return (PangoWrapMode) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PangoWrapMode");
    return (PangoWrapMode) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_gint(gint value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const gint neg_one = (gint) -1, const_zero = (gint) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(gint) < sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(gint) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#if !CYTHON_COMPILING_IN_PYPY
        } else if (sizeof(gint) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(gint) <= sizeof(long)) {
            return PyLong_FromLong((long) value);
        } else if (sizeof(gint) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(gint),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL, *kwds = NULL;
        PyObject *py_bytes = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(gint));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        {
            PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str };
            if (!is_unsigned) {
                kwds = __Pyx_MakeVectorcallBuilderKwds(1);
                if (!kwds) goto limited_bad;
                if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad;
            }
            result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds);
        }
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* CIntFromPy */
static CYTHON_INLINE PangoEllipsizeMode __Pyx_PyLong_As_PangoEllipsizeMode(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PangoEllipsizeMode neg_one = (PangoEllipsizeMode) -1, const_zero = (PangoEllipsizeMode) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        PangoEllipsizeMode val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (PangoEllipsizeMode) -1;
        val = __Pyx_PyLong_As_PangoEllipsizeMode(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(PangoEllipsizeMode) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) >= 2 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) (((((PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PangoEllipsizeMode) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) >= 3 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) (((((((PangoEllipsizeMode)digits[2]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PangoEllipsizeMode) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) >= 4 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) (((((((((PangoEllipsizeMode)digits[3]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[2]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (PangoEllipsizeMode) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(PangoEllipsizeMode) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoEllipsizeMode, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(PangoEllipsizeMode) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoEllipsizeMode, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(PangoEllipsizeMode) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) - 1 > 2 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) (((PangoEllipsizeMode)-1)*(((((PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(PangoEllipsizeMode) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) - 1 > 2 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) ((((((PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(PangoEllipsizeMode) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) - 1 > 3 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) (((PangoEllipsizeMode)-1)*(((((((PangoEllipsizeMode)digits[2]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PangoEllipsizeMode) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) - 1 > 3 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) ((((((((PangoEllipsizeMode)digits[2]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(PangoEllipsizeMode) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) - 1 > 4 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) (((PangoEllipsizeMode)-1)*(((((((((PangoEllipsizeMode)digits[3]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[2]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PangoEllipsizeMode) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoEllipsizeMode, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoEllipsizeMode) - 1 > 4 * PyLong_SHIFT)) {
                            return (PangoEllipsizeMode) ((((((((((PangoEllipsizeMode)digits[3]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[2]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[1]) << PyLong_SHIFT) | (PangoEllipsizeMode)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(PangoEllipsizeMode) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoEllipsizeMode, long, PyLong_AsLong(x))
        } else if ((sizeof(PangoEllipsizeMode) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoEllipsizeMode, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        PangoEllipsizeMode val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (PangoEllipsizeMode) -1;
#endif
        if (unlikely(ret))
            return (PangoEllipsizeMode) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PangoEllipsizeMode");
    return (PangoEllipsizeMode) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PangoEllipsizeMode");
    return (PangoEllipsizeMode) -1;
}

/* CIntFromPy */
static CYTHON_INLINE gint __Pyx_PyLong_As_gint(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const gint neg_one = (gint) -1, const_zero = (gint) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        gint val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (gint) -1;
        val = __Pyx_PyLong_As_gint(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(gint, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(gint) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) >= 2 * PyLong_SHIFT)) {
                            return (gint) (((((gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(gint) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) >= 3 * PyLong_SHIFT)) {
                            return (gint) (((((((gint)digits[2]) << PyLong_SHIFT) | (gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(gint) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) >= 4 * PyLong_SHIFT)) {
                            return (gint) (((((((((gint)digits[3]) << PyLong_SHIFT) | (gint)digits[2]) << PyLong_SHIFT) | (gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (gint) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(gint) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(gint, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(gint) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(gint, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(gint, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(gint) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) - 1 > 2 * PyLong_SHIFT)) {
                            return (gint) (((gint)-1)*(((((gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(gint) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) - 1 > 2 * PyLong_SHIFT)) {
                            return (gint) ((((((gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(gint) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) - 1 > 3 * PyLong_SHIFT)) {
                            return (gint) (((gint)-1)*(((((((gint)digits[2]) << PyLong_SHIFT) | (gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(gint) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) - 1 > 3 * PyLong_SHIFT)) {
                            return (gint) ((((((((gint)digits[2]) << PyLong_SHIFT) | (gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(gint) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) - 1 > 4 * PyLong_SHIFT)) {
                            return (gint) (((gint)-1)*(((((((((gint)digits[3]) << PyLong_SHIFT) | (gint)digits[2]) << PyLong_SHIFT) | (gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(gint) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(gint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(gint) - 1 > 4 * PyLong_SHIFT)) {
                            return (gint) ((((((((((gint)digits[3]) << PyLong_SHIFT) | (gint)digits[2]) << PyLong_SHIFT) | (gint)digits[1]) << PyLong_SHIFT) | (gint)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(gint) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(gint, long, PyLong_AsLong(x))
        } else if ((sizeof(gint) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(gint, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        gint val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (gint) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (gint) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (gint) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (gint) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(gint) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((gint) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(gint) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((gint) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((gint) 1) << (sizeof(gint) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (gint) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to gint");
    return (gint) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to gint");
    return (gint) -1;
}

/* CIntFromPy */
static CYTHON_INLINE PangoAlignment __Pyx_PyLong_As_PangoAlignment(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const PangoAlignment neg_one = (PangoAlignment) -1, const_zero = (PangoAlignment) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        PangoAlignment val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (PangoAlignment) -1;
        val = __Pyx_PyLong_As_PangoAlignment(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PangoAlignment, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(PangoAlignment) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) >= 2 * PyLong_SHIFT)) {
                            return (PangoAlignment) (((((PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PangoAlignment) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) >= 3 * PyLong_SHIFT)) {
                            return (PangoAlignment) (((((((PangoAlignment)digits[2]) << PyLong_SHIFT) | (PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PangoAlignment) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) >= 4 * PyLong_SHIFT)) {
                            return (PangoAlignment) (((((((((PangoAlignment)digits[3]) << PyLong_SHIFT) | (PangoAlignment)digits[2]) << PyLong_SHIFT) | (PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (PangoAlignment) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(PangoAlignment) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoAlignment, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(PangoAlignment) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoAlignment, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(PangoAlignment, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(PangoAlignment) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) - 1 > 2 * PyLong_SHIFT)) {
                            return (PangoAlignment) (((PangoAlignment)-1)*(((((PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(PangoAlignment) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) - 1 > 2 * PyLong_SHIFT)) {
                            return (PangoAlignment) ((((((PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(PangoAlignment) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) - 1 > 3 * PyLong_SHIFT)) {
                            return (PangoAlignment) (((PangoAlignment)-1)*(((((((PangoAlignment)digits[2]) << PyLong_SHIFT) | (PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(PangoAlignment) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) - 1 > 3 * PyLong_SHIFT)) {
                            return (PangoAlignment) ((((((((PangoAlignment)digits[2]) << PyLong_SHIFT) | (PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(PangoAlignment) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) - 1 > 4 * PyLong_SHIFT)) {
                            return (PangoAlignment) (((PangoAlignment)-1)*(((((((((PangoAlignment)digits[3]) << PyLong_SHIFT) | (PangoAlignment)digits[2]) << PyLong_SHIFT) | (PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(PangoAlignment) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(PangoAlignment, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(PangoAlignment) - 1 > 4 * PyLong_SHIFT)) {
                            return (PangoAlignment) ((((((((((PangoAlignment)digits[3]) << PyLong_SHIFT) | (PangoAlignment)digits[2]) << PyLong_SHIFT) | (PangoAlignment)digits[1]) << PyLong_SHIFT) | (PangoAlignment)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(PangoAlignment) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoAlignment, long, PyLong_AsLong(x))
        } else if ((sizeof(PangoAlignment) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(PangoAlignment, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        PangoAlignment val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() or PyLong_AsNativeBytes() not available, cannot convert large enums");
        val = (PangoAlignment) -1;
#endif
        if (unlikely(ret))
            return (PangoAlignment) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to PangoAlignment");
    return (PangoAlignment) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to PangoAlignment");
    return (PangoAlignment) -1;
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000
static __Pyx_TypeName
__Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp)
{
    PyObject *module = NULL, *name = NULL, *result = NULL;
    #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
    name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_qualname);
    #else
    name = PyType_GetQualName(tp);
    #endif
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad;
    module = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_mstate_global->__pyx_n_u_module);
    if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad;
    if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) {
        result = name;
        name = NULL;
        goto done;
    }
    result = PyUnicode_FromFormat("%U.%U", module, name);
    if (unlikely(result == NULL)) goto bad;
  done:
    Py_XDECREF(name);
    Py_XDECREF(module);
    return result;
  bad:
    PyErr_Clear();
    if (name) {
        result = name;
        name = NULL;
    } else {
        result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__4);
    }
    goto done;
}
#endif

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Long(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyLong_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* GetRuntimeVersion */
#if __PYX_LIMITED_VERSION_HEX < 0x030b0000
void __Pyx_init_runtime_version(void) {
    if (__Pyx_cached_runtime_version == 0) {
        const char* rt_version = Py_GetVersion();
        unsigned long version = 0;
        unsigned long factor = 0x01000000UL;
        unsigned int digit = 0;
        int i = 0;
        while (factor) {
            while ('0' <= rt_version[i] && rt_version[i] <= '9') {
                digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
                ++i;
            }
            version += factor * digit;
            if (rt_version[i] != '.')
                break;
            digit = 0;
            factor >>= 8;
            ++i;
        }
        __Pyx_cached_runtime_version = version;
    }
}
#endif
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
    return Py_Version & ~0xFFUL;
#else
    return __Pyx_cached_runtime_version;
#endif
}

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* NewCodeObj */
#if CYTHON_COMPILING_IN_LIMITED_API
    static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                       PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                       PyObject *fv, PyObject *cell, PyObject* fn,
                                       PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030b0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
#elif PY_VERSION_HEX >= 0x030B0000
  static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f,
                                         PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                         PyObject *fv, PyObject *cell, PyObject* fn,
                                         PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
    if (likely(result))
        result->_co_firsttraceable = 0;
    #endif
    return result;
  }
#elif !CYTHON_COMPILING_IN_PYPY
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
static PyObject* __Pyx_PyCode_New(
        const __Pyx_PyCode_New_function_description descr,
        PyObject * const *varnames,
        PyObject *filename,
        PyObject *funcname,
        PyObject *line_table,
        PyObject *tuple_dedup_map
) {
    PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL;
    Py_ssize_t var_count = (Py_ssize_t) descr.nlocals;
    PyObject *varnames_tuple = PyTuple_New(var_count);
    if (unlikely(!varnames_tuple)) return NULL;
    for (Py_ssize_t i=0; i < var_count; i++) {
        Py_INCREF(varnames[i]);
        if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done;
    }
    #if CYTHON_COMPILING_IN_LIMITED_API
    varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple);
    if (!varnames_tuple_dedup) {
        if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done;
        varnames_tuple_dedup = varnames_tuple;
    }
    #else
    varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple);
    if (unlikely(!varnames_tuple_dedup)) goto done;
    #endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(varnames_tuple_dedup);
    #endif
    if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) {
        Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table);
        #if !CYTHON_ASSUME_SAFE_SIZE
        if (unlikely(line_table_length == -1)) goto done;
        #endif
        Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL;
        code_bytes = PyBytes_FromStringAndSize(NULL, code_len);
        if (unlikely(!code_bytes)) goto done;
        char* c_code_bytes = PyBytes_AsString(code_bytes);
        if (unlikely(!c_code_bytes)) goto done;
        memset(c_code_bytes, 0, (size_t) code_len);
    }
    code_obj = (PyObject*) __Pyx__PyCode_New(
        (int) descr.argcount,
        (int) descr.num_posonly_args,
        (int) descr.num_kwonly_args,
        (int) descr.nlocals,
        0,
        (int) descr.flags,
        code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        varnames_tuple_dedup,
        __pyx_mstate_global->__pyx_empty_tuple,
        __pyx_mstate_global->__pyx_empty_tuple,
        filename,
        funcname,
        (int) descr.first_line,
        (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes
    );
done:
    Py_XDECREF(code_bytes);
    #if CYTHON_AVOID_BORROWED_REFS
    Py_XDECREF(varnames_tuple_dedup);
    #endif
    Py_DECREF(varnames_tuple);
    return code_obj;
}

/* DecompressString */
static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) {
    PyObject *module, *decompress, *compressed_bytes, *decompressed;
    const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib";
    PyObject *methodname = PyUnicode_FromString("decompress");
    if (unlikely(!methodname)) return NULL;
    #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000
    if (algo == 3) {
        PyObject *fromlist = Py_BuildValue("[O]", methodname);
        if (unlikely(!fromlist)) return NULL;
        module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
    } else
    #endif
        module = PyImport_ImportModule(module_name);
    if (unlikely(!module)) goto import_failed;
    decompress = PyObject_GetAttr(module, methodname);
    if (unlikely(!decompress)) goto import_failed;
    {
        #ifdef __cplusplus
            char *memview_bytes = const_cast<char*>(s);
        #else
            #if defined(__clang__)
              #pragma clang diagnostic push
              #pragma clang diagnostic ignored "-Wcast-qual"
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic push
              #pragma GCC diagnostic ignored "-Wcast-qual"
            #endif
            char *memview_bytes = (char*) s;
            #if defined(__clang__)
              #pragma clang diagnostic pop
            #elif !defined(__INTEL_COMPILER) && defined(__GNUC__)
              #pragma GCC diagnostic pop
            #endif
        #endif
        #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ)
        int memview_flags = 0x100;
        #else
        int memview_flags = PyBUF_READ;
        #endif
        compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags);
    }
    if (unlikely(!compressed_bytes)) {
        Py_DECREF(decompress);
        goto bad;
    }
    decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL);
    Py_DECREF(compressed_bytes);
    Py_DECREF(decompress);
    Py_DECREF(module);
    Py_DECREF(methodname);
    return decompressed;
import_failed:
    PyErr_Format(PyExc_ImportError,
        "Failed to import '%.20s.decompress' - cannot initialise module strings. "
        "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.",
        module_name, algo);
bad:
    Py_XDECREF(module);
    Py_DECREF(methodname);
    return NULL;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    {
        const char* result;
        Py_ssize_t unicode_length;
        CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        #if __PYX_LIMITED_VERSION_HEX < 0x030A0000
        if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL;
        #else
        result = PyUnicode_AsUTF8AndSize(o, length);
        #endif
        #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        unicode_length = PyUnicode_GetLength(o);
        if (unlikely(unicode_length < 0)) return NULL;
        if (unlikely(unicode_length != *length)) {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
        #endif
        return result;
    }
#else
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
}
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8
    if (PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
    if (PyByteArray_Check(o)) {
#if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)))
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
#else
        *length = PyByteArray_Size(o);
        if (*length == -1) return NULL;
        return PyByteArray_AsString(o);
#endif
    } else
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result));
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
    PyErr_Format(PyExc_TypeError,
                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")",
                 result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  PyObject *res = NULL;
  if (likely(PyLong_Check(x)))
      return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  if (likely(m && m->nb_int)) {
      res = m->nb_int(x);
  }
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
      res = PyNumber_Long(x);
  }
#endif
  if (likely(res)) {
      if (unlikely(!PyLong_CheckExact(res))) {
          return __Pyx_PyNumber_LongWrongResultType(res);
      }
  }
  else if (!PyErr_Occurred()) {
      PyErr_SetString(PyExc_TypeError,
                      "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyLong_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyLong_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) {
    CYTHON_UNUSED_VAR(b);
    return __Pyx_NewRef(Py_None);
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return __Pyx_NewRef(b ? Py_True: Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) {
    return PyLong_FromSize_t(ival);
}


/* MultiPhaseInitModuleState */
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
#ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000)
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1
#else
  #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0
#endif
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS
#error "Module state with PEP489 requires atomics. Currently that's one of\
 C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics"
#endif
#if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
#define __Pyx_ModuleStateLookup_Lock()
#define __Pyx_ModuleStateLookup_Unlock()
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000
static PyMutex __Pyx_ModuleStateLookup_mutex = {0};
#define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(__cplusplus) && __cplusplus >= 201103L
#include <mutex>
static std::mutex __Pyx_ModuleStateLookup_mutex;
#define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock()
#define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock()
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__)
#include <threads.h>
static mtx_t __Pyx_ModuleStateLookup_mutex;
static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT;
static void __Pyx_ModuleStateLookup_initialize_mutex(void) {
    mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain);
}
#define __Pyx_ModuleStateLookup_Lock()\
  call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\
  mtx_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(HAVE_PTHREAD_H)
#include <pthread.h>
static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER;
#define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex)
#elif defined(_WIN32)
#include <Windows.h>  // synchapi.h on its own doesn't work
static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT;
#define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex)
#else
#error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\
 Requires C standard >= C11, or C++ standard >= C++11,\
 or pthreads, or the Windows 32 API, or Python >= 3.13."
#endif
typedef struct {
    int64_t id;
    PyObject *module;
} __Pyx_InterpreterIdAndModule;
typedef struct {
    char interpreter_id_as_index;
    Py_ssize_t count;
    Py_ssize_t allocated;
    __Pyx_InterpreterIdAndModule table[1];
} __Pyx_ModuleStateLookupData;
#define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0;
#endif
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0;
#else
static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL;
#endif
static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound(
        __Pyx_InterpreterIdAndModule* table,
        Py_ssize_t count,
        int64_t interpreterId) {
    __Pyx_InterpreterIdAndModule* begin = table;
    __Pyx_InterpreterIdAndModule* end = begin + count;
    if (begin->id == interpreterId) {
        return begin;
    }
    while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
        __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2;
        if (halfway->id == interpreterId) {
            return halfway;
        }
        if (halfway->id < interpreterId) {
            begin = halfway;
        } else {
            end = halfway;
        }
    }
    for (; begin < end; ++begin) {
        if (begin->id >= interpreterId) return begin;
    }
    return begin;
}
static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return NULL;
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
    {
        __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        if (likely(data)) {
            __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data);
            if (likely(data == new_data)) {
                goto read_finished;
            }
        }
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
        __Pyx_ModuleStateLookup_Lock();
        __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter);
        data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data);
        __Pyx_ModuleStateLookup_Unlock();
    }
  read_finished:;
#else
    __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_InterpreterIdAndModule* found = NULL;
    if (unlikely(!data)) goto end;
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            found = data->table+interpreter_id;
        }
    } else {
        found = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
    }
  end:
    {
        PyObject *result=NULL;
        if (found && found->id == interpreter_id) {
            result = found->module;
        }
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
        __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter);
#endif
        return result;
    }
}
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) {
    while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0);
}
#else
#define __Pyx_ModuleStateLookup_wait_until_no_readers()
#endif
static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) {
    Py_ssize_t to_allocate = (*old_data)->allocated;
    while (to_allocate <= interpreter_id) {
        if (to_allocate == 0) to_allocate = 1;
        else to_allocate *= 2;
    }
    __Pyx_ModuleStateLookupData *new_data = *old_data;
    if (to_allocate != (*old_data)->allocated) {
         new_data = (__Pyx_ModuleStateLookupData *)realloc(
            *old_data,
            sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
        if (!new_data) {
            PyErr_NoMemory();
            return -1;
        }
        for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) {
            new_data->table[i].id = i;
            new_data->table[i].module = NULL;
        }
        new_data->allocated = to_allocate;
    }
    new_data->table[interpreter_id].module = module;
    if (new_data->count < interpreter_id+1) {
        new_data->count = interpreter_id+1;
    }
    *old_data = new_data;
    return 0;
}
static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) {
    __Pyx_InterpreterIdAndModule *read = data->table;
    __Pyx_InterpreterIdAndModule *write = data->table;
    __Pyx_InterpreterIdAndModule *end = read + data->count;
    for (; read<end; ++read) {
        if (read->module) {
            write->id = read->id;
            write->module = read->module;
            ++write;
        }
    }
    data->count = write - data->table;
    for (; write<end; ++write) {
        write->id = 0;
        write->module = NULL;
    }
    data->interpreter_id_as_index = 0;
}
static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    int result = 0;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data;
#endif
    __Pyx_ModuleStateLookupData *new_data = old_data;
    if (!new_data) {
        new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData));
        if (!new_data) {
            result = -1;
            PyErr_NoMemory();
            goto end;
        }
        new_data->allocated = 1;
        new_data->interpreter_id_as_index = 1;
    }
    __Pyx_ModuleStateLookup_wait_until_no_readers();
    if (new_data->interpreter_id_as_index) {
        if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) {
            result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id);
            goto end;
        }
        __Pyx_State_ConvertFromInterpIdAsIndex(new_data);
    }
    {
        Py_ssize_t insert_at = 0;
        {
            __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
                new_data->table, new_data->count, interpreter_id);
            assert(lower_bound);
            insert_at = lower_bound - new_data->table;
            if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) {
                lower_bound->module = module;
                goto end;  // already in table, nothing more to do
            }
        }
        if (new_data->count+1 >= new_data->allocated) {
            Py_ssize_t to_allocate = (new_data->count+1)*2;
            new_data =
                (__Pyx_ModuleStateLookupData*)realloc(
                    new_data,
                    sizeof(__Pyx_ModuleStateLookupData) +
                    (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule));
            if (!new_data) {
                result = -1;
                new_data = old_data;
                PyErr_NoMemory();
                goto end;
            }
            new_data->allocated = to_allocate;
        }
        ++new_data->count;
        int64_t last_id = interpreter_id;
        PyObject *last_module = module;
        for (Py_ssize_t i=insert_at; i<new_data->count; ++i) {
            int64_t current_id = new_data->table[i].id;
            new_data->table[i].id = last_id;
            last_id = current_id;
            PyObject *current_module = new_data->table[i].module;
            new_data->table[i].module = last_module;
            last_module = current_module;
        }
    }
  end:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data);
#else
    __Pyx_ModuleStateLookup_data = new_data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return result;
}
static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) {
    int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get());
    if (interpreter_id == -1) return -1;
    __Pyx_ModuleStateLookup_Lock();
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *)
            __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0);
#else
    __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data;
#endif
    if (data->interpreter_id_as_index) {
        if (interpreter_id < data->count) {
            data->table[interpreter_id].module = NULL;
        }
        goto done;
    }
    {
        __Pyx_ModuleStateLookup_wait_until_no_readers();
        __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound(
            data->table, data->count, interpreter_id);
        if (!lower_bound) goto done;
        if (lower_bound->id != interpreter_id) goto done;
        __Pyx_InterpreterIdAndModule *end = data->table+data->count;
        for (;lower_bound<end-1; ++lower_bound) {
            lower_bound->id = (lower_bound+1)->id;
            lower_bound->module = (lower_bound+1)->module;
        }
    }
    --data->count;
    if (data->count == 0) {
        free(data);
        data = NULL;
    }
  done:
#if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE
    __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data);
#else
    __Pyx_ModuleStateLookup_data = data;
#endif
    __Pyx_ModuleStateLookup_Unlock();
    return 0;
}
#endif

/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
