Closed laerm0 closed 5 years ago
Yes, like the error said. You should import like this:
from cu2qu.ufo import fonts_to_quadratic
or if you like the fully qualified import:
import cu2qu.ufo
Then you use it like:
cu2qu.ufo.fonts_to_quadratic
BTW, why don’t you just use the cu2qu console script?
I changed my script to read:
from defcon import Font
from cu2qu.ufo import fonts_to_quadratic
# import ipdb; ipdb.set_trace()
light_font = Font('source/Open Sans-Light.ufo')
bold_font = Font('source/Open Sans-Bold.ufo')
extrabold_font = Font('source/Open Sans-ExtraBold.ufo')
lightcond_font = Font('source/Open Sans-Light Condensed.ufo')
boldcond_font = Font('source/Open Sans-Bold Condensed.ufo')
extraboldcond_font = Font('source/Open Sans-ExtraBold Condensed.ufo')
cu2qu.ufo.fonts_to_quadratic([light_font, bold_font, extrabold_font, lightcond_font, boldcond_font, extraboldcond_font])
Same error:
NameError: name 'cu2qu' is not defined
BTW, why don’t you just use the cu2qu console script?
I didn't know there was one. There's nothing about it in the readme.
if you did from cu2qu.ufo import fonts_to_quadratic
, then you call the function as fonts_to_quadratic
, without cu2qu.ufo
in front.
I didn't know there was one.
I believe I did mention it in our private email conversation.
There's nothing about it in the readme.
Fair enough :) We should add a reference to that in the README.md
Ahhhh, I see now. Sorry I missed that in the email thread. Thanks very much, I am good now. Sorry to bug you. :)
Np, feel free to "debug" me :)
Hello –
I was trying to use this on my Open Sans work but it looks like the skeleton of a script provided is incorrect. @felipesanches was helping me with the script and it looks like that the module isn't as documented in the readme.
My script:
running in
ipdb
: