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; };