Tag: internet

How to show any font in your site with Google Fonts and Cufon

Unfortunately, to display texts using not defaults fonts, this fonts must be installed in user’s computer. What is a problem to the designers.

Now I show two ways to solve that, Google Web Fonts and Cufon.

Google Web Fonts

This tool, unfortunately, have a limited number of fonts that can be used, but your rendering is faster than Cufon.

How to use:

  • First, you must choose the fonts for your site. Go to http://www.google.com/webfonts.
  • Click “Add to Collection” to choose them. In this tutorial I’ve selected “Eater“, “Give You Glory” and “Bonbon“. Memorize their names to later.
  • In the blue bar below, click “Use“. Will be displayed tips for fonts and some methods to attach in your site (“3. Add this code to your website“). I’ve selected the tab “@import”:

  • Copy text box content and past in <style type=”text/css”>…</style> tag:
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Eater|Give+You+Glory|Bonbon);
</style>
  • Use their names in “font-family” normally:
    <p style="font-family:Eater">Fonte Eater</p>
    <p style="font-family:Give You Glory">Fonte Give You Glory</p>
    <p style="font-family:Bonbon">Fonte Bonbon</p>
    

Google Web Fonts is ready to use!

Cufon

Has long been used, inclusive some WordPress templates. It allows use any fonts, an advantage against Google Web Fonts. Uploading the font, it generates scripts to be used in your site. At current version (1.09), Cufon uses Canvas, taking more processing time and some browsers doesn’t support it.

How to:

  • Download .js file. Open URL http://cufon.shoqolate.com/generate/, right click “Download” and “Save As…” (or “Salve Link As…“).
  • Continuing at http://cufon.shoqolate.com/generate/, upload your font filling “Regular typeface” field. If you want bold and/or italic, upload respective files in “Bold typeface“, “Italic typeface” and “Bold italic typeface“, not mandatory.
  • Check “The EULAs of these fonts allow Web Embedding” (basically informs that you allowed to use these fonts), configure how font will be used in your site setting configuration fields and read terms and check “I acknowledge and accept these terms“, if agree.
  • Click “Let’s do this” to download another .js file, referencing fonts uploaded.
  • Attach javascripts (.js files) in HTML file:
<script type="text/javascript" language="JavaScript" src="<PATH>/cufon-yui.js"></script>
<script type="text/javascript" language="JavaScript" src="<PATH>/<FONT>.js"></script>
  • Let’s put Cufon to work! Call “replace” method of “Cufon” object, setting tag name…:
<script type="text/javascript" language="JavaScript">
//Replaces fonts of tags H1
Cufon.replace('h1');
</script>
  • Or id attribute:
<script type="text/javascript" language="JavaScript">
//Replaces font of tags with id="header"
Cufon.replace('#header');
</script>
  • Or CSS class
<script type="text/javascript" language="JavaScript">
//Replaces font of tags with class="highlight"
Cufon.replace('.highlight');
</script>
  • You can set more fonts, setting attribute “fontFamily” in method “replace“, this way:
<script type="text/javascript" language="JavaScript">
Cufon.replace('h1', {fontFamily: 'Font 1'});
Cufon.replace('#tagID', {fontFamily: 'Font 2});
Cufon.replace('.class', {fontFamily: 'Font 3});
</script>

Cufon is ready!

Click here to download this tutorial.

Now, there is no limit to fonts!


Google launches Chrome for Android, finally!

 

You can’t know but default Android’s browser isn’t Chrome, only a implementation of Webkit.

Today(7), quietly, Google published the beta version of your browser in Android Market. But, only the ICS (Ice Cream Sandwich), or above, is able to run it. I hope the Google change it to a most “accessible” version.

 

The video below shows Chrome in action.


Android Market

Unfortunately I don’t have the Ice Cream Sandwich to write a review, but read complete description and comments of who already downloaded the brownser from Android Market.

If you uses Chrome, share your experience with us. 😉

See ya!


How is fight between Firefox, Internet Explorer and Google Chrome?

I’ve was analysing blog access chart and, curiously, I see how are the most usable browsers.

The fight between Firefox and Internet Explorer is old and, little time ago, Microsoft’s browser lost first position to Firefox. Now, with Google Chrome more stable and accessible, the three firsts position may be changed again.

In one year of interval, this blog had 35,738 visits, where the Firefox was most usable browser, responsible for 14,705 (41.75%) of access, distantly followed by Internet Explorer (10,542 access, or 29.5%) and Google Chrome (8,679 access, or 24.29%). Opera came in 4th and Safari came in 5th.

Below the chart generated by Google Analytics with complete list of browsers and amount of access:

Chart generated by Google Analytics between 06/07/2010 and 06/07/2011 (click to zoom)

Will be a matter of time to Internet Explorer to leave second position to Google Chrome


How is brazilian broadband quality?

Who, that lives in Brazil, thinks owns broadband internet?
Don’t have! We have a high speed modem connection.

While here, in Brazil, the most fast connection is 100Mbps, the japanese are testing 1Gbps connection speed. Realy, 1Gbps!!

I live in São Paulo and in my house there isn’t a quality connection, my 1Mpbs connection rarely reaches 600Kbps.

Youtube provides a comparative chart between your ISP connection, national and world connection average.

chart Youtube
Chart by Youtube (http://www.youtube.com/my_speed)

The yellow bar is my ISP, blue bar is the city from connection, green bar is state from connection, pink bar is the country and gray bar is world average.

This chart tells how our broadband are deprecated.

If you want to compare you broadband connection too, you can use this link http://www.testesuavelocidade.com.br. Has others tools to meter you speed connection in Internet.


Setting up internet access through proxy server

Today I had a trouble in my workplace when a client application, running through a terminal (DOS prompt), not reach the server hosted in the internet, this is because the company where I work use proxy.

After some tries I found two solutions to solve my access problem: first was pass as Java parameters the proxy’s configurations.

$ java -Dhttp.proxyHost=serv -Dhttp.proxyPort=port -Dhttp.proxyUser=user -Dhttp.proxyPassword=pass  ClassJava

-Dhttp.proxyHost = IP or host name of server proxy
-Dhttp.proxyPort = Proxy port
-Dhttp.proxyUser = User
-Dhttp.proxyPassword = Password

This way the class ClassJava will have access to internet through proxy server.

Another way, was insert the settings in own class:

public static void main(String[] args){
...
System.getProperties().put("proxySet", "true");
System.getProperties().put("http.proxyHost", "serv");
System.getProperties().put("http.proxyPort", "port");
System.getProperties().put("http.proxyUser", "user");
System.getProperties().put("http.proxyPassword", "password");
...
}

proxySet = Connect, or not, through proxy server
http.proxyHost = IP or host name of server proxy
http.proxyPortt = Proxy port
http.proxyUse = User
http.proxyPassword = Password

Using this resource you can set your application to access the internet through proxy server.

I hope help you.  Bye! 😉


  • Advertisement

  • Advertisement

  • Copyright © 1996-2010 André L. S.. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress