On Fri, Nov 27, 2015 at 8:18 PM, David Kennedy <[email protected]> wrote:
> ... snip ...
>
> In other words, before calling drw_text (which needs to know the width of the 
> thing to be drawn) on line 739, we call drw_text with no parameters on line 
> 733 to get the width of the thing to be drawn.
>
> I think it would be better if another function was defined to get the width, 
> and drw_text only had to draw the text. Then w could be a required parameter.
>

I agree, but keep in mind drw_text also handles fallback fonts, so it
calculates the width for it if needed. I'll accept a patch if it makes
the code simpler though ofcourse.

> Then again, drw_font_getexts_width already exists and could be used for this 
> purpose. But it overlaps the functionality provided by drw_font_getexts. 
> Maybe drw_font_getexts should be used wherever pixel dimensions are required.
>
> Thoughts? Should I just submit a patch?

Yes

Reply via email to