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

Feature: Work with new Google Material Fonts #1

Open
artus70 opened this issue Nov 9, 2023 · 0 comments
Open

Feature: Work with new Google Material Fonts #1

artus70 opened this issue Nov 9, 2023 · 0 comments

Comments

@artus70
Copy link

artus70 commented Nov 9, 2023

Hi!

I just tried the EXT with this font:

https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200

On the first try, it did nothing. Then I replaced
return (bool)preg_match('/^https?:\/\/fonts\.googleapis\.com\/css\?/i', $url);
with
return (bool)preg_match('/^https?:\/\/fonts\.googleapis\.com\/css2?\?/i', $url);
(added 2? in /Classes/LoaderGoogleFontLoader.php, line 12).

Now it partly works (font files are stored and used locally) but it doesn't show the correct font details. It should look like this:

image

But it does look like this:

image

So the style details such as font weight and outline are not respected.

EDIT: I just found out that it doesn't recognize this additional css setting:

font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24 !important;
So it is displayed as filled even if FILL is set to zero. Same with the wght setting.

These are my additional settings to achieve the outlined, bolder look:

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 500,
  'GRAD' 0,
  'opsz' 24;
  font-size: 30px;
  margin-right: 8px;
}
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

1 participant