@@ -147,17 +147,17 @@ function draw(gd, titleClass, options) {
147
147
148
148
titleEl . attr ( 'transform' , transformVal ) ;
149
149
150
- titleEl . style ( {
151
- ' font-family' : fontFamily ,
152
- 'font-size' : d3 . round ( fontSize , 2 ) + 'px' ,
153
- fill : Color . rgb ( fontColor ) ,
154
- opacity : opacity * Color . opacity ( fontColor ) ,
155
- 'font- weight' : fontWeight ,
156
- 'font- style' : fontStyle ,
157
- 'font- variant' : fontVariant ,
158
- 'text-transform' : Drawing . textcase2transform ( fontTextcase ) ,
159
- 'text- shadow' : fontShadow === 'auto' ? svgTextUtils . makeTextShadow ( Color . contrast ( fontColor ) ) : fontShadow ,
160
- 'text-decoration-line' : Drawing . decorline2decorationLine ( fontDecorline ) ,
150
+ titleEl . style ( 'opacity' , opacity * Color . opacity ( fontColor ) )
151
+ . call ( Drawing . font , {
152
+ color : Color . rgb ( fontColor ) ,
153
+ size : d3 . round ( fontSize , 2 ) ,
154
+ family : fontFamily ,
155
+ weight : fontWeight ,
156
+ style : fontStyle ,
157
+ variant : fontVariant ,
158
+ textcase : fontTextcase ,
159
+ shadow : fontShadow ,
160
+ decorline : fontDecorline ,
161
161
} )
162
162
. attr ( attributes )
163
163
. call ( svgTextUtils . convertToTspans , gd ) ;
0 commit comments