freetype-gl
freetype-gl copied to clipboard
makefont.c : "Multiple --texture parameters"
Hi. I am trying to run makefont to generate sdf texture. My cmd arguments look like this:
--font fonts/arial.ttf --header arial.h --size 32 --texture 512 --rendermode 'sdf'
But I am getting "Multiple --texture parameters"
For some reason the code compares my texture size to the default (128.0) inside --rendermode loop and exists with this strange error. Am I missing anything in my cmd arguments?
Just checked the source and I don't quite understand either. It seems you cannot have a texture size != 128 and this is quite weird.
Changed by @gustafsson but no idea why. Best would be to disable the test and see if it works. If so, can you make a PR to fix the problem?
Nope, not by me. But it seems @adrianbroher copied the block for parsing --texture
arguments when he created the block for parsing --rendermode
arguments here: https://github.com/rougier/freetype-gl/commit/75a05c4db4ea6a6db70f30d7a81d2a5626689ebf
I tested without that check and it works fine. Looks like someone forgot to remove it ))
On Tue, Jun 12, 2018, 10:06 Johan [email protected] wrote:
Nope, not by me. But it seems @adrianbroher https://github.com/adrianbroher copied the block for parsing --texture arguments when he created the block for parsing --rendermode arguments here: 75a05c4 https://github.com/rougier/freetype-gl/commit/75a05c4db4ea6a6db70f30d7a81d2a5626689ebf
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rougier/freetype-gl/issues/187#issuecomment-396487683, or mute the thread https://github.com/notifications/unsubscribe-auth/AAawgDyp-FoByTZfATvpbzQAXyYGuQKhks5t72hbgaJpZM4UhpNi .
@gustafsson Sorry @sasmaster an you make a PR?
I will.Need to fork this project first. because currently I use your code in a completely different project
https://github.com/sasmaster/FMG
Btw,I forgot to mention it, if I put the commands in this order:
--font "fonts/arial.ttf" --header "data/arial.h" --size 32 --rendermode "sdf" --texture 512
So that --texture is put last, then the cmd passes ok.
Anyway,I guess that chunk should be removed from the second place.
Nice project indeed
--texture must come after --rendermode because for some reason when --rendermode is passed there is a check that demads texture size to be 128
Fixed this here in this PR along with a few other improvements: https://github.com/rougier/freetype-gl/pull/213