From 3d5fbc0880db25a7ce819af9546a515cb02e24f4 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 24 Feb 2017 21:42:40 -0500 Subject: [PATCH] Checked empty strings on Pango. --- darwin/drawtext.m | 2 +- unix/drawtext.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/darwin/drawtext.m b/darwin/drawtext.m index c6bd9e86..e5f0d12e 100644 --- a/darwin/drawtext.m +++ b/darwin/drawtext.m @@ -207,7 +207,7 @@ void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y) } // TODO document that the width and height of a layout is not necessarily the sum of the widths and heights of its constituent lines -// TODO width doesn't include trailing whitespace... (TODO on which platforms?) +// TODO width doesn't include trailing whitespace... // TODO figure out how paragraph spacing should play into this void uiDrawTextLayoutExtents(uiDrawTextLayout *tl, double *width, double *height) { diff --git a/unix/drawtext.c b/unix/drawtext.c index d7a1d3ce..842b70dd 100644 --- a/unix/drawtext.c +++ b/unix/drawtext.c @@ -4,11 +4,13 @@ // TODO // - if the RTL override is at the beginning of a line, the preceding space is included? +// - nLines == 0: mostly works, except the width is wrong if the paragraph alignment is center or right... struct uiDrawTextLayout { PangoLayout *layout; GPtrArray *backgroundClosures; uiDrawTextLayoutLineMetrics *lineMetrics; + // TODO change everything to use this int nLines; };