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 2017-01-26 07:10:04

andacar
Member
From: Albuquerque, NM
Registered: 2014-09-03
Posts: 159
Website

Adding Adobe Typekit fonts

(I hope this isn't explained somewhere else. I did search for it...)

I'd like to add an Adobe typekit font to my Backlight page. Where would I save the script it invokes?

Thanks as always,

Darrell Leland


Darrell Leland

"Never go creeping around old castles at night; you may find what you're looking for."
- Grimsley

Offline

#2 2017-01-26 07:30:03

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

Re: Adding Adobe Typekit fonts

you can add scripts using the phplugin ttg_scripts hook
http://backlight.theturninggate.net/doc … tg_scripts


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

Offline

#3 2017-01-26 07:52:08

andacar
Member
From: Albuquerque, NM
Registered: 2014-09-03
Posts: 159
Website

Re: Adding Adobe Typekit fonts

Thanks Rod. I'll work on it and holler if I have questions.


Darrell Leland

"Never go creeping around old castles at night; you may find what you're looking for."
- Grimsley

Offline

#4 2017-01-26 08:46:03

andacar
Member
From: Albuquerque, NM
Registered: 2014-09-03
Posts: 159
Website

Re: Adding Adobe Typekit fonts

OK, I'm mostly there. Here's what I have so far:

<?php


function ttg_user_load( $style, $path ) {
	$g_tsvrl = explode( ' ', $style );                          // Extract gallery type
	define ( 'G_STYLE', strtoupper($g_tsvrl[1]) );              // and set global for later
	$g_path = str_ireplace('\\','/',$path);                     // change \ to / 
	$chunks = explode('/',$g_path);                             // and put into array
	define ( 'G_PATH', strtoupper($chunks[count($chunks)-2]) ); // gallery folder name is second to last
	//define ( 'TTG_SITE', '');                                   // set new site root for navigation, resources, etc.
	}


function ttg_scripts( $style, $path ) { 
	echo '

	<script>var __adobewebfontsappname__="dreamweaver"</script>
<script src="http://use.edgefonts.net/metamorphous:n4:default.js" type="text/javascript"></script>

	';
	return false;
} // END


?>

Clearly I need to change the adobewebfontsappname from Dreamweaver. To what? Backlight? Would that make the Metamorphous font show up in the font selector in Backlight? In the normal HTML, Dreamweaver invokes the font like this:

<body style="font-family: metamorphous; font-style: normal; font-weight: 400;">
</body>

Would that be required somewhere else? In a css file?


Darrell Leland

"Never go creeping around old castles at night; you may find what you're looking for."
- Grimsley

Offline

#5 2017-01-26 09:05:11

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

Re: Adding Adobe Typekit fonts

I don't think the font will show up in Baklight's font selector. You can try entering it in the Prepend Font-family w/ field.

I don't know that you have to change the adobewebfonsappname at all. If it's "dreamweaver" just try adding "dreamweaver" (without the quotes) to the Prepend 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

#6 2017-01-26 12:05:43

andacar
Member
From: Albuquerque, NM
Registered: 2014-09-03
Posts: 159
Website

Re: Adding Adobe Typekit fonts

I put "metamorphous" in the Prepend field and it worked!

Thanks again Rod, I've learned a lot from you.

Darrell Leland


Darrell Leland

"Never go creeping around old castles at night; you may find what you're looking for."
- Grimsley

Offline

Board footer

Powered by FluxBB