-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Font paths to points #844
Comments
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. |
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 ? |
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. |
basically we could no longer use external fonts, only built-in browser fonts |
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. |
agreed, ready to close @lmccart |
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?
http://rednoise.org/GlyphFlock/
The text was updated successfully, but these errors were encountered: