§
    ¥”jÁ  ã                   ó   — d dl mZmZ d dlmZmZ d dlmZ d dlm	Z	 g d¢Z
dZd„ Z ed¬	¦  «         G d
„ d¦  «        ¦   «         Z ed¬	¦  «         G d„ d¦  «        ¦   «         Z G d„ d¦  «        Z G d„ d¦  «        ZdS )é    )Ú	dataclassÚfield)ÚDictÚOptional)Úgeneric)ÚBasePdfFileWriter)Ú
FontEngineÚFontEngineFactoryÚFontSubsetCollectionÚShapeResultÚABCDEFGHIJKLMNOPQRSTUVWXYZc                  óh   ‡ — dd l Š d                     ˆ fd„t          d¦  «        D ¦   «         ¦  «        S )Nr   Ú c              3   óZ   •K  — | ]%}t           ‰                     d d¦  «                 V — Œ&dS )r   é   N)ÚALPHABETÚrandint)Ú.0Ú_Úrandoms     €úi/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/pyhanko/pdf_utils/font/api.pyú	<genexpr>z)generate_subset_prefix.<locals>.<genexpr>   s6   øè è € ÐEÐE°q•8˜FŸNšN¨1¨bÑ1Ô1Ô2ÐEÐEÐEÐEÐEÐEó    é   )r   ÚjoinÚrange)r   s   @r   Úgenerate_subset_prefixr      s9   ø€ Ø€M€M€Mà�7Š7ÐEÐEÐEÐE½EÀ!¹H¼HÐEÑEÔEÑEÔEÐEr   T)Úfrozenc                   óh   — e Zd ZU eed<   	  ee¬¦  «        Zee	e         df         ed<   	 defd„Z
dS )r   Úbase_postscript_name)Údefault_factoryr	   ÚsubsetsÚreturnc                 ó8   — 	 t          ¦   «         }|| j        vr|S Œ©N)r   r"   )ÚselfÚprefixs     r   Ú
add_subsetzFontSubsetCollection.add_subset#   s)   € ð	Ý+Ñ-Ô-ˆFØ˜Tœ\Ð)Ð)Ø�ð	r   N)Ú__name__Ú
__module__Ú__qualname__ÚstrÚ__annotations__r   Údictr"   r   r   r(   © r   r   r   r      st   € € € € € € àÐÐÑðð 27°ÀtÐ1LÑ1LÔ1L€GˆT�(˜3”- Ð-Ô.ÐLÐLÑLðð˜Cð ð ð ð ð ð r   r   c                   ó6   — e Zd ZU dZeed<   	 eed<   	 eed<   dS )r   z#Result of shaping a Unicode string.Úgraphics_opsÚ	x_advanceÚ	y_advanceN)r)   r*   r+   Ú__doc__Úbytesr-   Úfloatr/   r   r   r   r   *   sF   € € € € € € à-Ð-àÐÐÑðð ÐÐÑØ/àÐÐÑØ-Ð-r   r   c                   ól   — e Zd ZdZ	 ddededefd„Zed„ ¦   «         Z	ded	e
fd
„Zd	ej        fd„Zd„ ZdS )r	   z4General interface for text shaping and font metrics.NÚwriterr    Úembedded_subsetc                 ó®   — |                      |¦  «        }|r|                     ¦   «         x| _        }n	d x| _        }| |j        |<   || _        || _        d S r%   )Úget_subset_collectionr(   Úsubset_prefixr"   r8   Ú
obj_stream)r&   r8   r    r9   r=   Úfscr'   s          r   Ú__init__zFontEngine.__init__=   sd   € ð ×*Ò*Ð+?Ñ@Ô@ˆØð 	/Ø*-¯.ª.Ñ*:Ô*:Ð:ˆDÔ  à*.Ð.ˆDÔ Ø"ˆŒ�FÑØˆŒØ$ˆŒˆˆr   c                 ó   — dS )aí  
        If ``True``, this font engine expects the line matrix to always be equal
        to the text matrix when exiting and entering :meth:`shape`.
        In other words, the current text position is where ``0 0 Td`` would
        move to.

        If ``False``, this method does not use any text positioning operators,
        and therefore uses the PDF standard's 'natural' positioning rules
        for text showing operators.

        The default is ``True`` unless overridden.
        Tr/   ©r&   s    r   Úuses_complex_positioningz#FontEngine.uses_complex_positioningM   s	   € ð ˆtr   Útxtr#   c                 ó   — t           ‚)zõRender a string to a format suitable for inclusion in a content
        stream and measure its total cursor advancement vector in em units.

        :param txt:
            String to shape.
        :return:
            A shaping result.
        ©ÚNotImplementedError)r&   rC   s     r   ÚshapezFontEngine.shape]   s
   € õ "Ð!r   c                 ó   — t           ‚)a÷  Convert a :class:`.FontEngine` to a PDF object suitable for embedding
        inside a resource dictionary.

        .. note::
            If the PDF object is an indirect reference, the caller must not
            attempt to dereference it. In other words, implementations can
            use preallocated references to delay subsetting until the last
            possible moment (this is even encouraged, see
            :meth:`prepare_write`).

        :return:
            A PDF dictionary.
        rE   rA   s    r   Úas_resourcezFontEngine.as_resourceh   s
   € õ "Ð!r   c                 ó   — dS )zß
        Called by the writer that manages this font resource before the PDF
        content is written to a stream.

        Subsetting operations and the like should be carried out as part of
        this method.
        Nr/   rA   s    r   Úprepare_writezFontEngine.prepare_writex   s	   € ð 	ˆr   r%   )r)   r*   r+   r4   r   r,   Úboolr?   ÚpropertyrB   r   rG   r   Ú	PdfObjectrI   rK   r/   r   r   r	   r	   :   s¾   € € € € € Ø>Ð>ð ð%ð %à!ð%ð "ð%ð ð	%ð %ð %ð %ð  ðð ñ „Xðð	"˜ð 	" ð 	"ð 	"ð 	"ð 	"ð"˜WÔ.ð "ð "ð "ð "ð ð ð ð ð r   r	   c                   ó"   — e Zd Z	 ddddefd„ZdS )r
   Nr8   r   r#   c                 ó   — t           ‚r%   rE   )r&   r8   r=   s      r   Úcreate_font_enginez$FontEngineFactory.create_font_engine„   s
   € õ "Ð!r   r%   )r)   r*   r+   r	   rQ   r/   r   r   r
   r
   ƒ   s@   € € € € € à6:ð"ð "Ø)ð"à	ð"ð "ð "ð "ð "ð "r   r
   N)Údataclassesr   r   Útypingr   r   Úpyhanko.pdf_utilsr   Úpyhanko.pdf_utils.writerr   Ú__all__r   r   r   r   r	   r
   r/   r   r   ú<module>rW      sj  ðØ (Ð (Ð (Ð (Ð (Ð (Ð (Ð (Ø !Ð !Ð !Ð !Ð !Ð !Ð !Ð !à %Ð %Ð %Ð %Ð %Ð %Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6ðð ð €ð (€ðFð Fð Fð €�$ÐÑÔðð ð ð ð ñ ô ñ Ôðð$ €�$ÐÑÔð.ð .ð .ð .ð .ñ .ô .ñ Ôð.ðFð Fð Fð Fð Fñ Fô Fð FðR"ð "ð "ð "ð "ñ "ô "ð "ð "ð "r   