2

Background

My boss gave me a project he gave up on, it's a CFF/OTF font subsetting + embedding feature. There is no deadline(well, it's more of a research project than a feature request). So I started with sfntly library and extended CFF support to it. I think I'm still in the early stages of the project as I just got the decoder for the Top DICT finished. Soldiering on with Adobe reference manual...

Then I found a java project from apache fontbox that have the functionality that I need and even have some similar code structure despite it being a java. I just need to port it to C++ library.

Conundrum

So how does an experienced coder decide when he or she wants to port a library? Especially if he had already started on his own project and discovered a very similar project online? Would it be wise of me to continue my project or am I just re-inventing the wheel?

2

You'll have to look at it from a cost-benefit perspective, which is going to be specific to your project. What you're looking for is which will cost you less in effort over the long term. That said, I can give you a few things to consider.

Reasons to port:

  • You start with a ready-made, known-working (or at least believed-working) code base. This gives you the benefit of not having to re-learn what the authors learned during development.
  • Maintenance of the original code is offloaded someone else. All you have to do with changes is incorporate them into the ported version.
  • If you contribute the port back to the original project (think PyLucene or Lucy), the community may help maintain the port for you.

Reasons to write your own:

  • You own it and can use or license it as you see fit.
  • Changes happen on your schedule, not the project's.
  • Maintenance doesn't require someone who understands both the source and target languages.
1

You find the license of the library, give it to your boss, who gives it to your legal team, and they determine whether that license is acceptable for your purposes or not. For example, if the company is determined to create proprietary software, then a GPL licensed libary isn't any good to you.

At the same time, you download the library (if that is allowed), look at the source code, and determine what the code quality is. There's nothing worse than working around bugs in broken library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.