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

Add support for quad curves in font writing #84

Closed
aui opened this issue Dec 28, 2014 · 4 comments
Closed

Add support for quad curves in font writing #84

aui opened this issue Dec 28, 2014 · 4 comments

Comments

@aui
Copy link

aui commented Dec 28, 2014

trueType use toBuffer () and download () method error.

BUG DEMO:

http://aui.github.io/demo/opentype.js/readwrite-ttf.html

@fdb
Copy link
Contributor

fdb commented Dec 28, 2014

Hi,

Thanks for the bug report. The error shows that quad curves are currently not supported.

A workaround is to use only fonts with bézier curves – that is, fonts that use CFF outlines. I know that's not always an option.

I'll add support for quad curves soon.

@aui
Copy link
Author

aui commented Dec 29, 2014

Thank you for your work, I'm looking forward to this feature!

@fdb fdb changed the title toBuffer() && download() BUG Add support for quad curves in font writing Jan 3, 2015
@zswang
Copy link
Contributor

zswang commented Jan 15, 2015

from https://raw.githubusercontent.com/DmitryBaranovskiy/raphael/master/raphael.js

 q2c = function (x1, y1, ax, ay, x2, y2) {
            var _13 = 1 / 3,
                _23 = 2 / 3;
            return [
                    _13 * x1 + _23 * ax,
                    _13 * y1 + _23 * ay,
                    _13 * x2 + _23 * ax,
                    _13 * y2 + _23 * ay,
                    x2,
                    y2
                ];
        }

@fdb
Copy link
Contributor

fdb commented Jan 17, 2015

This is fixed with #86, thanks @zswang!

@Connum Connum closed this as completed Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants