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

Why don't all OpenType features work in fonts served via the API? #1335

Open
m4rc1e opened this issue Nov 20, 2017 · 3 comments
Open

Why don't all OpenType features work in fonts served via the API? #1335

m4rc1e opened this issue Nov 20, 2017 · 3 comments
Assignees

Comments

@m4rc1e
Copy link
Collaborator

m4rc1e commented Nov 20, 2017

Fonts being served using the CSS API do not have the same OT features as their downloadable counterparts (fonts.google.com/download?family=FAMILY ZIPs).

If I extract TTFs from the CSS:

/* cyrillic-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: local('Montserrat Regular'), local('Montserrat-Regular'), url(https://fonts.gstatic.com/s/montserrat/v12/rBHvpRWBkgyW99dXT88n7wsYbbCjybiHxArTLjt7FRU.woff2) format('woff2');
  unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: local('Montserrat Regular'), local('Montserrat-Regular'), url(https://fonts.gstatic.com/s/montserrat/v12/NX1NravqaXESu9fFv7KuqgsYbbCjybiHxArTLjt7FRU.woff2) format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: local('Montserrat Regular'), local('Montserrat-Regular'), url(https://fonts.gstatic.com/s/montserrat/v12/SKK6Nusyv8QPNMtI4j9J2wsYbbCjybiHxArTLjt7FRU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: local('Montserrat Regular'), local('Montserrat-Regular'), url(https://fonts.gstatic.com/s/montserrat/v12/gFXtEMCp1m_YzxsBpKl68gsYbbCjybiHxArTLjt7FRU.woff2) format('woff2');
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: local('Montserrat Regular'), local('Montserrat-Regular'), url(https://fonts.gstatic.com/s/montserrat/v12/zhcz-_WihjSQC0oHJ9TCYAzyDMXhdD8sAj6OAJTFsBI.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
}

They only contain dnom, frac, liga, numr OT Features. If you download the family from GoogleFonts, they contain a ton more.

I'm guessing our settings for pyftsubset are removing features we deem unnecessary?

@rsheeter rsheeter self-assigned this Nov 30, 2017
@rsheeter
Copy link
Collaborator

@davelab6
Copy link
Member

We will look into this soon :)

@davelab6 davelab6 added this to the Questions about Google Fonts service (API) milestone Nov 30, 2017
@davelab6 davelab6 changed the title OT features for embed fonts Why don't all OpenType features work in fonts served via the API? Nov 30, 2017
@josineto
Copy link

josineto commented Jan 18, 2020

Hi, is this in any plans to be corrected?

Today I have to download two whole sets of fonts for using small caps: regular, italics and bold and SC-regular, SC-italics and SC-bold (SC for small-caps, obviously). If smcp font feature was embedded, just one set would be necessary (in this case, three fonts less).

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

5 participants