
    mj}                       d dl mZ d dlmZ d dlmZmZ d dlmZm	Z	m
Z
 d dlmZmZmZmZmZmZmZmZmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ erd dlm Z  d dl!m"Z" d dl#m$Z$ d dl%m&Z& ddl'm(Z( 	 d dl)m*Z* dZ+dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4 ed       G d d             Z5 ed       G d d             Z6e G d  d!             Z7y"# e,$ r dZ+Y Uw xY w)#    )annotations)Sequence)	dataclassfield)TYPE_CHECKINGAnycast)	ArrayObjectDictionaryObjectFloatObjectIndirectObject
NameObjectNumberObject	PdfObjectStreamObjectTextStringObject   )get_encodingadobe_glyphs)logger_warning)	FontFlags)PdfReadError)BytesIO)table__h_e_a_d)table__p_o_s_t)table_O_S_2f_2)	PdfWriter)TTFontTF            	   
      )frozenc                      e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   d
Z	ded<   dZ
ded<   dZded<   dZded<   dZded<    ed       Zded<   dZded<   ddZy)FontDescriptorz
    Represents the FontDescriptor dictionary as defined in the PDF specification.
    This contains both descriptive and metric information.

    The defaults are derived from the mean values of the 14 core fonts, rounded
    to 100.
    Unknownstrnamefamilyweightg     @floatascent      idescentg     @
cap_heightg     @@x_height        italic_angle    intflagsc                      y)N)g      Yr1        @@g      @ r<       >/root/.hermes/venv/lib/python3.12/site-packages/pypdf/_font.py<lambda>zFontDescriptor.<lambda>H   s    r=   default_factoryz!tuple[float, float, float, float]bboxNzStreamObject | None	font_filec                   t        t        d      t        d      t        d      t        d| j                         t        d      t        | j                        t        d      t        | j                  D cg c]  }t        |       c}      t        d      t        | j                        t        d      t        | j                        t        d	      t        | j                        t        d
      t        | j                        t        d      t        | j                        i	      }| j                  r| j                  |t        d      <   |S c c}w )N/Type/FontDescriptor	/FontName//Flags	/FontBBox/ItalicAngle/Ascent/Descent
/CapHeight/XHeight
/FontFile2)r   r   r,   r   r9   r
   rB   r   r6   r0   r2   r3   r4   rC   )selfnfont_descriptor_resources      r>   as_font_descriptor_resourcez*FontDescriptor.as_font_descriptor_resourceK   s    #3w,=!>{#Z!DII;%@x ,tzz":{#[$))1TQ+a.1T%U~&D4E4E(Fy!;t{{#;z"K$=|$k$//&Bz"K$>
5
 
$  >>AE$Z%=>'' 2Us   6Ereturnr   )__name__
__module____qualname____doc__r,   __annotations__r-   r.   r0   r2   r3   r4   r6   r9   r   rB   rC   rT   r<   r=   r>   r)   r)   4   s     D#FCFCFEGUJHeL%E3O.3Dk.lD
+l%)I")(r=   r)   c                  "    e Zd ZU ded<   ded<   y)CoreFontMetricsr)   font_descriptordict[str, int]character_widthsN)rW   rX   rY   r[   r<   r=   r>   r]   r]   _   s    ##$$r=   r]   c                     e Zd ZU dZded<   ded<    ee      Zded<   d	Zded
<    ee	      Z
ded<    ed       Zded<   dZded<   dZded<   dZded<   e	 	 	 	 	 	 	 	 	 	 d(d       Ze	 	 	 	 	 	 	 	 d)d       Ze	 	 	 	 	 	 d*d       Zed+d       Ze	 	 	 	 	 	 	 	 d,d       Zed-d       Ze	 	 	 	 d.d       Ze	 	 	 	 	 	 	 	 d/d       Zed0d        Zd1d!Zd2d"Zd3d#Z	 	 	 	 	 	 	 	 d4d$Zd5d6d%Zd7d&Zy')8Fonta  
    A font object for use during text extraction and for producing
    text appearance streams.

    Attributes:
        name: Font name, derived from font["/BaseFont"]
        character_map: The font's character map
        encoding: Font encoding
        sub_type: The font type, such as Type1, TrueType, or Type3.
        font_descriptor: Font metrics, including a mapping of characters to widths
        character_widths: A mapping of characters to widths
        space_width: The width of a space, or an approximation
        interpretable: Default True. If False, the font glyphs cannot
            be translated to characters, e.g. Type3 fonts that do not define
            a '/ToUnicode' mapping.

    r+   r,   str | dict[int, str]encodingr@   dict[Any, Any]character_mapr*   sub_typer)   r^   c                 
    ddiS )Ndefault  r<   r<   r=   r>   r?   zFont.<lambda>~   s    iQTEU r=   r_   r`      zfloat | intspace_width 
space_charTboolinterpretablec                    t        t        | d         }| j                  dd      }t        |      D ]  \  }}t	        |      |t        ||z         <   ! y)zcParses a TrueType or Type1 font's /Widths array from a font dictionary and updates character widths/Widthsz
/FirstCharr   N)r	   r
   get	enumerater8   chr)pdf_font_dictchar_maprd   current_widthswidths_array
first_charidxwidths           r>   _collect_tt_t1_character_widthsz$Font._collect_tt_t1_character_widths   sW     Ky)AB"&&|Q7
#L1 	?JC47JN3sZ/01	?r=   c                
   d}| j                  dt                     j                         }t        |      }t	        |      D ]  \  }}|j                         }|r|dz  }t        |t        t        f      st        dt        |       H|dz   |k  r||dz      j                         nd}t        |t              rr||}
}	|j                  t        t        t        t        |	      t        t        |	      t        |
      z   d      |
      D ci c]  \  }}t        |      | c}}       d}t        |t        t        f      r|dz   |k  rt        ||dz      j                         t        t        f      rq||||dz      j                         }}}	|j                  t        t        t        |	      t        t        |dz         d      D ci c]  }t        |      | c}       d}t        dt        |        yc c}}w c c}w )	zRParses the /W array from a DescendantFont dictionary and updates character widths.r   /Wr   z?Expected numeric value for width, got %(w_entry)s. Ignoring it.)sourcew_entryNr    z9Invalid font width definition. Last element: %(w_entry)s.)rs   r
   
get_objectlenrt   
isinstancer8   r/   r   rW   r   updatezipranger	   ru   )d_fontrw   rx   
skip_count_w	_w_lengthr{   r   w_next_entry	start_idx
width_list_cidx_widthstop_idxconst_widths                  r>   _collect_cid_character_widthsz"Font._collect_cid_character_widths   s    
ZZkm,779G	%bM ;	LC((*Ga
gU|4 U##
 7:Qw7J2cAg;113PTL,1(/:	%% .1! $S) 4 $S) 4s: F !
 '.
)E6 E
F*
 
 <#u6!Gi'r#'{557#uF  sQwK**, &18	
 %% &+ i0$sHqL2I1&! E
K/ 
 O##o;	&
2s   
G:H 
c                    d}t        | t              r*| j                         D ]  \  }}||k(  st        |      c S  |j                         D ]  \  }}||k(  st	        |      c S  |S )Nrm   )r   dictitemsru   r+   )rd   rf   rn   	char_codechar_strglyph_ids         r>   _get_space_charzFont._get_space_char   sy    
 
h%'/~~'7 *#	8z)y>)* #0"5"5"7 	%Hh:%8}$	% r=   c                D   | sd| d<   y || v rJ| |   dk7  rB|t         j                  z  t         j                  k(  r	| |   | d<   y t        d| |   z        | d<   y | j                         D cg c]
  }|dkD  s	| }}|rt	        |      t        |      z  | d<   y d| d<   y c c}w )Nrj   ri   r   r    )r   FIXED_PITCHr8   valuessumr   )rx   r9   rn   wvalid_widthss        r>   _add_default_widthzFont._add_default_width   s    (+N9%'N:,F!,K	---)2G2GG,::,Fy)(+Az0J,J(KN9% $2#8#8#:Daa!eDDNZC$5\9J$Jy!`cy! Es   )
