+
    f7i>  c                   s    ^ RI Ht ^ RIHt ^RIHt ^RIHtHtH	t	H
t
 ^RIHtHtHt ^ RIt ! R R]P                  4      tR	 t ! R
 R]4      t ! R R]]4      t ! R R]]4      t ! R R]4      t^]^]^]/tR# )i    )	bytesjoin)sstruct)E_B_D_T_)BigGlyphMetricsbigGlyphMetricsFormatSmallGlyphMetricssmallGlyphMetricsFormat)BitmapGlyphBitmapPlusSmallMetricsMixinBitmapPlusBigMetricsMixinNc                   s.   a  ] tR t^t o RtRtR tRtV tR# )table_C_B_D_T_a  Color Bitmap Data table

The ``CBDT`` table contains color bitmap data for glyphs. It must
be used in concert with the ``CBLC`` table.

It is backwards-compatible with the monochrome/grayscale ``EBDT`` table.

See also https://learn.microsoft.com/en-us/typography/opentype/spec/cbdt
ZCBLCc                s~     \         P                  P                  W4      #   \         d    \        T,          u # i ; i)N)r   table_E_B_D_T_getImageFormatClassZKeyErrorcbdt_bitmap_classes)selfZimageFormat   &&F/usr/lib64/python3.14/site-packages/fontTools/ttLib/tables/C_B_D_T_.pyr   Z"table_C_B_D_T_.getImageFormatClass&   s8    	4**>>tQQ 	4&{33	4s   ! << N)	__name__
__module____qualname____firstlineno__Z__doc__ZlocatorNamer   __static_attributes____classdictcell__Z__classdict__   @r   r
   r
      s      K4 4    r
   c                 s"    \        V 4      p V R  V # )Zrow)Zdict)ZdataFunctionss   &r   _removeUnsupportedForColorr   /   s    'Mer   c                   s>    ] tR t^5tRt]! ]P                  4      tRtR# )ColorBitmapGlyphz.pngr   N)	r   r   r   r   ZfileExtensionr   r   ZxmlDataFunctionsr   r   r   r   r   r   5   s    M1+2N2NOr   r   c                   s,   a  ] tR t^:t o R tR tRtV tR# )cbdt_bitmap_format_17c                   \        4       V n        \        P                  ! \        V P
                  V P                  4      w  r\        P                  ! R VR,          4      w  pVR,          pV\        V4      8:  g   Q R4       hVRV V n	        R# )>LN   Nr!   NNzData overun in format 17N)
r   metricsr   unpack2r   datastructunpacklen	imageDatar   Zdummyr%   dataLen   &   r   	decompileZcbdt_bitmap_format_17.decompile;   so    (*oo&=tyy$,,W]]4b2
Bx #d)#?%??#hwr   c                ,   . pVP                  \        P                  ! \        V P                  4      4       VP                  \
        P                  ! R \        V P                  4      4      4       VP                  V P                  4       \        V4      # r   )	appendr   packr   r#   r&   r(   r)   r    r   ttFontZdataList   && r   compileZcbdt_bitmap_format_17.compileE   s^    %<dllKLD#dnn*=>?'""r   r)   r#   Nr   r   r   r   r-   r5   r   r   r   r   r   r   r   :        (# #r   r   c                   s,   a  ] tR t^Mt o R tR tRtV tR# )cbdt_bitmap_format_18c                r   )r   r    r"   zData overun in format 18N)
r   r#   r   r$   r   r%   r&   r'   r(   r)   r*   r,   r   r-   Zcbdt_bitmap_format_18.decompileN   so    &(oo&;TYYU]]4b2
Bx #d)#?%??#hwr   c                r.   r/   )	r0   r   r1   r   r#   r&   r(   r)   r    r2   r4   r   r5   Zcbdt_bitmap_format_18.compileX   s^    %:DLLIJD#dnn*=>?'""r   r6   Nr7   r   r   r   r9   r9   M   r8   r   r9   c                   s,   a  ] tR t^`t o R tR tRtV tR# )cbdt_bitmap_format_19c                s    \         P                  ! R V P                  R,          4      w  pV P                  R,          pV\        V4      8:  g   Q R4       hVRV V n        R# )r   r    r"   zData overun in format 19N)r&   r'   r%   r(   r)   )r   r+   r%   s   &  r   r-   Zcbdt_bitmap_format_19.decompilea   sN    ]]427
yy}#d)#?%??#hwr   c                sx    \         P                  ! R \        V P                  4      4      V P                  ,           # r/   )r&   r1   r(   r)   )r   r3   r   r   r5   Zcbdt_bitmap_format_19.compileh   s%    {{4T^^!45FFr   )r)   Nr7   r   r   r   r:   r:   `   s     (G Gr   r:   )ZfontTools.misc.textToolsr    ZfontTools.miscr   Z r   ZBitmapGlyphMetricsr   r   r   r   r   r   r	   r&   r   r
   r   r   r   r9   r:   r   r   r   r   <module>r;      s    / "   
 4X,, 40P{ P
#79I #&#57G #&	G, 	G  r   