Meta+Tests: Substitute Ahem font path in import-wpt-test.py

This commit is contained in:
Aliaksandr Kalenik 2024-11-05 14:14:08 +01:00 committed by Alexander Kalenik
parent b7efb61fbe
commit 3833049fc8
Notes: github-actions[bot] 2024-11-05 16:45:09 +00:00
3 changed files with 8 additions and 0 deletions

View file

@ -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('/'):

Binary file not shown.

View file

@ -0,0 +1,6 @@
@font-face {
font-family: 'Ahem';
src: local('Ahem'),
url('Ahem.ttf');
}