Embedding TrueType fonts in PDF

I hacked the load_char method to accept a "flags" keyword

    > parameter. I hope I didn't break anything; is it safe to
    > use PyArg_ParseTupleAndKeywords with the C++ interface?

You shouldn't need to with the ft2font extension code, because it uses
pycxx which has support for kwarg handling. Eg in the _image.cpp src

  Py::Object resize(const Py::Tuple& args, const Py::Dict& kwargs);

Image::resize(const Py::Tuple& args, const Py::Dict& kwargs) {


  int norm = 1;
  if ( kwargs.hasKey("norm") ) norm = Py::Int( kwargs["norm"] );

  double radius = 4.0;
  if ( kwargs.hasKey("radius") ) radius = Py::Float( kwargs["radius"] );
  //snip snip snip

so you can easily add kwarg handling by changing the declaration to
accept a Py::Dict and then use the object with dictionary like
semantics. In the init_type function, you'll need to declare your
method as a kwarg method, eg

  add_keyword_method( "resize", &Image::resize, Image::resize__doc__);