Re: font dialog error

[email protected] Thu, 04 Sep 2025 10:28:23 -0500
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 2025-08-29 16:34, John Selverian wrote:
> On Ubuntu when I enumerate the system fonts and go through them I
> get the following error in the cmd window:
> 
> 
> 
> 
> 
> X Error: code 16 major 140 minor 20: BadLength (poly request too
> large or internal Xlib length error).

Do you know what version of FOX this was?  Stuff with long strings
was recently fixed and on the linux side, there should be no buffer
length issues at this time.

The fix is two-fold:

1) FXTextField fix which now limits draw calls to visible area.  This 
should
    be well below buffer limits.

2) FXFont::getTextWidth() change which now measures utf8 character at a 
time.
    [basically implements exact commands that XftTextExtentsUtf8() was 
calling
    under the hood.

3) On Windows, limitations may still exist.  We've removed buffer 
limitations
    in FXDCWindow::drawText() and FXDCWindow::drawImageText() on windows.

Note: drawing APIs are less likely to hit the limits, but measuring APIs
like getTextWidth() are; optimal drawing should limit itself to visible
parts only, and we're now doing a bit more work to avoid drawing in
clipped areas; chiefly, this was FXTextField as FXText already does
this.

If you have custom widgets, perhaps they may have been drawing clipped
parts of text.  A typical screen, e.g. 4k, would only be able to show
a few hundreds of characters, even at really small font sizes.

   -- JVZ