Skip to content

Commit

Permalink
Meta+Tests: Substitute Ahem font path in import-wpt-test.py
Browse files Browse the repository at this point in the history
(cherry picked from commit 3833049fc8680d4e6349511cf566f27a25225ada)
  • Loading branch information
kalenikaliaksandr authored and nico committed Nov 22, 2024
1 parent f857a80 commit d2ee346
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Meta/import-wpt-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ def modify_sources(files):
with open(file, 'r') as f:
page_source = f.read()

page_source = page_source.replace('/fonts/ahem.css', '../' * parent_folder_count + 'fonts/ahem.css')

# Iterate all scripts and overwrite the src attribute
for i, src_value in enumerate(src_values):
if src_value.startswith('/'):
Expand Down
Binary file added Tests/LibWeb/Text/input/wpt-import/fonts/Ahem.ttf
Binary file not shown.
6 changes: 6 additions & 0 deletions Tests/LibWeb/Text/input/wpt-import/fonts/ahem.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@font-face {
font-family: 'Ahem';
src: local('Ahem'),
url('Ahem.ttf');
}

0 comments on commit d2ee346

Please sign in to comment.