font is applied only for English letters? - css

Hi I am trying to use Tamil font , Which is supporting only for English letters but not for the Tamil letters
The dark letters are English Letters and the list is tamil letters but
font not applied
app.scss
#font-face {
font-family: 'tamil-ravi';
font-weight: normal;
font-style: normal;
src: url('../assets/fonts/ravi-b.ttf');
src: url('../assets/fonts/ravi-b.ttf') format('embedded-opentype'),
local('Akzidenz-Grotesk Next'),
local('Akzidenz-Grotesk Next'),
url('../assets/fonts/ravi-b.ttf') format('woff')
}
#font-face {
font-family: 'nagananthini';
font-weight: normal;
font-style: normal;
src: url('../assets/fonts/nagananthini.ttf');
src: url('../assets/fonts/nagananthini.ttf'),
local('nagananthini Next'),
local('nagananthini Next'),
url('../assets/fonts/nagananthini.ttf') format('ttf')
}
.tamil-ravi{
font-family: 'nagananthini';
}
* {
font-family: 'tamil-ravi';
}

Can you please use this fonts and download fonts file on zip
#font-face{
font-family:'Ravi-d';
src:url('../assets/fonts/Ravi-d.eot');
src:url('../assets/fonts/Ravi-d.eot?#iefix') format('embedded-opentype'),
url('../assets/fonts/Ravi-d.woff2') format('woff2'),
url('../assets/fonts/Ravi-d.woff') format('woff'),
url('../assets/fonts/Ravi-d.ttf') format('truetype');
}
font-family:'Ravi-d';
https://drive.google.com/open?id=1GYZdI7em5S0iPp4sw6cYdST0Q3buFPpO

Related

How to use #font-face for the Manrope font?

I need to use a custom font in my email templates and #font-face looks like the only viable option.
In the previous version of the template there was ProximaNova
#font-face {
font-family: ProximaNova;
src: url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-regular-webfont-webfont.eot);
src: url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-regular-webfont-webfont.eot?#iefix) format('embedded-opentype'), url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-regular-webfont-webfont.woff) format('woff');
font-weight: 400;
font-style: normal
}
#font-face {
font-family: ProximaNova;
src: url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-semibold-webfont-webfont.eot);
src: url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-semibold-webfont-webfont.eot?#iefix) format('embedded-opentype'), url(https://cdn.auth0.com/fonts/proxima-nova/proximanova-semibold-webfont-webfont.woff) format('woff');
font-weight: 600;
font-style: normal
}
Now I need to replace it with Manrope https://fonts.google.com/specimen/Manrope?sidebar.open=true&selection.family=Manrope but there is no instructions how to use it in #font-face.
You can download the Manrope font family zip from google, extract the Manrope-VariableFont_wght.ttf file and place it in you css folder.
Then in your stylesheet simply add:
#font-face {
font-family: 'manrope';
src: url('Manrope-VariableFont_wght.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

Browser rendering faux bold - not font face bold

I have a regular and bold version of a font face implemented like this:
#font-face {
font-family: 'TeXGyreAdventor';
src: url('../fonts/texgyreadventor-regular-webfont.eot');
src: url('../fonts/texgyreadventor-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/texgyreadventor-regular-webfont.woff') format('woff'),
url('../fonts/texgyreadventor-regular-webfont.ttf') format('truetype'),
url('../fonts/texgyreadventor-regular-webfont.svg#TeXGyreAdventorRegular') format('svg');
font-weight: normal;
font-style: normal; }
#font-face {
font-family: 'TeXGyreAdventor';
src: url('../fonts/texgyreadventor-bold-webfont.eot');
src: url('../fonts/texgyreadventor-bold-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/texgyreadventor-bold-webfont.woff') format('woff'),
url('../fonts/texgyreadventor-bold-webfont.ttf') format('truetype'),
url('../fonts/texgyreadventor-bold-webfont.svg#TeXGyreAdventorbold') format('svg');
font-weight: bold;
font-style: normal; }
body { font-family: 'TeXGyreAdventor'; }
Now I would expect anything told to be bold in the CSS to use the bold version of the font and everything else to use the regular version. Alas this doesn't work. The browser uses the regular version for everything and implements it's own faux style.
If on the other hand I implement the font face like this:
#font-face {
font-family: 'TeXGyreAdventor';
src: url('../fonts/texgyreadventor-regular-webfont.eot');
src: url('../fonts/texgyreadventor-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/texgyreadventor-regular-webfont.woff') format('woff'),
url('../fonts/texgyreadventor-regular-webfont.ttf') format('truetype'),
url('../fonts/texgyreadventor-regular-webfont.svg#TeXGyreAdventorRegular') format('svg');
font-weight: normal;
font-style: normal; }
#font-face {
font-family: 'TeXGyreAdventorBold';
src: url('../fonts/texgyreadventor-bold-webfont.eot');
src: url('../fonts/texgyreadventor-bold-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/texgyreadventor-bold-webfont.woff') format('woff'),
url('../fonts/texgyreadventor-bold-webfont.ttf') format('truetype'),
url('../fonts/texgyreadventor-bold-webfont.svg#TeXGyreAdventorbold') format('svg');
font-weight: normal;
font-style: normal; }
body { font-family: 'TeXGyreAdventor'; }
b,strong {
font-weight: normal;
font-family: 'TeXGyreAdventorBold'; }
Then it works! What gives? I thought the first method is suppose to work. Am I doing something wrong? Is there no way for the browser to understand what is bold and apply the correct version of the font? I don't want to have to declare a new font family for any bit of CSS I want to make bold!

