Giter Club home page Giter Club logo

Comments (5)

Mouvedia avatar Mouvedia commented on July 26, 2024

This version specifies that no PostScript name information is provided for the glyphs in this font file.

cf http://www.microsoft.com/typography/otspec/post.htm

I am getting the same error with Arial Unicode MS regular (ARIALUNI.TTF).
Would using the gh-pages one be a real downgrade?

The error seems to be that you don't handle version 3 there: https://github.com/nodebox/opentype.js/blob/a43a85ddccdc3560086b269a291cae1ed5ef8f51/src/tables/post.js#L24

Temporary fix: } else if (font.tables.post.version !== 3) { line 216

While you are it you could add version 4 as well.

from opentype.js.

fdb avatar fdb commented on July 26, 2024

@darionco sorry for the late reply. I'll look into it tomorrow. The gh-pages version is an older version and will be upgraded soon. I'll also fix any performance regressions in master. I've had to undo some performance optimizations to enable font writing.

@Mouvedia support for post version 3 seems like a good idea. While looking into format 4, the Apple site you mentioned states:

As a rule, format 4 'post' tables are no longer necessary and should be avoided.

So not really sure if it's worth it. Do you have fonts that require it? Could you send me one for testing?

from opentype.js.

Mouvedia avatar Mouvedia commented on July 26, 2024

Do you have fonts that require it?

Not yet.
Support for version 3 is essential I agree.

from opentype.js.

fdb avatar fdb commented on July 26, 2024

The performance you see for big fonts is because we add the Unicode code point and glyph name to each glyph. For large fonts, this causes some overhead.

In special cases, we could disable this post-processing step to speed up parsing when you don't need all the data in the glyph. Does this sound useful @darionco ?

from opentype.js.

darionco avatar darionco commented on July 26, 2024

@fdb Absolutely, although we do use some of the glyph data to layout the text, so an option to only parse metrics maybe? would that be sensible? if not, I believe the current performance is something we can work around.

from opentype.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.