Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-08-03 07:37:43

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Google Fonts

Hi, I tried now for some hours Google Fonts.

In OSX / IOS Safari I cannot use these fonts. Firefox has no problems to show these fonts.

Have I overlooked something?

Rainer

Offline

#2 2016-08-03 12:42:19

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Google Fonts


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2016-08-03 17:15:35

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Google Fonts

I have read this post 20 times and did this exactly. The font Cormorant Garamond will not display in Safari Browser, please try it:

<link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond:400i,500i,600i,700i" rel="stylesheet">

Please have a look on my testsite:

http://tripstrilles.myqnapcloud.com

In Firefox the font has changed, in Safari a little, but to another font.


Rainer

---

Edit:

I tried now:

<link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond" rel="stylesheet">

this works, but how can I change between regular and italic?

Last edited by Rainer Goergen (2016-08-03 17:38:34)

Offline

#4 2016-08-03 22:28:53

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Google Fonts

Looks like the syntax is wrong. Did you copy it directly from the Google Fonts site?
Instead of 400i, for example, it should be 400italic, as shown in Matt's post.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2016-08-03 23:56:58

Rainer Goergen
Member
From: Trier, Germany
Registered: 2016-05-01
Posts: 401
Website

Re: Google Fonts

Google Fonts site is new. Directly copy from the site. I took the whole font family like Matthew wrote and it works.
But I don't know how zu change the font from regular to italic, see the edited post of mine.

Rainer

Offline

#6 2016-08-04 05:48:14

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Google Fonts

If using Markdown, try wrapping the words in underscores:   _italic words_

if using html, use the em tag:

<em>italic words</em>

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2016-08-04 14:59:44

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Google Fonts

Or use CSS:

h1 { font-family: my-font; }
h1.italic-heading { font-style: italic; }

Matt

The Turning Gate, http://theturninggate.net

Offline

#8 2016-08-27 09:03:41

john
Member
Registered: 2013-04-27
Posts: 55
Website

Re: Google Fonts

What I see on the google website does not end in CSS.  Should it.  As a result (apparently) I don't see the font in the list in the template.

Offline

#9 2016-08-27 10:16:47

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Google Fonts

It won't appear in the list. You need to write it in the "Prepend Font-family w/" field


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#10 2016-08-27 13:25:30

john
Member
Registered: 2013-04-27
Posts: 55
Website

Re: Google Fonts

The instructions in tips were strait forward other than the text did not match Matthew's example.

Offline

#11 2016-08-27 13:28:37

john
Member
Registered: 2013-04-27
Posts: 55
Website

Re: Google Fonts

Oops. Didn't read your last. I did write it in the prep end font-family w/.   What I wrote was "Italiano" without the quotes. Was that correct?

Offline

#12 2016-08-27 14:58:50

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Google Fonts

I don't know. Is that the correct font name?
Did you add the Google Fonts statement in Typography?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#13 2016-09-03 13:23:24

john
Member
Registered: 2013-04-27
Posts: 55
Website

Re: Google Fonts

I think I got that now Rod. Still working on it.

Offline

#14 2016-10-16 09:40:32

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Google Fonts

I just managed to use self hosted webfonts with backlight

This is how:
I created a directory outside the Backlight hierarchy (actually in the root of my site where the folder "backlight" also lies) and put the CSS with the webfont definitions there. In this directory I also created a subdir named "fonts" where I put my eot, woff, woff2 and ttf files.
In the "Google Fonts Statement" field of my templates I entered a link to this local stylesheet

<link href="http://fotos.michilge.de/mhfonts/latolatinfonts_mh.css" rel="stylesheet" type='text/css'>

I edited the stylesheet that came with my fontpackage to contain only the variations I really want to use and changed the property "font-weight" according to the convention followed by google fonts from something like "font-weight: bold;" to "font-weight: 700;" and so on since the numerical weights is what I can choose in backlight.

A sample declaration from my Stylesheet would be:

/* Webfont: LatoLatin-Regular */@font-face {
    font-family: 'LatoLatinWeb';
    src: url('fonts/LatoLatin-Regular.eot'); /* IE9 Compat Modes */
    src: url('fonts/LatoLatin-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('fonts/LatoLatin-Regular.woff2') format('woff2'), /* Modern Browsers */
         url('fonts/LatoLatin-Regular.woff') format('woff'), /* Modern Browsers */
         url('fonts/LatoLatin-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    text-rendering: optimizeLegibility;
}

The field "Prepend Font-family w/" must contain the value of the "font-family"-property so in my case "LatoLatinWeb".

Why should one want this?
The font I use is not available via Google Fonts.
I have visitors concerned about their privacy who don't like google to get a call for the fonts with a referrer from the pages they view.

Last edited by michilge (2016-10-16 09:44:03)

Offline

#15 2016-10-16 12:26:22

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Google Fonts

Since you're referencing the font location in the css file, I don't think you actually need to put anything in the Google Fonts Statement field.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#16 2016-10-16 21:40:47

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Google Fonts

You can write in any font in the Prepend Font-family field; it doesn't have to be a Google Font. In fact, you can paste any type of <link> element into the Google Fonts Statement field; that doesn't necessarily have to be hosted on Google.


Matt

The Turning Gate, http://theturninggate.net

Offline

#17 2016-10-16 22:57:22

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Google Fonts

Yes,  indeed. It's as open and straightforward as I had hoped it would be. The only thing to keep in mind is to notice if the stylesheet provided with the fonts uses numbers to specify font-weight or elsewise needs modification.

Offline

#18 2016-10-16 23:38:57

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Google Fonts

I can even enter multiple font-families.
In my case "Lato, LatoLatinWeb" would end up using Lato if it is installed as a system font and fall back to the self hosted latin subset if Lato is not present locally.

Offline

#19 2016-10-17 00:04:31

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: Google Fonts

rod barbee wrote:

Since you're referencing the font location in the css file, I don't think you actually need to put anything in the Google Fonts Statement field.

If I had it in my custom.css within the backlight tree, that would be right as long custom.css is activated.

I could probably rely on future updates or reinstallations not to do harm to the /backlight/custom tree, but somehow I tended to put it outside.

Offline

#20 2016-10-17 08:47:08

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Google Fonts

michilge wrote:

Yes,  indeed. It's as open and straightforward as I had hoped it would be. The only thing to keep in mind is to notice if the stylesheet provided with the fonts uses numbers to specify font-weight or elsewise needs modification.

That's why there are numerical font-weight controls throughout. ;-)


Matt

The Turning Gate, http://theturninggate.net

Offline

Board footer

Powered by FluxBB