mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
Meta+Tests: Substitute Ahem font path in import-wpt-test.py
This commit is contained in:
parent
b7efb61fbe
commit
3833049fc8
Notes:
github-actions[bot]
2024-11-05 16:45:09 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/3833049fc86 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2177
3 changed files with 8 additions and 0 deletions
|
@ -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('/'):
|
||||
|
|
BIN
Tests/LibWeb/Text/input/wpt-import/fonts/Ahem.ttf
Normal file
BIN
Tests/LibWeb/Text/input/wpt-import/fonts/Ahem.ttf
Normal file
Binary file not shown.
6
Tests/LibWeb/Text/input/wpt-import/fonts/ahem.css
Normal file
6
Tests/LibWeb/Text/input/wpt-import/fonts/ahem.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
@font-face {
|
||||
font-family: 'Ahem';
|
||||
src: local('Ahem'),
|
||||
url('Ahem.ttf');
|
||||
}
|
||||
|
Loading…
Reference in a new issue