Open source work – Improve FontForge (Expert C programmers only) – Upwork

Hello!

I write this post as a representative of an open source software development grant.

This job is all about improving FontForge, an open source C program for editing fonts. In FontForge, there's a feature called "Expand Stroke". This takes a Bezier path, and makes two offsets, adds endcaps, and removes overlaps. See images attached.

As nice as this feature is, it's very buggy. We'd like to replace it with Inkscape's 2Geom code, at least the circular brush.

The initial project is to just replace the circular brush. Then we can discuss further improvements, such as a calligraphic mode and dashed lines, in future projects.

TECHNICAL INFORMATION BELOW

FontForge has its UI and functions split, to make things like this easier, where we want to replace some internal function with a new one or an external library. SplineSetStroke in CVStrokeIt is the function that bridges fontforgeexe/cvstroke.c (the UI code) and fontforge/splinestroke.c. You can pretty much totally ignore fontforge/splinestroke.c – the old code. It might help a little in understanding FontForge internals, but the spline math in it is not necessary for you to understand. All you have to do, from what I can see, is replace SplineSetStroke. It takes an unstroked SplineSet and returns a stroked one, that's it.

So, to be clear, if lib2geom alone is not enough to do this (it should be – take a look at the `scribble` example in its `toys` directory which shows how to use lib2geom to do path offsets), since this is for open source, we can vendorize as much Inkscape code as we want. Start here: https://gitlab.com/inkscape/inkscape/blob/f0c19696be05686219208abad41b29b7ce6601a6/src/helper/geom-pathstroke.cpp

So, to replace SplineSetStroke, you have to do these three things:

* Write a function that takes a SplineSet and returns a new SplineSet
* Inside that function, create two Bezier path offsets on the original path
* Close the path with end caps
* Remove overlap. It's OK to use FontForge's internal function for this, SplineSetRemoveOverlap. You may also use lib2geom's function if there is one.

Posted On: June 20, 2019 00:51 UTC
ID: 216629315
Category: Web, Mobile & Software Dev > Desktop Software Development
Skills: Desktop Applications
Country: Philippines
click to apply

Polish your skills. Be confident with your talent. Update your resume. Get a degree. Is your application letter ready?

Graphic artist and designer. Web designer. Flower arranger. Fashion designer. Advertising account executive.

Copy editor. Creative writer. Videographer. Photographer. Flash. Autocad. 2D. 3D. Freelance. Part time. Full time. Fresh graduate.

Get a job. Start your career right. Look for an opening. Choose the right company. Work abroad. Stay in the Philippines.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.