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

Replace italic figure sample word #123

Open
davelab6 opened this issue Feb 21, 2020 · 6 comments
Open

Replace italic figure sample word #123

davelab6 opened this issue Feb 21, 2020 · 6 comments
Assignees

Comments

@davelab6
Copy link
Collaborator

The italic figure sample word is Good but this doesn't have an a or g in it, which the text explicitly mentions, so the sample word should be updated

Screen Shot 2020-02-21 at 11 51 32 AM

@jpamental jpamental self-assigned this Feb 21, 2020
@jpamental
Copy link
Owner

This is harder than it seems. I'm having trouble finding an open-source VF where a single font file contains upright and italic, and responds properly to the 'ital' axis being set. Separate files don't work as the browser doesn't download the italic one if it's not called. I've replaced it with Literata and separate files, but this is really not ideal as it's using syntax that only works with separate files.

I'm going to have to rewrite the content a little bit to talk about separate vs combined VF files as they behave and are supported completely differently right now.

@jpamental
Copy link
Owner

(it is worth doing, but still a bummer. I should have thought this one through better)

Also, will need a nice fancy Material toggle like on Optical Size (auto). Hoping that @kennethormandy can help with that.

@jpamental
Copy link
Owner

OK - I've updated the copy and added both demos to showcase the different strategies for combined or separate upright/italic VF files. Just needs toggles instead of the current widgets.

@jpamental
Copy link
Owner

Reassigning this one to @kennethormandy to add MD toggle component instead of radio buttons (same as on opsz component)

jpamental added a commit that referenced this issue Feb 26, 2020
Related to #123 and #124 - replace radio buttons with mdc-switch component. Currently the Sass isn’t compiling properly, which could be related to Ruby vs Dart Sass syntax differences. Found reference to similiar issue here:

material-components/material-components-web#5631
@davelab6
Copy link
Collaborator Author

davelab6 commented Feb 29, 2020

Thanks Jason!

I'm having trouble finding an open-source VF where a single font file contains upright and italic, and responds properly to the 'ital' axis being set.

Are there any non-libre fonts that respond properly?

Separate files don't work as the browser doesn't download the italic one if it's not called.

I'm not entirely sure what you mean... if they are separate files, then there is no ital axis, there is just a pairing of roman and italic files into a single family via name or STAT table metadata on desktops and via matching font-family values within @font-face stanzas in CSS; and the VF family works the same as a static family.

I'm going to have to rewrite the content a little bit to talk about separate vs combined VF files as they behave and are supported completely differently right now.

I wonder if there is a different way of explaining this that explains ital and slnt together as one topic - eg, emphasis, per the association with HTML <em> tags. The first two 'expressive' variable font projects that Google Fonts team highlighted at the ATypI 2019 presentation were Recursive and Fraunces, and Recursive has both slnt and ital, and Fraunces has 2 separate files for roman and italic. I think using those as examples would be ideal, as they will be soon available in the API.

I also wonder if its worth discussing the other details in https://www.w3.org/TR/css-fonts-4/#font-style-prop, or just linking out to that page to learn more... I see https://www.w3.org/TR/css-fonts-3/#font-style-prop doesn't deal with VF at all, and (afaik) css-fonts-4 is not yet at the Recommendation stage... but I am fuzzy on the way CSS is evolving these days.

@jpamental
Copy link
Owner

I already rewrote the content to include talking about a single VF file with an ital axis or separate upright and ital, so that part's covered.

But I think I may have found a hole in the implementation of how browsers are dealing with the separate files and custom properties. I'm not certain it's a bug, but it's definitely a problem.

If you have both files included in your @font-face rules, but are assigning font-style with a CSS custom property, changing the value of that custom property does not trigger the font download. I need to do more research on this one, but it's definitely an issue.

Anyway I think this section is in good shape short of having a Material 'switch' instead of a radio button.

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

3 participants