Ë
    \Rði%5  ã                  óŠ   — d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 ddl
mZmZ erddlmZ ddlmZ dd	l
mZ  G d
„ de«      Zy)zFont-related proxy objects.é    )Úannotations)ÚTYPE_CHECKINGÚAny)ÚColorFormat)ÚWD_UNDERLINE)ÚElementProxyÚEmu)ÚWD_COLOR_INDEX)ÚCT_R)ÚLengthc                  óö  ‡ — e Zd ZdZd:d;ˆ fd„Zed<d„«       Zej                  d=d„«       Zed<d„«       Zej                  d=d„«       Zed„ «       Z	ed<d„«       Z
e
j                  d=d	„«       Z
ed<d
„«       Zej                  d=d„«       Zed<d„«       Zej                  d=d„«       Zed<d„«       Zej                  d=d„«       Zed<d„«       Zej                  d=d„«       Zed<d„«       Zej                  d=d„«       Zed>d„«       Zej                  d?d„«       Zed<d„«       Zej                  d=d„«       Zed<d„«       Zej                  d=d„«       Zed<d„«       Zej                  d=d„«       Zed@d„«       Zej                  dAd„«       Zed<d„«       Zej                  d=d„«       Zed<d „«       Zej                  d=d!„«       Zed<d"„«       Zej                  d=d#„«       Zed<d$„«       Zej                  d=d%„«       ZedBd&„«       Zej                  dCd'„«       Zed<d(„«       Zej                  d=d)„«       Zed<d*„«       Zej                  d=d+„«       Zed<d,„«       Zej                  d=d-„«       Zed<d.„«       Zej                  d=d/„«       Zed<d0„«       Zej                  d=d1„«       Zed<d2„«       Zej                  d=d3„«       ZedDd4„«       Z e j                  dEd5„«       Z ed<d6„«       Z!e!j                  d=d7„«       Z!dFd8„Z"dGd9„Z#ˆ xZ$S )HÚFontz’Proxy object for parent of a `<w:rPr>` element and providing access to
    character properties such as font name, font size, bold, and subscript.c                óB   •— t         ‰| �  ||«       || _        || _        y ©N)ÚsuperÚ__init__Ú_elementÚ_r)ÚselfÚrÚparentÚ	__class__s      €úI/var/www/html/Extract/venv/lib/python3.12/site-packages/docx/text/font.pyr   zFont.__init__   s    ø€ Ü‰Ñ˜˜FÔ#ØˆŒØˆ�ó    c                ó$   — | j                  d«      S )zTRead/write.

        Causes text in this font to appear in capital letters.
        Úcaps©Ú_get_bool_prop©r   s    r   Úall_capszFont.all_caps   s   € ð ×"Ñ" 6Ó*Ð*r   c                ó(   — | j                  d|«       y )Nr   ©Ú_set_bool_prop©r   Úvalues     r   r    zFont.all_caps"   s   € à×Ñ˜F EÕ*r   c                ó$   — | j                  d«      S )zIRead/write.

        Causes text in this font to appear in bold.
        Úbr   r   s    r   Úboldz	Font.bold&   s   € ð ×"Ñ" 3Ó'Ð'r   c                ó(   — | j                  d|«       y )Nr'   r"   r$   s     r   r(   z	Font.bold.   ó   € à×Ñ˜C Õ'r   c                ó,   — t        | j                  «      S )z[A |ColorFormat| object providing a way to get and set the text color for this
        font.)r   r   r   s    r   Úcolorz
