• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Base64 Encoding and Font CSS

By Abhishek Ghosh October 21, 2013 9:41 pm Updated on October 21, 2013

Base64 Encoding and Font CSS

Advertisement

Base64 Encoding Data URI can be used for Font Face in CSS Files, this is basically a good practice as we are decreasing four HTTP requests per font face. Redmond’s Browser (read Internet Explorer, if you never heard the terminology) can not be taken as a standard web browser, unfortunately. More unfortunately, it is still used and we still need to add the CSS, Javascript etc. fix for each version.

As practically most of these users are newer and the usage rate is declining very fast (historically, we should be thankful to Opera), may be you’ll think that probably there is no need to show the Internet Explorer users a very great Typography. Its important to know, depending on the user types of the website, you might need to think what is required to use. Peoples of China at the time of writing, still uses Internet Explorer 6. So, at least for commercial websites, it is quite important to show things properly. For non-Microsoft product, tutorial related blogs, honestly; you can ignore the fix and let the browser fall to the second closer font mentioned in the CSS file. In other words – if Internet Explorer users of the particular website historically is more, the time and money investment will be worthy (as market share is falling very fast).

 

Base64 Encoding and Font CSS : Introduction

 

For Free Fonts, there is no headache for the Licensing part. For paid Fonts, if you have the License, no one can prevent you to use the Font in Base64 Encoded Data URI format. It is quite important to understand that, Helvetica Neue Ultralight is quite closer at look when compared with Proxima Nova Condensed Thin. There is no issue with Mac, but for Windows PC, there can be issue, nicely discussed here :

Advertisement

---

 

Vim
1
https://github.com/twbs/bootstrap/issues/3629

 

So, these are quite important points to consider in the context of Base64 Encoding and Font CSS. What fonts to use and for which purposes in blogs is a complicated topic itself. Image in CSS to Base64 Data URI and How To Use Any Web Font From Own Hosted Library. These last two links towards two guides are quite important in the context of Base64 Encoding and Font CSS.

 

Base64 Encoding and Font CSS : Guide

 
Base64-Encoding-and-Font-CSS
So, our practical targets are two in number :

 

  1. To load the font properly for most of the users of the particular website for proper Typography
  2. To decrease the HTTP requests to load the webpage quickly

 

You’ll be using EOT for legacy IE and WOFF for anything else. Normally we use this typical CSS :

Vim
1
2
3
4
5
6
7
8
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
     url('webfont.woff') format('woff'), /* Modern Browsers */
     url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
     url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

 

When we are thinking about Base64 Encoding Data URI that can be used for Font Face in CSS Files, ideally we should use all the substitutes and replace with Data URI. But, practically this works :

Vim
1
2
3
4
5
6
7
8
9
@font-face {
font-family: 'Arial'; /* Do Proper Naming */
src: url('Arial.eot'); /* For IE 5-8 */
src: local('?'), /* It is called smile hack to promote CSS to UTF-16 */
url(data:font/truetype;charset=utf-8;base64,) format('truetype'), /*base64 encoded font IE9, Safari 3.1+ FF 3.5+ Chrome 4.0+*/
url('Arial.svg#123XYZ') format('svg'); /* iPad, iPhone with OS less than or equal to 4.1 */
font-weight: normal;
font-style: normal;
}

If you do not add the eot and SVG, actually it will fall back to second option – Helvetica Neue Ultralight will not create issue for iOS users, OS X users. They are installed by default plus the thing is for older generation. Now about generation. Almost all paid Font “suppliers” now has kits or tools for the automated Base64 Data Encoded CSS for Font face. For Free Fonts, you can use this tool :

Vim
1
http://www.fontsquirrel.com/tools/webfont-generator

You can use a TTF font and generate the whole thing kind of automatically.

Tagged With base 64 font , truetype fonts as base64 string c# , css eotファイル base64 , css encode font , css data: font eot , base64 font filter ie , base64 font css , base64 encoded fonts IE , base64 encode font , android chrome base64 font/opentype

This Article Has Been Shared 600 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Base64 Encoding and Font CSS

  • What are ASCII art and emoticons

    You have probably seen pictures “written” inside text files within a downloaded zipped file or obviously used a colon, followed by a close part of first bracket. These are ASCII art and emoticons.

  • Syntax Highlighting : All About the Colorful Snippets

    Syntax Highlighting is a method for coloring certain words and characters in a text depending on their importance in in an piece of code or snippet.

  • Secure Connection to Cloud Infrastructure by VPN Tunnel

    Secure connection to Cloud Infrastructure by using VPN Tunnel – on Secure Cloud Computing Guide, we pointed the importance of the connecting device.

  • Configuring Windows 7 as Web Server

    Configuring Windows 7 as Web Server with a Static IP is the most important and easy way to allow any Windows Program to use access your web folder by World.

  • Fundamentals of Cloud Computing

    Fundamentals of Cloud Computing represents the History, Characteristics, Cloud Computing Models and Implementation of Cloud Computing in separate paragraphs.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Configuration Management February 5, 2023
  • What is ChatGPT? February 3, 2023
  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Base64 Encoding and Font CSS," in The Customize Windows, October 21, 2013, February 5, 2023, https://thecustomizewindows.com/2013/10/base64-encoding-and-font-css/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT