optFontStyle method
Implementation
@protected
FontStyle? optFontStyle(
MarkupContext ctx, {
bool enableTagAttr = true,
}) {
const params = {'normal': FontStyle.normal, 'italic': FontStyle.italic};
FontStyle? fs;
if (enableTagAttr) {
fs ??= ctx.whenExist(params);
fs ??= ctx.switchT(ctx.getBy(tags), params);
}
fs ??= ctx.switchT(ctx.get('font-style'), params);
return fs ?? fontStyle;
}