Font.color2   s   € ô ˜4Ÿ=™=Ó)Ð)r   c                ó$   — | j                  d«      S )z§Read/write tri-state value.

        When |True|, causes the characters in the run to be treated as complex script
        regardless of their Unicode values.
        Úcsr   r   s    r   Úcomplex_scriptzFont.complex_script8   s   € ð ×"Ñ" 4Ó(Ð(r   c                ó(   — | j                  d|«       y )Nr.   r"   r$   s     r   r/   zFont.complex_scriptA   s   € à×Ñ˜D %Õ(r   c                ó$   — | j                  d«      S )z”Read/write tri-state value.

        When |True|, causes the complex script characters in the run to be displayed in
        bold typeface.
        ÚbCsr   r   s    r   Úcs_boldzFont.cs_boldE   ó   € ð ×"Ñ" 5Ó)Ð)r   c                ó(   — | j                  d|«       y )Nr2   r"   r$   s     r   r3   zFont.cs_boldN   ó   € à×Ñ˜E 5Õ)r   c                ó$   — | j                  d«      S )z–Read/write tri-state value.

        When |True|, causes the complex script characters in the run to be displayed in
        italic typeface.
        ÚiCsr   r   s    r   Ú	cs_italiczFont.cs_italicR   r4   r   c                ó(   — | j                  d|«       y )Nr8   r"   r$   s     r   r9   zFont.cs_italic[   r6   r   c                ó$   — | j                  d«      S )zzRead/write tri-state value.

        When |True|, causes the text in the run to appear with double strikethrough.
        Údstriker   r   s    r   Údouble_strikezFont.double_strike_   ó   € ð ×"Ñ" 9Ó-Ð-r   c                ó(   — | j                  d|«       y )Nr<   r"   r$   s     r   r=   zFont.double_strikeg   ó   € à×Ñ˜I uÕ-r   c                ó$   — | j                  d«      S )zŒRead/write tri-state value.

        When |True|, causes the text in the run to appear as if raised off the page in
        relief.
        Úembossr   r   s    r   rB   zFont.embossk   ó   € ð ×"Ñ" 8Ó,Ð,r   c                ó(   — | j                  d|«       y )NrB   r"   r$   s     r   rB   zFont.embosst   ó   € à×Ñ˜H eÕ,r   c                ó$   — | j                  d«      S )z´Read/write tri-state value.

        When |True|, causes the text in the run to be hidden from display, unless
        applications settings force hidden text to be shown.
        Úvanishr   r   s    r   ÚhiddenzFont.hiddenx   rC   r   c                ó(   — | j                  d|«       y )NrG   r"   r$   s     r   rH   zFont.hidden�   rE   r   c                óL   — | j                   j                  }|€y|j                  S )z:Color of highlighing applied or |None| if not highlighted.N)r   ÚrPrÚhighlight_val©r   rK   s     r   Úhighlight_colorzFont.highlight_color…   s'   € ð �m‰m×ÑˆØˆ;ØØ× Ñ Ð r   c                óF   — | j                   j                  «       }||_        y r   )r   Úget_or_add_rPrrL   ©r   r%   rK   s      r   rN   zFont.highlight_color�   s   € à�m‰m×*Ñ*Ó,ˆØ!ˆÕr   c                ó$   — | j                  d«      S )z¿Read/write tri-state value.

        When |True|, causes the text of the run to appear in italics. |None| indicates
        the effective value is inherited from the style hierarchy.
        Úir   r   s    r   ÚitaliczFont.italic’   s   € ð ×"Ñ" 3Ó'Ð'r   c                ó(   — | j                  d|«       y )NrS   r"   r$   s     r   rT   zFont.italic›   r*   r   c                ó$   — | j                  d«      S )z|Read/write tri-state value.

        When |True|, causes the text in the run to appear as if pressed into the page.
        Úimprintr   r   s    r   rW   zFont.imprintŸ   r>   r   c                ó(   — | j                  d|«       y )NrW   r"   r$   s     r   rW   zFont.imprint§   r@   r   c                ó$   — | j                  d«      S )z Read/write tri-state value.

        When |True|, specifies this run contains WML that should be handled as though it
        was Office Open XML Math.
        ÚoMathr   r   s    r   Úmathz	Font.math«   s   € ð ×"Ñ" 7Ó+Ð+r   c                ó(   — | j                  d|«       y )NrZ   r"   r$   s     r   r[   z	Font.math´   s   € à×Ñ˜G UÕ+r   c                óL   — | j                   j                  }|€y|j                  S )z×The typeface name for this |Font|.

        Causes the text it controls to appear in the named font, if a matching font is
        found. |None| indicates the typeface is inherited from the style hierarchy.
        N)r   rK   ÚrFonts_asciirM   s     r   Únamez	Font.name¸   s'   € ð �m‰m×ÑˆØˆ;ØØ×ÑÐr   c                óT   — | j                   j                  «       }||_        ||_        y r   )r   rP   r^   ÚrFonts_hAnsirQ   s      r   r_   z	Font.nameÄ   s$   € à�m‰m×*Ñ*Ó,ˆØ ˆÔØ ˆÕr   c                ó$   — | j                  d«      S )z¾Read/write tri-state value.

        When |True|, specifies that the contents of this run should not report any
        errors when the document is scanned for spelling and grammar.
        ÚnoProofr   r   s    r   Úno_proofzFont.no_proofÊ   s   € ð ×"Ñ" 9Ó-Ð-r   c                ó(   — | j                  d|«       y )Nrc   r"   r$   s     r   rd   zFont.no_proofÓ   r@   r   c                ó$   — | j                  d«      S )zòRead/write tri-state value.

        When |True| causes the characters in the run to appear as if they have an
        outline, by drawing a one pixel wide border around the inside and outside
        borders of each character glyph.
        Úoutliner   r   s    r   rg   zFont.outline×   s   € ð ×"Ñ" 9Ó-Ð-r   c                ó(   — | j                  d|«       y )Nrg   r"   r$   s     r   rg   zFont.outlineá   r@   r   c                ó$   — | j                  d«      S )z{Read/write tri-state value.

        When |True| causes the text in the run to have right-to-left characteristics.
        Úrtlr   r   s    r   rj   zFont.rtlå   s   € ð ×"Ñ" 5Ó)Ð)r   c                ó(   — | j                  d|«       y )Nrj   r"   r$   s     r   rj   zFont.rtlí   r6   r   c                ó$   — | j                  d«      S )z‰Read/write tri-state value.

        When |True| causes the text in the run to appear as if each character has a
        shadow.
        Úshadowr   r   s    r   rm   zFont.shadowñ   rC   r   c                ó(   — | j                  d|«       y )Nrm   r"   r$   s     r   rm   zFont.shadowú   rE   r   c                óL   — | j                   j                  }|€y|j                  S )aä  Font height in English Metric Units (EMU).

        |None| indicates the font size should be inherited from the style hierarchy.
        |Length| is a subclass of |int| having properties for convenient conversion into
        points or other length units. The :class:`docx.shared.Pt` class allows
        convenient specification of point values::

            >>> font.size = Pt(24)
            >>> font.size
            304800
            >>> font.size.pt
            24.0

        N)r   rK   Úsz_valrM   s     r   Úsizez	Font.sizeþ   s%   € ð  �m‰m×ÑˆØˆ;ØØ�z‰zÐr   c                ól   — | j                   j                  «       }|€d |_        y t        |«      |_        y r   )r   rP   r	   rp   )r   ÚemurK   s      r   rq   z	Font.size  s)   € à�m‰m×*Ñ*Ó,ˆØ ˜[�Tˆ�
¬c°#«hˆ�
r   c                ó$   — | j                  d«      S )zÆRead/write tri-state value.

        When |True| causes the lowercase characters in the run to appear as capital
        letters two points smaller than the font size specified for the run.
        Ú	smallCapsr   r   s    r   Ú
small_capszFont.small_caps  ó   € ð ×"Ñ" ;Ó/Ð/r   c                ó(   — | j                  d|«       y )Nru   r"   r$   s     r   rv   zFont.small_caps!  ó   € à×Ñ˜K¨Õ/r   c                ó$   — | j                  d«      S )zÑRead/write tri-state value.

        When |True| causes the run to use the document grid characters per line settings
        defined in the docGrid element when laying out the characters in this run.
        Ú
snapToGridr   r   s    r   Úsnap_to_gridzFont.snap_to_grid%  s   € ð ×"Ñ" <Ó0Ð0r   c                ó(   — | j                  d|«       y )Nr{   r"   r$   s     r   r|   zFont.snap_to_grid.  ó   € à×Ñ˜L¨%Õ0r   c                ó$   — | j                  d«      S )u\  Read/write tri-state value.

        When |True|, specifies that the given run shall always behave as if it is
        hidden, even when hidden text is being displayed in the current document. The
        property has a very narrow, specialized use related to the table of contents.
        Consult the spec (Â§17.3.2.36) for more details.
        Ú
specVanishr   r   s    r   Úspec_vanishzFont.spec_vanish2  s   € ð ×"Ñ" <Ó0Ð0r   c                ó(   — | j                  d|«       y )Nr€   r"   r$   s     r   r�   zFont.spec_vanish=  r~   r   c                ó$   — | j                  d«      S )z¤Read/write tri-state value.

        When |True| causes the text in the run to appear with a single horizontal line
        through the center of the line.
        Ústriker   r   s    r   r„   zFont.strikeA  rC   r   c                ó(   — | j                  d|«       y )Nr„   r"   r$   s     r   r„   zFont.strikeJ  rE   r   c                óL   — | j                   j                  }|€y|j                  S )z½Boolean indicating whether the characters in this |Font| appear as subscript.

        |None| indicates the subscript/subscript value is inherited from the style
        hierarchy.
        N)r   rK   Ú	subscriptrM   s     r   r‡   zFont.subscriptN  s%   € ð �m‰m×ÑˆØˆ;ØØ�}‰}Ðr   c                óF   — | j                   j                  «       }||_        y r   )r   rP   r‡   rQ   s      r   r‡   zFont.subscriptZ  s   € à�m‰m×*Ñ*Ó,ˆØˆ�r   c                óL   — | j                   j                  }|€y|j                  S )zÉBoolean indicating whether the characters in this |Font| appear as
        superscript.

        |None| indicates the subscript/superscript value is inherited from the style
        hierarchy.
        N)r   rK   ÚsuperscriptrM   s     r   rŠ   zFont.superscript_  s%   € ð �m‰m×ÑˆØˆ;ØØ�‰Ðr   c                óF   — | j                   j                  «       }||_        y r   )r   rP   rŠ   rQ   s      r   rŠ   zFont.superscriptl  s   € à�m‰m×*Ñ*Ó,ˆØˆ�r   c                óÎ   — | j                   j                  }|€y|j                  }|t        j                  k(  rdS |t        j
                  k(  rdS |t        j                  k(  rdS |S )a©  The underline style for this |Font|.

        The value is one of |None|, |True|, |False|, or a member of :ref:`WdUnderline`.

        |None| indicates the font inherits its underline value from the style hierarchy.
        |False| indicates no underline. |True| indicates single underline. The values
        from :ref:`WdUnderline` are used to specify other outline styles such as double,
        wavy, and dotted.
        NTF)r   rK   Úu_valr   Ú	INHERITEDÚSINGLEÚNONE)r   rK   Úvals      r   Ú	underlinezFont.underlineq  s|   € ð �m‰m×ÑˆØˆ;ØØ�i‰iˆð ”l×,Ñ,Ò,ð ð	
