@@ -44,10 +44,11 @@ def test_ft2font_dejavu_attrs():
4444 assert font .num_fixed_sizes == 0 # All glyphs are scalable.
4545 assert font .num_charmaps == 5
4646 # Other internal flags are set, so only check the ones we're allowed to test.
47- expected_flags = (ft2font .SCALABLE | ft2font .SFNT | ft2font .HORIZONTAL |
48- ft2font .KERNING | ft2font .GLYPH_NAMES )
49- assert (font .face_flags & expected_flags ) == expected_flags
50- assert font .style_flags == 0 # Not italic or bold.
47+ expected_flags = (ft2font .FaceFlags .SCALABLE | ft2font .FaceFlags .SFNT |
48+ ft2font .FaceFlags .HORIZONTAL | ft2font .FaceFlags .KERNING |
49+ ft2font .FaceFlags .GLYPH_NAMES )
50+ assert expected_flags in font .face_flags
51+ assert font .style_flags == ft2font .StyleFlags .NORMAL
5152 assert font .scalable
5253 # From FontForge: Font Information → General tab → entry name below.
5354 assert font .units_per_EM == 2048 # Em Size.
@@ -76,10 +77,10 @@ def test_ft2font_cm_attrs():
7677 assert font .num_fixed_sizes == 0 # All glyphs are scalable.
7778 assert font .num_charmaps == 2
7879 # Other internal flags are set, so only check the ones we're allowed to test.
79- expected_flags = (ft2font .SCALABLE | ft2font .SFNT | ft2font . HORIZONTAL |
80- ft2font .GLYPH_NAMES )
81- assert ( font . face_flags & expected_flags ) == expected_flags , font .face_flags
82- assert font .style_flags == 0 # Not italic or bold.
80+ expected_flags = (ft2font .FaceFlags . SCALABLE | ft2font .FaceFlags . SFNT |
81+ ft2font .FaceFlags . HORIZONTAL | ft2font . FaceFlags . GLYPH_NAMES )
82+ assert expected_flags in font .face_flags
83+ assert font .style_flags == ft2font . StyleFlags . NORMAL
8384 assert font .scalable
8485 # From FontForge: Font Information → General tab → entry name below.
8586 assert font .units_per_EM == 2048 # Em Size.
@@ -108,10 +109,10 @@ def test_ft2font_stix_bold_attrs():
108109 assert font .num_fixed_sizes == 0 # All glyphs are scalable.
109110 assert font .num_charmaps == 3
110111 # Other internal flags are set, so only check the ones we're allowed to test.
111- expected_flags = (ft2font .SCALABLE | ft2font .SFNT | ft2font . HORIZONTAL |
112- ft2font .GLYPH_NAMES )
113- assert ( font . face_flags & expected_flags ) == expected_flags , font .face_flags
114- assert font .style_flags == ft2font .BOLD
112+ expected_flags = (ft2font .FaceFlags . SCALABLE | ft2font .FaceFlags . SFNT |
113+ ft2font .FaceFlags . HORIZONTAL | ft2font . FaceFlags . GLYPH_NAMES )
114+ assert expected_flags in font .face_flags
115+ assert font .style_flags == ft2font .StyleFlags . BOLD
115116 assert font .scalable
116117 # From FontForge: Font Information → General tab → entry name below.
117118 assert font .units_per_EM == 1000 # Em Size.
0 commit comments