File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ def add(
38
38
strike = False ,
39
39
font = None ,
40
40
url_id = None ,
41
+ rtl = False ,
42
+ lang = None ,
41
43
):
42
44
43
45
# If a RichText is added
@@ -73,8 +75,12 @@ def add(
73
75
prop += '<w:vertAlign w:val="superscript"/>'
74
76
if bold :
75
77
prop += "<w:b/>"
78
+ if rtl :
79
+ prop += '<w:bCs/>'
76
80
if italic :
77
81
prop += "<w:i/>"
82
+ if rtl :
83
+ prop += '<w:iCs/>'
78
84
if underline :
79
85
if underline not in [
80
86
"single" ,
@@ -98,7 +104,10 @@ def add(
98
104
prop += '<w:rFonts w:ascii="{font}" w:hAnsi="{font}" w:cs="{font}"{regional_font}/>' .format (
99
105
font = font , regional_font = regional_font
100
106
)
101
-
107
+ if rtl :
108
+ prop += '<w:rtl w:val="true"/>'
109
+ if lang :
110
+ prop += '<w:lang w:val="%s"/>' % lang
102
111
xml = "<w:r>"
103
112
if prop :
104
113
xml += "<w:rPr>%s</w:rPr>" % prop
You can’t perform that action at this time.
0 commit comments