Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] CSS font loader #62

Open
S-K-Tiger opened this issue Sep 22, 2022 · 0 comments
Open

[Feature request] CSS font loader #62

S-K-Tiger opened this issue Sep 22, 2022 · 0 comments

Comments

@S-K-Tiger
Copy link

A CSS file that can be referenced to import the font for use on a webpage.

For a live example see <link href="https://fonts.googleapis.com/css?family=Dosis" rel="stylesheet">.
This example can be used to import the Dosis font.

A potential implementation could look like:
<link href="https://cdn.jsdelivr.net/gh/ThomasJockin/readexpro@master/fonts/css/ReadexPro.css" rel="stylesheet">
Referring to a file looking like:

@charset "UTF-8";
/* For information on this font see: https://www.lexend.com/ */
@font-face {
	font-family: 'ReadexPro';
	src: url(https://cdn.jsdelivr.net/gh/ThomasJockin/readexpro@master/fonts/ttf/ReadexPro-Regular.ttf) format('ttf');
	font-weight: normal;
}
@font-face {
	font-family: 'ReadexPro';
	src: url(https://cdn.jsdelivr.net/gh/ThomasJockin/readexpro@master/fonts/ttf/ReadexPro-bold.ttf) format('ttf');
	font-weight: bold;
}
@font-face {
	font-family: 'ReadexPro';
	src: url(https://cdn.jsdelivr.net/gh/ThomasJockin/readexpro@master/fonts/ttf/ReadexPro-Light.ttf) format('ttf');
	font-weight: lighter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant