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
{{ message }}
Repository navigation
changing fontStyle func to set all font attr and adding fontWeight func to set just font weight attr #394
I think fontStyle should set all the font attributes in 1 line like css's font property and while a new function named fontWeight should set the font's weight.
changed the title [-]changing fontStyle to set all font attr and a new fontWeight to set just font weight attr[/-][+]changing fontStyle func to set all font attr and adding fontWeight func to set just font weight attr[/+]on Oct 15, 2014
ah that must be it. there are no other comments on this so it seems not crucial enough to warrant deviating from the processing API. @dhowe what do you think, ok to close?
I really cant remember what problems I was running into when I thought of it this. I think I meant it'd be good to be able to set the font, size, weight, and style in one call/func like in css with font property
If we can clearly document this, it seems like a useful (additional) option at least for browser/system fonts, and we wouldn't have to change the API... @ekeneijeoma, maybe you can add a quick sketch to the examples/p5.Font dir to show a few examples of how it might work?
i'm not sure supporting all the variations of the css font property is necessary, perhaps for one-line-ness, chaining would be a more javascripty way to do it? textFont(foo).textStyle(BOLD).textSize(40)
Also being able to set the weight with numbers rather than just BOLD and NORMAL might be useful.
I just found myself having to change the font and weight for a project with heavy text layout a lot and thought it'd be great if I could do it in 1 line. @dhowe I was thinking something more like textStyle(FONT,WEIGHT,SIZE) where the weights are numbers with constants (LIGHT, BOLD, and etc). I think it should only use params that are already in the api.
I think this is easy enough to do manually using the underlying canvas api, I suggest we don't further bloat the API as there are already a lot of settings to keep track of. for example:
ah, I didn't realize processing does support 3d text. I don't think p5.js does currently (except for the 2d canvas solution) but I suppose eventually it should. in any case, I'd really prefer to flesh out the existing API and fix type related bugs before adding more possible cases. so unless someone is volunteering to implement this right now, I'd suggest we close it for now and revisit at some future point. sound ok?
Activity
[-]changing fontStyle to set all font attr and a new fontWeight to set just font weight attr[/-][+]changing fontStyle func to set all font attr and adding fontWeight func to set just font weight attr[/+]lmccart commentedon Sep 29, 2015
I'm not sure what this means exactly. I don't believe there is a
fontStyle()function currently?dhowe commentedon Sep 30, 2015
textStyle() ?
lmccart commentedon Oct 4, 2015
ah that must be it. there are no other comments on this so it seems not crucial enough to warrant deviating from the processing API. @dhowe what do you think, ok to close?
studioijeoma commentedon Oct 5, 2015
I really cant remember what problems I was running into when I thought of it this. I think I meant it'd be good to be able to set the font, size, weight, and style in one call/func like in css with font property
dhowe commentedon Oct 5, 2015
If we can clearly document this, it seems like a useful (additional) option at least for browser/system fonts, and we wouldn't have to change the API... @ekeneijeoma, maybe you can add a quick sketch to the examples/p5.Font dir to show a few examples of how it might work?
brysonian commentedon Oct 5, 2015
i'm not sure supporting all the variations of the css font property is necessary, perhaps for one-line-ness, chaining would be a more javascripty way to do it?
textFont(foo).textStyle(BOLD).textSize(40)Also being able to set the weight with numbers rather than just BOLD and NORMAL might be useful.
dhowe commentedon Oct 5, 2015
I guess the intent here is something like below?
studioijeoma commentedon Oct 7, 2015
I just found myself having to change the font and weight for a project with heavy text layout a lot and thought it'd be great if I could do it in 1 line. @dhowe I was thinking something more like textStyle(FONT,WEIGHT,SIZE) where the weights are numbers with constants (LIGHT, BOLD, and etc). I think it should only use params that are already in the api.
studioijeoma commentedon Oct 7, 2015
Also as far as I know a lot of those params/styles are only used in HTML ex: em, px/px, small-caps, and cursive.
lmccart commentedon Oct 12, 2015
I think this is easy enough to do manually using the underlying canvas api, I suggest we don't further bloat the API as there are already a lot of settings to keep track of. for example:
studioijeoma commentedon Oct 12, 2015
That works great for canvas but then what about WebGL? The problem is still
the same.
lmccart commentedon Oct 12, 2015
in webgl, couldn't you just use a canvas to create a texture that has text in it?
lmccart commentedon Oct 12, 2015
ah, I didn't realize processing does support 3d text. I don't think p5.js does currently (except for the 2d canvas solution) but I suppose eventually it should. in any case, I'd really prefer to flesh out the existing API and fix type related bugs before adding more possible cases. so unless someone is volunteering to implement this right now, I'd suggest we close it for now and revisit at some future point. sound ok?
dhowe commentedon Oct 12, 2015
sounds good to me
note: 3d text is another case where path-points for fonts comes in handy...
studioijeoma commentedon Oct 12, 2015
@dhowe right! you could also use divs which are usually better for labeling.