Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to opentype.js #214

Closed
photopea opened this issue Aug 3, 2016 · 23 comments
Closed

Alternative to opentype.js #214

photopea opened this issue Aug 3, 2016 · 23 comments

Comments

@photopea
Copy link

photopea commented Aug 3, 2016

This is not a forum to advertise alternative projects.

@Jolg42
Copy link
Member

Jolg42 commented Aug 4, 2016

Hi!

Nice :) I just added it to the awesome-typography list (You can check this list for OpenType related libraries!).

If you want to check other alternatives to OpenType.js:

Both are OpenType parsers (not writers).

I searched for your issues, but maybe you used another account for them (I can't find any)?

By the way if you have a .zip with fonts working / not working it would be helpful for testing! 😉

@fdb
Copy link
Contributor

fdb commented Aug 4, 2016

Hi @photopea, always good to see some alternative implementations! As @Jolg42 mentioned, there are some other high-quality implementations as well. I'll look at your implementation to see if there are any speed gains we can port over to OpenType.js as well.

If there are specific issues you'd like to see solved, please take them up with me (again). I've been completing my PhD in the last year(s) so OpenType.js was not always my nr 1 priority 😉

@photopea
Copy link
Author

photopea commented Aug 4, 2016

The most important problem was this one: #117 . I was waiting more than a year, but nobody fixed it.
Here you can see the same 100 glyphs rendered with opentype and Typr
glyphs

@photopea
Copy link
Author

photopea commented Aug 4, 2016

I was testin Typr.js with fontsquirrel fonts, which I accessed through their API: https://www.fontsquirrel.com/blog/2010/12/the-font-squirrel-api

@fdb
Copy link
Contributor

fdb commented Aug 4, 2016

Looking at that issue, could you pinpoint what your parser is doing differently? I'd love to fix this.

Thanks for the link to the fontsquirrel API. Didn't know about that one.

@photopea
Copy link
Author

photopea commented Aug 4, 2016

When there is a CFF operator 14 (endchar) and stack length is 4, the "seac" (standard encoding accented character) command should be performed. Opentype does nothing. See http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5177.Type2.pdf page 35.

@fdb
Copy link
Contributor

fdb commented Aug 4, 2016

Thanks! I saw that was an issue with e.g. character index 202, which has the code [98, 146, 154, 236, 247, 89, 14] which sets up a stack with five numbers but then only does endchar. I was scratching my head on what that should do.

@Jolg42
Copy link
Member

Jolg42 commented Aug 4, 2016

I just did a dump from the API, all fonts are available here https://github.com/Jolg42/FontSquirrel-Fonts

@photopea
Copy link
Author

photopea commented Aug 4, 2016

Nice :) but I think it will be outdated like tomorrow :D

@Jolg42
Copy link
Member

Jolg42 commented Aug 4, 2016

Maybe…! But I don't think that the fonts are updated on regular basis.
They add more new fonts than they update the old ones no?
Having a dump is just easier for testing (even if outdated).

@behdad
Copy link

behdad commented Aug 4, 2016

Thanks! I saw that was an issue with e.g. character index 202, which has the code [98, 146, 154, 236, 247, 89, 14] which sets up a stack with five numbers but then only does endchar. I was scratching my head on what that should do.

What was the solution that worked? Early termination?

@fdb
Copy link
Contributor

fdb commented Aug 7, 2016

@behdad As @photopea mentioned, it should be interpreted as seac. We don't have code for this, I'll look into it.

@photopea
Copy link
Author

photopea commented Aug 7, 2016

Can you please also make sure, that you can render the glyph 190 in this font? I am having problems with it. https://ufile.io/0a748 BTW it really helped me when I looked at the code of FreeType library.

@ivarref
Copy link

ivarref commented Mar 17, 2018

Hi.

I wrote opentype.clj, a small wrapper for a subset of opentype.js. It runs on the Java Virtual Machine (JVM) and should be easy to interface using the Clojure programming language. Hope it's of good use to someone!

@Jolg42
Copy link
Member

Jolg42 commented Mar 29, 2018

Hi @photopea It's been a while since your last message and it looks like your ufile.io/0a748 is 404. Do you still have it somewhere?
The best would be to upload it with GitHub (See https://help.github.com/articles/file-attachments-on-issues-and-pull-requests/ basically just Drag & Drop)

@Jolg42
Copy link
Member

Jolg42 commented Mar 29, 2018

By the way @ivarref good job!
I'll add it to https://github.com/Jolg42/awesome-typography soon and also adding to OpenType.js' README would make sense.

@photopea
Copy link
Author

@Jolg42 I don't remember what was that file. Why do you still need it?

@Jolg42
Copy link
Member

Jolg42 commented Mar 29, 2018

@photopea I just wanted to try it again :)
By the way, I don't remember exactly but when you created Typr.js it was partly because of an issue with the parsing of some glyphs I think. Do you know if this issue was fixed in OpenType.js?

@photopea
Copy link
Author

photopea commented Mar 29, 2018

@Jolg42 Yes, I did it because some issues here were not fixed. It seemed to me like the author made opentype.js just for fun and did not plan to do updates.

I am the kind of programmer that prefers writing his own code instead of deciphering foreign code :D If I find a bug in Typr.js now, I can fix it right away myself. I made it because I actually need it in practice at www.Photopea.com . It is used by thousands of people every day and bugs have been found and fixed very quickly. In general, I trust Typr.js much more than opentype.js now . It is much more advanced, e.g. it even supports Color Fonts :) https://blog.photopea.com/color-fonts-in-photopea.html while being much smaller, faster and RAM-friendlier than opentype.js

@Connum
Copy link
Contributor

Connum commented Nov 25, 2023

The issue discussed above was fixed via #633. Closing.

@Connum Connum closed this as completed Nov 25, 2023
@CNV1018
Copy link

CNV1018 commented Jan 4, 2024

hi, can I check if it supports TTC file? can it display all characters in TTC files? Currently, I'm using opentype.js. It works well with TTF and OTF, but it doesn't support TTC file. I'm currently looking for other alternatives.

@photopea
Copy link
Author

photopea commented Jan 4, 2024

This is not a forum to advertise alternative projects.

@CNV1018
Copy link

CNV1018 commented Jan 5, 2024

That's great!! I'm working on a .NET Core project with React for the front end. Can this tool be implemented into the project?

@opentypejs opentypejs locked and limited conversation to collaborators Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants