fontlab.SmartCornerParameters
SmartCornerParameters
Data wrapper
A value wrapper for a font's Smart Corners settings. Read it from flPackage.smartCornerParameters, modify the copy, and assign it back to apply the settings.
import fontlab
fg_font = fontlab.CurrentFont()
if fg_font is not None:
package = fontlab.flPackage(fg_font)
parameters = package.smartCornerParameters
parameters.curvature = 0.67
parameters.inktrap_len = 2.0
package.smartCornerParameters = parameters
Construction and fields
SmartCornerParameters() uses native defaults: curvature=0.67, inktrap_len=2.0. Positional fields follow that order; keyword field initialization is also supported, for example SmartCornerParameters(curvature=0.7, inktrap_len=3.0).
| Field | Type | Access | Meaning |
|---|---|---|---|
curvature |
float | read/write | Curvature parameter used when constructing rounded corners. |
inktrap_len |
float | read/write | Native ink-trap length parameter. |
asTuple() returns the fields in constructor order; asDict() returns a dictionary snapshot. The wrapper supports indexing, item assignment and len(). Editing a snapshot does not update the font until it is assigned back. Direct model edits still need the usual history and change notifications.
For adding live corners to outlines, see flShape.
Native bases: object
Captured native MRO: SmartCornerParameters, object
Native new allocation evidence (not an init overload): (args, *kwargs) Create and return a new object. See help(type) for accurate signature.
Supplemental documentation:
A data wrapper with the single attribute curvature. The captured declaration exposes asDict (represent the object as a dictionary) and asTuple (represent it as a tuple).
Source: FontLab Proteus API documentation
Source: generated/fontlab.py: SmartCornerParameters captured declaration
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, /, *args: Any, **kwargs: Any) -> None |
Initialize self. (shared captured text) |
asDict |
function | (self, *args: Any, **kwargs: Any) -> Any |
Represent object as dictionary (shared captured text) |
asTuple |
function | (self, *args: Any, **kwargs: Any) -> Any |
Represent object as tuple (shared captured text) |
curvature |
attribute | Any |
(shared captured text) |
inktrap_len |
attribute | Any |