Open cssobral2013 opened 4 years ago
Absolutely love this font, really struggling without italics. Let's please get this in if possible! đ
As an aside, does anybody know a way to let the browser apply faux italics to it for the time being? Firefox & Safari do it fine but Chromium doesn't. Presumably because they don't support font-synthesis yet.
Is there any time schedule when will Inter font be updated to include italic?
https://github.com/google/fonts/issues/2576 explains a bit more why this is the case.
https://github.com/rsms/inter/blob/5ea76aef5a6790085ef2427a726d9953772a26ef/Makefile#L55-L56 suggests there is now a separate italic file that we can use.
To clarify ... I don't have an issue with a separate font file for Italic (or one). Just curious when it'll be available on Google CDN?
@rsms Do you know why italic is missing from Google Fonts?
Unless/until Google Fonts makes an italic version available, one can do the following:
fonttools
library for this purpose). I am currently doing this on my own Tailwind CSS-equipped site with a single Inter v.3.15 variable-font file (that ends up at a little under 51K after subsetting), using the following CSS:
/* === entire 'fonts.css' file === */
/* === Inter, variable === */
/* === (see https://thetrevorharmon.com/blog/how-to-prepare-and-use-variable-fonts-on-the-web) === */
/* latin */
@font-face {
font-family: 'Inter';
font-weight: 1 999;
font-style: oblique 0deg 7deg;
font-display: swap;
src: url('../fonts/Inter-3-15_subset_2020-08-20.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
font-family: 'Inter';
font-weight: 1 999;
font-style: normal;
font-display: swap;
src: url('../fonts/Inter-3-15_subset_2020-08-20.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* === within 'index.css' (which imports 'fonts.css' and some other .css files) === */
/* Safari 11+ */
@media not all and (min-resolution:.001dpcm) {
@supports (-webkit-appearance:none) and (stroke-color:transparent) {
.italic { /* overriding this Tailwind CSS class in Safari 11+ only */
@apply not-italic !important;
}
}
}
i, cite, em, var, address, dfn, .italic, h3, .h3 { /* overriding the Tailwind CSS .italic class */
font-variation-settings: 'slnt' -7;
font-style: oblique 7deg;
}
/* === The 7-degree thing is up to you. Some suggest 10 degrees, but that looks **too** slanted to me. === */
This works for my site, anyway. As you see, I had to do some adjusting to keep Safari in particular from over-slanting, but this otherwise seems to do well.
Update: The site is no longer using Tailwind, so donât want to confuse or mislead anybody about that; it was, however, using it at the time I originally wrote this reply.
2576 explains a bit more why this is the case.
https://github.com/rsms/inter/blob/5ea76aef5a6790085ef2427a726d9953772a26ef/Makefile#L55-L56 suggests there is now a separate italic file that we can use.
So, could you use that italics file then, to make the italics variant available in Google Fonts? It already exists, after all. You could just make it available the same way italics is available in other Google Fonts.
Many other variable fonts already have italics variants available on Google Fonts, i.e. Raleway, Roboto Mono, Rubik, Bitter, Exo 2, Merriweather Sans, EB Garamond, Vollkorn, and Literata. I donât see what is blocking Google Fonts from just using the existing italics file for the Inter font, seems like an easy fix.
I looked at the Inter fonts GitHub and it says that if there are any Google Fonts issues with it to report them here instead of at that GitHub.
So, if there is some kind of issue with how Inter codes for italics, as you suggest in #2576, perhaps just go ahead and change it to do it in a way compatible with current web browsers and the <i> tag or CSS âfont-style: italic;â that is typically used for italics, and then hopefully it is possible to just directly upload the fixed version to Google Fonts, or (alternatively) submit it as a pull request to the Inter font with the fixes and then upload the fixed version to Google Fonts.
And if the issue is not on Googleâs end but on Interâs end... well, the Inter GitHub said that this is where to report issues with it that occur in Google Fonts, but, please feel free to tell them anything that needs changing over at https://github.com/rsms/inter/, if there is actually an issue on their end rather than on Googleâs end.
I am looking to use the Inter font, including italics, on a MediaWiki wiki where Google Fonts do work but where @brycewrayâs creative workaround is not technically possible (specifically, there is no way to upload font files to the web server since only certain file types can be hosted; the fonts have to be remotely hosted by Google Fonts for it to work due to technical limitations). Thanks.
I should note also that I have since found additional issues with the CSS I put above in terms of getting different browsers to âbehaveâ so, as of now, here are the relevant sections of my siteâs SCSS:
/* === entire `_fonts.scss`=== */
/* === Inter, variable === */
/* ===
references:
https://thetrevorharmon.com/blog/how-to-prepare-and-use-variable-fonts-on-the-web
https://rwt.io/typography-tips/getting-bent-current-state-italics-variable-font-support
=== */
/* latin */
@font-face {
font-family: 'Inter';
font-weight: 1 999;
font-style: normal;
font-display: swap;
src: url('../fonts/Inter-3-15_subset_2020-08-20.woff2') format('woff2-variations');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* === part of `_base.scss` === */
i, cite, em, var, address, dfn, h3, h5, h6 { /* dealing with Inter VF */
font-variation-settings: 'slnt' -7;
/* previous is needed by Chromium and Safari; its presence makes Firefox "over-slant" Inter VF,
so we override that below with the @-moz-document url-prefix media query for Firefox */
font-style: oblique 7deg;
/* previous is needed by Firefox and Safari to prevent "over-slanting";
it apparently has no effect on Chromium */
@-moz-document url-prefix() {
font-variation-settings: normal;
}
}
Would love to see italic support added. đ
@M4RC1E - Could you reopen this issue? As of today, the API is not still displaying the italics.
Sadly while the PR was merged, this hasn't been pushed through to the API, and needs further (internal) discussion.
The issue I have is that -->API<-- is serving the slnt axis, but this isn't shown on fonts.google.com because - per https://arrowtype.github.io/vf-slnt-test/slnt-ital-tests - there is a sad state of the world in regard to ital and slnt axis support in browsers, and in CSS itself.
If we don't remove the snlt axis, but add a second Italic file to the Roman (the other major thing in that PR #4211) then the API will expose that as an "ital axis" that is only offered 0,1
rather than 0..1
, in addition to the slnt
axis; and it would be possible to call both from the API at the same time. What to do with fonts that provide both axes isn't defined in CSS atm, so it seems undesirable to add it; indeed for Recursive the early betas did this and were changed so that only slnt
remains, and that is the only other family that reached the production API with a slnt axis in 2019 before this minefield was recognized.
So, I think really the best thing to do will be to keep updating the Inter VF file as it was onboarded, with the slnt axis, and the GF team could make that axis visible on the fonts.google.com specimen page. The impact is that in Safari this won't be handled very nicely, but eventually Safari will fix that.
keep updating the Inter VF file as it was onboarded, with the slnt axis
@RosaWagner please organize this into the queue with a fairly high priority as its such a popular fam
So we upgrade to last version, but we don't wait for the slnt.textproto to be updated?
It looks like Inter 4.0-beta7 (released 14 days ago) no longer supports the slant axis and is instead opting to use two separate variable font files for roman/italic:
slnt (italic) variable-font axis has been removed and there are now two variable fonts, one roman and one italic, both with wght and opsz axes. This addresses issues with web browsers unable to reliably apply italic styles. Also makes it possible for the Italic designs to diverge from the upright "roman" design, which is not possible when italic is an axis of one variable font.
Does "won't happen" resolution mean Inter font won't offer italic versions in the future? It's a really popular and great font. Would be a shame to deprive it of such basic and in many cases crucial feature. The in-browser slanting is far from good looking :/
Edit: Reading a bit more in the docs, I found that that there's a slant property which allows adding what's equivalent to italics. I'm not a very frequent user of google's web fonts, but have used it on quite a few occasions. If not for this issue and taking the time to really re-explore the UI, my conclusion would have been as above - that this font doesn't offer italics at all, and it would be all up to browser's default slanting.
Perhaps, the discoverability of this fact could be improved a little in the UI? It's easy to make the wrong conclusion by looking for what seems like the way for google fonts to show that a font does ship with italics - and not finding it there.
Hey @RosaWagner - you set this to "won't happen". Can you please give an explanation so we know?
Just need some context to your update to the issue on March 9 for those of us who come to see the issue.
Thanks
Inter has a slant axis, so "italic" styles are available within the variable font. In CSS you can choose the slope angle with the parameter font-variation-settings: 'slnt' -10
for example. You can find more information about browser support of slant axis here: https://arrowtype.github.io/vf-slnt-test/
Google Font API can't yet generate static italic instances from a slant axis, that's a pity, but that's how it is.
We onboarded Inter Tight with a separated italic style, therefore with 2 variable fonts Roman/Italic, you can eventually use that one if you don't mind the tighter spacing.
Thanks for the detailed explanation - much appreciated.
@RosaWagner @mbyrne00 There is currently a beta for Inter which will have separate âRomanâ and âitalicâ (obliqued) versions, so perhaps its future release to GA will resolve this issue.
đ Inter author here. As mentioned, the upcoming version of Inter no longer has a slnt (or ital) axis. It is designed and distributed as two separate variable font files ("Italic" and "Roman"/"upright")
thanks @rsms for highlighting that a Roman/Italic version will be available in your repository :)
Concerning GF, unfortunately, once we onboarded a font with a Slant axis, we can't replace that font with a Roman/Italic family because it would otherwise cause reflow to existing users. More info on that page: https://googlefonts.github.io/gf-guide/onboarding.html#font-upgrades
@RosaWagner Does it mean that we won't get any Inter update on Google Fonts?
Will it be updated with another name like "Inter v4"?
@RosaWagner once we onboarded a font with a Slant axis, we can't replace that font with a Roman/Italic family
Good to know. Then letâs hold off on doing anything with the current version 3, not adding the slnt axis, so that we can add version 4 in the same way as Inter Tight (with separate Roman/Italic fonts.)
We could eventually do that like we did with Source Sans Pro. @chrissimpkins @davelab6 what do you think?
@rsms said,
so that we can add version 4 in the same way as Inter Tight (with separate Roman/Italic fonts.)
We also don't do versioning.
@RosaWagner said,
We could eventually do that like we did with Source Sans Pro. @chrissimpkins @davelab6 what do you think?
Oh, I see on https://fonts.google.com/?query=source that we still need to de-list Source Sans Pro
and Source Serif Pro
. This is why we don't do versioning ;)
@rsms would you be fine if we fork Inter to a GF maintained version that recreates a slnt axis?
@davelab6: would you be fine if we fork Inter to a GF maintained version that recreates a slnt axis?
Yes, no problem
@rsms thank you!!
Are you maintaining the Inter roman and italic as outline compatible designs?
Are you maintaining the Inter roman and italic as outline compatible designs?
No, not anymore. (For example, the italic /a is single-storey while the Roman one is double-storey.)
The new Inter VFs does have an ital axis in the STAT table, but itâs not interpolateable so the actual fonts are split in two.
@davelab6 - I support the idea of uploading Inter 4 to Google Fonts with another name, then delisting current Inter. See, for example, #2616 & #3104
@davelab6 - thanks for all of your input on this. Do you think there will be much chance of an inter4 version being published soon? Or a GF maintained fork of this one with slint axis? Just something to get us all going with this font? This would also unblock fontsource publishing a workable version of inter.
@davelab6 - If you still want to reinstate the slnt axis, I propose using an rvrn feature that changes a/e/f to cursive in Italic.
In case this helps someone looking for a quick solution, I was able to get the latest with italics by importing from the creator's site.
@import url('https://rsms.me/inter/inter.css');
EDIT - The author's suggestion:
<!-- HTML in your document's head -->
<link rel="preconnect" href="https://rsms.me/">
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
/* CSS */
:root { font-family: 'Inter', sans-serif; }
@supports (font-variation-settings: normal) {
:root { font-family: 'Inter var', sans-serif; }
}
@millerrafi You could borrow just the italic CSS, which configures the variable font's slnt
axis. This comment above clarifies how you can configure this yourself.
I wouldn't recommend hotlinking to other sites' resources for a couple reasons:
@import
rules issue network requests, slowing down CSS parsing and your page load.@AleksandrHovhannisyan All valid points. I updated my post with a <link>
example.
That CSS file is the author's offered solution and worth the tradeoff for my case, so I thought I would share. The assets are served by Cloudflare and each WOFF2 is about 100KB.
@davelab6 - If you still want to reinstate the slnt axis, I propose using an rvrn feature that changes a/e/f to cursive in Italic.
Yep, exactly - recursive.design demos how to do that nicely :)
I'll be discussing this family (and other families that are in a versioning conundrum) internally and update here when I have more information about how to move forwards.
(For folks logged into ex-twitter, there's a bit more discussion from me and @eliheuer above https://twitter.com/davelab6/status/1730698467859656907)
Version 3.12 includes the italic variable font. @m4rc1e Anyway to get this included?