You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'd like to integrate some path routines I've written into the p5.Font class to handle conversion back and forth between paths (both opentype or svg) and points. This will allow people to do stuff like the little demo below. However, its a big chunk of code (~20k before minimization), so wanted to check that others thought this a good idea (some of it would likely be reusable in future PShape or PPath objects). Thoughts?
the demo is awesome!! what would you think about putting this functionality into an addon lib for now until we have a better sense where we're going with pshape / svg? (this is just a first reaction suggestion thinking about filesize, so please feel free to tell me why this doesn't make sense, and don't feel I'm trying to relegate this to an addon if it should be core.)
Thanks @lmccart I'm a bit conflicted on this question... There's an argument to be made that typography itself (beyond basic browser fonts) could be a separate addon, as it does add nontrivially to file size (the opentype lib, etc.) and is not a necessary component. Probably the ideal option would be a modernizr or lodash-style interface (as suggested in #94) where typography is a separate module that one can select or ignore. In this case, I would argue that the path stuff be included for sure, as its sort of a natural progression, once you have high quality font-data, to want to use it to manipulate letter forms (as above), in which case you need paths...
Any further thoughts on a module selection interface? @kadamwhite ?
@dhowe I'm not sure what the roadmap would need to look like to get us to Modernizr-style builds, but I do see your argument about typography being its own add-on. OpenType itself is already 81kb minified, and combined with the existing code (12kb minified) that's close to 40% of the total p5.min.js file size. That's probably something we should eventually at least let p5 users opt out of (i.e. make a custom build without the functionality), even if it stays part of the "default" core lib.
sorry for the silence... with option 2, how much of the core type stuff would we lose/move by doing this? I'm not totally sure what the best way to move forward is as I feel like the real solution here is to get the modernizr-style builds working, but I don't think I have the bandwidth for that in the near future.
For lack of any further discussion on this, I've created a PR for a smaller version of this functionality. I'm proposing this as an interim solution until we can do custom-builds or some other long-term solution (as discussed above)...
sounds good. sorry to take so long with this. i think we are waiting on the modular build thing which may not happen in the immediate future. this makes sense as a good interim solution.
does it make sense to close this issue then since we have one open for the modular build already?
Activity
lmccart commentedon Aug 11, 2015
the demo is awesome!! what would you think about putting this functionality into an addon lib for now until we have a better sense where we're going with pshape / svg? (this is just a first reaction suggestion thinking about filesize, so please feel free to tell me why this doesn't make sense, and don't feel I'm trying to relegate this to an addon if it should be core.)
dhowe commentedon Aug 30, 2015
Thanks @lmccart I'm a bit conflicted on this question... There's an argument to be made that typography itself (beyond basic browser fonts) could be a separate addon, as it does add nontrivially to file size (the opentype lib, etc.) and is not a necessary component. Probably the ideal option would be a modernizr or lodash-style interface (as suggested in #94) where typography is a separate module that one can select or ignore. In this case, I would argue that the path stuff be included for sure, as its sort of a natural progression, once you have high quality font-data, to want to use it to manipulate letter forms (as above), in which case you need paths...
Any further thoughts on a module selection interface? @kadamwhite ?
kadamwhite commentedon Aug 31, 2015
@dhowe I'm not sure what the roadmap would need to look like to get us to Modernizr-style builds, but I do see your argument about typography being its own add-on. OpenType itself is already 81kb minified, and combined with the existing code (12kb minified) that's close to 40% of the total p5.min.js file size. That's probably something we should eventually at least let p5 users opt out of (i.e. make a custom build without the functionality), even if it stays part of the "default" core lib.
dhowe commentedon Sep 8, 2015
So the options appear to be as follows (all compatible with the possibility of Modernizr-style builds at some point in the future):
Option 3 (what we have now) seems least appealing to me, as we still have the bloat of opentype, but not the full functionality
Other options, thoughts... @lmccart @kadamwhite ?
lmccart commentedon Sep 28, 2015
sorry for the silence... with option 2, how much of the core type stuff would we lose/move by doing this? I'm not totally sure what the best way to move forward is as I feel like the real solution here is to get the modernizr-style builds working, but I don't think I have the bandwidth for that in the near future.
dhowe commentedon Sep 28, 2015
basically we could no longer use external fonts, only built-in browser fonts
dhowe commentedon Dec 10, 2015
For lack of any further discussion on this, I've created a PR for a smaller version of this functionality. I'm proposing this as an interim solution until we can do custom-builds or some other long-term solution (as discussed above)...
lmccart commentedon Dec 11, 2015
sounds good. sorry to take so long with this. i think we are waiting on the modular build thing which may not happen in the immediate future. this makes sense as a good interim solution.
does it make sense to close this issue then since we have one open for the modular build already?
dhowe commentedon Jan 23, 2016
agreed, ready to close @lmccart