On 01/17/2017 08:51 AM, Jean-Marc Lasgouttes wrote:
> Le 17/01/2017 à 12:19, Enrico Forestieri a écrit :
>> This seems to be a Qt issue. QTextLine::naturalTextWidth() should report
>> the width of the line occupied by text. If a zero-width character is
>> present, it is correctly accounted for, except when it is the only
>> character in the line. That is to say that "/=" has the same width
>> as "=" if "/" has zero-width, but "/" by alone is reported to have
>> its real width. The metrics in math are computed char by char, so that
>> explains the behavior. The solution is to compute the width by using
>> the old method when when the font is one of ours. See attached patch.
>
> Hello Enroci,
>
> Thanks for the analysis. You patch is a solution, but wouldn't it more
> in line with what you propose to use width(s[0]) when there is only
> one character?

Thanks for your work on this, both of you. When you decide on a solution,
please feel free to commit to stable.

Richard

Reply via email to