What is base 64 fonts for CSS - css

What is base font for CSS and how can we generate base font URL for CSS font face.
Generally we use like this
#font-face { font-family: myFirstFont; src: url(sansation_light.woff); }
But some time I have seen like
#font-face { font-family: myFirstFont; src: url(too long url with encrypted form); }
I Searched on web but did not get any useful knowledge. So is anyone used in project, please guide me.
Thanks

What you are looking for is encoding your font in base64. Compass (the library that extends SASS which generates CSS for you) has a built-in helper to do that for you:
http://compass-style.org/reference/compass/helpers/inline-data/
There are also a plethora of sites on the web that can convert your files into base64. Beware: this is not encrypted, it's just encoded into a string that is valid to embed in CSS and can be read by the system as a file.

Related

use custom fonts in header with Rotativa

I want to use a custom font in the header of the pdf file.
Using the font name only works properly on systems where that font exists
Accepts the text inside the body of the font using the following code, but does not work for headers
I do not want to use Google fonts and I want to use my own custom fonts
##font-face {
font-family: 'hpf';
font-style: normal;
font-weight: normal;
src: url(data:font/truetype;charset=utf-8;base64,AAEAAAAPAIAA...) format("truetype");
}
* {
font-family: 'hpf' !important;
}
I accomplished this using woff, woff2 and ttf files, but haven't tested it with base64. However, if you can't make it work with base64 format, you can choose to convert to the other formats. If this is the case, you could make use of https://onlinefontconverter.com (please, check this link), or any other conveter you prefer.
Here is a sample HTML file I have tested in my project (to clarify, I just changed the font name I used to MyFont):
<!DOCTYPE html>
<head>
<style>
#font-face { font-family: 'MyFont'; src: url('../../../Content/fonts/MyFont.woff2') format('woff2'),
url('../../../Content/fonts/MyFont.woff') format('woff'),
url('../../../Content/fonts/MyFont.ttf') format('truetype') }
.custom-font-text {
font-family: 'MyFont' !important;
}
</style>
</head>
<div>
Normal text <div class="custom-font-text">Text with custom font</div>
</div>
Please, also pay attention to the URLs, as they're crucial to make this approach work. In my case, font files are stored inside a folder called fonts, which is inside a folder called Content, in project's root folder (/Content/fonts). The final So I have to use "../" each time I want to go backwards from my /Views/Documents/PDF folder, where the header is placed.
EDIT (Base64 testing):
Tested successfully using base64. Here is my code:
#font-face {
font-family: 'MyFont';
src: url(data:font/truetype;charset=utf-8;base64,AAEAAAAOA...) format('truetype');
}
.custom-font-text {
font-family: 'MyFont' !important;
}
As far as I can see, the only difference with yours is that I'm using simple quotes on format("truetype"), but seems to have no real impact, as it also works with double quotes.
As your problem might be on the base64 encoded data, I would recommend you to generate the base64 using a tool like this:
https://www.fontsquirrel.com/tools/webfont-generator
Checking these options: ttf (as FontFormats), Keep existing (as TrueType Hinting) and Base64 Encode (as CSS) will generate a complete kit to test your font. For your information, please, have in mind that this tool requires to accept an agreeement clause which states that your font is legally eligible for web embedding.
Check this post to read a complete walkthrough to properly generate the kit and more useful info:
https://www.htmlgoodies.com/beyond/webmaster/serving-up-base64-encoded-custom-fonts.html

Embedding Glyphicons in CSS as data-uri

I have a web application that uses Glyphicons, but the client is restricted from downloading fonts.
I found a page that says you can convert to uri the Glyphicon files and embed them in the Bootstrap CSS, which I did.
(partial listing)
#font-face {
font-family: 'Glyphicons Halflings';
src: "data:application/octet-stream;base64,n04AAEFNAAAC.......
When I test it on the server, I get only a box where the glyph should be. Did I miss a step?
The application does use SASS-- could this be the problem?
There are few errors in your listing snippet:
src dataURI value must be inside url() 'function',
it must have either correct mime type instead of application/octet-stream: e.g. application/font-woff,
or corresponding format() declaration: e.g. format('woff'). Or better both.
Correct template should look like
#font-face {
font-family: '[name]';
src: url(data:font/[mime-format];base64,...) format('[css-format]');
/* font-weight, font-style, ... */
}
SASS should not be the problem for resulting snippet as long file is .scss and not .sass.

Converting and rendering web fonts to base64 - keep original look

