Skip to content

Inter fonts lacks italics #2386

Open

Description

@cssobral2013
No description provided.

Activity

  1. virgofx commented on Apr 2, 2020

    @virgofx

    Version 3.12 includes the italic variable font. @m4rc1e Anyway to get this included?

  2. addyzone commented on May 24, 2020

    @addyzone

    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.

  3. bartek-szymanski commented on Jul 9, 2020

    @bartek-szymanski

    Is there any time schedule when will Inter font be updated to include italic?

  4. davelab6 commented on Aug 14, 2020

    @davelab6
    Member
  5. virgofx commented on Aug 17, 2020

    @virgofx

    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?

  6. mahnunchik commented on Sep 9, 2020

    @mahnunchik

    @rsms Do you know why italic is missing from Google Fonts?

  7. brycewray commented on Sep 12, 2020

    @brycewray

    Unless/until Google Fonts makes an italic version available, one can do the following:

    1. Download the full variable-font version of Inter (https://github.com/rsms/inter/releases/ should always have the latest).
    2. Subset it so it's not enormously large (see https://michaeljherold.com/2015/05/04/creating-a-subset-font/ for an explanation of using the Python 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.

  8. yetisyny commented on Sep 28, 2020

    @yetisyny

    #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.

  9. brycewray commented on Sep 28, 2020

    @brycewray

    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;
      }
    }
  10. natedunn commented on Jan 25, 2021

    @natedunn

    Would love to see italic support added. 👍

  11. cssobral2013 commented on Feb 4, 2022

    @cssobral2013
    Author

    @m4rc1e - Could you reopen this issue? As of today, the API is not still displaying the italics.

  12. davelab6 commented on Feb 17, 2022

    @davelab6
    Member

    Sadly while the PR was merged, this hasn't been pushed through to the API, and needs further (internal) discussion.

  13. 28 remaining items

  14. RosaWagner commented on May 26, 2023

    @RosaWagner
    Contributor

    We could eventually do that like we did with Source Sans Pro. @chrissimpkins @davelab6 what do you think?

  15. davelab6 commented on May 27, 2023

    @davelab6
    Member

    @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?

  16. rsms commented on May 27, 2023

    @rsms

    @davelab6: would you be fine if we fork Inter to a GF maintained version that recreates a slnt axis?

    Yes, no problem

  17. added this to the Icebox milestone on Jun 1, 2023
  18. moved this from Won't happen to Todo in Google Fontson Jun 1, 2023
  19. davelab6 commented on Jun 4, 2023

    @davelab6
    Member

    @rsms thank you!!

    Are you maintaining the Inter roman and italic as outline compatible designs?

  20. rsms commented on Jun 5, 2023

    @rsms

    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.

  21. cssobral2013 commented on Jun 5, 2023

    @cssobral2013
    Author

    @davelab6 - I support the idea of uploading Inter 4 to Google Fonts with another name, then delisting current Inter. See, for example, #2616 & #3104

  22. mbyrne00 commented on Jun 30, 2023

    @mbyrne00

    @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.

  23. cssobral2013 commented on Jun 30, 2023

    @cssobral2013
    Author
  24. millerrafi commented on Aug 3, 2023

    @millerrafi

    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; }
    }
    
  25. AleksandrHovhannisyan commented on Aug 3, 2023

    @AleksandrHovhannisyan

    @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:

    1. The path to the asset may change in the future, and you wouldn't know until your site breaks.
    2. CSS @import rules issue network requests, slowing down CSS parsing and your page load.
    3. If your site gets enough traffic, it could spam the other site's server with requests since it would now have to serve requests originating both from your site and theirs.
  26. millerrafi commented on Aug 3, 2023

    @millerrafi

    @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.

  27. davelab6 commented on Dec 1, 2023

    @davelab6
    Member

    @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)

  28. removed this from the Icebox milestone on Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions