Read and write OpenType fonts using JavaScript.

Overview

opentype.js · Build Status npm PRs Welcome GitHub license david-dm

opentype.js is a JavaScript parser and writer for TrueType and OpenType fonts.

It gives you access to the letterforms of text from the browser or Node.js. See https://opentype.js.org/ for a live demo.

Features

  • Create a bézier path out of a piece of text.
  • Support for composite glyphs (accented letters).
  • Support for WOFF, OTF, TTF (both with TrueType glyf and PostScript cff outlines)
  • Support for kerning (Using GPOS or the kern table).
  • Support for ligatures.
  • Support for TrueType font hinting.
  • Support arabic text rendering (See issue #364 & PR #359 #361)
  • A low memory mode is available as an option (see #329)
  • Runs in the browser and Node.js.

Installation

Using npm package manager

npm install opentype.js
const opentype = require('opentype.js');

import opentype from 'opentype.js'

import { load } from 'opentype.js'

Using TypeScript? See this example

Note: OpenType.js uses ES6-style imports, so if you want to edit it and debug it in Node.js run npm run build first and use npm run watch to automatically rebuild when files change.

Directly

Download the latest ZIP and grab the files in the dist folder. These are compiled.

Using via a CDN

To use via a CDN, include the following code in your html:

<script src="https://cdn.jsdelivr.net/npm/opentype.js@latest/dist/opentype.min.js"></script>

Using Bower (Deprecated see official post)

To install using Bower, enter the following command in your project directory:

bower install opentype.js

You can then include them in your scripts using:

<script src="/bower_components/opentype.js/dist/opentype.js"></script>

API

Loading a font

OpenType.js example Hello World

Use opentype.load(url, callback) to load a font from a URL. Since this method goes out the network, it is asynchronous. The callback gets (err, font) where font is a Font object. Check if the err is null before using the font.

opentype.load('fonts/Roboto-Black.ttf', function(err, font) {
    if (err) {
        alert('Font could not be loaded: ' + err);
    } else {
        // Now let's display it on a canvas with id "canvas"
        const ctx = document.getElementById('canvas').getContext('2d');

        // Construct a Path object containing the letter shapes of the given text.
        // The other parameters are x, y and fontSize.
        // Note that y is the position of the baseline.
        const path = font.getPath('Hello, World!', 0, 150, 72);

        // If you just want to draw the text you can also use font.draw(ctx, text, x, y, fontSize).
        path.draw(ctx);
    }
});

You can also use es6 async/await syntax to load your fonts

async function make(){
    const font = await opentype.load('fonts/Roboto-Black.ttf');
    const path = font.getPath('Hello, World!', 0, 150, 72);
    console.log(path);
}

If you already have an ArrayBuffer, you can use opentype.parse(buffer) to parse the buffer. This method always returns a Font, but check font.supported to see if the font is in a supported format. (Fonts can be marked unsupported if they have encoding tables we can't read).

const font = opentype.parse(myBuffer);

Loading a font synchronously (Node.js)

Use opentype.loadSync(url) to load a font from a file and return a Font object. Throws an error if the font could not be parsed. This only works in Node.js.

const font = opentype.loadSync('fonts/Roboto-Black.ttf');

Writing a font

Once you have a Font object (either by using opentype.load or by creating a new one from scratch) you can write it back out as a binary file.

In the browser, you can use Font.download() to instruct the browser to download a binary .OTF file. The name is based on the font name.

// Create the bézier paths for each of the glyphs.
// Note that the .notdef glyph is required.
const notdefGlyph = new opentype.Glyph({
    name: '.notdef',
    unicode: 0,
    advanceWidth: 650,
    path: new opentype.Path()
});

const aPath = new opentype.Path();
aPath.moveTo(100, 0);
aPath.lineTo(100, 700);
// more drawing instructions...
const aGlyph = new opentype.Glyph({
    name: 'A',
    unicode: 65,
    advanceWidth: 650,
    path: aPath
});

const glyphs = [notdefGlyph, aGlyph];
const font = new opentype.Font({
    familyName: 'OpenTypeSans',
    styleName: 'Medium',
    unitsPerEm: 1000,
    ascender: 800,
    descender: -200,
    glyphs: glyphs});
font.download();

If you want to inspect the font, use font.toTables() to generate an object showing the data structures that map directly to binary values. If you want to get an ArrayBuffer, use font.toArrayBuffer().

The Font object

A Font represents a loaded OpenType font file. It contains a set of glyphs and methods to draw text on a drawing context, or to get a path representing the text.

  • glyphs: an indexed list of Glyph objects.
  • unitsPerEm: X/Y coordinates in fonts are stored as integers. This value determines the size of the grid. Common values are 2048 and 4096.
  • ascender: Distance from baseline of highest ascender. In font units, not pixels.
  • descender: Distance from baseline of lowest descender. In font units, not pixels.

Font.getPath(text, x, y, fontSize, options)

Create a Path that represents the given text.

  • x: Horizontal position of the beginning of the text. (default: 0)
  • y: Vertical position of the baseline of the text. (default: 0)
  • fontSize: Size of the text in pixels (default: 72).

Options is an optional object containing:

  • kerning: if true takes kerning information into account (default: true)
  • features: an object with OpenType feature tags as keys, and a boolean value to enable each feature. Currently only ligature features "liga" and "rlig" are supported (default: true).
  • hinting: if true uses TrueType font hinting if available (default: false).

Note: there is also Font.getPaths with the same arguments which returns a list of Paths.

Font.draw(ctx, text, x, y, fontSize, options)

Create a Path that represents the given text.

  • ctx: A 2D drawing context, like Canvas.
  • x: Horizontal position of the beginning of the text. (default: 0)
  • y: Vertical position of the baseline of the text. (default: 0)
  • fontSize: Size of the text in pixels (default: 72).

Options is an optional object containing:

  • kerning: if true takes kerning information into account (default: true)
  • features: an object with OpenType feature tags as keys, and a boolean value to enable each feature. Currently only ligature features "liga" and "rlig" are supported (default: true).
  • hinting: if true uses TrueType font hinting if available (default: false).

Font.drawPoints(ctx, text, x, y, fontSize, options)

Draw the points of all glyphs in the text. On-curve points will be drawn in blue, off-curve points will be drawn in red. The arguments are the same as Font.draw.

Font.drawMetrics(ctx, text, x, y, fontSize, options)

Draw lines indicating important font measurements for all glyphs in the text. Black lines indicate the origin of the coordinate system (point 0,0). Blue lines indicate the glyph bounding box. Green line indicates the advance width of the glyph.

Font.stringToGlyphs(string)

Convert the string to a list of glyph objects. Note that there is no strict 1-to-1 correspondence between the string and glyph list due to possible substitutions such as ligatures. The list of returned glyphs can be larger or smaller than the length of the given string.

Font.charToGlyph(char)

Convert the character to a Glyph object. Returns null if the glyph could not be found. Note that this function assumes that there is a one-to-one mapping between the given character and a glyph; for complex scripts this might not be the case.

Font.getKerningValue(leftGlyph, rightGlyph)

Retrieve the value of the kerning pair between the left glyph (or its index) and the right glyph (or its index). If no kerning pair is found, return 0. The kerning value gets added to the advance width when calculating the spacing between glyphs.

Font.getAdvanceWidth(text, fontSize, options)

Returns the advance width of a text.

This is something different than Path.getBoundingBox() as for example a suffixed whitespace increases the advancewidth but not the bounding box or an overhanging letter like a calligraphic 'f' might have a quite larger bounding box than its advance width.

This corresponds to canvas2dContext.measureText(text).width

  • fontSize: Size of the text in pixels (default: 72).
  • options: See Font.getPath

The Glyph object

A Glyph is an individual mark that often corresponds to a character. Some glyphs, such as ligatures, are a combination of many characters. Glyphs are the basic building blocks of a font.

  • font: A reference to the Font object.
  • name: The glyph name (e.g. "Aring", "five")
  • unicode: The primary unicode value of this glyph (can be undefined).
  • unicodes: The list of unicode values for this glyph (most of the time this will be 1, can also be empty).
  • index: The index number of the glyph.
  • advanceWidth: The width to advance the pen when drawing this glyph.
  • xMin, yMin, xMax, yMax: The bounding box of the glyph.
  • path: The raw, unscaled path of the glyph.
Glyph.getPath(x, y, fontSize)

Get a scaled glyph Path object we can draw on a drawing context.

  • x: Horizontal position of the glyph. (default: 0)
  • y: Vertical position of the baseline of the glyph. (default: 0)
  • fontSize: Font size in pixels (default: 72).
Glyph.getBoundingBox()

Calculate the minimum bounding box for the unscaled path of the given glyph. Returns an opentype.BoundingBox object that contains x1/y1/x2/y2. If the glyph has no points (e.g. a space character), all coordinates will be zero.

Glyph.draw(ctx, x, y, fontSize)

Draw the glyph on the given context.

  • ctx: The drawing context.
  • x: Horizontal position of the glyph. (default: 0)
  • y: Vertical position of the baseline of the glyph. (default: 0)
  • fontSize: Font size, in pixels (default: 72).
Glyph.drawPoints(ctx, x, y, fontSize)

Draw the points of the glyph on the given context. On-curve points will be drawn in blue, off-curve points will be drawn in red. The arguments are the same as Glyph.draw.

Glyph.drawMetrics(ctx, x, y, fontSize)

Draw lines indicating important font measurements for all glyphs in the text. Black lines indicate the origin of the coordinate system (point 0,0). Blue lines indicate the glyph bounding box. Green line indicates the advance width of the glyph. The arguments are the same as Glyph.draw.

The Path object

Once you have a path through Font.getPath or Glyph.getPath, you can use it.

  • commands: The path commands. Each command is a dictionary containing a type and coordinates. See below for examples.
  • fill: The fill color of the Path. Color is a string representing a CSS color. (default: 'black')
  • stroke: The stroke color of the Path. Color is a string representing a CSS color. (default: null: the path will not be stroked)
  • strokeWidth: The line thickness of the Path. (default: 1, but since the stroke is null no stroke will be drawn)
Path.draw(ctx)

Draw the path on the given 2D context. This uses the fill, stroke and strokeWidth properties of the Path object.

  • ctx: The drawing context.
Path.getBoundingBox()

Calculate the minimum bounding box for the given path. Returns an opentype.BoundingBox object that contains x1/y1/x2/y2. If the path is empty (e.g. a space character), all coordinates will be zero.

Path.toPathData(decimalPlaces)

Convert the Path to a string of path data instructions. See https://www.w3.org/TR/SVG/paths.html#PathData

  • decimalPlaces: The amount of decimal places for floating-point values. (default: 2)
Path.toSVG(decimalPlaces)

Convert the path to a SVG <path> element, as a string.

  • decimalPlaces: The amount of decimal places for floating-point values. (default: 2)

Path commands

  • Move To: Move to a new position. This creates a new contour. Example: {type: 'M', x: 100, y: 200}
  • Line To: Draw a line from the previous position to the given coordinate. Example: {type: 'L', x: 100, y: 200}
  • Curve To: Draw a bézier curve from the current position to the given coordinate. Example: {type: 'C', x1: 0, y1: 50, x2: 100, y2: 200, x: 100, y: 200}
  • Quad To: Draw a quadratic bézier curve from the current position to the given coordinate. Example: {type: 'Q', x1: 0, y1: 50, x: 100, y: 200}
  • Close: Close the path. If stroked, this will draw a line from the first to the last point of the contour. Example: {type: 'Z'}

Versioning

We use SemVer for versioning.

License

MIT

Thanks

I would like to acknowledge the work of others without which opentype.js wouldn't be possible:

Comments
  • Ligatures

    Ligatures

    Hi,

    I've spent some time with opentype, using it to load fonts used in txt.js. It was surprisingly easy, but I miss ligatures.

    From what I can see in the code, opentypejs uses GPOS tables for kerning values. Isn't the GPOS also the table for ligatures? Anyone working on this now? If not, any pointer for me if I find the time to try and implement it?

    Thanks to all developers for an amazing feat - if it wasn't for the obvious proof that it's working, I wouldn't have believed that parsing of binary font data was feasible in javascript

    enhancement 
    opened by casperno 29
  • Support for GPOS table parsing

    Support for GPOS table parsing

    Most fonts from Google repo (http://www.google.com/fonts) use the GPOS table for kerning data, and many don't include the old "kern" section, which currently causes missing kerning data from opentype.js.

    IMO this is an important feature to support. Safari and Firefox both turn on kerning by default for all text. Not being able to take kerning into account leads to:

    • Inconsistent drawing results between native text and custom ones on the canvas elements.
    • Inability to accurately measure the size of a piece of text with kerning = true, which prevents usage of opentype.js for layout calculation that relies on text measurement.
    opened by nktpro 29
  • Refactor drawing functions, so that all functions now work on a graph.

    Refactor drawing functions, so that all functions now work on a graph.

    • a graph has now draw ,drawMetrcis and drawPoints function
    • every function works with canvas and SVG
    • decouple the rendering from graph
    • update API doc and example
    opened by eskimoblood 22
  • Suport for WOFF File Format

    Suport for WOFF File Format

    Are there any plans to support Web-Fonts (WOFF) i.e. to read from Google-Fonts and the such? As far as I understood, on could actually use zlib.js to decompress the woff format?

    opened by quasado 20
  • Added Google Closure externs file

    Added Google Closure externs file

    I was not able to get an externs file to be generated automatically. The simplest solution turned out to be just creating the file manually.

    It'll be some extra work updating the file as APIs change, but it should not be too bad.

    I made some changes to the Substitution APIs to play better with ActionScript (which is the target I'm using). ActionScript requires optional parameters to be at the end of a signature. To accommodate this, I moved the "feature" and "sub" parameters to the beginning of the signatures.

    opened by Harbs 18
  • Truetype Font Hinting

    Truetype Font Hinting

    Implementing a font hinting interpreter for truetype:

    Demo:

    The actual canvas is the top one, the lower one has each pixel enlarged by a factor of 7. The font used in the demo is DejaVuSans.ttf First line is default opentype.js Second line is opentype.js with fonthinting enabled Third line is canvas.fillText() with @font-face.

    hintingdemo

    As you see there is hardly a difference between second and third line, except glyph advancement not being hinted. I didn't do that yet, as that would require some changes to the opentype.js.

    I tried to keep all changes to opentype.js outside of src/hintingtt.js as minimal as possible.

    PS: I'll need to append a fix commits until the code styling checks stop complaining.

    opened by axkibe 17
  • can someone help me?

    can someone help me?

    I am loading .ttf font file and now I want to add in the weight and style for it but getPath only expects font size, is there a way I can define the weight and style for font? e.g.

    Bold, Italic or Bold, normal or normal, normal

    opened by fahadnabbasi 17
  • Rewrite GPOS parsing

    Rewrite GPOS parsing

    Description

    Full rewrite of the old GPOS table parser.

    • exposes raw data in font.tables.gpos
    • code is simpler and consistent with the GSUB parser, with less duplication
    • better kerning

    Fixes #292 and maybe other reported issues.

    Known limitations (what this doesn't fix)

    • only lookups 1 (single glyph positioning) and 2 (pair positioning) are parsed
    • kerning rendering still limited to xAdvance
    • extended tables (lookup 9, uses e.g. in Times New Roman) still not supported
    • no writing

    How Has This Been Tested?

    New unit tests added. Tried the home page with at least a dozen various fonts.

    Types of changes

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] I did npm run test and all tests passed green (including code styling checks).
    • [x] I have added tests to cover my changes.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the README accordingly.
    • [x] I have read the CONTRIBUTING document.
    opened by fpirsch 16
  • Switch from

    Switch from "load all glyphs immediately" to "load glyphs only once needed"

    Fixes https://github.com/nodebox/opentype.js/issues/129

    This changes glyph loading to a system where glyph paths are not parsed until they are needed by something. It does this by introducing a Glyphset class that acts as the font.glyphs container, so rather than font.glyphs[id] everything now uses font.glyphs.get(id), and the Glyph object now uses a special getter/setter for the path property, so that glyphs don't parse their associated outline data blocks until glyph.path is actually requested. The Glyphset object, when glyphs are pushed into it, instead binds a lazy loader to glyph.path until that happens.

    The difference in performance is staggering.

    This patch also cleans up some of the platform-dependencies that were found in package.json and server.js, so things should work on all platforms now, and the code passes npm test without errors.

    opened by Pomax 15
  • Performance Issues Rendering Lots of Text

    Performance Issues Rendering Lots of Text

    I'm not sure if this is just a limitation of the shear complexity of rendering text on the screen, but I'm getting fairly slow rendering of lots of text on the screen:

    screenshot from 2017-10-09 12-30-01

    It's taking around 250ms to render each time. I've tried converting it all to paths but it doesn't seem to help. Is this an expected performance limitation or is there something that can be done?

    opened by darkfrog26 14
  • How to know the baseline and x value for font.getPath() ?

    How to know the baseline and x value for font.getPath() ?

    Hello, this question have already been asked but the answer given didn't work : var baseline = (font.ascender / font.unitsPerEm * fontSize); So since it's been a while maybe now there is a solution for it.

    Expected Behavior

    When I use font.getPath('text', 0,0,40) => the text will be cut on the top or the bottom, or the right... And I would like to know the value of x and y relatively to the font and text. Or to make it simple, i would like the text to not be cut.

    Steps to Reproduce (for bugs)

    I made a small repo to visualize the text generated

    1. git clone https://github.com/microSoftware/display-font.git
    2. npm install
    3. node opentype.js (or nodemon opentype.js if you want to watch for modif)
    4. modify the words to see which one work and don't work
    5. Go on http://localhost:8900 to see the result

    Thank you

    opened by microSoftware 14
  • Error `0x963a: ClassDef format must be 1 or 2` since upgrading from `1.3.3` to `1.3.4`

    Error `0x963a: ClassDef format must be 1 or 2` since upgrading from `1.3.3` to `1.3.4`

    Expected Behavior

    The attached file loads without issues on [email protected]

    Current Behavior

    It fails to load with [email protected] with error x963a: ClassDef format must be 1 or 2.

    Steps to Reproduce (for bugs)

    This is the source font file: 96025-ld-soft-serif.ttf.zip

    import { load } from "opentype.js";
    
    load("src/96025-ld-soft-serif.ttf", function (err) {
      if (err) {
        // when using `[email protected]`
        console.log("Font could not be loaded: " + err.message);
      } else {
        // when using `[email protected]`
        console.log("Successfully loaded");
      }
    });
    

    Your Environment

    • Version used: 1.3.4
    • Font used: see file attached
    • Browser Name and version: Google Chrome @ 108.0.5359.124
    • Operating System and version (desktop or mobile): MacOS Ventura 13.1
    opened by adriaanmeuris 0
  • Async await not working in typescript

    Async await not working in typescript

    Expected Behavior

    Current Behavior

    trying to use the async await as per the readme but its not returning the font object. image

    Possible Solution

    Steps to Reproduce (for bugs)

    Context

    Your Environment

    • Version used:
    • Font used:
    • Browser Name and version:
    • Operating System and version (desktop or mobile):
    • Link to your project:
    opened by noobd3v 0
  • mark as side effect free

    mark as side effect free

    Description

    Marked the package as side effect free so it can be tree shaken by webpack if not used

    Motivation and Context

    I saw that this package was included in my bundle. I'm not actually sure if this dep is side effect free.... is it?

    How Has This Been Tested?

    In my app

    Checklist:

    • [ ] I did npm run test and all tests passed green (including code styling checks).
    • [ ] I have added tests to cover my changes.
    • [ ] My change requires a change to the documentation.
    • [x] I have updated the README accordingly.
    • [x] I have read the CONTRIBUTING document.
    opened by hipstersmoothie 0
  • create post table from existing data if available

    create post table from existing data if available

    copy settings from existing post table if available

    Description

    At the moment, when calling toArrayBuffer() on the font, or download() it will create a new tables.post with all values set to 0(default) instead of using the values for the font.

    Motivation and Context

    This fixes the issue with underlines not showing up in SVGs. This fixes issue #529.

    How Has This Been Tested?

    I verified that this worked with a few different fonts. Before the change the underline would be invisible and after the change it is visible.

    Screenshots (if appropriate):

    Types of changes

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] I did npm run test and all tests passed green (including code styling checks).
    • [ ] I have added tests to cover my changes.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the README accordingly.
    • [x] I have read the CONTRIBUTING document.
    opened by cthorner 0
  • post table is created with defaults when calling toArrayBuffer

    post table is created with defaults when calling toArrayBuffer

    Expected Behavior

    calling toArrayBuffer should create a font that has the same post table as the font it was created from

    since the post table is created from scratch with defaults with post.make() things like underlineThickness and underlinePosition are always set to 0 instead of using the values from the original post table

    Here is the offending code: https://github.com/opentypejs/opentype.js/blob/2a6c2f61630ec1f5f580f092e42631e95ad8bb48/src/tables/sfnt.js#L289

    I would expect something like this: https://github.com/opentypejs/opentype.js/blob/2a6c2f61630ec1f5f580f092e42631e95ad8bb48/src/tables/sfnt.js#L309 https://github.com/opentypejs/opentype.js/blob/2a6c2f61630ec1f5f580f092e42631e95ad8bb48/src/tables/sfnt.js#L312 https://github.com/opentypejs/opentype.js/blob/2a6c2f61630ec1f5f580f092e42631e95ad8bb48/src/tables/sfnt.js#L315

    Current Behavior

    font.toArrayBuffer() creates font with post table defaults

    Possible Solution

    parse values from the font's post table to create the new set of tables

    Steps to Reproduce (for bugs)

    load a font with a value for tables.post.underlineThickness != 0 call: font.toArrayBuffer() use the font with underline, see that it is not underlined

    Context

    have working underlining in an SVG

    Your Environment

    • Version used: 1.3.4
    • Font used: any font
    • Browser Name and version: N/A
    • Operating System and version (desktop or mobile): N/A
    • Link to your project: N/A
    opened by cthorner 0
  • Preserve platform specific names in fonts.

    Preserve platform specific names in fonts.

    Description

    This PR redoes the names table handling to preserve platform specific naming schemes for fonts.

    Motivation and Context

    I have a project that depends on this working correctly. This closes issue #527.

    How Has This Been Tested?

    All test cases pass.

    Types of changes

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [x] Breaking change (fix or feature that would cause existing functionality to change)

    Checklist:

    • [x] I did npm run test and all tests passed green (including code styling checks).
    • [x] I have added tests to cover my changes.
    • [x] I have updated the README accordingly.
    • [x] I have read the CONTRIBUTING document.
    opened by ILOVEPIE 1
Releases(1.3.1)
The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey

Paper.js - The Swiss Army Knife of Vector Graphics Scripting If you want to work with Paper.js, simply download the latest "stable" version from http:

Paper.js 13.5k Dec 30, 2022
Interactive visualizations of time series using JavaScript and the HTML canvas tag

dygraphs JavaScript charting library The dygraphs JavaScript library produces interactive, zoomable charts of time series: Learn more about it at dygr

Dan Vanderkam 3k Jan 3, 2023
HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.

HTML Canvas Gauges v2.1 Installation Documentation Add-Ons Special Thanks License This is tiny implementation of highly configurable gauge using pure

Mykhailo Stadnyk 1.5k Dec 30, 2022
Grab the color palette from an image using just Javascript. Works in the browser and in Node.

Color Thief Grab the color palette from an image using just Javascript.Works in the browser and in Node. View the demo page for examples, API docs, an

Lokesh Dhakar 11.2k Dec 30, 2022
Simple yet powerful JavaScript Charting library built using d3.js

uvCharts Simple, robust, extensible JavaScript charting library built using d3 designed to help developers embed, build charts in less than couple of

Imaginea 267 May 20, 2021
React + Canvas = Love. JavaScript library for drawing complex canvas graphics using React.

React Konva React Konva is a JavaScript library for drawing complex canvas graphics using React. It provides declarative and reactive bindings to the

konva 4.9k Jan 9, 2023
D3 (or D3.js) is a JavaScript library for visualizing data using web standards

D3 (or D3.js) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data.

D3 103.8k Jan 5, 2023
a graph visualization library using web workers and jQuery

arbor.js -------- Arbor is a graph visualization library built with web workers and jQuery. Rather than trying to be an all-encompassing framework, a

Christian Swinehart 2.6k Dec 19, 2022
Beautiful React SVG maps with d3-geo and topojson using a declarative api.

react-simple-maps Create beautiful SVG maps in react with d3-geo and topojson using a declarative api. Read the docs, or check out the examples. Why R

z creative labs 2.7k Dec 29, 2022
🍞🎨 Full-featured photo image editor using canvas. It is really easy, and it comes with great filters.

Full featured image editor using HTML5 Canvas. It's easy to use and provides powerful filters. Packages toast-ui.image-editor - Plain JavaScript compo

NHN 5.7k Jan 6, 2023
Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library

laravel-chartjs - Chart.js v2 wrapper for Laravel 5.x Simple package to facilitate and automate the use of charts in Laravel 5.x using the Chart.js v2

Felix Costa 473 Dec 15, 2022
An implementation of Bézier curve rendering and manipulation, using the HTML5 Canvas API.

Bézier Curves An implementation of Bézier curve rendering and manipulation, using the HTML5 Canvas API. How does it work? Bézier curves can be simply

nethe550 1 Apr 13, 2022
📸 Generate image using HTML5 canvas and SVG

egami → image README | 中文文档 Generate image using HTML5 canvas and SVG Fork from html-to-image Installation pnpm pnpm add egami npm npm i egami Usage i

weng 12 Jan 3, 2023
Demonstration of liquid effect on HTML Canvas using Matter.js and SVG Filters (Blur + Contrast)

Canvas Liquid Effect Demonstration of liquid (or gooey) effect on HTML Canvas using Matter.js and SVG Filters (feGaussianBlur and feColorMatrix). DEMO

Utkarsh Verma 78 Dec 24, 2022
Using ASP.NET Core, SignalR, and ChartJs to create real-time updating charts

Real-time Charts with ASP.NET Core, SignalR, and Chart.js This project shows how to update a real-time chart in your web browser using technologies li

Khalid Abuhakmeh 11 Nov 25, 2022
Simple HTML5 Charts using the tag

Simple yet flexible JavaScript charting for designers & developers Documentation Currently, there are two versions of the library (2.9.4 and 3.x.x). V

Chart.js 59.4k Jan 7, 2023
🦍• [Work in Progress] React Renderer to build UI interfaces using canvas/WebGL

React Ape React Ape is a react renderer to build UI interfaces using canvas/WebGL. React Ape was built to be an optional React-TV renderer. It's mainl

Raphael Amorim 1.5k Jan 4, 2023
A Simple Dashboard Chart in Laravel Nova using Chart JS

A Simple Dashboard Chart in Laravel Nova using Chart JS. Starting create your own dashboard with Chart JS Integration can save your time and help you maintain consistency across standard elements such as Bar, Stacked, Line, Area, Doughnut and Pie Chart.

Kuncoro Wicaksono 177 Jan 4, 2023
Lightweight, interactive planning tool that visualizes a series of tasks using an HTML canvas

Planner Lightweight, interactive planning tool that visualizes a series of tasks using an HTML canvas. Try it yourself at plannerjs.dev Plans created

Brian Vaughn 512 Jan 2, 2023