Custom font help?

I’d like to use a specific Google web font, Alegreya Sans, for both body text (regular weight) and headlines (the heaviest ‘900’ weight).
How should I set this up? I have created a custom font with the correct font name, added alternatives, set the type, and set the font URL (https://fonts.googleapis.com/css2?family=Alegreya+Sans).

But how should I specify the weight? If I set Bold, 900 or Bolder in the Document: Default Styles for Header 1 it doesn’t make any difference in Xway or the browser. If I apply Bold, 900 or Bolder directly to the header 1 text this looks correct in Xway but doesn’t translate to the chunky weight in a browser; it looks faintly bolder, like Medium vs Regular.

If I add “:wght@900” to the end of the custom font URL this works, but of course it makes ALL text set in that typeface to be ultra-bold. I tried setting up two different custom font entries, one with 900 set, but the font name can’t be identical for two entries, and it’s what references the actual typeface so can’t be different. :open_mouth:

Hi Keith,

This overlaps with my previous reply, but you can specify several weights in the URL.

This works for me:

https://fonts.googleapis.com/css2?family=Alegreya+Sans:wght@400;900&display=swap

I pasted the following text from Google’s Embed tab, after selecting Regular and Black 900 on the Alegreya Sans page:

groups.io Thatkeith=email@hidden wrote:

I’d like to use a specific Google web font, Alegreya Sans, for both body text (regular weight) and headlines (the heaviest ‘900’ weight).
How should I set this up? I have created a custom font with the correct font name, added alternatives, set the type, and set the font URL (https://fonts.googleapis.com/css2?family=Alegreya+Sans).

But how should I specify the weight? If I set Bold, 900 or Bolder in the Document: Default Styles for Header 1 it doesn’t make any difference in Xway or the browser. If I apply Bold, 900 or Bolder directly to the header 1 text this looks correct in Xway but doesn’t translate to the chunky weight in a browser; it looks faintly bolder, like Medium vs Regular.

If I add “:wght@900” to the end of the custom font URL this works, but of course it makes ALL text set in that typeface to be ultra-bold. I tried setting up two different custom font entries, one with 900 set, but the font name can’t be identical for two entries, and it’s what references the actual typeface so can’t be different. :open_mouth:

Re the URL, I had made a slightly silly assumption about what should be included. That’s because I know in other software cases (generically speaking, outside of Xway entirely) it’s sometimes best to copy only the ‘core’ URL without any parameters. I hadn’t consciously connected the User Guide’s note about this (“you can copy font URLs with surrounding text and Xway will extract the URL from the surrounding text”) with what I was getting from Google Fonts. I wonder whether giving an example of using a full parameter-rich Google font URL in the guide might be helpful for people who make the same silly assumptions? It’s actually really simple, far easier than I suspected, IF I work with Google’s fonts style selection and embedding helper and let Xway get on with its job. :slight_smile:

k