FLTK logo

Re: [fltk.coredev] RFC: Is issue #568 a problem or not?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: RFC: Is issue #568 a problem or not? Albrecht Schlosser Dec 02, 2022  
 
On 12/2/22 09:00 Greg Ercolano wrote:

I noticed text was off by +1 on x/y in my app, and could see it
in e.g. the fltk test/radio demo.

Opened issue #568:
https://github.com/fltk/fltk/issues/568

wcout mentioned it was probably the new use of Pango, and that seemed
to be the cause.


Hmm, I don't see that Pango is used in 1.3.x at all. I understand that you report that the same issue as in 1.4.x (using Pango) is already in 1.3.x (i.e. branch-1.3 after the release of 1.3.8). I doubt that this is the case. Or maybe I misunderstand your report.

Greg, can you please double check your findings? If it's related to Pango, then 1.3.x (git) should *not* be affected and you might want to edit your report.

But the question is: is this a given with pango, or is there actually a small x+1/y+1 offset bug?
If it's a given, I'll close the issue.

Curious what the opinion is.


I don't have a clear opinion. Generally I'd say that font sizes etc. can differ depending on platforms and you should never rely on a particular text fitting exactly in a button or whatever. There can always be small differences, and if you use different fonts you'll notice that the text can be much wider or smaller depending on the font (see the long text in your unittests comparison gif ("NOTE: On systems ...").

That said, if we can find out that we have - additionally to different font rendering - also a positioning (x+1, y+1) issue then we should try to fix the latter. But this could be really hard because bare X11 vs. Xft vs. Pango (Cairo) all use their different rendering and font width calculations.

Maybe Manolo can tell us more... (?)

One really notices this in apps where the buttons are small, where it's easy to see
when text is off, compared to previous releases. Trying to avoid refactoring a lot of code
to get things recentered.


In the unittests gif image  posted on GitHub it looks as if the left and right borders of fl_measure (red) vs. fl_text_extents (green) are - at least in some cases - offset by one pixel to the left or right side. This makes me believe that there could really be a positioning issue which could perhaps be fixed.

It would be interesting to see images made on Windows and macOS for comparison. ;-)

That said:

1. I did not test anything yet, my "opinions" above are based on what I see

2. IMPORTANT: if this is really an issue in 1.3.x (git branch-1.3) WRT. 1.3.8 then we should investigate and fix it in 1.3.9 which I intend to release soon because of the known compilation error in Visual Studio (which leads to unnecessary error reports).


--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/4e9c7838-efd8-a952-0c27-ed98218f8c1c%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.