From 644f9796c22aadecb29599fcf215a8e9a9ea1027 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 18 Oct 2005 09:32:23 +0000 Subject: LabelFormat filed width adjustments can be be negative to allow for small negative jerning of the fileds. --- generic/Attrs.c | 12 ++++++------ generic/Field.c | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/generic/Attrs.c b/generic/Attrs.c index 5b6a74f..bc64977 100644 --- a/generic/Attrs.c +++ b/generic/Attrs.c @@ -709,12 +709,12 @@ ZnLFCreate(Tcl_Interp *interp, if (num_tok != 4) { goto lf_error_syn; } - if (width < 0) { - width = 0; - } - if (height < 0) { - height = 0; - } + //if (width < 0) { + // width = 0; + //} + //if (height < 0) { + // height = 0; + //} field_struct.x_dim = CharToDim(x_char); field_struct.y_dim = CharToDim(y_char); diff --git a/generic/Field.c b/generic/Field.c index ee812a1..3b8eb5e 100644 --- a/generic/Field.c +++ b/generic/Field.c @@ -207,6 +207,9 @@ ComputeFieldAttachment(ZnFieldSet field_set, real_width = text_width < real_width ? real_width : text_width; } real_width += (ZnDim) width_spec; + if (real_width < 0) { + real_width = 0; + } break; } case ZN_LF_DIM_LABEL: @@ -247,6 +250,9 @@ ComputeFieldAttachment(ZnFieldSet field_set, real_height = text_height < real_height ? real_height : text_height; } real_height += (ZnDim) height_spec; + if (real_height < 0) { + real_height = 0; + } break; } case ZN_LF_DIM_LABEL: -- cgit v1.1