Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 31094) +++ trunk/src/obj_common.c (revision 31095) @@ -161,6 +161,8 @@ } } +#define istrue(s) ((*(s) == '1') || (*(s) == 'y') || (*(s) == 'Y') || (*(s) == 't') || (*(s) == 'T')) + void pcb_obj_attrib_post_change(rnd_attribute_list_t *list, const char *name, const char *value) { pcb_any_obj_t *obj = (pcb_any_obj_t *)(((char *)list) - offsetof(pcb_any_obj_t, Attributes)); @@ -206,6 +208,10 @@ if (strcmp(arg, "role") == 0) obj->extobj_role = value; } + else if ((obj->type == PCB_OBJ_TEXT) && (strcmp(name, "tight_clearance") == 0)) { + pcb_text_t *t = (pcb_text_t *)obj; + t->tight_clearance = value == NULL ? 0 : istrue(value); + } } const char *pcb_obj_id_invalid(const char *id) Index: trunk/src/obj_text.h =================================================================== --- trunk/src/obj_text.h (revision 31094) +++ trunk/src/obj_text.h (revision 31095) @@ -44,6 +44,7 @@ rnd_coord_t thickness; /* if non-zero, thickness of line/arc within the font */ rnd_coord_t clearance; /* clearance around the object in polygon if flags have PCB_FLAG_CLEARLINE */ double rot; /* used when Direction is PCB_TEXT_FREEROT */ + unsigned tight_clearance:1; /* CACHED from attribute: when true, clearance is calculated to follow the true contour of the text; when false, the old, pre-v7 bbox based clearance is applied */ gdl_elem_t link; /* a text is in a list of a layer */ }; Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 31094) +++ trunk/src/polygon.c (revision 31095) @@ -432,7 +432,7 @@ static int SubtractText(pcb_text_t * text, pcb_poly_t * p) { poly_sub_text_t sctx; - int by_bbox = 1; TODO("v7textclr"); + int by_bbox = !text->tight_clearance; if (!PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, text)) return 0;