I would like to add macOS system font San Francisco to the CSS style sheet. I tried to use font-family “San Francisco”, also tried font-family: -apple-system,
but no luck so far. What would be the correct string?
Regards,
I would like to add macOS system font San Francisco to the CSS style sheet. I tried to use font-family “San Francisco”, also tried font-family: -apple-system,
but no luck so far. What would be the correct string?
Regards,
Maybe this helps: http://stackoverflow.com/questions/3266 … -a-webpage
Hi, indeed check the comment in the link provided by Patrick.
None of the current answers – including the accept one – will use Apple’s San Francisco font on systems that don’t have it installed as the system font. Since the question isn’t “how do I use the OS X system font on a webpage,” the correct solution is to use web fonts:
You can include the San Francisco web fonts by adding this CSS
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff");
}
/** Thin */
@font-face {
font-family: "San Francisco";
font-weight: 200;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-thin-webfont.woff");
}
/** Regular */
@font-face {
font-family: "San Francisco";
font-weight: 400;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff");
}
/** Medium */
@font-face {
font-family: "San Francisco";
font-weight: 500;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-medium-webfont.woff");
}
/** Semi Bold */
@font-face {
font-family: "San Francisco";
font-weight: 600;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-semibold-webfont.woff");
}
/** Bold */
@font-face {
font-family: "San Francisco";
font-weight: 700;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-bold-webfont.woff");
}
* {
font-family: "San Francisco"
}
Source: https://gist.github.com/AndrewBarba/2c0 … ef30f5f55d