Xj%5dZddlmZddlmZmZddlmZddlm Z ddl m Z m Z erddlm Z ddlmZdd l mZGd d e Zy ) zFont-related proxy objects.) annotations) TYPE_CHECKINGAny) ColorFormat) WD_UNDERLINE) ElementProxyEmu)WD_COLOR_INDEX)CT_R)LengthceZdZdZd:d;fd ZeddZejd?dZed` element and providing access to character properties such as font name, font size, bold, and subscript.cBt|||||_||_yN)super__init___element_r)selfrparent __class__s b/mnt/ssd/data/Dropbox/adrian/vault-secondbrain/venv/lib/python3.12/site-packages/docx/text/font.pyrz Font.__init__s  F# c$|jdS)zTRead/write. Causes text in this font to appear in capital letters. caps_get_bool_proprs rall_capsz Font.all_capss ""6**rc(|jd|y)Nr_set_bool_proprvalues rr z Font.all_caps"s FE*rc$|jdS)zIRead/write. Causes text in this font to appear in bold. brrs rboldz Font.bold&s ""3''rc(|jd|y)Nr'r"r$s rr(z Font.bold. C'rc,t|jS)z[A |ColorFormat| object providing a way to get and set the text color for this font.)rrrs rcolorz Font.color2s4==))rc$|jdS)zRead/write tri-state value. When |True|, causes the characters in the run to be treated as complex script regardless of their Unicode values. csrrs rcomplex_scriptzFont.complex_script8s""4((rc(|jd|y)Nr.r"r$s rr/zFont.complex_scriptAs D%(rc$|jdS)zRead/write tri-state value. When |True|, causes the complex script characters in the run to be displayed in bold typeface. bCsrrs rcs_boldz Font.cs_boldE""5))rc(|jd|y)Nr2r"r$s rr3z Font.cs_boldN E5)rc$|jdS)zRead/write tri-state value. When |True|, causes the complex script characters in the run to be displayed in italic typeface. iCsrrs r cs_italiczFont.cs_italicRr4rc(|jd|y)Nr8r"r$s rr9zFont.cs_italic[r6rc$|jdS)zzRead/write tri-state value. When |True|, causes the text in the run to appear with double strikethrough. dstrikerrs r double_strikezFont.double_strike_ ""9--rc(|jd|y)Nr<r"r$s rr=zFont.double_strikeg Iu-rc$|jdS)zRead/write tri-state value. When |True|, causes the text in the run to appear as if raised off the page in relief. embossrrs rrBz Font.embossk""8,,rc(|jd|y)NrBr"r$s rrBz Font.embosst He,rc$|jdS)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. vanishrrs rhiddenz Font.hiddenxrCrc(|jd|y)NrGr"r$s rrHz Font.hiddenrErcL|jj}|y|jS)z:Color of highlighing applied or |None| if not highlighted.N)rrPr highlight_valrrKs rhighlight_colorzFont.highlight_colors'mm ;   rcF|jj}||_yr)rget_or_add_rPrrLrr%rKs rrNzFont.highlight_colorsmm**,!rc$|jdS)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. irrs ritalicz Font.italics""3''rc(|jd|y)NrSr"r$s rrTz Font.italicr*rc$|jdS)z|Read/write tri-state value. When |True|, causes the text in the run to appear as if pressed into the page. imprintrrs rrWz Font.imprintr>rc(|jd|y)NrWr"r$s rrWz Font.imprintr@rc$|jdS)zRead/write tri-state value. When |True|, specifies this run contains WML that should be handled as though it was Office Open XML Math. oMathrrs rmathz Font.maths""7++rc(|jd|y)NrZr"r$s rr[z Font.maths GU+rcL|jj}|y|jS)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)rrK rFonts_asciirMs rnamez Font.names'mm ;rcT|jj}||_||_yr)rrPr^ rFonts_hAnsirQs rr_z Font.names$mm**,  rc$|jdS)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. noProofrrs rno_proofz Font.no_proofs""9--rc(|jd|y)Nrcr"r$s rrdz Font.no_proofr@rc$|jdS)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. outlinerrs rrgz Font.outlines""9--rc(|jd|y)Nrgr"r$s rrgz Font.outliner@rc$|jdS)z{Read/write tri-state value. When |True| causes the text in the run to have right-to-left characteristics. rtlrrs rrjzFont.rtls ""5))rc(|jd|y)Nrjr"r$s rrjzFont.rtlr6rc$|jdS)zRead/write tri-state value. When |True| causes the text in the run to appear as if each character has a shadow. shadowrrs rrmz Font.shadowrCrc(|jd|y)Nrmr"r$s rrmz Font.shadowrErcL|jj}|y|jS)aFont 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)rrKsz_valrMs rsizez Font.sizes% mm ;zzrcl|jj}|d|_yt||_yr)rrPr rp)remurKs rrqz Font.sizes)mm**, [T c#h rc$|jdS)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. smallCapsrrs r small_capszFont.small_caps"";//rc(|jd|y)Nrur"r$s rrvzFont.small_caps! K/rc$|jdS)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. snapToGridrrs r snap_to_gridzFont.snap_to_grid%s""<00rc(|jd|y)Nr{r"r$s rr|zFont.snap_to_grid. L%0rc$|jdS)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. specVanishrrs r spec_vanishzFont.spec_vanish2s""<00rc(|jd|y)Nrr"r$s rrzFont.spec_vanish=r~rc$|jdS)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. strikerrs rrz Font.strikeArCrc(|jd|y)Nrr"r$s rrz Font.strikeJrErcL|jj}|y|jS)zBoolean indicating whether the characters in this |Font| appear as subscript. |None| indicates the subscript/subscript value is inherited from the style hierarchy. N)rrK subscriptrMs rrzFont.subscriptNs%mm ;}}rcF|jj}||_yr)rrPrrQs rrzFont.subscriptZsmm**, rcL|jj}|y|jS)zBoolean indicating whether the characters in this |Font| appear as superscript. |None| indicates the subscript/superscript value is inherited from the style hierarchy. N)rrK superscriptrMs rrzFont.superscript_s%mm ;rcF|jj}||_yr)rrPrrQs rrzFont.superscriptlsmm**,rc|jj}|y|j}|tjk(rdS|tj k(rdS|tj k(rdS|S)aThe 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)rrKu_valr INHERITEDSINGLENONE)rrKvals r underlinezFont.underlineqs|mm ;iil,,,  l))) l'''   rc|jj}|durtjn|durtjn|}||_y)NTF)rrPrrrr)rr%rKrs rrzFont.underlinesEmm**, $)D=L  5TY>l6G6G_d  rc$|jdS)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. webHiddenrrs r web_hiddenzFont.web_hiddenrwrc(|jd|y)Nrr"r$s rrzFont.web_hiddenryrcV|jj}|y|j|S)z;Return the value of boolean child of `w:rPr` having `name`.N)rrK _get_bool_val)rr_rKs rrzFont._get_bool_props*mm ;  &&rc\|jj}|j||y)z6Assign `value` to the boolean child `name` of `w:rPr`.N)rrP _set_bool_val)rr_r%rKs rr#zFont._set_bool_props$mm**, $&rr)rr rz Any | None)return bool | None)r%rrNone)rWD_COLOR_INDEX | None)r%r)r str | None)r%rrr)rz Length | None)rszint | Length | Nonerr)rbool | WD_UNDERLINE | None)r%rrr)r_strrr)r_rr%r)%__name__ __module__ __qualname____doc__rpropertyr setterr(r,r/r3r9r=rBrHrNrTrWr[r_rdrgrjrmrqrvr|rrrrrrrr# __classcell__)rs@rrrsO ++__++(( [[((** ))))** ^^******....-- ]]---- ]]--!!""(( ]]((.. ^^..,, [[,,     [[!! ..__.... ^^..** ZZ**-- ]]--( [[77000011111111-- ]]--        00000''rrN)r __future__rtypingrrdocx.dml.colorrdocx.enum.textr docx.sharedrr r docx.oxml.text.runr r rrrrs1!"%&')-'"['<['r