How to import fonts in CSS?

I want to use some fonts and I want it to work without having this font on the client computer. I have done this but it doesn't work:
#font-face {
font-family: EntezareZohoor2;
src: url(Entezar2.ttf) format("truetype");
}
.EntezarFont {
font-family: EntezareZohoor2, B Nazanin, Tahoma !important;
}
Following lines are used to define a font in css
#font-face {
font-family: 'EntezareZohoor2';
src: url('fonts/EntezareZohoor2.eot'), url('fonts/EntezareZohoor2.ttf') format('truetype'), url('fonts/EntezareZohoor2.svg') format('svg');
font-weight: normal;
font-style: normal;
}
Following lines to define/use the font in css
#newfont{
font-family:'EntezareZohoor2';
}
One of the best source of information on this topic is Paul Irish's Bulletproof #font-face syntax article.
Read it and you will end with something like:
/* definition */
#font-face {
font-family: EntezareZohoor2;
src: url('fonts/EntezareZohoor2.eot');
src: url('fonts/EntezareZohoor2.eot?') format('☺'),
url('fonts/EntezareZohoor2.woff') format('woff'),
url('fonts/EntezareZohoor2.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/* use */
body {
font-family: EntezareZohoor2, Tahoma, serif;
}
When I went to Google fonts all they gave me were true type font files .ttf and didn't explain at all how to use the #font-face to include them into my document. I tried the web font generator from font squirrel too, which just kept running the loading gif and not working... I then found this site -
https://transfonter.org/
I had great success using the following method:
I selected the Add Fonts button, leaving the default options, added all of my .ttf that Google gave me for Open Sans (which was like 10, I chose a lot of options...).
Then I selected the Convert button.
Heres the best part!
They gave me a zip file with all the font format files I selected, .ttf, .woff and .eot. Inside that zip file they had a demo.html file that I just double clicked on and it opened up a web page in my browser showing me example usages of all the different css font options, how to implement them, and what they looked like etc.
#font-face
I still didn't know at this point how to include the fonts into my stylesheet properly using #font-face but then I noticed that this demo.html came with it's own stylesheet in the zip as well. I opened the stylesheet and it showed how to bring in all of the fonts using #font-face so I was able to quickly, and easily, copy paste this into my project -
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-BoldItalic.eot');
src: url('fonts/Open_Sans/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-BoldItalic.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-BoldItalic.ttf') format('truetype');
font-weight: bold;
font-style: italic;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-LightItalic.eot');
src: url('fonts/Open_Sans/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-LightItalic.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-LightItalic.ttf') format('truetype');
font-weight: 300;
font-style: italic;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-SemiBold.eot');
src: url('fonts/Open_Sans/OpenSans-SemiBold.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-SemiBold.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-SemiBold.ttf') format('truetype');
font-weight: 600;
font-style: normal;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Regular.eot');
src: url('fonts/Open_Sans/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-Regular.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Light.eot');
src: url('fonts/Open_Sans/OpenSans-Light.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-Light.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-Light.ttf') format('truetype');
font-weight: 300;
font-style: normal;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Italic.eot');
src: url('fonts/Open_Sans/OpenSans-Italic.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-Italic.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-Italic.ttf') format('truetype');
font-weight: normal;
font-style: italic;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-SemiBoldItalic.eot');
src: url('fonts/Open_Sans/OpenSans-SemiBoldItalic.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-SemiBoldItalic.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-SemiBoldItalic.ttf') format('truetype');
font-weight: 600;
font-style: italic;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-ExtraBold.eot');
src: url('fonts/Open_Sans/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-ExtraBold.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-ExtraBold.ttf') format('truetype');
font-weight: 800;
font-style: normal;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-ExtraBoldItalic.eot');
src: url('fonts/Open_Sans/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-ExtraBoldItalic.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-ExtraBoldItalic.ttf') format('truetype');
font-weight: 800;
font-style: italic;
}
#font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Bold.eot');
src: url('fonts/Open_Sans/OpenSans-Bold.eot?#iefix') format('embedded-opentype'),
url('fonts/Open_Sans/OpenSans-Bold.woff') format('woff'),
url('fonts/Open_Sans/OpenSans-Bold.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
The demo.html also had it's own inline stylesheet that was interesting to take a look at, though I am familiar with working with font weights and styles once they are included so I didn't need it much. For an example of how to implement a font style onto an html element for reference purposes you could use the following method in a similar case to mine after #font-face has been used properly -
html, body{
margin: 0;
font-family: 'Open Sans';
}
.banner h1{
font-size: 43px;
font-weight: 700;
}
.banner p{
font-size: 24px;
font-weight: 300;
font-style: italic;
}
Go through http://www.w3.org/TR/css3-fonts/
Try this:
#font-face {
font-family: 'EntezareZohoor2';
src: url('EntezareZohoor2.eot');
src: local('EntezareZohoor2'), local('EntezareZohoor2'), url('EntezareZohoor2.ttf') format('svg');
font-weight: normal;
font-style: normal;
}
Try this link1,link2
#font-face {
font-family: 'RieslingRegular';
src: url('fonts/riesling.eot');
src: local('Riesling Regular'), local('Riesling'), url('fonts/riesling.ttf') format('truetype');
}
I used Ataturk's font like this. I didn't use "TTF" version. I translated orginal font version ("otf" version) to "eot" and "woof" version.
Then It works in local but not working when I uploaded the files to server.
So I added "TTF" version too like this. Now, It's working on Chrome and Firefox but Internet Explorer still defence.
When you installed on your computer "Ataturk" font, then working IE too. But I wanted to use this font without installing.
#font-face {
font-family: 'Ataturk';
font-style: normal;
font-weight: normal;
src: url('font/ataturk.eot');
src: local('Ataturk Regular'), url('font/ataturk.ttf') format('truetype'),
url('font/ataturk.woff') format('woff');
}
You can see it on my website here: http://www.canotur.com