ð ”l×)Ñ)Ò)ð ð	
ð ”l×'Ñ'Ò'ð ð	
ð ð	
r   c                óš   — | j                   j                  «       }|du rt        j                  n|du rt        j                  n|}||_        y )NTF)r   rP   r   r�   r�   r�   )r   r%   rK   r‘   s       r   r’   zFont.underlineŠ  sE   € à�m‰m×*Ñ*Ó,ˆð
 $)¨D¡=ŒL×ÒÈ5ÐTYÉ>´l×6GÒ6GÐ_dð 	ð ˆ�	r   c                ó$   — | j                  d«      S )z«Read/write tri-state value.

        When |True|, specifies that the contents of this run shall be hidden when the
        document is displayed in web page view.
        Ú	webHiddenr   r   s    r   Ú
web_hiddenzFont.web_hidden•  rw   r   c                ó(   — | j                  d|«       y )Nr•   r"   r$   s     r   r–   zFont.web_hiddenž  ry   r   c                óV   — | j                   j                  }|€y|j                  |«      S )z;Return the value of boolean child of `w:rPr` having `name`.N)r   rK   Ú_get_bool_val)r   r_   rK   s      r   r   zFont._get_bool_prop¢  s*   € à�m‰m×ÑˆØˆ;ØØ× Ñ  Ó&Ð&r   c                ó\   — | j                   j                  «       }|j                  ||«       y)z6Assign `value` to the boolean child `name` of `w:rPr`.N)r   rP   Ú_set_bool_val)r   r_   r%   rK   s       r   r#   zFont._set_bool_prop©  s$   € à�m‰m×*Ñ*Ó,ˆØ×Ñ˜$ Õ&r   r   )r   r   r   z
Any | None)Úreturnúbool | None)r%   r�   rœ   ÚNone)rœ   úWD_COLOR_INDEX | None)r%   rŸ   )rœ   ú
str | None)r%   r    rœ   rž   )rœ   zLength | None)rs   zint | Length | Nonerœ   rž   )rœ   úbool | WD_UNDERLINE | None)r%   r¡   rœ   rž   )r_   Ústrrœ   r�   )r_   r¢   r%   r�   )%Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr    Úsetterr(   r,   r/   r3   r9   r=   rB   rH   rN   rT   rW   r[   r_   rd   rg   rj   rm   rq   rv   r|   r�   r„   r‡   rŠ   r’   r–   r   r#   Ú__classcell__)r   s   @r   r   r      sº  ø„ ñOöð
 ò+ó ð+ð ‡_�_ò+ó ð+ð ò(ó ð(ð 
‡[�[ò(ó ð(ð ñ*ó ð*ð
 ò)ó ð)ð ×Ñò)ó ð)ð ò*ó ð*ð ‡^�^ò*ó ð*ð ò*ó ð*ð ×Ñò*ó ð*ð ò.ó ð.ð ×Ñò.ó ð.ð ò-ó ð-ð ‡]�]ò-ó ð-ð ò-ó ð-ð ‡]�]ò-ó ð-ð ò!ó ð!ð ×Ñò"ó ð"ð ò(ó ð(ð ‡]�]ò(ó ð(ð ò.ó ð.ð ‡^�^ò.ó ð.ð ò,ó ð,ð 
‡[�[ò,ó ð,ð ò	 ó ð	 ð 
‡[�[ò!ó ð!ð
 ò.ó ð.ð ‡_�_ò.ó ð.ð ò.ó ð.ð ‡^�^ò.ó ð.ð ò*ó ð*ð 	‡Z�Zò*ó ð*ð ò-ó ð-ð ‡]�]ò-ó ð-ð òó ðð( 
‡[�[ò7ó ð7ð ò0ó ð0ð ×Ñò0ó ð0ð ò1ó ð1ð ×Ñò1ó ð1ð ò1ó ð1ð ×Ñò1ó ð1ð ò-ó ð-ð ‡]�]ò-ó ð-ð ò	ó ð	ð ×Ñòó ðð ò
ó ð
ð ×Ñò ó ð ð ò
ó ð
ð0 ×Ñòó ðð ò0ó ð0ð ×Ñò0ó ð0ó'÷'r   r   N)r¦   Ú
__future__r   Útypingr   r   Údocx.dml.colorr   Údocx.enum.textr   Údocx.sharedr   r	   r
   Údocx.oxml.text.runr   r   r   © r   r   ú<module>r±      s1   ðÙ !å "ç %å &Ý 'ß )áÝ-Ý'Ý"ô['ˆ<õ ['r   