B4Bc                    | j                  |d      }|dk7  r|S |t        j                  z  t        j                  k(  r| d   S | d   dz  S )Nr   ri   r    )rs   r   r   )r`   r9   rn   rl   s       r>   _add_space_widthzFont._add_space_width   sX     '**:q9!I)))i.C.CC#I..	*a//r=   c           	     n   i }dD ]  \  }}|| v s| |   ||<    d|v r6t        t        t        |d               }t        |      dk(  sJ |       ||d<   dD ]2  }|| v sd|v rt	        d|        	 | |   j                         }||d<   4 |S # t        $ r}t        dt        || |       Y d }~Yd }~ww xY w)	N)
)rG   r,   )z/FontFamilyr-   )z/FontWeightr.   )rL   r0   )rM   r2   )rN   r3   )rO   r4   )rK   r6   )rI   r9   )rJ   rB   rB   r"   z	/FontFilerP   z
/FontFile3rC   z!More than one /FontFile found in zBFailed to get %(source_key)r in %(font_descriptor_obj)s: %(error)s)r   
source_keyfont_descriptor_objerror)tuplemapr/   r   r   r   r   rW   )r   font_descriptor_kwargsr   
target_key
bbox_tuplerC   es          r>   _parse_font_descriptorzFont._parse_font_descriptor  s   13'
 	U"J
 005H5T&z2	U ++s5*@*HIJJz?a'33'-7"6* D 	J00"88&)JK^J_'`aa
 3J ? J J LI:C*;7	  &% $ "\'#-,? s   1B	B4B//B4c                    ddl m} |j                  dd      j                  d      }|j                  dd      j                  d      }t	        |      \  }}d }i }d}	|j                  d      dv r|d	k(  r)d
|vr%t        d |j                  d      xs g D              }	|	r^d|v r| j                  ||||       n||v r||   j                  }t        |t              rI|j                         D ]5  \  }
}|||   j                  v s||   j                  |   |t        |
      <   7 nBt        d      D ]4  }
t        |
      }|||   j                  v s ||   j                  |   ||<   6 d|v rl|j                  dt                     j                         }d|v r$t!        t"        |d   j                               |d<   t%        di | j'                  |      }n'd|v r"t)        t+        t,        t!        t.        |d                     }t1        |      dk(  sJ |       t%        ||      }nt3        t!        t.        |d               D ]  \  }}t!        t        |j                               }|t!        t.        |d         |<   | j5                  |||       d|v r$t!        t"        |d   j                               |d<   |j                  dt                     j                         }t%        di | j'                  |      } |st%        |      }| j7                  ||      }|j                  dd      dk(  r| j9                  ||j:                  |       | j=                  ||j:                  |      } | |||||||||		      S )Nr   )CORE_FONT_METRICS	/BaseFontr*   rH   /SubtypeT)/Type1z/MMType1z	/TrueTypez/Type3Type3
/ToUnicodec              3  ,   K   | ]  }|t         v   y wNr   ).0cnames     r>   	<genexpr>z*Font.from_font_resource.<locals>.<genexpr>M  s      $ \)$s   z
/CharProcsrr      rF   z/MissingWidthri   rJ   r"   )r,   rB   /DescendantFonts/DW)r,   	r,   rg   rd   r^   rf   r`   rl   rn   rp   r<   )pypdf._codecs.core_font_metricsr   rs   removeprefixr   allr}   r^   r   r   r   r`   ru   r   r   r   r	   r8   r)   r   r   r   r/   r
   r   rt   r   r   r   r9   r   )clsrv   r   r,   rg   rd   rf   r^   r`   rp   code	characterr   r   
d_font_idxr   rn   rl   s                     r>   from_font_resourcezFont.from_font_resource7  s   
 	F   i8EEcJ $$Z;HHM".}"=-+- Z(,YY
 7"|='H # $!.!2!2<!@!FB$ ! -77%}h@P ..&7&=&M&MO!(D1/7~~/? rOD)(,=d,C,T,TT>OPT>U>f>fgp>q 0T ;r
 %*#J rD(+D	I(,=d,C,T,TT>OPT>U>f>fgp>q 0 ;r %5*7*;*;<MO_Oa*b*m*m*o'&*==6:3@STc@d@o@o@q6r(3&4&gs7Q7QRe7f&gO M1!&s5${MR]D^2_'`!aJz?a/;;/&4$Z&PO '0[-0B"CD' d"
F .0A0A0CDSY[-0B"CDZP11M+; F?26sF5M<T<T<V2W$Y/&,jj1BDTDV&W&b&b&d#"0"c33M3MNa3b"cd ,$7O((=A
	1-2""#3_5J5JJW**+;_=R=RT^_+'-#!'

 
	
r=   c                   |r|j                   }|j                  dz	  }d}| j                  t        z  s|r&|j                  t
        z  r|t        j                  z  }|r$|j                  }|dk7  r|t        j                  z  }|rj                  t        k(  s|r"|j                  dkD  r|t        j                  z  }|r/t        k(  sj                  t        k(  r|t        j                   z  }|r<dj"                  cxk  rdk  sn dcxk  rdk  sn |dk(  r|t        j$                  z  }|r6t&        k(  sj                  t(        t*        hv r|t        j,                  z  }|S |t        j.                  z  }|S )	N   r   r5   r    r%   r   r#      )panosesFamilyClassmacStyleHEADER_MACSTYLE_ITALICfsSelectionOS2_FSSELECTION_ITALICr   ITALICitalicAnglebProportion!OS2_PANOSE_BPROPORTION_MONOSPACEDisFixedPitchr   OS2_SFAMILYSCLASS_SCRIPTSbFamilyTypeOS2_PANOSE_BFAMILYTYPE_SCRIPTSCRIPTbSerifStyleSERIFOS2_SFAMILYSCLASS_SYMBOLIC!OS2_PANOSE_BFAMILYTYPE_DECORATIVE OS2_PANOSE_BFAMILYTYPE_PICTORIALSYMBOLICNONSYMBOLIC)header
