1.2.0@sutton-signwriting/unicode8 is a javascript package for processing SignWriting in Unicode 8 (uni8) characters. See SignWriting#Unicode for more information about the characters and notofont/sign-writing for more information about the Unicode compliant font.
This package also supports Formal SignWriting in ASCII (FSW) and SignWriting in Unicode (SWU) character sets. See draft-slevinski-formal-signwriting for detailed specification.
Author: https://SteveSlevinski.me
Channel: https://www.youtube.com/channel/UCXu4AXlG0rXFtk_5SzumDow
Support: https://www.patreon.com/signwriting
Donate: https://donate.sutton-signwriting.io
The source is written in small ES Modules available in the src directory along with the associated tests.
The distribution is available in three flavors. Minified, the whole library is 2 KB in size.
npm install @sutton-signwriting/unicode8
wget https://github.com/sutton-signwriting/unicode8/archive/master.zip
unzip master.zip
cd unicode8-master
npm install
// import entire library
const unicode8 = require('@sutton-signwriting/unicode8');
// import individual module
const unicode8Symbol = require('@sutton-signwriting/unicode8/symbol');
// import entire library
// available as ssw.unicode8
<script src="unicode8.js"></script>
// import individual module
// available as ssw.unicode8.symbol
<script src="symbol/symbol.js"></script>
// import entire library
// available as ssw.unicode8
<script src="https://unpkg.com/@sutton-signwriting/unicode8@1.1.0"></script>
// import individual module
// available as ssw.unicode8.font
<script src="https://unpkg.com/@sutton-signwriting/unicode8@1.1.0/font/font.js"></script>
MIT
The font module contains functions for handing the font.
Function that appends font-face CSS for the Noto Sans SignWriting font for use with SignWriting in Unicode 8 (uni8) characters.
This font-face declaration will use a locally installed font if available. If not found, the font will be loaded from a content delivery network.
The list of local names is currently a work in progress. The font-face currently works for Windows and iOS. This CSS is duplicated in the src/font/index.css file.
(string)
	    an optional relative directory for font location
          font.cssAppend('./font/')
    
  
  
  
  
  
The symbol module contains regular expressions and functions for parsing and composing SignWriting in Unicode 8 (uni8) characters.
Object of regular expressions for symbol strings
{ base, fill, rotation, full }
Type: object
Function to parse symbol string to object
(string)
	    a symbol string
          object:
        elements of symbol string
      
    
  
  
  
  
    symbol.parse('𝠀')
return {
 'base': '𝠀',
 'fill': undefined,
 'rotation': undefined
}
    
  
  
  
  
  
Function to compose symbol string from object
string:
        symbol string
      
    
  
  
  
  
    symbol.compose({
 'base': '𝠀'
})
return '𝠀'
    
  
  
  
  
  
The string module contains regular expressions and functions for parsing and composing SignWriting in Unicode 8 (uni8) symbol strings.
Object of regular expressions for string of symbols
{ full }
Type: object
Function to parse string of uni8 symbols to array
(string)
	    a string of uni8 symbols
          array:
        array of uni8 symbols
      
    
  
  
  
  
    string.parse('𝠀𝠁')
return ['𝠀','𝠁']
    
  
  
  
  
  
Function to compose uni8 string from array
(array)
	    an array of uni8 symbols
          string:
        string of uni8 symbols
      
    
  
  
  
  
    string.compose(['𝠀','𝠁'])
return '𝠀𝠁'
    
  
  
  
  
  
The convert module contains functions to help process the various SignWriting Character sets.
Function to convert a SignWriting in Unicode 8 (uni8) code point to a character
(integer)
	    unicode code point
          string:
        SignWriting in Unicode 8 character
      
    
  
  
  
  
    convert.code2uni(0x1D800)
return '𝠀'
    
  
  
  
  
  
Function to convert a SignWriting in Unicode 8 (uni8) character to a code point
(string)
	    SignWriting in Unicode 8 character
          integer:
        unicode code point
      
    
  
  
  
  
    convert.uni2code('𝠀')
return 0x1D800
    
  
  
  
  
  
Function to convert a SignWriting in Unicode 8 (uni8) character to hex values
(string)
	    SignWriting in Unicode 8 character
          string:
        hex value of unicode character
      
    
  
  
  
  
    convert.uni2hex('𝠀')
return "1D800"
    
  
  
  
  
  
Function to convert a SignWriting in Unicode 8 (uni8) symbol to Formal SignWriting in ASCII (FSW)
(string)
	    SignWriting in Unicode 8 character(s)
          string:
        an FSW symbol key
      
    
  
  
  
  
    convert.uni2fsw('𝠀')
return 'S10000'
    
  
  
  
  
  
Function to convert a SignWriting in Unicode 8 (uni8) symbol to SignWriting in Unicode (SWU)
(string)
	    SignWriting in Unicode 8 character(s)
          string:
        an SWU symbol
      
    
  
  
  
  
    convert.uni2swu('𝠀')
return ''
    
  
  
  
  
  
Function to convert a Formal SignWriting in ASCII (FSW) to SignWriting in Unicode 8 (uni8)
(string)
	    an FSW symbol key
          string:
        SignWriting in Unicode 8 character(s)
      
    
  
  
  
  
    convert.fsw2uni('S10000')
return '𝠀'
    
  
  
  
  
  
Function to convert a SignWriting in Unicode (SWU) to SignWriting in Unicode 8 (uni8)
(string)
	    an SWU symbol
          string:
        SignWriting in Unicode 8 character(s)
      
    
  
  
  
  
    convert.swu2uni('')
return '𝠀'