forked from webcompat/webcompat.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue webcompat#2750 - Improves text renderig on mobile
- Loading branch information
1 parent
b5f0638
commit 131deb5
Showing
5 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
if (/Mobi/.test(navigator.userAgent)) { | ||
document.documentElement.className += " font-mobile"; | ||
var sourceSansPro300 = new FontFaceObserver("Source Sans Pro", { | ||
weight: 300 | ||
}); | ||
|
||
var sourceSansPro400 = new FontFaceObserver("Source Sans Pro", { | ||
weight: 400 | ||
}); | ||
|
||
var openSans400 = new FontFaceObserver("Open Sans", { | ||
weight: 400 | ||
}); | ||
|
||
var openSans600 = new FontFaceObserver("Open Sans", { | ||
weight: 600 | ||
}); | ||
|
||
Promise.all([ | ||
sourceSansPro300.load(null, 20000), | ||
sourceSansPro400.load(null, 20000), | ||
openSans400.load(null, 20000), | ||
openSans600.load(null, 20000) | ||
]).then(function() { | ||
document.documentElement.className += " fonts-loaded"; | ||
}); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters