Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ynakajima/ttf.js
JavaScript font library for Node.js and browser.
https://github.com/ynakajima/ttf.js
Last synced: 10 days ago
JSON representation
JavaScript font library for Node.js and browser.
- Host: GitHub
- URL: https://github.com/ynakajima/ttf.js
- Owner: ynakajima
- Created: 2012-08-08T17:06:26.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2019-10-13T03:54:34.000Z (over 4 years ago)
- Last Synced: 2024-03-09T17:36:03.697Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.16 MB
- Stars: 420
- Watchers: 45
- Forks: 72
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Lists
- awesome-stars - ynakajima/ttf.js - JavaScript font library for Node.js and browser. (JavaScript)
- awesome-nodejs-pure-js - ttj.js
README
ttf.js
======
A JavaScript TrueType font engine for modern browsers and Node.js.Demo
------
ttf.js Demo - Glyph List
Development Status
------
work in progress...### Implementation status of TrueType Tables
#### sfnt header
sfnt versionImplemented
numTablesImplemented
searchRangeImplemented
entrySelectorImplemented
rangeShiftImplemented
#### Table Directory
Table DirectoryImplemented
#### Required Tables
cmapPart Implemented
glyfAlmost
headAlmost
hhea-
hmtx-
locaAlmost
maxpAlmost
name-
post-
OS/2-
#### Optional Tables
cvt-
EBDT-
EBLC-
EBSC-
fpgm-
gasp-
hdmx-
kern-
LTSH-
prep-
PCLT-
VDMX-
vhea-
vmtx-
API
------------* **ttf.cmap.getGlyphIndex**(charactor)
* Return glyph index array of the given charactor . The array's length equals to number of the font's cmap subtables.
* The param charactor only accept a single charactor, if you use multiple charactors , only return the result of the first charactor.
* This API is working in process , only support cmap format0 and part format4. You can try your font with this , if not support, contact me;
TrueType Specifications
------* Microsoft Typography - Features of TrueType and OpenType (Microsoft)
* TrueType Reference Manual (Apple)