
    hJ                     X    d dl mZmZ d dlmZ d dlmZ  ed       G d d             Zy)	    )	dataclassfield)Optional)DictionaryObjectT)frozenc                       e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	e
ed<   dZe
ed	<   d
Ze
ed<   dZe
ed<   dZe
ed<   dZeed<    ed       Zee
e
e
e
f   ed<    ee      Zeeef   ed<   ededdf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namefamilyweightg     @ascent      idescentg     @
cap_heightg     @@x_heightg        italic_angle    flagsc                       y)N)g      Yr   g     @@g      @ r       J/var/www/html/aiagenthome/venv/lib/python3.12/site-packages/pypdf/_font.py<lambda>zFontDescriptor.<lambda>   s    Lkr   )default_factorybboxcharacter_widthspdf_font_dictreturnzOptional[FontDescriptor]c                 z    ddl m} |j                  dd      }|dd  |v r|j                  |dd        S  | |      S )Nr   )CORE_FONT_METRICSz	/BaseFontr
      )r   )pypdf._codecs.core_fontmetricsr!   get)clsr   r!   	font_names       r   from_font_resourcez!FontDescriptor.from_font_resource   sH    D!%%k9=	QR=--$((1277	""r   N)__name__
__module____qualname____doc__r   str__annotations__r   r   r   floatr   r   r   r   r   intr   r   tupledictr   classmethodr   r'   r   r   r   r	   r	      s     D#FCFCFEGUJHeL%E3O.3Dk.lD%ueU*
+l',T'Bd38nB#/? #D^ # #r   r	   N)dataclassesr   r   typingr   pypdf.genericr   r	   r   r   r   <module>r6      s,    (  * $# # #r   