+
    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RV V n        R# >L:N   N:r!   NNN)	r   metricsr   unpack2r   datastructunpack	imageDatar   Zdummyr$   dataLen   &   r   	decompileZcbdt_bitmap_format_17.decompile;   sW    (*oo&=tyy$,,W]]4b2
Bx 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%   lenr'   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+   r4   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"   r   r#   r   r$   r%   r&   r'   r(   r*   r   r+   Zcbdt_bitmap_format_18.decompileN   sW    &(oo&;TYYU]]4b2
Bx hwr   c                r,   r-   )	r.   r   r/   r   r"   r%   r0   r'   r    r1   r3   r   r4   Zcbdt_bitmap_format_18.compileX   s^    %:DLLIJD#dnn*=>?'""r   r5   Nr6   r   r   r   r8   r8   M   r7   r   r8   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RV V n        R# r   )r%   r&   r$   r'   )r   r)   r$   s   &  r   r+   Zcbdt_bitmap_format_19.decompilea   s8    ]]427
yy} hwr   c                sx    \         P                  ! R \        V P                  4      4      V P                  ,           # r-   )r%   r/   r0   r'   )r   r2   r   r   r4   Zcbdt_bitmap_format_19.compileh   s%    {{4T^^!45FFr   )r'   Nr6   r   r   r   r9   r9   `   s     (G Gr   r9   )ZfontTools.misc.textToolsr    ZfontTools.miscr   Z r   ZBitmapGlyphMetricsr   r   r   r   r   r   r	   r%   r   r
   r   r   r   r8   r9   r   r   r   r   <module>r:      s    / "   
 4X,, 40P{ P
#79I #&#57G #&	G, 	G  r   