postscriptos2r   family_classr9   r6   s          r>   %_font_flags_from_truetype_font_tablesz*Font._font_flags_from_truetype_font_tables  sd    ZZF ++q0L ??33Rh@hY%%%E%11Ls"))) V''+LLJ33a7Y***E 559K9KOl9lY%%%E ##)r)L%A%):Y__$E 66#DFf"ggY'''E  Y***Er=   c                $   t         st        d      t        |      5 }|d   }|d   }|d   j                  }|j	                  dd       }|j	                  dd       }|j
                  }|st        d      d|z  }	i }
|j	                  d	d       }|r9|j                         |
d	<   |j                         |
d
<   |j                         |
d<   t        t        |j                  |	z  d            |
d<   t        t        |j                  |	z  d            |
d<   |rK	 t        t        |j                  |	z  d            |
d<   t        t        |j                  |	z  d            |
d<   | j#                  |||      |
d<   t        |j$                  |	z  d      t        |j&                  |	z  d      t        |j(                  |	z  d      t        |j*                  |	z  d      f|
d<   t-               }|j/                         }|j1                  |       |j3                  t5        d      t7        t9        |            i       ||
d<   t;        di |
}d}i }i }|j=                         }|j	                  d      }|r|j?                         }tA        |      D ]  \  }}|j	                  |      }|tC        |      }|jE                  |      }|jG                  dd      }|jI                  dd      }|||<   t        t        ||   d   |	z  d            ||<    nt        d      | jK                  ||      }| jM                  ||
d   |       | jO                  ||
d   |      }d d d         | jP                  d|d	      S # t         $ r Y #w xY w# 1 sw Y   4xY w) NzDThe 'fontTools' library is required to use 'from_truetype_font_file'headhheahmtxpostzOS/2z(Font file has an invalid unitsPerEm of 0r;   r,   r-   r.   r   r0   r2   r3   r4   r9   rB   z/Length1rC   	utf_16_becmapr    bigz	utf-16-besurrogatepassz$Font file does not have a cmap tableTrueTypeTr   r<   ))HAS_FONTTOOLSImportErrorr   metricsrs   
unitsPerEmr   getBestFullNamegetBestFamilyNamegetBestSubFamilyNamer8   roundr0   r2   
sCapHeightsxHeightAttributeErrorr   xMinyMinxMaxyMaxr   getvalueset_datar   r   r   r   r)   getGlyphOrderbuildReversedMinrt   ru   
getGlyphIDto_bytesdecoder   r   r   r,   )r   rC   tt_font_objectr   horizontal_headerr   r   r   units_per_emscale_factorr   namesfont_file_datafont_file_raw_bytesr^   rd   r`   rf   glyph_ordertt_font_cmap_tablereverse_cmapgidglyphr   char	gid_bytesgid_key_stringrn   rl   s                                r>   from_truetype_font_filezFont.from_truetype_font_file  s   deeI P	.
 $F+F .v 6$V,44G (++FD9J $$VT2C ",,L"#MNN!L0L 68""&&vt4E161F1F1H&v.383J3J3L&x0383M3M3O&x0/259J9Q9QT`9`bc3d/e"8,03E:K:S:SVb:bde4f0g"9-;>uS^^VbEbde?f;g*<89<U3<<R^C^`a=b9c*:6 /2.W.WX^`jlo.p"7+ fkkL0!4fkkL0!4fkkL0!4fkkL0!4	."6* *^N"+"4"4"6##$78!!:j#9<L_H`;a"bc2@";/,F/EFO"H/1,.M(668K "0!3!3F!;!1BBD"+K"8 
gJC , 0 0 7I ( y>D(33E:C #Q 6I%.%5%5k?%SN48M.17:5PQARUaAacd;e7f$^4
g ##IJJ,,X}EJ""#35KG5TV`a.. "8"A:K]P	d  %%+'-#!

 
	
e & AP	 P	s2   C7NA
M6G4N6	N?NNNNc                v   i }i }t        | j                  t              rT| j                  j	                         D ]3  \  }}t        |      }|||<   |j                  | j                        ||<   5 ||fS | j                  j	                         D ]$  \  }}t        |      }|||<   t        |f      ||<   & | j                  j	                         D ci c]  \  }}|t        |f       }}}| j                  j	                         D ])  \  }}|||<   |j                  |t        |f            ||<   + ||fS c c}}w )z
        Generates maps to translate input unicode text to bytes in two steps:
        Unicode code point -> raw_character (reverse cmap) -> PDF bytes (encoding cmap).
        )	r   rd   r+   rf   r   encoderu   bytesrs   )	rQ   r  encoding_cmapr   unicode_charglyph_id_strcharacter_codecharacter_strunicode_to_bytess	            r>   _get_typographic_mapszFont._get_typographic_maps+  sg   
 dmmS)*.*<*<*B*B*D Q&,"8}-9\*.:.A.A$--.Pl+Q" ]** 150C0C0E H, #N 3-:\*/4n5F/Gm,H \`[h[h[n[n[p ;W><e^$566    +/*<*<*B*B*D a&,-5\**:*>*>|UT\S^M_*`h'a ]** s   D5c           	        g }g }| j                   j                         D ]  \  }}t        |      }|dk  st        |      }|d}|d}|j                  d| d| d       | j                  j                  || j                  d         }	|j                  t        |      t        t        |	      g      g        t               }
|
j                  dt        |       dd	j                  |      z   d
z   j                  d             ||
fS )Ni  04X<z> <>ri   z/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo << /Registry (Adobe) /Ordering (UCS) /Supplement 0 >> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange <0000> <FFFF> endcodespacerange
z beginbfchar

zH
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end endascii)rf   r   ordappendr`   rs   extendr   r
   r   r   r   joinr  )rQ   widths_listunicode_mapgid_stractual_char	uni_pointcidcid_hexuni_hexr|   to_unicode_streams              r>   &_create_widths_list_and_unicode_streamz+Font._create_widths_list_and_unicode_streamG  s1    %)$6$6$<$<$> 	\ G[K(I F"'l I&sO""Qwis7)1#=>--11'4;P;PQZ;[\""L$5{LQVDWCX7Y#Z[	\ )N""J {#$N4 ))K(), fWo	
$ ---r=   c                   | j                   j                  r| j                  dk(  r| j                         \  }}t	        t        d      t        d      t        d      t        d      t        d      t        d| j                         t        d      t	        t        d	      t        d
      t        d      t        d      t        d      t        d      i      t        d      | j                   j                         t        d      t        |      t        d      t        | j                  d         t        d      t        d      i      }t	        t        d      t        d      t        d      t        d      t        d      t        d| j                         t        d      t        d      t        d      t        |g      t        d      |i      S t	        t        d      t        d      t        d      t        d      t        d      t        d| j                         t        d      t        d| j                         t        d      t        d      i      S )Nr   rE   z/Fontr   z/CIDFontType2r   rH   z/CIDSystemInfoz	/RegistryAdobez	/OrderingIdentityz/Supplementr   rF   r   r   ri   z/CIDToGIDMapz	/Identityz/Type0z	/Encodingz/Identity-Hr   r   r   z/Namez/WinAnsiEncoding)r^   rC   rg   r3  r   r   r,   r   r   rT   r
   r`   )rQ   r*  r2  cid_fonts       r>   as_font_resourcezFont.as_font_resourcer  s   ))dmmz.I .2-X-X-Z*K* (7#Z%8:&
?(C;'a		{O)D+,.>{+-=g-F{+-=j-I}-|A@ /
 ,-t/C/C/_/_/a4 +k":5!<0E0Ei0P#Q>*J{,C) H  $7#Z%8:&
8(<;'a		{O)D;'M)B-.XJ0G<(*;%    wG!4z"Jx$8wa		{O!<{#Z!DII;%@{#Z0B%C!
  	r=   c                   | j                         }d|v r |j                  |d         |t        d      <   d|v r't        t        |d         }t        t
        |d         }n|}d|v r_t        t
        |d         }dD ]'  }||v s|j                  ||         |t        |      <   ) |j                  |d         |t        d      <   |j                  |      }	|	||<   |	S )a  
        Some objects in a font resource need to be indirect objects. This method
        ensures that ToUnicode, FontDescriptor, FontFile, and, ultimately, the font
        resource itself, are registered with the PdfWriter instance as indirect objects.
        r   r   r   rF   r   )r8  _add_objectr   r	   r
   r   )
rQ   writertarget_resource_dictfont_resource_namefont_resourcedescendant_fontsfont_resource_dictr   keyfont_resource_refs
             r>   _add_to_writerzFont._add_to_writer  s    --/=(6<6H6HWcId6eM*\23.#K?Q1RS!%&68H8K!L!. 22"&'79KL]9^"_@ h--;A;M;MNabeNf;g'
38h AG@R@R"#45Az*;<= #..}=3D/0  r=   c           
         t        |D cg c]+  }| j                  j                  || j                  d         - c}d      S c c}w )zDSum of character widths specified in PDF font for the supplied text.ri   r5   )r   r`   rs   )rQ   textr  s      r>   get_text_widthzFont.get_text_width  sB    [_`SWT""&&tT-B-B9-MN`be
 	
`s   0Ac                   	 | j                   r7t        | j                   j                               t        fd|D              S t	        | j
                  t              r|j                  | j
                  d       yt        | j
                  j                               t        fd|D              S # t        $ r Y yw xY w)z7Check whether the font is able to encode a text string.c              3  &   K   | ]  }|v  
 y wr   r<   r   r  supported_charss     r>   r   z"Font.can_encode.<locals>.<genexpr>       Dt4?2D   r   c              3  &   K   | ]  }|v  
 y wr   r<   rI  s     r>   r   z"Font.can_encode.<locals>.<genexpr>  rK  rL  FT)	rf   setr   r   r   rd   r+   r  UnicodeEncodeError)rQ   rE  rJ  s     @r>   
can_encodezFont.can_encode  s    	!!"%d&8&8&?&?&A"BDtDDD$---DMM?;  #&dmm&:&:&<"=DtDDD! 		s   AB4 6B4 =6B4 4	C ?C N)
rv   r   rw   re   rd   rc   rx   r_   rV   None)r   r   rw   re   rx   r_   rV   rQ  )rd   rc   rf   re   rV   r+   )rx   r_   r9   r8   rn   r+   rV   rQ  )r`   r_   r9   r8   rn   r+   rV   r8   )r   r   rV   zdict[str, Any])rv   r   rV   rb   )r   r   r   r   r   r   rV   r8   )rC   r   rV   rb   )rV   z'tuple[dict[str, str], dict[str, bytes]])rV   z$tuple[list[PdfObject], StreamObject]rU   )r;  r   r<  r   r=  r   rV   r   ) )rE  r+   rV   r/   )rE  r+   rV   ro   ) rW   rX   rY   rZ   r[   r   r   rf   rg   r)   r^   r`   rl   rn   rp   staticmethodr}   r   r   r   r   r   classmethodr   r   r  r  r3  r8  rC  rF  rP  r<   r=   r>   rb   rb   e   s9   $ I""$)$$?M>?Hc&+N&KO^K',=U'VnV"K"JM4
?'
? 
? '
? '	
?
 

? 
? G G,:GLZG	G GR &% 
   d d$ 0(00 0 
	0 0 '& '&R Z
'Z
 
Z
 Z
x 2"2&2  2 	2 2h _
 _
B+8).V(T!! /! '	!
 
!B
r=   rb   N)8
__future__r   collections.abcr   dataclassesr   r   typingr   r   r	   pypdf.genericr
   r   r   r   r   r   r   r   r   _cmapr   _codecs.adobe_glyphsr   _utilsr   	constantsr   errorsr   ior   fontTools.ttLib.tables._h_e_a_dr   fontTools.ttLib.tables._p_o_s_tr   fontTools.ttLib.tables.O_S_2f_2r   _writerr   fontTools.ttLibr   r   r   r   r   r   r   r   r   r   r   r)   r]   rb   r<   r=   r>   <module>re     s    " $ ( + +
 
 
   . "    >>>"&M    ! $% !#$  $% !   $'( '( '(T $% % %
 l	 l	 l	C  Ms   4C CC