
    h                     R    S SK Jr  S SKJr  SSKJr   " S S\R
                  5      rg)    )BytesIO)cffLib   )DefaultTablec                   L    \ rS rSrSrSS jrS rS rS rS r	S	 r
S
 rS rSrg)table_C_F_F_   a  Compact Font Format table (version 1)

The ``CFF`` table embeds a CFF-formatted font. The CFF font format
predates OpenType and could be used as a standalone font file, but the
``CFF`` table is also used to package CFF fonts into an OpenType
container.

.. note::
   ``CFF`` has been succeeded by ``CFF2``, which eliminates much of
   the redundancy incurred by embedding CFF version 1 in an OpenType
   font.

See also https://learn.microsoft.com/en-us/typography/opentype/spec/cff
Nc                     [         R                   R                  X5        [        R                  " 5       U l        SU l        g )NF)r   __init__r   
CFFFontSetcff_gaveGlyphOrder)selftags     O/var/www/html/env/lib/python3.13/site-packages/fontTools/ttLib/tables/C_F_F_.pyr   table_C_F_F_.__init__   s.    !!**45$$&$    c                     U R                   R                  [        U5      USS9  [        U R                   5      S:X  d   S5       eg )NFisCFF2r   z&can't deal with multi-font CFF tables.)r   	decompiler   len)r   dataotFonts      r   r   table_C_F_F_.decompile   s;    74=&?488}!K#KK!r   c                 j    [        5       nU R                  R                  X!SS9  UR                  5       $ )NFr   )r   r   compilegetvalue)r   r   fs      r   r   table_C_F_F_.compile   s,    I51zz|r   c                 p    [        U R                  U R                  R                  S      S5      (       a  gg)Nr   ROSFT)hasattrr   	fontNames)r   s    r   haveGlyphNamestable_C_F_F_.haveGlyphNames$   s-    488DHH..q12E::r   c                     U R                   (       a  SSKJn  UR                  S5      eSU l         U R                  U R                  R
                  S      R                  5       $ )Nr   )ttLibzillegal use of getGlyphOrder()T)r   	fontToolsr(   
TTLibErrorr   r$   getGlyphOrder)r   r(   s     r   r+   table_C_F_F_.getGlyphOrder*   sO    '""#CDD#xx**1-.<<>>r   c                     g N )r   
glyphOrders     r   setGlyphOrdertable_C_F_F_.setGlyphOrder2   s    r   c                 :    U R                   R                  U5        g r.   )r   toXML)r   writerr   s      r   r4   table_C_F_F_.toXML7   s    vr   c                     [        U S5      (       d  [        R                  " 5       U l        U R                  R	                  XX45        g )Nr   )r#   r   r   r   fromXML)r   nameattrscontentr   s        r   r8   table_C_F_F_.fromXML:   s3    tU##((*DHg6r   )r   r   r.   )__name__
__module____qualname____firstlineno____doc__r   r   r   r%   r+   r1   r4   r8   __static_attributes__r/   r   r   r   r      s0    %
L
?
7r   r   N)ior   r)   r    r   r   r/   r   r   <module>rE      s       77<,, 77r   