I want to defer font loading on my site inspired by deferred font loading logic for Smashing Magazine.
Main part of this is converting fonts to base64 and preparing your CSS file. My steps so far:
Pick fonts on Google Web Fonts and download them.
Use Font Squirrel Webfont Generator to convert downloaded TTF files to CSS file with base64 embedded WOFF fonts (Expert options -> CSS -> Base64 Encode).
Load CSS file async (not important here).
CSS snippet for Open Sans Bold:
#font-face {
font-family: 'Open Sans';
src: url(data:application/x-font-woff;charset=utf-8;base64,<base64_encoded>) format('woff');
font-weight: 700;
font-style: normal;
}
The problem is, that converted fonts look a lot different. Take a look at Open Sans Bold:
Especially notice accents being way off and absolutely horrible letter a. Other font families and variants look very noticeably different as well (size and shape distortions, etc.).
So the question is: How do you properly encode TTF files from Google Web Fonts (or other source) to base64 format and use it in a way that the result is identical to the original file?
In the Font Squirrel Expert options, make sure to set the 'TrueType Hinting' option to 'Keep Existing'. Either of the other options will cause the TrueType instructions (hints) to be modified, which will in turn affect the rendering of the font.
Alternatively, if you're happy with the rendering of the font directly from GWF, you can just take that file and do the base64 encoding yourself. In OS X or Linux, use the built-in base64 command in Terminal/shell:
$ base64 myfont.ttf > fontbase64.txt
For Windows, you'll need to download a program to encode in base64 (there are several free/Open Source tools available). Copy the contents of that file, then use in your CSS as:
#font-face {
font-family: 'myfont';
src: url(data:font/truetype;charset=utf-8;base64,<<copied base64 string>>) format('truetype');
font-weight: normal;
font-style: normal;
}
(Note that you may need to make some adjustments to the various #font-face info to match your particular font data; this is just an example template)
Use this code snippet to base64 encode your font directly in the browser (OS independent, no need to install anything)
function base64convert (files) {
console.clear()
const reader = new FileReader()
reader.onload = (e) => {
console.log(e.target.result)
}
reader.readAsDataURL(files[0])
}
<input type="file" onchange="base64convert(this.files)">
Then copy the output and paste it into your CSS:
#font-face {
font-family: 'myfont';
src: url("<<copied base64 string>>");
}
A much simpler way to get the base64 code for Google Fonts is to use the following tool:
https://amio.github.io/embedded-google-fonts/
input the URL to your font and you get the base64 code back straight away :)

Using #font-face in tumblr not working with RTL script

I am trying to embed a font file to my tumblr blog using #font-face and Font Squirrel kit, but so far I had no luck. I also used base64 encoding for embedding the font, but neither in Safari nor Firefox I cannot get it to work.
Edit: Uploading files and using them to tumblr's static area works in Safari and for Latin script. The font I am trying to use includes characters from Old Turkic script, and I cannot get these to work. Any advice regarding the complex scripts would be appreciated.
My code is below:
#font-face {
font-family: 'orkunregular';
src: url('http://static.tumblr.com/gaobkbe/d1rn63eux/orkun-regular-webfont.eot');
}
#font-face {
font-family: 'orkunregular';
src: url(data:application/x-font-woff;charset=utf-8;base64,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NImKi/hcW2sakEffUEhgCX1BF3jhXyG8fRLscKe5ayIr/EWs26fCMG0zNlBQYPHeBPdEQ77Fo3ddJtv9J79JW6DXI3J/w+lLz3lmdTwh1Q76mePiPZj6hie0ppD+38qHv0PPTs983jabczJTgJRFIThvxilmUdFUMEn6NvSCCzUFsJ7mChDYgzRsPC15AHRcM/S2nypc5IixSnHESv+ywyUUpo0GbIEFClRpkKVGnUaNGnRpsM5F3S5pEefK665YcCQWx545ImEZ+bKKKuc8jpTQYGKKqmsiqqqqa6GmvxwUEttdXLr9+/dxuX3H9swDBfeJDRPPfp7mM6MzDtzZMbm2Lw3J+bUTLzOdp0LVtv1/vPt9eVr40/R0ht74+X8F+k2Nv0AALgB/4WwAY0AS7AIUFixAQGOWbFGBitYIbAQWUuwFFJYIbCAWR2wBitcWFmwFCsAAAABU4DqjgAA) format('woff'),
url('http://static.tumblr.com/gaobkbe/xtgn63ewo/orkun-regular-webfont.ttf') format('truetype'),
url('http://static.tumblr.com/gaobkbe/nZcn63ey6/orkun-regular-webfont.svg#orkunregular') format('svg');
font-weight: normal;
font-style: normal;
}
How to proceed from now on?
Don't try to store and serve the font files on tumblr itself. This is likely not permitted by Tumblr TOS.
Put the font files somewhere else and it will work.
What you have done so far is, you defined the font-family. That will not make the browser use it.
Add this to your current custom css.
section.post {
font-family: "orkunregular";
}
You need to apply that Font to the HTML-Elements you want to use it on.
section.post would be only your own blogposts.
if you want everything to use that font, try:
* {
font-family: "orkunregular" !important;
}
Please check the TOS of Tumblr if they allow that kind of customization, or atleast host those Fonts on a seperate webserver.
Okay, I've solved it. When generating the font kit, I chose the Unicode range of the Old Turkic script, then when used the new kit, it displayed without any problems.
Here's the blog page, http://bitigchi.tumblr.com/indiriler1
Thanks for all the answers.

How to add custom font in my theme?

now, i want to use Monotype Corsiva. i add the font in my theme ,then in css file using font-family:Monotype Corsiva ,but some one tips me: font used for site title and headings is not working if it's not installed on users system. You should either remove font file from theme directory or include it in css file in apropriate way.
how to include it in css file in apropriate way? thank you
You need to use #font-face with your font in either .ttf or .eot
Below is an example
#font-face {
font-family: 'RieslingRegular';
src: url('fonts/riesling.eot');
src: local('Riesling Regular'), local('Riesling'), url('fonts/riesling.ttf') format('truetype');
}
h1 {
font-family: 'RieslingRegular', Arial, sans-serif;
}
For more details, look here http://bavotasan.com/2010/embedding-fonts-web-site-css-font-face/
Monotype Corsiva is a copyrighted font. Check out http://www.fonts.com for conditions and instructions for use. They have a policy that allows a limited number of page views (25,000) for free. The instructions and procedures might be a bit confusing, but in the end you will have a script element generated by them to add to your pages, and then you will just use the font under the name they give you (it seems to be Corsiva W01).
Alternative, try and find a suitably similar free font from Google Web Fonts, for example.

Resources