Hi, I think that it would be much easier to define a new char. attribute with the same font but bold or italic variant applied.
Than you only have to apply this already defined style to the text selection.
This will be useful only if you have a static and not very large collection of styles.
Oscar.