
    hU5                        S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	  SSK
JrJr  \(       a  SSKJr  SSKJr  SS	K
Jr   " S
 S\5      rg)zFont-related proxy objects.    )annotations)TYPE_CHECKINGAny)ColorFormat)WD_UNDERLINE)ElementProxyEmu)WD_COLOR_INDEX)CT_R)Lengthc                  p  ^  \ rS rSrSrS<S=U 4S jjjr\S>S j5       r\R                  S?S j5       r\S>S j5       r	\	R                  S?S j5       r	\S 5       r
\S>S	 j5       r\R                  S?S
 j5       r\S>S j5       r\R                  S?S j5       r\S>S j5       r\R                  S?S j5       r\S>S j5       r\R                  S?S j5       r\S>S j5       r\R                  S?S j5       r\S>S j5       r\R                  S?S j5       r\S@S j5       r\R                  SAS j5       r\S>S j5       r\R                  S?S j5       r\S>S j5       r\R                  S?S j5       r\S>S j5       r\R                  S?S j5       r\SBS j5       r\R                  SCS j5       r\S>S j5       r\R                  S?S  j5       r\S>S! j5       r\R                  S?S" j5       r\S>S# j5       r\R                  S?S$ j5       r\S>S% j5       r\R                  S?S& j5       r\SDS' j5       r\R                  SES( j5       r\S>S) j5       r\R                  S?S* j5       r\S>S+ j5       r\R                  S?S, j5       r\S>S- j5       r\R                  S?S. j5       r\S>S/ j5       r\R                  S?S0 j5       r\S>S1 j5       r\R                  S?S2 j5       r\S>S3 j5       r \ R                  S?S4 j5       r \SFS5 j5       r!\!R                  SGS6 j5       r!\S>S7 j5       r"\"R                  S?S8 j5       r"SHS9 jr#SIS: jr$S;r%U =r&$ )JFont   zProxy object for parent of a `<w:rPr>` element and providing access to
character properties such as font name, font size, bold, and subscript.c                <   > [         TU ]  X5        Xl        Xl        g N)super__init___element_r)selfrparent	__class__s      @/var/www/html/env/lib/python3.13/site-packages/docx/text/font.pyr   Font.__init__   s    #    c                $    U R                  S5      $ )zDRead/write.

Causes text in this font to appear in capital letters.
caps_get_bool_propr   s    r   all_capsFont.all_caps   s     ""6**r   c                (    U R                  SU5        g )Nr   _set_bool_propr   values     r   r"   r#   "   s    FE*r   c                $    U R                  S5      $ )z9Read/write.

Causes text in this font to appear in bold.
br   r!   s    r   bold	Font.bold&   s     ""3''r   c                (    U R                  SU5        g )Nr*   r%   r'   s     r   r+   r,   .       C'r   c                ,    [        U R                  5      $ )zSA |ColorFormat| object providing a way to get and set the text color for this
font.)r   r   r!   s    r   color
Font.color2   s     4==))r   c                $    U R                  S5      $ )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_scriptFont.complex_script8   s     ""4((r   c                (    U R                  SU5        g )Nr3   r%   r'   s     r   r4   r5   A   s    D%(r   c                $    U R                  S5      $ )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_boldFont.cs_boldE        ""5))r   c                (    U R                  SU5        g )Nr8   r%   r'   s     r   r9   r:   N       E5)r   c                $    U R                  S5      $ )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_italicFont.cs_italicR   r;   r   c                (    U R                  SU5        g )Nr?   r%   r'   s     r   r@   rA   [   r=   r   c                $    U R                  S5      $ )zjRead/write tri-state value.

When |True|, causes the text in the run to appear with double strikethrough.
dstriker   r!   s    r   double_strikeFont.double_strike_        ""9--r   c                (    U R                  SU5        g )NrD   r%   r'   s     r   rE   rF   g       Iu-r   c                $    U R                  S5      $ )ztRead/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   rK   Font.embossk        ""8,,r   c                (    U R                  SU5        g )NrK   r%   r'   s     r   rK   rL   t       He,r   c                $    U R                  S5      $ )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   hiddenFont.hiddenx   rM   r   c                (    U R                  SU5        g )NrQ   r%   r'   s     r   rR   rS      rO   r   c                N    U R                   R                  nUc  gUR                  $ )z:Color of highlighing applied or |None| if not highlighted.N)r   rPrhighlight_valr   rV   s     r   highlight_colorFont.highlight_color   s'     mm;   r   c                D    U R                   R                  5       nXl        g r   )r   get_or_add_rPrrW   r   r(   rV   s      r   rY   rZ      s    mm**,!r   c                $    U R                  S5      $ )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   italicFont.italic   s     ""3''r   c                (    U R                  SU5        g )Nr_   r%   r'   s     r   r`   ra      r.   r   c                $    U R                  S5      $ )zlRead/write tri-state value.

When |True|, causes the text in the run to appear as if pressed into the page.
imprintr   r!   s    r   rd   Font.imprint   rG   r   c                (    U R                  SU5        g )Nrd   r%   r'   s     r   rd   re      rI   r   c                $    U R                  S5      $ )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   math	Font.math   s     ""7++r   c                (    U R                  SU5        g )Nrh   r%   r'   s     r   ri   rj      s    GU+r   c                N    U R                   R                  nUc  gUR                  $ )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   rV   rFonts_asciirX   s     r   name	Font.name   s'     mm;r   c                P    U R                   R                  5       nXl        Xl        g r   )r   r\   rm   rFonts_hAnsir]   s      r   rn   ro      s     mm**,  r   c                $    U R                  S5      $ )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_proofFont.no_proof   s     ""9--r   c                (    U R                  SU5        g )Nrs   r%   r'   s     r   rt   ru      rI   r   c                $    U R                  S5      $ )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   rx   Font.outline   s     ""9--r   c                (    U R                  SU5        g )Nrx   r%   r'   s     r   rx   ry      rI   r   c                $    U R                  S5      $ )zkRead/write tri-state value.

When |True| causes the text in the run to have right-to-left characteristics.
rtlr   r!   s    r   r|   Font.rtl   s     ""5))r   c                (    U R                  SU5        g )Nr|   r%   r'   s     r   r|   r}      r=   r   c                $    U R                  S5      $ )zqRead/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   r   Font.shadow   rM   r   c                (    U R                  SU5        g )Nr   r%   r'   s     r   r   r      rO   r   c                N    U R                   R                  nUc  gUR                  $ )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   rV   sz_valrX   s     r   size	Font.size   s%      mm;zzr   c                n    U R                   R                  5       nUc  S Ul        g [        U5      Ul        g r   )r   r\   r	   r   )r   emurV   s      r   r   r     s)    mm**, [T
c#h
r   c                $    U R                  S5      $ )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_capsFont.small_caps       "";//r   c                (    U R                  SU5        g )Nr   r%   r'   s     r   r   r   !      K/r   c                $    U R                  S5      $ )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_gridFont.snap_to_grid%  s     ""<00r   c                (    U R                  SU5        g )Nr   r%   r'   s     r   r   r   .      L%0r   c                $    U R                  S5      $ )u4  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_vanishFont.spec_vanish2  s     ""<00r   c                (    U R                  SU5        g )Nr   r%   r'   s     r   r   r   =  r   r   c                $    U R                  S5      $ )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   Font.strikeA  rM   r   c                (    U R                  SU5        g )Nr   r%   r'   s     r   r   r   J  rO   r   c                N    U R                   R                  nUc  gUR                  $ )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   rV   	subscriptrX   s     r   r   Font.subscriptN  s%     mm;}}r   c                D    U R                   R                  5       nXl        g r   )r   r\   r   r]   s      r   r   r   Z  s    mm**,r   c                N    U R                   R                  nUc  gUR                  $ )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   rV   superscriptrX   s     r   r   Font.superscript_  s%     mm;r   c                D    U R                   R                  5       nXl        g r   )r   r\   r   r]   s      r   r   r   l  s    mm**,r   c                    U R                   R                  nUc  gUR                  nU[        R                  :X  a  S$ U[        R
                  :X  a  S$ U[        R                  :X  a  S$ U$ )ay  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   rV   u_valr   	INHERITEDSINGLENONE)r   rV   vals      r   	underlineFont.underlineq  s|     mm;ii l,,, 	
 l))) 	
 l''' 	
 	
r   c                    U R                   R                  5       nUSL a  [        R                  OUSL a  [        R                  OUnX2l        g )NTF)r   r\   r   r   r   r   )r   r(   rV   r   s       r   r   r     sK    mm**, }  ~ "" 	 	r   c                $    U R                  S5      $ )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_hiddenFont.web_hidden  r   r   c                (    U R                  SU5        g )Nr   r%   r'   s     r   r   r     r   r   c                X    U R                   R                  nUc  gUR                  U5      $ )z;Return the value of boolean child of `w:rPr` having `name`.N)r   rV   _get_bool_val)r   rn   rV   s      r   r    Font._get_bool_prop  s*    mm;  &&r   c                Z    U R                   R                  5       nUR                  X5        g)z6Assign `value` to the boolean child `name` of `w:rPr`.N)r   r\   _set_bool_val)r   rn   r(   rV   s       r   r&   Font._set_bool_prop  s"    mm**,$&r   )r   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)r   zint | Length | Noner   r   )r   bool | WD_UNDERLINE | None)r(   r   r   r   )rn   strr   r   )rn   r   r(   r   )'__name__
__module____qualname____firstlineno____doc__r   propertyr"   setterr+   r0   r4   r9   r@   rE   rK   rR   rY   r`   rd   ri   rn   rt   rx   r|   r   r   r   r   r   r   r   r   r   r   r    r&   __static_attributes____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   