
    ,hU5                        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FontzProxy 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      P/var/www/html/Resume-Scraper/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    FE*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 )zRead/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 )zRead/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       E5)r   c                $    | j                  d      S )zRead/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       Iu-r   c                $    | j                  d      S )zRead/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       He,r   c                $    | j                  d      S )zRead/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'     mm;   r   c                F    | j                   j                         }||_        y r   )r   get_or_add_rPrrL   r   r%   rK   s      r   rN   zFont.highlight_color   s    mm**,!r   c                $    | j                  d      S )zRead/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 )zRead/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    GU+r   c                L    | j                   j                  }|y|j                  S )zThe 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'     mm;r   c                T    | j                   j                         }||_        ||_        y r   )r   rP   r^   rFonts_hAnsirQ   s      r   r_   z	Font.name   s$    mm**,  r   c                $    | j                  d      S )zRead/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 )zRead/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 )zRead/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%      mm;zzr   c                l    | j                   j                         }|d |_        y t        |      |_        y r   )r   rP   r	   rp   )r   emurK   s      r   rq   z	Font.size  s)    mm**, [T
c#h
r   c                $    | j                  d      S )zRead/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 )zRead/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 )zRead/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 )zBoolean 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%     mm;}}r   c                F    | j                   j                         }||_        y r   )r   rP   r   rQ   s      r   r   zFont.subscriptZ  s    mm**,r   c                L    | j                   j                  }|y|j                  S )zBoolean 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%     mm;r   c                F    | j                   j                         }||_        y r   )r   rP   r   rQ   s      r   r   zFont.superscriptl  s    mm**,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|     mm;ii 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  sM    mm**, }  ~ "" 	 	r   c                $    | j                  d      S )zRead/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*    mm;  &&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$    mm**,$&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
 + + __+ + ( ( 
[[( ( * *
 ) ) ) ) * * ^^* * * * * * . . . . - - ]]- - - - ]]- - ! ! " " ( ( ]]( ( . . ^^. . , , 
[[, , 	  	  
[[! !
 . . __. . . . ^^. . * * 	ZZ* * - - ]]- -  ( 
[[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   