the script form justfont

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Jan 22, 2013 2:31 pm
Reply with quote
Report this post
A Question about the web font service (Chinese fonts) from http://www.justfont.com/
User can get a code <script type="text/javascript"> xxxxx xxxx... </script> from justfont,
and paste the script code between <head> ...</head> in index.php or paste between <body>... </body> in index.php of Joomla Template,
then the font of web site will display with customer Chinese Font
But, the index.php in GK Templates, like fashion, has no <head> and <body>
I am wondering the use of this custom font service in GK Templates. :?: Thanks :!:
User avatar
Junior Boarder

Konrad M
Tue Jan 22, 2013 4:47 pm
Reply with quote
Report this post
Hi,
please try go to layouts/default.php Here you should find <body> tags.
User avatar

GK User
Tue Jan 22, 2013 7:11 pm
Reply with quote
Report this post
Sorry, there is a correction in the use of justfont
the script code
<script type="text/javascript"> xxxxx xxxx... </script> from justfont, should paste between <head> ...</head> in index.php
and the custom font can be displayed in article content, when edit article content by add<div class="ct1"> mycontents xxx...</div>

and then if we want the custom font display in full web further (without add <div class="ct1"> </div> on every article when editing) , we add <div class="ct1"> below <body> , and add </div> under </body> in index.php

Because the index.phph of GK Template has no <head> and <body>

Now, I paste script code between <head> </head> in layouts/default.php
and paste <div class="ct1"></div> between <body> </body> in in layouts/default.php

the outcomes are,
first, the article content editing with <div class="ct1">xxx</div> can show custom font correctly,

but the other font like menu, article title ... can not show the custom font !?

Is any way I can use custom font(in Chinese) for all the web.
User avatar
Junior Boarder

Konrad M
Tue Jan 22, 2013 7:12 pm
Reply with quote
Report this post
So please go to layouts/blocks/head.php here you will find <head> tags.
User avatar

GK User
Tue Jan 22, 2013 7:19 pm
Reply with quote
Report this post
but the layouts/blocks/head.php has no <head> tag
User avatar
Junior Boarder

Konrad M
Tue Jan 22, 2013 7:22 pm
Reply with quote
Report this post
Yes, but content in this file is loaded between <head>. This tag you will find in default.php too.
User avatar

GK User
Tue Jan 22, 2013 7:44 pm
Reply with quote
Report this post
I have paste 2 code in default.php

(1) <script type="text/javascript"> xxxxx xxxx... </script> is pasted between <head> </head>
(2) <div class="ct1"> </div> pasted below <body> ,
like
<body<?php echo $tpl_page_suffix; ?><?php if($this->browser->get("tablet") == true) echo ' data-tablet="true"'; ?><?php $this->layout->generateLayoutWidths(); ?><?php echo ' data-loading-translation="'.JText::_('TPL_GK_LANG_SIDEBAR_LOADING').'"'; ?>>
<?php if ($this->browser->get('browser') == 'ie7' || $this->browser->get('browser') == 'ie6') : ?>
<div class="ct1"> </div>

is this correct? or what should I do further, for the custom font to display in full web. thanks

or is something need to change in template settings / fonts ??
User avatar
Junior Boarder

Konrad M
Thu Jan 24, 2013 9:05 am
Reply with quote
Report this post
No you don't have to change nothing in template font settings. Is it working no for you after you paste this code ?
User avatar

GK User
Tue Jan 29, 2013 4:18 pm
Reply with quote
Report this post
code (1) seens works
but code(2) not

the code(1) : <script type="text/javascript"> xxxxx xxxx... </script> is pasted between <head> </head>
the custom font is working! when I typeing <div class="ct1">xxx</div> in articles
but the heading of article still can not show custom font

so I paste code(2) <div class="ct1"> </div> pasted below <body> in default.php, for display custom font in all web Chinese Characters,
but the custom font , besides the article pasted with code(1), not working.
User avatar
Junior Boarder

Konrad M
Wed Jan 30, 2013 10:58 am
Reply with quote
Report this post
Have you some example to correct script using ? Becasue I don't know it.
User avatar

GK User
Mon Feb 04, 2013 9:46 am
Reply with quote
Report this post
http://fashion.tcscope.com/index.php/20 ... 2-02-34-08

The red color characters in Chinese is the custom fonts display correctly, the source code of this article:

<p>
服飾組畢展</p>
<div class="ct1">
<span style="color:#ff0000;">這是測試字體 &nbsp;use &lt;div&gt;</span></div>
<p>
<span style="color:#ff0000;"><span class="ct1" style="">這是測試字體 use &lt;span&gt;</span></span></p>
<div class="ct1">
<span style="color:#ff0000;"><span style="font-size: 30px;">這是測試字體依照參考師上輸入的</span></span></div>

so code(1) is working.

However, then I paste code(2) <div class="ct1"></div> between <body> </body> in in layouts/default.php
the Chinese font in this web should be show in custom font, but it is not working.
because the other font in webpage like menu, article title ... can not show the custom font .

here is the script get from justfont.com (the Chinese custom font service)
<script type="text/javascript">window.jfAsyncInit=function(){ctb.main({'appId':'d43748b0Tbfih8BBjb-d-IWl5kU8pnZkTCDwRgk2jT03b6oKpMX5GMrHVKl7FWHc7arbN1IAD-ZOANw85CzzULeAa3VJS1zR1_5kJI3Xb1005DxJ_YIxisxaH-Tvr8Aw1q0lvlILxTHrS4TkzYd8xggxuPGYR7Vuoq-Mj3XjevLdX55emRo='})};(function(){var c={'scriptTimeout':3000};var h=document.getElementsByTagName("html")[0];h.className+=" jf-loading";var e=setTimeout(function(){h.className=h.className.replace(/(\s|^)jf-loading(\s|$)/g," ");h.className+=" jf-inactive"},c.scriptTimeout);var jf=document.createElement("script");var d=false;jf.type="text/javascript";jf.async=true;jf.src='http://ds.justfont.com/core/js/v1.0/d43748b0Tbfih8BBjb-d-IWl5kU8pnZkTCDwRgk2jT03b6oKpMX5GMrHVKl7FWHc7arbN1IAD-ZOANw85CzzULeAa3VJS1zR1_5kJI3Xb1005DxJ_YIxisxaH-Tvr8Aw1q0lvlILxTHrS4TkzYd8xggxuPGYR7Vuoq-Mj3XjevLdX55emRo=.js';jf.onload=jf.onreadystatechange=function(){var a=this.readyState;if(d||a&&a!="complete"&&a!="loaded"){return}d=true;clearTimeout(e)};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(jf,s)})();</script>
User avatar
Junior Boarder

Konrad M
Mon Feb 04, 2013 1:00 pm
Reply with quote
Report this post
Unfortunetly it is 3rd party extension not our template issue. And we don't support 3rd party script.
User avatar


cron