Discussion:
[fontforge-users] Limits of selection (Python API)
Abraham Lee
2017-02-03 18:53:25 UTC
Permalink
Greetings, All!

I'm pretty sure I know the answer already to this question, but I'd be
pleasantly surprised if I'm wrong. Is it true that the lowest-level of
selection possible with the python API is the glyph object? If so, any idea
what it would take to extend selection abilities (within a glyph object)
down to the contour and point levels so one can do fine-grained
programmatic operations on individual contours rather than ALL contours? I
have programmed a bunch of functionality that *can* work on a glyph as a
whole, but I really, REALLY, wish I could do it to individual contours (and
their segments).

Frank? Dave? Many thanks in advance for your (or anyone else's) thoughts.

Best,
Abraham
Dave Crossland
2017-02-04 03:49:37 UTC
Permalink
I suggest using defcon (and trufont) for this kind of thing
Post by Abraham Lee
Greetings, All!
I'm pretty sure I know the answer already to this question, but I'd be
pleasantly surprised if I'm wrong. Is it true that the lowest-level of
selection possible with the python API is the glyph object? If so, any idea
what it would take to extend selection abilities (within a glyph object)
down to the contour and point levels so one can do fine-grained
programmatic operations on individual contours rather than ALL contours? I
have programmed a bunch of functionality that *can* work on a glyph as a
whole, but I really, REALLY, wish I could do it to individual contours (and
their segments).
Frank? Dave? Many thanks in advance for your (or anyone else's) thoughts.
Best,
Abraham
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
fontforge-users mailing list
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Abraham Lee
2017-02-04 15:27:54 UTC
Permalink
Thanks, Dave! I know very little about those. Would you mind sharing why
you feel they would be more suitable for 1) graphically selecting a
node/curve, 2) running an operation on it (or something around it), and 3)
updating the UI to reflect the change?

Perhaps you could show me a simple example? Even a script that
interactively moves a selected node to the right 10 units and its adjacent
control points down 25 units.

Thanks,
Abraham
Post by Dave Crossland
I suggest using defcon (and trufont) for this kind of thing
Post by Abraham Lee
Greetings, All!
I'm pretty sure I know the answer already to this question, but I'd be
pleasantly surprised if I'm wrong. Is it true that the lowest-level of
selection possible with the python API is the glyph object? If so, any idea
what it would take to extend selection abilities (within a glyph object)
down to the contour and point levels so one can do fine-grained
programmatic operations on individual contours rather than ALL contours? I
have programmed a bunch of functionality that *can* work on a glyph as a
whole, but I really, REALLY, wish I could do it to individual contours (and
their segments).
Frank? Dave? Many thanks in advance for your (or anyone else's) thoughts.
Best,
Abraham
Dave Crossland
2017-02-04 21:00:58 UTC
Permalink
Post by Abraham Lee
Thanks, Dave! I know very little about those. Would you mind sharing why
you feel they would be more suitable for 1) graphically selecting a
node/curve, 2) running an operation on it (or something around it), and 3)
updating the UI to reflect the change?
Perhaps you could show me a simple example? Even a script that
interactively moves a selected node to the right 10 units and its adjacent
control points down 25 units.
Trufont is all script, so you can script anything you want with it. There
is no difference between the packaged program and your script extension to
it.
Abraham Lee
2017-02-06 15:35:06 UTC
Permalink
Post by Dave Crossland
Post by Abraham Lee
Thanks, Dave! I know very little about those. Would you mind sharing why
you feel they would be more suitable for 1) graphically selecting a
node/curve, 2) running an operation on it (or something around it), and 3)
updating the UI to reflect the change?
Perhaps you could show me a simple example? Even a script that
interactively moves a selected node to the right 10 units and its adjacent
control points down 25 units.
Trufont is all script, so you can script anything you want with it. There
is no difference between the packaged program and your script extension to
it.
Interesting... I'll have to look into it a little bit more, then.

Thanks,
Abraham

Loading...