-
Notifications
You must be signed in to change notification settings - Fork 76
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 tiff loader to tipam [ex Document font-creation] #11
Comments
This still isn't finalized but will be part of the manual. |
I ended up writing code to do this (and some other 2d render to texture code) if you are interested, I'll put it up on github. |
Yes. Certainly interested. Is it python code that should be part of the pi3d library? Do you have access rights to contribute to this github? |
Yeah, it could be incorporated into the library. I committed my code up at https://github.com/dwarcher/pi3d/tree/RenderToTexture Unfortunately a lot of this work was done on an older version of pi3d so some merging needs to be done. The ttf loader may not be working 100% right now, but there are some other useful things like some drawing functions for drawing fonts and textures into another texture (useful if you are trying to do dynamic textures, texture animations, HUD's, etc). |
put dwarcher's tiff loader into tipam |
The Ttffont class is now implemented. Seems generally a better system which should be the default. Apart from integrating it with the new texture system there were 3 tweaks (if you want to fix this in the old version of pi3d though I would recommend upgrading at this stage): making the start point at the bottom left (as opposed to top left) of each character, adding a small gap to cope with overlapping italics (not sure why this happens, poss bug in ImageFont module) and adding the draw colour to ImageDraw.text() Also fixed 'if ch > 0:' in String that scrambled text when ch == 0, i.e. a space! |
Cool, thanks for the bugfixes! |
I have some TTFs that I'd like to use as fonts - what's the best way to turn them into PNG's that are usable as fonts? I was looking at the code and it looks like you are encoding the height and width so I'm guessing these aren't standard PNG's.
The text was updated successfully, but these errors were encountered: