Limits of selection (Python API)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Limits of selection (Python API)

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Reply | Threaded
Open this post in threaded view
|

Re: Limits of selection (Python API)

Dave Crossland
I suggest using defcon (and trufont) for this kind of thing

On Feb 3, 2017 1:54 PM, "Abraham Lee" <[hidden email]> wrote:
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Reply | Threaded
Open this post in threaded view
|

Re: Limits of selection (Python API)

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.

Thanks,
Abraham

On Fri, Feb 3, 2017 at 8:49 PM, Dave Crossland <[hidden email]> wrote:
I suggest using defcon (and trufont) for this kind of thing

On Feb 3, 2017 1:54 PM, "Abraham Lee" <[hidden email]> wrote:
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Reply | Threaded
Open this post in threaded view
|

Re: Limits of selection (Python API)

Dave Crossland

On 4 February 2017 at 10:27, Abraham Lee <[hidden email]> wrote:
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.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
Reply | Threaded
Open this post in threaded view
|

Re: Limits of selection (Python API)

Abraham Lee


On Sat, Feb 4, 2017 at 2:00 PM, Dave Crossland <[hidden email]> wrote:

On 4 February 2017 at 10:27, Abraham Lee <[hidden email]> wrote:
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

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html