@@ -816,10 +816,10 @@ void test_generated_pseudo_font_family_scene_and_scale_gate()
816816 auto advance = font_size * 3 .0F ;
817817 if (selected.find (" FixtureIconAlternate" ) != std::string_view::npos) {
818818 ++state.alternate_calls ;
819- advance = 18 . 0F ;
819+ advance = font_size * 0 . 9F ;
820820 } else if (selected.find (" FixtureIcon" ) != std::string_view::npos) {
821821 ++state.fixture_calls ;
822- advance = 12 . 0F ;
822+ advance = font_size * 0 . 6F ;
823823 } else if (selected.find (" ParentFace" ) != std::string_view::npos) {
824824 ++state.parent_calls ;
825825 }
@@ -885,6 +885,9 @@ void test_generated_pseudo_font_family_scene_and_scale_gate()
885885 + std::string (resource);
886886 }
887887 if (command.rgba != 0x0C2238FFU ) continue ;
888+ require (resource.starts_with (" 19.5\t " ),
889+ " generated pseudo text command did not serialize the resolved 19.5px size: "
890+ + std::string (resource));
888891 const auto family_field = " \t " + std::string (expected_family) + " \t " ;
889892 require (resource.find (family_field) != std::string_view::npos,
890893 " generated pseudo text command used the originating font family: "
@@ -927,10 +930,10 @@ void test_generated_pseudo_font_family_scene_and_scale_gate()
927930 const rules = document.createElement('style');
928931 rules.id = 'pseudo-font-rules';
929932 rules.textContent = `
930- .icon-host { display:block; font-family:ParentFace; height:20px; }
933+ .icon-host { display:block; font-family:ParentFace; font-size:13px; height:20px; }
931934 .icon-host::before { content:'\\e023'; display:inline-block;
932935 color:rgb(12,34,56); font-family:FixtureIcon;
933- font-size:20px ; line-height:20px; }
936+ font-size:150% ; line-height:20px; }
934937 #single-icon::before { font-family:WrongFace; }
935938 .icon-host::before { font-family:FixtureIcon !important; }
936939 .icon-host.alternate::before { font-family:FixtureIconAlternate !important; }
@@ -943,27 +946,27 @@ void test_generated_pseudo_font_family_scene_and_scale_gate()
943946 document.body.appendChild(host);
944947 })()
945948 )JS" , " native-pseudo-font-family-setup.js" );
946- const auto initial = capture (" FixtureIcon" , 12 . 0F , 1U );
949+ const auto initial = capture (" FixtureIcon" , 11 . 7F , 1U );
947950 execute (engine,
948951 " document.getElementById('single-icon').classList.add('inherited')" ,
949952 " native-pseudo-font-family-inherit.js" );
950- const auto inherited = capture (" ParentFace" , 60 . 0F , 1U );
953+ const auto inherited = capture (" ParentFace" , 58 . 5F , 1U );
951954 execute (engine,
952955 " document.getElementById('single-icon').classList.remove('inherited')" ,
953956 " native-pseudo-font-family-inherit-restore.js" );
954- const auto inherited_restored = capture (" FixtureIcon" , 12 . 0F , 1U );
957+ const auto inherited_restored = capture (" FixtureIcon" , 11 . 7F , 1U );
955958 require (initial.checksum != inherited.checksum
956959 && initial.checksum == inherited_restored.checksum
957960 && initial.node_ids == inherited_restored.node_ids ,
958961 " pseudo font-family inheritance did not exactly restore retained scene identity" );
959962 execute (engine,
960963 " document.getElementById('single-icon').classList.add('alternate')" ,
961964 " native-pseudo-font-family-alternate.js" );
962- const auto alternate = capture (" FixtureIconAlternate" , 18 . 0F , 1U );
965+ const auto alternate = capture (" FixtureIconAlternate" , 17 . 55F , 1U );
963966 execute (engine,
964967 " document.getElementById('single-icon').classList.remove('alternate')" ,
965968 " native-pseudo-font-family-restore.js" );
966- const auto restored = capture (" FixtureIcon" , 12 . 0F , 1U );
969+ const auto restored = capture (" FixtureIcon" , 11 . 7F , 1U );
967970 require (initial.checksum != alternate.checksum
968971 && initial.checksum == restored.checksum
969972 && initial.node_ids == restored.node_ids ,
@@ -980,10 +983,11 @@ void test_generated_pseudo_font_family_scene_and_scale_gate()
980983 (() => {
981984 const rules = document.getElementById('pseudo-font-rules');
982985 rules.textContent += `
983- #bulk > .bulk-icon { display:block; height:20px; font-family:ParentFace; }
986+ #bulk > .bulk-icon { display:block; height:20px; font-family:ParentFace;
987+ font-size:13px; }
984988 #bulk > .bulk-icon::before { content:'\\e023'; display:inline-block;
985989 color:rgb(12,34,56); font-family:FixtureIcon;
986- font-size:20px ; line-height:20px; }
990+ font-size:150% ; line-height:20px; }
987991 #bulk.alternate > .bulk-icon::before { font-family:FixtureIconAlternate; }
988992 `;
989993 const bulk = document.createElement('main');
@@ -1001,13 +1005,13 @@ void test_generated_pseudo_font_family_scene_and_scale_gate()
10011005 require (evaluate (engine, " document.getElementById('bulk').children.length" ,
10021006 " native-pseudo-font-family-scale-count.js" ) == " 4096" ,
10031007 " pseudo font-family scale fixture did not create 4,096 icons" );
1004- const auto bulk_initial = capture (" FixtureIcon" , 12 . 0F , 4096U );
1008+ const auto bulk_initial = capture (" FixtureIcon" , 11 . 7F , 4096U );
10051009 execute (engine, " document.getElementById('bulk').classList.add('alternate')" ,
10061010 " native-pseudo-font-family-scale-alternate.js" );
1007- const auto bulk_alternate = capture (" FixtureIconAlternate" , 18 . 0F , 4096U );
1011+ const auto bulk_alternate = capture (" FixtureIconAlternate" , 17 . 55F , 4096U );
10081012 execute (engine, " document.getElementById('bulk').classList.remove('alternate')" ,
10091013 " native-pseudo-font-family-scale-restore.js" );
1010- const auto bulk_restored = capture (" FixtureIcon" , 12 . 0F , 4096U );
1014+ const auto bulk_restored = capture (" FixtureIcon" , 11 . 7F , 4096U );
10111015 require (bulk_initial.checksum != bulk_alternate.checksum
10121016 && bulk_initial.checksum == bulk_restored.checksum
10131017 && bulk_initial.node_ids == bulk_restored.node_ids ,
@@ -1036,7 +1040,7 @@ void test_generated_pseudo_font_family_scene_and_scale_gate()
10361040 require (elapsed < 5000.0 ,
10371041 " 4,096 pseudo icons across 100 family cycles exceeded 5 seconds: "
10381042 + std::to_string (elapsed));
1039- const auto bulk_after_cycles = capture (" FixtureIcon" , 12 . 0F , 4096U );
1043+ const auto bulk_after_cycles = capture (" FixtureIcon" , 11 . 7F , 4096U );
10401044 require (bulk_after_cycles.checksum == bulk_initial.checksum
10411045 && bulk_after_cycles.node_ids == bulk_initial.node_ids ,
10421046 " scaled family cycles did not restore the original retained scene" );
0 commit comments