Closed felipesanches closed 9 years ago
Thanks! This looks good at a first glance. I will look deeper into it tomorrow.
I have some questions and requests:
OK. The tabs are probably reminescent of the copy&pasted python code. I'll fix that.
I will be glad to completely port all the other methods.
Bit of a side question, but, wouldn't porting defcon make more sense than robofab?
We are not porting all of robofab. These are just utilities like pens and some math functions (look at the names of it).
I will be glad to completely port all the other methods.
I'm not sure. Let's rather decide which ones we are going to use from these libs. For something like vectorLength
of arrayTools.js
I'd prefer to have more complete set of complex-number-math operations around. In metapolator we use math/Vector
which in turn uses https://github.com/graphicore/Complex and maybe we can have a better structured solution one day. So I wouldn't bother right now to port this.
I will be glad to completely port all the other methods.
Also, I think in the long run it's much better to use http://pomax.github.io/bezierjs/
please write in a comment at the top of the file what the source-file of the port is (github url + revision hash)
I checked you ports with several! versions of the source files. For bezierTools and arrayTools I'd prefer as a source: https://github.com/behdad/fonttools/blob/master/Lib/fontTools/misc/arrayTools.py and https://github.com/behdad/fonttools/blob/master/Lib/fontTools/misc/bezierTools.py as the projects are more actively maintained.
The pens should be from robofab (I don't understand how or when that temporary fork is supposed to end, but it is mentioned in the docstring): https://github.com/robofab-developers/robofab/blob/ufo3k/Lib/robofab/pens/boundsPen.py but with a hint to also check https://github.com/robofab-developers/robofab/blob/master/Lib/robofab/pens/boundsPen.py (as the first is the primary source of ufoJS but the second is more actively maintained)
Ok, I think we don't have to port all the missing stuff. But a short comment at the top of the files, near to the source statement about what functions are missing from the port would be good.
once you do consider bezierjs, I'll be happy to work in as many improvements as possible for fast (and efficient) computation as make sense for font purposes.
:dancer:
The .outline()
method is great, would love to have that :)
@Pomax awesome!
@Pomax Thanks! Your help offer is greatly appreciated :-) We have indeed some performance issues in Metapolator's current implementation (which uses ufoJS modules). We better deal with these improvements after we settle the OTF & UFO Export features there. Then, we'll be happy to have you help on profiling and performance improvements if you have those skills to offer.
The performance issues we have are far away from bezier math.
But we can use the outline stuff to make an alternative form of centerline-expansion :-)
@graphicore yeah, that's what I thought.
@graphicore Do you see any pending issue here, or can we already merge this?
Do you see any pending issue here
both pens have still tabs
A list of missing functions that are exported by the source modules but not by us would be really nice to have. At least we should acknowledge in the header comment that the port is not complete.
Anything else looks pretty good.
oh, yeah, sorry! That one slipped. I'll add these comments there.
no problem
(just the portions that are really needed for now):
These modules are all used to calculate the bounding box of glyphs during OTF export in Metapolator.