mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add ahem font
Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
This commit is contained in:
parent
02efd6d46a
commit
adea65f46a
2 changed files with 7 additions and 0 deletions
|
@ -822,12 +822,15 @@ impl RemoteWebFontDownloader {
|
||||||
|
|
||||||
let document_context = &state.document_context;
|
let document_context = &state.document_context;
|
||||||
|
|
||||||
|
let document_origin = document_context.document_url.origin();
|
||||||
|
|
||||||
let request = RequestBuilder::new(
|
let request = RequestBuilder::new(
|
||||||
state.webview_id,
|
state.webview_id,
|
||||||
url.clone().into(),
|
url.clone().into(),
|
||||||
Referrer::ReferrerUrl(document_context.document_url.clone()),
|
Referrer::ReferrerUrl(document_context.document_url.clone()),
|
||||||
)
|
)
|
||||||
.destination(Destination::Font)
|
.destination(Destination::Font)
|
||||||
|
.origin(document_origin)
|
||||||
.mode(RequestMode::CorsMode)
|
.mode(RequestMode::CorsMode)
|
||||||
.credentials_mode(CredentialsMode::CredentialsSameOrigin)
|
.credentials_mode(CredentialsMode::CredentialsSameOrigin)
|
||||||
.service_workers_mode(ServiceWorkersMode::All)
|
.service_workers_mode(ServiceWorkersMode::All)
|
||||||
|
|
4
tests/wpt/mozilla/tests/css/css/ahem.css
vendored
4
tests/wpt/mozilla/tests/css/css/ahem.css
vendored
|
@ -1,3 +1,7 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: Ahem;
|
||||||
|
src: url('/fonts/Ahem.ttf');
|
||||||
|
}
|
||||||
body {
|
body {
|
||||||
font-family: 'ahem';
|
font-family: 'ahem';
|
||||||
font-size: 100px;
|
font-size: 100px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue