+
    TiB7                         ^ RI Ht ^ RIHtHt ^ RIHtHtHtH	t	 ^ RI
HtHtHt ^RIHt ^RIHt ^RIHt ]! RR	7       ! R
 R4      4       t] ! R R4      4       tR# )    )Sequence)	dataclassfield)AnyOptionalUnioncast)ArrayObjectDictionaryObjectIndirectObject)get_encodingadobe_glyphs)logger_warningT)frozenc                     a  ] tR t^t o RtRtRtRtRtRt	Rt
RtRt^ t]! R R7      t]! R	 R7      t]V 3R
 lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]RV 3R lR ll4       tV 3R ltRtV tR# )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.
Unknowng     @g     @g     @@        c                     R# )g      Y@)g      Y      ig     @@g      @ r       V/home/kuhnn/.local/share/uv/tools/nano-pdf/lib/python3.14/site-packages/pypdf/_font.py<lambda>FontDescriptor.<lambda>    s    Lkr   default_factoryc                 
    R R/# )default  r   r   r   r   r   r   "   s
    iQTEUr   c                X   < V ^8  d   QhRS[ S[S[3,          RS[RS[ S[S[3,          /# )   font_kwargsfont_descriptor_objreturn)dictstrr   r   )format__classdict__s   "r   __annotate__FontDescriptor.__annotate__%   s8      DcN Qa fjknpsksft r   c                   \        V\        4      '       d   VP                  4       MTpR F  w  r4W29   g   K  W#,          W&   K  	  RV 9   d<   \        \	        \
        V R,          4      4      p\        V4      ^8X  g   Q V4       hWPR&   V # )	/FontNamebbox)
)r.   name)z/FontFamilyfamily)z/FontWeightweight)z/Ascentascent)z/Descentdescent)z
/CapHeight
cap_height)z/XHeightx_height)z/ItalicAngleitalic_angle)z/Flagsflags)z	/FontBBoxr/   )
isinstancer   
get_objecttuplemapfloatlen)r$   r%   font_descriptor_dict
source_key
target_key
bbox_tuples   &&    r   _parse_font_descriptor%FontDescriptor._parse_font_descriptor$   s     -~>>  **,$ 	
'
"J 1*>*J''
 [ s5+f*=>?Jz?a'33'",r   c          
         < V ^8  d   QhRS[ RS[S[S[3,          RS[S[S[S[S[3,          3,          RS[S[S[3,          RR/# )r#   pdf_font_dictchar_mapencodingcurrent_widthsr&   N)r   r'   r   r   r(   int)r)   r*   s   "r   r+   r,   A   s]     6 6'6sCx.6 T#s(^+,6 S#X	6
 
6r   c                   \        \        V R,          4      pV P                  R^ 4      p\        V\        4      '       gW   TP                  \        V4       UUu/ uF-  w  rgVP                  We,           \        We,           4      4      VbK/  	  upp4       R# \        V4       F^  w  rgWe,           p\        V.4      P                  VR4      p	VP                  V	4      p
V
'       d   \        V4      W:&   KQ  \        V4      W9&   K`  	  R# u uppi )zcParses a TrueType or Type1 font's /Widths array from a font dictionary and updates character widths/Widthsz
/FirstCharNsurrogatepass)r	   r
   getr9   r(   update	enumeratechrbytesdecoderJ   )rF   rG   rH   rI   widths_array
first_charidxwidth	char_coderaw_charunicode_chars   &&&&       r   _collect_tt_t1_character_widths.FontDescriptor._collect_tt_t1_character_widths@   s     Ky)AB"&&|Q7
(C((!!"+L"9#"9JC S-s33C/DEuL"9#   $L1JC(Ii[)00?KH#<<1L/25z,+.u:( 2#s   3D
c                \   < V ^8  d   QhRS[ RS[S[S[3,          RS[S[S[3,          RR/# )r#   d_fontrG   rI   r&   N)r   r'   r   r(   rJ   )r)   r*   s   "r   r+   r,   a   sF     F F F,0cNFLPQTVYQYNF	Fr   c                   VP                  4        UUu/ uF)  w  r4\        V\        4      '       g   K  \        V4      VbK+  	  ppp^ pV P	                  R. 4      p\        V4       EF  w  rV	P                  4       p	V'       d   V^,          pK)  \        V	\        \        34      '       g   \        RV	 R2\        4       K[  Wx^,           ,          P                  4       p
\        V
\        4      '       d}   YrTP                  \        \        \        \        V4      \        \        V4      \!        V4      ,           ^4      V4       UUu/ uF  w  rW9   g   K  W],          VbK  	  upp4       ^pEK
  \        V
\        \        34      '       d   \        Wx^,           ,          P                  4       \        \        34      '       d   T	T
Wx^,           ,          P                  4       prTP                  \        \        \        V4      \        \        V^,           4      ^4       Uu/ uF  pW9   g   K  W],          VbK  	  up4       ^pEK  \        RV	 R2\        4       EK  	  R# u uppi u uppi u upi )zRParses the /W array from a DescendantFont dictionary and updates character widths.z/Wz&Expected numeric value for width, got z. Ignoring it.z-Invalid font width definition. Last element: .N)itemsr9   r(   ordrN   rP   r:   rJ   r=   r   __name__r   rO   zipranger	   r>   )r^   rG   rI   _target
_surrogateord_map
skip_count_wrV   w_entryw_next_entry	start_idx
width_list_cidx_widthstop_idxconst_widths   &&&              r   _collect_cid_character_widths,FontDescriptor._collect_cid_character_widths`   s:    (0~~'7
'7#'3' %CL*$'7 	 
 
ZZb!%bMLC((*Ga
gU|44 !GyP^_aijAg;113L,11(/:%% .1! $S) 4 $S) 4s: F !
 '..ME !+ /.. 
L3,77J7&&(3,= =  QwK**, &18
 %% &+ i0$sHqL2I1&&E !+	 43& 
 CG9ANg *
60s"   I I 
I&I&I,
,I,
c                :   < V ^8  d   QhRS[ S[S[3,          RR/# )r#   rI   r&   N)r'   r(   rJ   )r)   r*   s   "r   r+   r,      s'     d d4S> dd dr   c                D   V '       g   R V R&   R# RV 9   d   R# RV 9   d-   V R,          ^ 8w  d   \        ^V R,          ,          4      V R&   R# V P                  4        Uu. uF  q^ 8  g   K  VNK  	  ppV'       d   \        V4      \        V4      ,          MR V R&   R# u upi )r!   r    N )rJ   valuessumr>   )rI   wvalid_widthss   &  r   _add_default_width!FontDescriptor._add_default_width   s    (+N9%&. ^C%8A%=(+As0C,C(DN9% $2#8#8#:D#:a!e#:DNZC$5\9J$J`cy! Es   B+BNc          	         < V ^8  d   QhRS[ RS[S[S[S[S[S[3,          3,          ,          RS[S[S[S[3,          ,          RR/# )r#   rF   rH   rG   r&   r   )r   r   r   r(   r'   rJ   r   )r)   r*   s   "r   r+   r,      sW     =" ="'=" 5d38n!456=" 4S>*	="
 
="r   c           	        ^ RI Hp VP                  RR4      P                  R4      pR/ /pVP                  R4      R9   Ed(   RV9   d8   V'       d	   V'       g   \	        V4      w  r#V P                  WW&R,          4       M+WT9   d&   WE,          pV P                  VP                  4       V# RV9   d   VP                  R\        4       4      P                  4       p\        \        V4      p	R	V	9   d"   V	R	,          P                  4       VR,          R
&   V P                  WaP                  R\        4       4      4      pR
VR,          9  d   V P                  VR,          4       V ! R/ VB # V'       d	   V'       g   \	        V4      w  r#\        \        \        VR,          4      4       F  w  r\        \        VP                  4       4      pV\        \        VR,          4      V
&   V P                  WVR,          4       RV9   d#   VR,          P                  4       VR,          R
&   MV P                  VR,          4       V P                  WkP                  R\        4       4      4      pK  	  V ! R/ VB # )r   )CORE_FONT_METRICS	/BaseFontr   /character_widths/SubtyperL   z/FontDescriptorz/MissingWidthr    z/DescendantFontsz/DW)z/Type1z/MMType1z	/TrueTypez/Type3r   )pypdf._codecs.core_fontmetricsr   rN   removeprefixr   r[   r|   r   r   r:   r	   rC   rP   r
   rs   )clsrF   rH   rG   r   	font_namer$   font_descriptorfont_descriptor_resourcer%   
d_font_idxr^   s   &&&&        r   from_font_resource!FontDescriptor.from_font_resource   sD    	E!%%k9=JJ3O	'92&> Z(,YYM) X)5m)D&H33!XCU7V /"3">&&'G'GH&& M1+8+<+<=NP`Pb+c+n+n+p(&*+;=U&V#"&99ATUdAeApApArK 23I>!88!2!23DFVFX!Y ,> ??&&{3E'FG%%%
 X!-m!<H"+m,>?@#
J *F,=,=,?@FOUDm,>?@L--+.@"A =CE]=U=U=W./	:&&{3E'FG44ZZ(9;K;MNK#
  ![!!r   c                   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R	&   S[S[S[S[S[3,          ;R
&   S[S[ S[3,          ;R&   # )r#   r0   r1   r2   r3   r4   r5   r6   r7   r8   r/   r   )r(   r=   rJ   r;   r'   )r)   r*   s   "r   r+   r,      s                 ! " # $ % & O' ( ueU*
+l) , 38nV- r   r   r   )NN)rc   
__module____qualname____firstlineno____doc__r0   r1   r2   r3   r4   r5   r6   r7   r8   r   r/   r   staticmethodrC   r[   rs   r|   classmethodr   __annotate_func____static_attributes____classdictcell__r*   s   @r   r   r      s      DFFFGJHLE.3Dk.lD',=U'V 6 6 6> F FP d d" =" =" ="a  r   r   c                      a  ] tR t^t o Rt]! ]R7      tRt]! ]	R7      t
]! ]R7      t^tRt]V 3R lR l4       tRV 3R lR lltV 3R	 ltR
tV tR# )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   Tc                $   < V ^8  d   QhRS[ RR/# )r#   rF   r&   r   )r   )r)   r*   s   "r   r+   Font.__annotate__  s     '
 '
''
 
'
r   c                   VP                  R R4      P                  R4      pVP                  RR4      P                  R4      p\        V4      w  rERpVR8X  dn   RV9  dg   \        ;QJ d5    R VP                  R4      ;'       g    .  4       F  '       d   K   R	M*	  RM&! R VP                  R4      ;'       g    .  4       4      pV'       d   \        P                  WV4      pM
\	        4       pVP                  pVP                  P                  R
4      p	V	'       d   V	^ 8X  d   VP                  R,          ^,          p	V ! VVVVVVV	VR7      # )r   r   r   r   TType3z
/ToUnicodec              3   4   "   T F  pV\         9   x  K  	  R # 5i)Nr   ).0cnames   & r   	<genexpr>*Font.from_font_resource.<locals>.<genexpr>)  s       BE %Bs   z
/CharProcsFrw   r    )r0   sub_typerH   r   character_mapr   space_widthinterpretable)rN   r   r   allr   r   r   )
r   rF   r0   r   rH   r   r   r   r   r   s
   &&        r   r   Font.from_font_resource  s?      i8EEcJ $$Z;HHM".}"= w<}#DC  *..|<BBB CCC  *..|<BBB  M
 ,??YfgO,.O*;;%66::3?kQ.)::9EJK+'-#'	
 		
r   c                &   < V ^8  d   QhRS[ RS[/# )r#   textr&   )r(   r=   )r)   r*   s   "r   r+   r   C  s     
 
s 
E 
r   c           
         \        V Uu. uF.  q P                  P                  W P                  R,          4      NK0  	  upR4      # u upi )zDSum of character widths specified in PDF font for the supplied text.r    r   )ry   r   rN   )selfr   chars   && r   
text_widthFont.text_widthC  sD    [_`[_SW""&&t-B-B9-MN[_`be
 	
`s   4Ac                   < V ^8  d   Qh/ S[ ;R&   S[S[ S[S[S[ 3,          3,          ;R&   S[S[S[3,          ;R&   S[ ;R&   S[;R&   S[S[ S[3,          ;R&   S[S[S[3,          ;R&   S[;R&   # )	r#   r0   rH   r   r   r   r   r   r   )r(   r   r'   rJ   r   r   r=   bool)r)   r*   s   "r   r+   r      s     ( I) * Cc3h'((+ , S>?- . / 0 $K1 2 38nB3 4 ucz"(5 6 7 r   r   N) )rc   r   r   r   r   r   r'   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r      s_     ( %*$$?MH&+N&KO',T'B%(KM'
 '
R
 
O  r   r   N)collections.abcr   dataclassesr   r   typingr   r   r   r	   pypdf.genericr
   r   r   _cmapr   _codecs.adobe_glyphsr   _utilsr   r   r   r   r   r   <module>r      s^    $ ( - - G G  . " $l" l" l"^ J
 J
 J
r   