Skip to content

Instantly share code, notes, and snippets.

@nasirkhan
Last active February 19, 2020 03:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nasirkhan/4ea361333cb87d6b53871a0dd1332e8f to your computer and use it in GitHub Desktop.
Save nasirkhan/4ea361333cb87d6b53871a0dd1332e8f to your computer and use it in GitHub Desktop.
Embed Bengali/ Bangla Webfonts with Unicode Range
/* ========================================================================
    Bengali/ Bangla Webfont
    Embed Bengali Webfonts with Unicode Range
	Fonts are hosted at http://nasirkhn.com
 ========================================================================== */

@font-face {
	font-family: 'Siyam Rupali';
	font-style: normal;
	font-weight: 400;
	src: local('Siyam Rupali Regular'), 
		local('SiyamRupali-Regular'), 
		url("http://nasirkhn.com/fonts/Siyamrupali_1_01.eot?") format("eot");
	src: local('Siyam Rupali Regular'), 
		local('SiyamRupali-Regular'), 
		url('http:http://nasirkhn.com/fonts/Siyamrupali_1_01.woff2') format('woff2');
	src: local('Siyam Rupali Regular'), 
		local('SiyamRupali-Regular'), 
		url('http://nasirkhn.com/fonts/Siyamrupali_1_01.woff') format('woff');
	src: local('Siyam Rupali Regular'), 
		local('SiyamRupali-Regular'), 
		url("http://nasirkhn.com/fonts/Siyamrupali_1_01.ttf") format("truetype");
	src: local('Siyam Rupali Regular'), 
		local('SiyamRupali-Regular'), 
		url("http://nasirkhn.com/fonts/Siyamrupali_1_01.svg#SiyamRupali") format("svg");
	unicode-range: U+0964-0965, U+0981-09FB, U+200B-200D, U+20B9, U+25CC;
}


/* ========================================================================
    Bengali/ Bangla Webfont Example
	Fonts are hosted at http://nasirkhn.com
 ========================================================================== */


body {
  font-family: "Siyam Rupali", 'sans-serif';
}

@MShafquat
Copy link

Not working now, can you please check it?

@nasirkhan
Copy link
Author

Not working now, can you please check it?

If you directly use these CSS then it should not work. You have to replace the font path like http://nasirkhn.com/fonts/Siyamrupali_1_01.eot with your own. I used my website link as an example here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment