@@ -165,6 +165,14 @@ class FontStyleType(Enum):
165165 oblique = "oblique"
166166
167167
168+ class FontVariantType (Enum ):
169+ '''tts:fontVariant value
170+ '''
171+ normal = "normal"
172+ superscript = "super"
173+ subscript = "sub"
174+
175+
168176class FontWeightType (Enum ):
169177 '''tts:fontWeight value
170178 '''
@@ -610,6 +618,21 @@ def validate(value):
610618 return isinstance (value , FontStyleType )
611619
612620
621+ class FontVariant (StyleProperty ):
622+ '''Corresponds to tts:fontVariant.'''
623+
624+ is_inherited = True
625+ is_animatable = True
626+
627+ @staticmethod
628+ def make_initial_value ():
629+ return FontVariantType .normal
630+
631+ @staticmethod
632+ def validate (value ):
633+ return isinstance (value , FontVariantType )
634+
635+
613636 class FontWeight (StyleProperty ):
614637 '''Corresponds to tts:fontWeight.'''
615638
@@ -717,8 +740,8 @@ def make_initial_value():
717740 @staticmethod
718741 def validate (value : CoordinateType ):
719742 return isinstance (value , CoordinateType ) \
720- and value .x .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rw ) \
721- and value .y .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rh ) \
743+ and value .x .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rh , LengthType . Units . rw ) \
744+ and value .y .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rh , LengthType . Units . rw ) \
722745 and value .x .is_non_negative () and value .y .is_non_negative ()
723746
724747
@@ -771,8 +794,8 @@ def make_initial_value():
771794 @staticmethod
772795 def validate (value : PositionType ):
773796 return isinstance (value , PositionType ) \
774- and value .h_offset .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rw ) \
775- and value .v_offset .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rh ) \
797+ and value .h_offset .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rh , LengthType . Units . rw ) \
798+ and value .v_offset .units in (LengthType .Units .pct , LengthType .Units .px , LengthType .Units .rh , LengthType . Units . rw ) \
776799 and value .h_offset .is_non_negative () and value .v_offset .is_non_negative ()
777800
778801 class RubyAlign (StyleProperty ):
0 commit comments