#fontface Quicksand Light for Mac/iPhone/iPad

i have installed webkit Quicksand Light and book in to my CSS file, its all working fine in all browsers on the PC however when i view it on a MAC in any browser the quicksand light web font doesnt display properly comes out like a times new roman type of font. Is it not picking up the font? or is it just not rendering?
cant find any solutions to this problem, been at it all day trying to fix it
CSS:
#font-face {
font-family: 'QuicksandLight';
src: url('/assets/fonts/Quicksand_Light-webfont.eot');
src: url('/assets/fonts/Quicksand_Light-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/Quicksand_Light-webfont.woff') format('woff'),
url('/assets/fonts/Quicksand_Light-webfont.ttf') format('truetype'),
url('/assets/fonts/Quicksand_Light-webfont.svg#QuicksandLight') format('svg');
/*url('/assets/fonts/Quicksand_Light.otf');*/
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'QuicksandLightOblique';
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot');
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/Quicksand_Light_Oblique-webfont.woff') format('woff'),
url('/assets/fonts/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
url('/assets/fonts/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'QuicksandBook';
src: url('/assets/fonts/Quicksand_Book-webfont.eot');
src: url('/assets/fonts/Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/Quicksand_Book-webfont.woff') format('woff'),
url('/assets/fonts/Quicksand_Book-webfont.ttf') format('truetype'),
url('/assets/fonts/Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;
}
CSS for QuicksandBook;
body
{
font:13px/24px 'QuicksandBook', Arial,sans-serif;
font-weight: normal;
}
these have been referenced in the head section.
Unfortunately I don't have a Mac available to test on, but some of the pointers listed here might well be worth a shot. Let us know how you get on!
http://paulirish.com/2010/font-face-gotchas/#smiley
I normally load all of my font's at the very top of my css - I dont know if that makes a difference.
Also for future reference you can do your font's like this:
#font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Light-webfont.eot');
src: url('/assets/fonts/Quicksand_Light-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/Quicksand_Light-webfont.woff') format('woff'),
url('/assets/fonts/Quicksand_Light-webfont.ttf') format('truetype'),
url('/assets/fonts/Quicksand_Light-webfont.svg#QuicksandLight') format('svg');
/*url('/assets/fonts/Quicksand_Light.otf');*/
font-weight: lighter;
font-style: normal;
}
#font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot');
src: url('/assets/fonts/Quicksand_Light_Oblique-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/Quicksand_Light_Oblique-webfont.woff') format('woff'),
url('/assets/fonts/Quicksand_Light_Oblique-webfont.ttf') format('truetype'),
url('/assets/fonts/Quicksand_Light_Oblique-webfont.svg#QuicksandLightOblique') format('svg');
font-weight: lighter;
font-style: italic;
}
#font-face {
font-family: 'Quicksand';
src: url('/assets/fonts/Quicksand_Book-webfont.eot');
src: url('/assets/fonts/Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/Quicksand_Book-webfont.woff') format('woff'),
url('/assets/fonts/Quicksand_Book-webfont.ttf') format('truetype'),
url('/assets/fonts/Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;
}
This means you can reference the font weight in your css rather than having to set the font as oblique. eg
body
{
font: italic lighter 13px/24px 'Quicksand', Arial,sans-serif;
}
That will print the font in Italic in the lighter style

