Copy link to clipboard
Copied
Hello all,
I'm embedding HTML code into a web object in Captivate to get scrolling text. (I do not want to use the Captivate scrolling text widget just an FYI)
Everything is working fine except for the font. It's correctly pulling Lato into the scrolling text when I preview in Captivate, but when I publish the project to the web, it's showing Times New Roman.
I'm currently calling to the Lato font via Adobe Web Fonts but I want to call to the google font instead to see if this will solve my problem. How should I change the code, so that I'm calling in the font from Google? Or is there an obvious reason I'm not seeing as to why the correct font isn't appearing in the published project?
Here's the @Import code for Lato from Google Fonts:
<style>
@Import url('https://fonts.googleapis.com/css?family=Lato');
</style>
Here's the standard code:
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
Here's my scrolling text code:
<style type="text/css">
#scrollingText, h1 {
font-family: lato;
font-style: normal;
font-weight: 300;
font-size: 14px;
}
h1 {
text-align: center
}
#scrollingText {
margin-top: -25px;
padding-right: 15px;
padding-left: 15px;
}
</style>
<!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.--><script>var __adobewebfontsappname__="dreamweaver"</script><script src="http://use.edgefonts.net/lato:n1,n3:default.js" type="text/javascript"></script>
<div id="scrollingText">
<p> TEXT TEXT TEXT TEXT </p>
</div>
Thanks!
Copy link to clipboard
Copied
Moved to the Captivate forum
Copy link to clipboard
Copied
The Adobe Web Fonts method you have for your scrolling text assumes that you have access to both the <head> and <body> areas of a web page in order for the external call to the font to work...
Take a look at this article link that addresses using external fonts in Captivate:
https://medium.com/@hdecisions/using-custom-fonts-in-adobe-captivate-592350d4c650
Copy link to clipboard
Copied
Thanks for the article Anissa. I actually had already put the javascript discussed by this article into the project that so on enter it calls out the font from google. However, the correct font is still not being pulled into the scrolling text I've embedded as code in a web object that I created.
I'm wondering if the code is confused that I'm asking it to call out a font from adobe within the scrolling text, when on enter i'm having it call out a font from google. That's why I was guessing that if I changed the HTML code to call out the google font it might fix it. I just am not sure how to do it in the above code. (I'm new to HTML and all forms of coding so I'm having to figure this out as I go)
Any help on how to fix this code would be greatly appreciated!
Copy link to clipboard
Copied
Is this text dynamically generated from variables in the code?
Sometimes dynamic text doesn't behave in the same way as static text. Try testing whether you have the same issue with Static text (i.e. text that does not change in any way).
Copy link to clipboard
Copied
The text itself isn't dynamic.
Within the project the only advanced action applied to the text is that i have a button in the project and when you click it, it reveals the scrolling text box. However, there are no variables within the actual HTML code that make the text dyanmic. The exact code I'm using is in my original post, and the place where I place my text is where you see "TEXT TEXT TEXT."
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more