I want to change the font and set its style to bold. I have two problems:
- changing
CharWeight
works but notCharFontName
- it applies "bold" to the whole paragraph, not only to the selection
Here's my code:
sub AddAnimation
xTextCursor = ThisComponent.CurrentController.Selection(0)
xText = xTextCursor.getText()
xText.CharFontName = "Consolas"
xText.CharWeight = com.sun.star.awt.FontWeight.BOLD
end Sub