#font-face with embedded font does not work

I have website: http://kuvaklubi.fi where I'm trying to use font "Century Gothic".
This font is not present on my computer in "Installed fonts", and I'd like to embed this font in css via #font-face.
I have generated some font files and css at http://www.fontsquirrel.com/
however I'm still having problems. I can't see "Century Gothic" font in IE9, FF4 browsers.
CSS:
#font-face {
font-family: 'CenturyGothicRegular';
src: url('gothic-webfont.eot');
src: url('gothic-webfont.eot?#iefix') format('embedded-opentype'),
url('gothic-webfont.woff') format('woff'),
url('gothic-webfont.ttf') format('truetype'),
url('gothic-webfont.svg#CenturyGothicRegular') format('svg');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'CenturyGothicRegular';
src: url('gothicbi-webfont.eot');
src: url('gothicbi-webfont.eot?#iefix') format('embedded-opentype'),
url('gothicbi-webfont.woff') format('woff'),
url('gothicbi-webfont.ttf') format('truetype'),
url('gothicbi-webfont.svg#CenturyGothicBoldItalic') format('svg');
font-weight: bold;
font-style: italic;
}
#font-face {
font-family: 'CenturyGothicRegular';
src: url('gothici-webfont.eot');
src: url('gothici-webfont.eot?#iefix') format('embedded-opentype'),
url('gothici-webfont.woff') format('woff'),
url('gothici-webfont.ttf') format('truetype'),
url('gothici-webfont.svg#CenturyGothicItalic') format('svg');
font-weight: normal;
font-style: italic;
}
#font-face {
font-family: 'CenturyGothicRegular';
src: url('gothicb-webfont.eot');
src: url('gothicb-webfont.eot?#iefix') format('embedded-opentype'),
url('gothicb-webfont.woff') format('woff'),
url('gothicb-webfont.ttf') format('truetype'),
url('gothicb-webfont.svg#CenturyGothicBold') format('svg');
font-weight: bold;
font-style: normal;
}
body {
font-family: "Century Gothic", CenturyGothicRegular, Verdana, Tahoma, Helvetica, sans-serif;
...
}
I'm using all combinations of normal/bold/italic fonts on the site.
Can anybody help me see what is happening, why it's happening, and how to fix this?
Thanks.
Your font-family name for the fonts you've uploaded has been titled "CenturyGothicRegular", so you need to refer to this in quotes in the same way you have with Century Gothic proper:
body {
font-family: "Century Gothic", "CenturyGothicRegular", Verdana, Tahoma, Helvetica, sans-serif;
...
}
You also need to make sure the font files are in the same location as your CSS file, or change the relative URL for the file names.

Resources