hershey Text

Post questions on how to use or achieve an effect in Inkscape.
max246
Posts: 2
Joined: Sat Jan 07, 2017 3:30 am

hershey Text

Postby max246 » Sat Jan 07, 2017 3:33 am

Is it possible to use a custom font for this extension? I google around but I couldnt find anything to parse a TTF to one of the array data sorted in the python file.

I would like to know if there is a way to convert my TTF so I can update the data.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: hershey Text

Postby Moini » Sun Jan 08, 2017 8:53 am

No, those are included as paths in the extension, look into the extension directory to find the file (or here: http://bazaar.launchpad.net/~inkscape.d ... heydata.py). You'd need to build one yourself, or find a different way to build them.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

max246
Posts: 2
Joined: Sat Jan 07, 2017 3:30 am

Re: hershey Text

Postby max246 » Mon Jan 09, 2017 12:45 am

Yep I have seen that file, but I am confused how to create that. Can i trace it over and export letter by letter and then add into that array ? Not sure how that array was created.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: hershey Text

Postby Moini » Mon Jan 09, 2017 4:02 am

Seems that's the biggest part of it. Also, there seems to be an additional 'Move' part, which moves to the start point of the letter from a predefined point (maybe the baseline, dunno). That's what the very first instruction in each path is for.

The structure for each single font is this:

font_name = ["path_data_for_char", "path_data_for_char", ...]
and the order of the letters is the same as when you print the glyph table.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”