Custom font help?


ThatKeith
 

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. :)

k


Jeremy Hughes
 

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:

<link href="https://fonts.googleapis.com/css2?family=Alegreya+Sans:wght@400;900&display=swap" rel="stylesheet”>

One difference that I see between Xway and browsers is that Xway displays a less bold version of the font. This is because Xway chooses a less bold weight (following CSS “bolder”) that is not available to the browsers. To get the same font in Xway and browsers you could select 900 in the Weight popup (default style for Heading1).

I also found that the font was updated in Xway after I switched pages and back (following up from your previous email).

Jeremy

On 15 May 2020, at 15:34, ThatKeith via groups.io <Thatkeith=mac.com@groups.io> 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. :-O


ThatKeith
 

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. :-O