Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

⚠️ UNMAINTAINED // CSS3 unicode-range polyfill

Notifications You must be signed in to change notification settings

infojunkie/jquery-unicode-range

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This jQuery plugin emulates the CSS3 descriptor unicode-range http://www.w3.org/TR/css3-fonts/#unicode-range-desc. It detects DOM elements that have associated @font-face rules that include unicode-range descriptors, and only applies the rule to those characters that match the given Unicode range.

To use:

<script src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script>
<script src="lib/CSSOM.js"></script>
<script src="jquery.unicode-range.js"></script>
<style type="text/css">
  @font-face {
    font-family: 'SSP';
    src: url('f/SourceSansPro-Bold.ttf');
    unicode-range: U+41-4D, U+6E, U+6F, U+7?;
  }
  p {font: 2.5em SSP, serif;}
</style>
<script>
  $(document).ready(function(){
    $('p').unicodeRange({debug:true});
  });
</script>

To see it in action: http://jsfiddle.net/infojunkie/qayLF/7/

About

⚠️ UNMAINTAINED // CSS3 unicode-range polyfill

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published