API Notes: CoreText framework
An introduction to PyObjC describes the general method for translating Objective-C calls into Python calls, including the handling of pass-by-reference arguments and buffers.
This document describes where the PyObjC bindings for this framework are different from the general rule, such as mentioning APIs that are not supported or where the interface is different than expected.
This function is not supported by PyObjC.
rangeargument must not be
This structure is not yet supported.
This function is not supported, because the ATS framework does not have wrappers.
This function returns a python tuple, not a
CFArrayRef. That’s because the C version returns a CFArray that doesn’t contain objects.
This returns a python string containing the actual value, you’ll have to decode this using the
structmodule to get at the real value.
Both API’s have a rather low-level interface in Python: you’ll have to encode the value to a python buffer (string), or decode it from such a buffer yourself using the
As a convenience the sizes of value types are defined as
sizeof_TYPE, for example
A special case is
kCTParagraphStyleSpecifierTabStops, it’s value should be an instance of
NSArraywhen using with
CTParagraphStyleCreate. Note that arbitrary Python sequences won’t work here.
CTParagraphStyleGetTabStopsto fetch the tabstops from a style object, using
CTParagraphStyleGetValueSpecifiekeris not supported with key
All types and constants definied in “SFNTLayoutTypes.h” and “SFNTTypes.h” are not yet supported
This function is only supported when the runDelegate argument was created in Python.
The first argument is a tuple with the
getWidthfunctions, the second argument is an arbitrary python object.